:root {
  --nexai-dark: #11212D;
  --nexai-light: #E5EDF1;
  --nexai-white: #FFFFFF;

  --font-base: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  --font-title: var(--font-base);
}

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

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-base);
  overflow-x: hidden;
  width: 100vw;
  line-height: 1.6;

  /* Default (dark) section tokens — flipped by .on-light */
  --bg: var(--nexai-dark);
  --surface: rgba(255, 255, 255, 0.03);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --text-main: var(--nexai-white);
  --text-muted: rgba(255, 255, 255, 0.65);
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.28);
  --chip-bg: var(--nexai-light);
  --chip-fg: var(--nexai-dark);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  --shadow-hover: 0 20px 44px rgba(0, 0, 0, 0.38);

  background: var(--bg);
  color: var(--text-main);
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: var(--font-base); cursor: pointer; border: none; background: transparent; }
img { max-width: 100%; display: block; }

a:focus-visible, button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 4px;
}

/* Motion — scroll-in reveal, one-shot and subtle */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s cubic-bezier(.16,.84,.44,1), transform 0.65s cubic-bezier(.16,.84,.44,1);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee-track { animation: none; }
  * { scroll-behavior: auto !important; }
}

/* Section flip: Nexai Light background, Nexai Dark ink */
.on-light {
  --bg: var(--nexai-light);
  --surface: #ffffff;
  --surface-hover: #ffffff;
  --text-main: var(--nexai-dark);
  --text-muted: rgba(17, 33, 45, 0.65);
  --border: rgba(17, 33, 45, 0.1);
  --border-strong: rgba(17, 33, 45, 0.28);
  --chip-bg: var(--nexai-dark);
  --chip-fg: var(--nexai-white);
  --shadow: 0 4px 20px rgba(17, 33, 45, 0.07);
  --shadow-hover: 0 20px 40px rgba(17, 33, 45, 0.14);

  background: var(--bg);
  color: var(--text-main);
}

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; position: relative; }

