:root {
  --primary: #1c398e;
  --primary-glow: rgba(28, 57, 142, 0.3);
  --primary-hover: #152b6b;
  --bg: #fafafa;
  --bg-subtle: #ffffff;
  --fg: #09090b;
  --muted: #52525b;
  --border: rgba(228, 228, 231, 0.8);
  --card-bg: rgba(255, 255, 255, 0.7);
  --radius-xl: 2rem;
  --radius-lg: 1.5rem;
  --radius-md: 1rem;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
  --shadow-premium: 0 25px 50px -12px rgba(0, 0, 0, 0.08);
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(255, 255, 255, 0.5);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  background-image: 
    radial-gradient(at 0% 0%, rgba(28, 57, 142, 0.03) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(28, 57, 142, 0.03) 0px, transparent 50%);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Typography */
h1 {
  font-size: clamp(3rem, 8vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.95;
  margin-bottom: 2rem;
  color: var(--fg);
}

h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

p {
  color: var(--muted);
  font-size: 1.125rem;
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  border: none;
  gap: 0.75rem;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 10px 20px -10px var(--primary-glow);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -10px var(--primary-glow);
}

.btn-outline {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--fg);
}

.btn-outline:hover {
  background-color: #f4f4f5;
  border-color: var(--fg);
  transform: translateY(-2px);
}

/* Layout Sections */
.nav-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.5rem 1rem;
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  height: 4.5rem;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--radius-lg);
  background-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.08);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s;
}

.nav-logo:hover {
  opacity: 0.8;
}

.badge-beta {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: rgba(28, 57, 142, 0.1);
  color: var(--primary);
  border: 1px solid rgba(28, 57, 142, 0.2);
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  padding: 0.5rem 1rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  transition: all 0.2s;
}

.nav-link:hover {
  color: var(--fg);
  background: #f4f4f5;
}