/* Typography */
.gradient-text {
  background: linear-gradient(135deg, var(--text-main) 0%, var(--text-muted) 50%, var(--text-main) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.section-title { font-family: var(--font-title); font-size: clamp(32px, 5vw, 48px); font-weight: 700; text-align: center; margin-bottom: 20px; line-height: 1.12; letter-spacing: -0.5px; }
.section-title-accent { width: 56px; height: 3px; border-radius: 2px; background: var(--text-main); opacity: 0.5; margin: 0 auto 32px; }
.section-sub { font-size: 18px; color: var(--text-muted); text-align: center; max-width: 600px; margin: 0 auto 60px auto; }

/* Navbar (always dark, independent of section behind it) */
.navbar { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; transition: background 0.3s, padding 0.3s, box-shadow 0.3s; padding: 22px 0; border-bottom: 1px solid transparent; }
.navbar.scrolled { background: rgba(17, 33, 45, 0.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding: 14px 0; border-bottom-color: rgba(255, 255, 255, 0.08); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25); }
.nav-content { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: 12px; font-family: var(--font-title); font-size: 19px; font-weight: 700; color: #fff; }
.logo-icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; }

.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a:not(.btn) { position: relative; font-size: 14px; font-weight: 500; color: rgba(255, 255, 255, 0.65); transition: color 0.2s; }
.nav-links a:not(.btn)::after { content: ''; position: absolute; left: 0; bottom: -6px; width: 0; height: 1.5px; background: #fff; transition: width 0.25s ease; }
.nav-links a:not(.btn):hover { color: #fff; }
.nav-links a:not(.btn):hover::after { width: 100%; }
.menu-toggle { display: none; color: #fff; }
.logo-icon img { transition: transform 0.3s ease; }
.logo:hover .logo-icon img { transform: scale(1.08); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 24px; border-radius: 8px; font-weight: 600; font-size: 14px; transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
.btn-lg { padding: 16px 32px; font-size: 16px; border-radius: 12px; }
.btn-primary { background: var(--text-main); color: var(--bg); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn-secondary { background: var(--surface-hover); color: var(--text-main); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--surface); border-color: var(--border-strong); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--text-main); border: 1px solid var(--border-strong); }
.btn-outline:hover { background: var(--text-main); color: var(--bg); }
.full-width { width: 100%; }

/* Navbar contact button stays legible even before the navbar has a solid background */
.nav-btn.btn-outline { border-color: rgba(255, 255, 255, 0.3); color: #fff; }
.nav-btn.btn-outline:hover { background: #fff; color: var(--nexai-dark); }

/* Hero */
.hero { padding: 168px 24px 88px; position: relative; overflow: hidden; text-align: center; }
.hero-bg-layer { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.hero-content { position: relative; z-index: 2; max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 8px; background: var(--surface-hover); border: 1px solid var(--border); padding: 7px 16px; border-radius: 100px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 32px; color: var(--text-main); }
.badge-dot { width: 6px; height: 6px; background: var(--text-main); border-radius: 50%; }
.hero-title { font-family: var(--font-title); font-size: clamp(40px, 6vw, 76px); font-weight: 800; line-height: 1.06; margin-bottom: 24px; letter-spacing: -2px; }
.hero-subtitle { font-size: 18px; color: var(--text-muted); line-height: 1.65; max-width: 600px; margin-bottom: 32px; }
.hero-checks { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; margin-bottom: 48px; }
.hero-checks span { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--text-main); }
.hero-checks svg { color: var(--text-main); flex-shrink: 0; }
.hero-actions { display: flex; gap: 16px; justify-content: center; }

/* Glow orbs (single-color radial fade → transparent, no cross-brand gradients) */
.glow-orb { position: absolute; border-radius: 50%; filter: blur(110px); opacity: 0.12; pointer-events: none; }
.glow-orb.top-left { width: 500px; height: 500px; background: var(--nexai-light); top: -120px; left: -100px; }
.glow-orb.center { width: 600px; height: 600px; background: var(--nexai-white); top: 15%; left: 50%; transform: translateX(-50%); opacity: 0.06; }

/* Static grid, scoped to whichever section hosts it (hero) */
.grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center top, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center top, black 0%, transparent 70%);
}

/* Marquee */
.marquee-section { padding: 36px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface); text-align: center; }
.marquee-label { font-size: 13px; color: var(--text-muted); margin-bottom: 22px; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600; }
.marquee { overflow: hidden; width: 100vw; margin-left: calc(-50vw + 50%); mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent); }
.marquee-track { display: flex; gap: 32px; width: max-content; animation: scroll-marquee 40s linear infinite; }
.marquee-track span { font-family: var(--font-base); font-size: 13px; font-weight: 800; color: var(--text-muted); letter-spacing: 1.5px; text-transform: uppercase; }
@keyframes scroll-marquee { 0% { transform: translateX(0); } 100% { transform: translateX(calc(-50% - 16px)); } }

/* Cards Base — colors/elevation resolve automatically via the section's tokens */
.metric-card, .feature-card, .process-card, .pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.metric-card:hover, .feature-card:hover, .process-card:hover, .pricing-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-hover);
}

/* Sections */
.problem-section, .features, .process-section, .pricing { padding: 128px 0; }

/* Problem Section */
.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; }
.metric-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--chip-bg); color: var(--chip-fg); display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.metric-icon svg { width: 24px; height: 24px; }
.metric-card h3 { font-family: var(--font-title); font-size: 20px; font-weight: 700; margin-bottom: 12px; }
.metric-card p { font-size: 14px; color: var(--text-muted); }

/* Features */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.feature-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--chip-bg); color: var(--chip-fg); display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.feature-icon svg { width: 24px; height: 24px; }
.feature-card h3 { font-family: var(--font-title); font-size: 21px; font-weight: 700; margin-bottom: 12px; }
.feature-card p { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; min-height: 42px; }
.feature-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.feature-tags span { font-size: 11px; font-family: var(--font-base); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; background: var(--surface-hover); padding: 4px 10px; border-radius: 4px; color: var(--text-muted); border: 1px solid var(--border); }

/* Process — large "ghost numeral" motif borrowed from the brand manual's section covers */
.process-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.process-num { font-family: var(--font-title); font-size: 56px; font-weight: 800; color: var(--text-main); opacity: 0.16; margin-bottom: 8px; line-height: 1; letter-spacing: -1px; }
.process-card h3 { font-family: var(--font-title); font-size: 20px; font-weight: 700; margin-bottom: 12px; }
.process-card p { font-size: 14px; color: var(--text-muted); }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; }
.pricing-card { display: flex; flex-direction: column; }
.pricing-card.premium { border-color: var(--border-strong); background: linear-gradient(180deg, var(--surface-hover) 0%, var(--surface) 100%); box-shadow: var(--shadow-hover); }
.popular-tag { font-size: 11px; font-family: var(--font-base); font-weight: 700; letter-spacing: 0.5px; color: var(--chip-fg); background: var(--chip-bg); display: inline-block; padding: 4px 12px; border-radius: 100px; margin-bottom: 16px; align-self: flex-start; }
.pricing-card h3 { font-family: var(--font-title); font-size: 23px; font-weight: 700; margin-bottom: 12px; }
.pricing-desc { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; min-height: 42px; }
.pricing-features { flex: 1; margin-bottom: 32px; }
.pricing-features li { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; font-size: 14px; color: var(--text-main); }
.pricing-features li svg { color: var(--text-main); opacity: 0.7; flex-shrink: 0; margin-top: 2px; width: 20px; height: 20px; }