header {
  display: none; /* We use .nav-fixed instead */
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.hero {
  padding: 12rem 0 8rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  background-color: var(--bg);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.glow-orb {
  position: absolute;
  filter: blur(80px);
  border-radius: 50%;
  animation: float 20s infinite alternate ease-in-out;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(2vw, 2vh) scale(1.1); }
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.badge-premium {
  display: inline-flex;
  padding: 0.5rem 1rem;
  background: rgba(28, 57, 142, 0.05);
  border: 1px solid rgba(28, 57, 142, 0.1);
  border-radius: 9999px;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.hero-subtext {
  max-width: 900px;
  margin: 0 auto 3rem;
  font-size: 1.25rem;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  align-items: center;
}

.btn-lg {
  padding: 1.25rem 2.5rem;
  font-size: 1.125rem;
}

.section {
  padding: 6rem 0;
}

/* Animations */
.reveal {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

body.js-enabled .reveal {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

body.js-enabled .reveal.active {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

.hover-lift {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
}

.grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card-icon {
  width: 3rem;
  height: 3rem;
  background: rgba(28, 57, 142, 0.05);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--primary);
  border: 1px solid rgba(28, 57, 142, 0.1);
}

.pricing-tab {
  border-radius: 9999px;
  padding: 0.5rem 1.5rem;
  font-size: 0.875rem;
}

.pricing-tab.active-tab {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Cards */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Pricing Card Special */
.pricing-card {
  display: flex;
  flex-direction: column;
}

.pricing-card .price {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 1rem 0;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.original-price {
  text-decoration: line-through;
  color: var(--muted);
  font-size: 1.25rem;
  font-weight: 400;
}

.pricing-card .price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--muted);
}

.pricing-card ul {
  list-style: none;
  margin: 1.5rem 0;
  flex-grow: 1;
}

.pricing-card li {
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
}

.pricing-card li::before {
  content: "✓";
  color: var(--primary);
  font-weight: bold;
}

.pricing-card li.no-tick::before {
  content: none;
}

.badge-popular {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: var(--primary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 10px rgba(28, 57, 142, 0.2);
}

.card-featured {
  border: 2px solid var(--primary) !important;
  box-shadow: 0 20px 40px -12px rgba(28, 57, 142, 0.15) !important;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.modal {
  background: white;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 440px;
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(28, 57, 142, 0.1);
}

.footer-main {
  padding: 4rem 0;
  background-color: var(--bg);
  border-top: 1px solid var(--border);
  font-family: var(--font-sans);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-section h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
  color: var(--fg);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
  }
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-icon {
  color: var(--muted);
  transition: color 0.2s;
}

.social-icon:hover {
  color: var(--fg);
}

/* Mobile Menu Premium Styles */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-content {
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100%;
  background: white;
  z-index: 101;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-overlay.active .mobile-menu-content {
  right: 0;
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.mobile-menu-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--primary);
}

.mobile-menu-close {
  background: #f4f4f5;
  border: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--fg);
  transition: background 0.2s;
}

.mobile-menu-close:hover {
  background: #e4e4e7;
}

.mobile-link {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--fg);
  text-decoration: none;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--fg);
}

@media (max-width: 1024px) {
  .nav-links.desktop {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
}

/* Responsive Utilities */
/* Browser Mockup */
.browser-mockup {
  max-width: 1000px;
  margin: 4rem auto;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
}

.browser-header {
  background: #f1f5f9;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between; /* Added for perfect centering */
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.browser-dots {
  display: flex;
  gap: 0.5rem;
  width: 80px; /* Adjusted to balance header */
}

.browser-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.browser-dots span:nth-child(1) { background: #ff5f56; }
.browser-dots span:nth-child(2) { background: #ffbd2e; }
.browser-dots span:nth-child(3) { background: #27c93f; }

.browser-url {
  background: #ffffff;
  padding: 0.4rem 1.5rem;
  border-radius: 9999px; /* Bubble style as requested */
  font-size: 0.75rem;
  color: #64748b;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.05);
  min-width: 280px;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.01em;
}

.browser-header-end {
  width: 80px; /* Match browser-dots for symmetry */
}

.browser-content-area {
  display: flex;
  flex-direction: row;
  background: #f9fafb;
}

.browser-sidebar-mock {
  width: 200px; /* Slightly wider to accommodate lines */
  background: #f3f4f6;
  border-right: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  gap: 0.85rem;
}

.sidebar-item {
  height: 0.65rem; /* Back to lines */
  background: #e5e7eb;
  border-radius: 4px;
}

.browser-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  background: #ffffff;
}

.browser-footer {
  padding: 1rem 0 1.5rem; /* Thinner footer area */
  background: #ffffff;
}

.chat-input-mock {
  max-width: 750px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #9ca3af;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.chat-buttons-wrapper {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.chat-send-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  cursor: pointer;
}

.chat-send-icon.safai-send {
  background: #7c3aed; /* Branded Purple */
  color: white;
  width: auto;
  padding: 0 1rem;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(124, 58, 237, 0.3);
}

.chat-send-icon.chatgpt-send {
  background: #000;
  color: #fff;
  width: 32px;
  height: 32px;
}

.chatgpt-orb {
  width: 12px;
  height: 12px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255,255,255,0.8);
}

.chat-send-icon:hover {
  transform: translateY(-1px);
}

.chat-send-icon.safai-send:hover {
  box-shadow: 0 4px 8px rgba(28, 57, 142, 0.3);
}

/* Comparison Slider */
.comparison-slider {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  cursor: ew-resize;
  background: #fff;
}

.slider-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  line-height: 1.6;
  overflow: hidden;
}

.chat-message-wrapper {
  display: flex;
  gap: 1.25rem;
  max-width: 750px;
  width: 100%;
}

.chat-avatar-mock {
  width: 36px;
  height: 36px;
  background: #10a37f;
  color: white;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.chat-message-wrapper p {
  margin: 0;
  text-align: left;
  color: #374151;
}

.img-before {
  background: #fff8f8;
  color: #1a1a1b;
  z-index: 2;
  width: 100%;
  clip-path: inset(0 50% 0 0);
  overflow: hidden;
}

.img-after {
  background: #f8fafc;
  color: #1a1a1a;
  z-index: 1;
  width: 100%;
}

.slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: var(--primary);
  z-index: 3;
  transform: translateX(-50%);
}

.slider-button {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 48px;
  height: 48px;
  background: var(--primary);
  border-radius: 50%;
  z-index: 4;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 0 0 8px rgba(28, 57, 142, 0.1);
}

.label-before, .label-after {
  position: absolute;
  bottom: 1.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  z-index: 5;
}

.label-before { left: 1.5rem; color: #ef4444; z-index: 10; }
.label-after { right: 1.5rem; color: var(--primary); z-index: 10; }

.token-highlight {
  background: rgba(28, 57, 142, 0.05);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
  border: 1px solid rgba(28, 57, 142, 0.15);
}

.pii-highlight {
  background: rgba(239, 68, 68, 0.05);
  color: #ef4444;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
  border: 1px solid rgba(239, 68, 68, 0.15);
}

/* Semantic Colors */
.token-person, .pii-person { background: rgba(139, 92, 246, 0.05); color: #7c3aed; border-color: rgba(139, 92, 246, 0.15); }
.token-org, .pii-org { background: rgba(28, 57, 142, 0.05); color: var(--primary); border-color: rgba(28, 57, 142, 0.15); }
.token-location, .pii-location { background: rgba(16, 185, 129, 0.05); color: #059669; border-color: rgba(16, 185, 129, 0.15); }
.token-email, .pii-email { background: rgba(245, 158, 11, 0.05); color: #d97706; border-color: rgba(245, 158, 11, 0.15); }
.token-phone, .pii-phone { background: rgba(6, 182, 212, 0.05); color: #0891b2; border-color: rgba(6, 182, 212, 0.15); }
.token-project, .pii-project { background: rgba(236, 72, 153, 0.05); color: #db2777; border-color: rgba(236, 72, 153, 0.15); }
.token-money, .pii-money { background: rgba(34, 197, 94, 0.05); color: #16a34a; border-color: rgba(34, 197, 94, 0.15); }

@media (max-width: 768px) {
  .comparison-slider { height: 300px; }
  .slider-img { font-size: 0.9rem; padding: 1.5rem; }
}

.hidden { display: none !important; }