/* CTA Section */
.cta-section { padding: 108px 24px; text-align: center; }
.cta-section h2 { font-family: var(--font-title); font-size: clamp(28px, 4vw, 40px); font-weight: 700; margin-bottom: 16px; letter-spacing: -0.5px; }
.cta-section p { font-size: 16px; color: var(--text-muted); max-width: 600px; margin: 0 auto 32px; }
.mt-4 { margin-top: 32px; }

/* Footer — always Nexai Dark, single-color accents only (no external colors) */
.site-footer { background: var(--nexai-dark); color: #fff; position: relative; }
.footer-accent-line { height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent); }
.footer-inner { padding: 80px 24px 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 60px; max-width: 1200px; margin: 0 auto; padding-bottom: 56px; }
.footer-brand-row { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.footer-brand-row img { width: 36px; height: 36px; object-fit: contain; }
.footer-brand-row span { font-family: var(--font-title); font-weight: 700; font-size: 21px; color: #fff; }
.footer-desc { font-size: 14px; color: rgba(255, 255, 255, 0.55); line-height: 1.8; margin-bottom: 24px; max-width: 380px; }
.footer-socials { display: flex; gap: 10px; }
.footer-socials a { width: 40px; height: 40px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.1); display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, 0.55); transition: all 0.25s ease; }
.footer-socials a:hover { background: var(--nexai-light); color: var(--nexai-dark); border-color: var(--nexai-light); transform: translateY(-3px); }
.footer-heading { font-family: var(--font-title); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: rgba(255, 255, 255, 0.35); margin-bottom: 22px; }
.footer-nav { display: flex; flex-direction: column; gap: 16px; }
.footer-nav a { font-size: 15px; color: rgba(255, 255, 255, 0.6); transition: all 0.2s ease; display: inline-block; }
.footer-nav a:hover { color: #fff; transform: translateX(4px); }
.footer-contact { display: flex; flex-direction: column; gap: 18px; }
.footer-contact-item { display: flex; align-items: center; gap: 12px; }
.footer-contact-item svg { flex-shrink: 0; color: var(--nexai-light); }
.footer-contact-label { font-size: 11px; color: rgba(255, 255, 255, 0.35); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.footer-contact-item a, .footer-contact-item p { font-size: 14px; color: rgba(255, 255, 255, 0.75); transition: color 0.2s; }
.footer-contact-item a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.08); max-width: 1200px; margin: 0 auto; padding: 24px 0; display: flex; justify-content: center; align-items: center; font-size: 13px; color: rgba(255, 255, 255, 0.35); text-align: center; }

@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .footer-brand-row { justify-content: center; }
  .footer-desc { max-width: none; margin-left: auto; margin-right: auto; }
  .footer-socials { justify-content: center; }
  .footer-contact-item { justify-content: center; }
  .footer-nav a:hover { transform: none; }
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .hero-checks { flex-direction: column; gap: 12px; align-items: center; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  .nav-links { position: fixed; top: 72px; left: 0; width: 100%; background: rgba(17, 33, 45, 0.98); backdrop-filter: blur(14px); flex-direction: column; padding: 32px 24px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); transform: translateY(-100%); opacity: 0; pointer-events: none; transition: all 0.3s ease; }
  .nav-links.active { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .menu-toggle { display: block; }
}

@media (max-width: 600px) {
  .hero { padding: 124px 16px 64px; }
  .container { padding: 0 16px; }
  .problem-section, .features, .process-section, .pricing { padding: 84px 0; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; }
  .metric-card, .feature-card, .process-card, .pricing-card { padding: 24px; }
  .cta-section { padding: 84px 16px; }
  .footer-inner { padding: 64px 24px 0; }
  .footer-contact-item svg { display: none; }
}
