/* ============================================================
   NeuroLingo, marketing site styles
   Design system: dark, premium, connection-themed
   ============================================================ */

/* ----------  Design tokens  ---------- */
:root {
  /* Color */
  --bg:            #07090f;
  --bg-elev:       #0c1020;
  --surface:       rgba(255, 255, 255, 0.035);
  --surface-2:     rgba(255, 255, 255, 0.06);
  --border:        rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);

  --text:          #eaeefb;
  --text-muted:    #9aa6c2;
  --text-faint:    #6b768f;

  --primary:       #7c6cff;
  --primary-soft:  #a99fff;
  --accent:        #3dd7d0;
  --accent-soft:   #7ef0e8;
  --pink:          #ff7eb6;

  --grad:          linear-gradient(120deg, var(--primary) 0%, var(--accent) 100%);
  --grad-text:     linear-gradient(120deg, #b9b2ff 0%, #7ef0e8 60%, #3dd7d0 100%);

  /* Type */
  --font-display:  "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body:     "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* Spacing / layout */
  --maxw:          1140px;
  --radius:        18px;
  --radius-sm:     12px;
  --radius-lg:     28px;

  /* Motion */
  --ease:          cubic-bezier(0.22, 1, 0.36, 1);

  --shadow-soft:   0 24px 60px -20px rgba(5, 8, 20, 0.8);
  --shadow-glow:   0 0 60px -10px rgba(124, 108, 255, 0.45);
}

/* ----------  Reset / base  ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
}

p { margin: 0; }

a {
  color: var(--accent-soft);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
a:hover { color: var(--accent); }

img, svg { display: block; max-width: 100%; }

::selection {
  background: rgba(124, 108, 255, 0.35);
  color: #fff;
}

/* ----------  Layout helpers  ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.section {
  position: relative;
  padding-block: clamp(4.5rem, 9vw, 8rem);
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(2.5rem, 5vw, 3.75rem);
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

h2 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.1rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; }

.section-lead {
  margin-top: 1.1rem;
  color: var(--text-muted);
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.2rem);
  max-width: 60ch;
}

.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ----------  Skip link / a11y  ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -64px;
  z-index: 100;
  background: var(--primary);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ----------  Ambient background  ---------- */
.bg-aurora,
.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

.bg-aurora {
  background:
    radial-gradient(820px 520px at 78% -8%, rgba(124, 108, 255, 0.22), transparent 60%),
    radial-gradient(720px 520px at 12% 6%, rgba(61, 215, 208, 0.16), transparent 60%),
    radial-gradient(900px 700px at 50% 108%, rgba(255, 126, 182, 0.10), transparent 60%);
}

.bg-canvas { z-index: -1; opacity: 0.55; }

/* ----------  Buttons  ---------- */
.btn {
  --btn-pad-y: 0.82rem;
  --btn-pad-x: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.005em;
  padding: var(--btn-pad-y) var(--btn-pad-x);
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease),
              background 0.25s var(--ease), border-color 0.2s var(--ease);
  will-change: transform;
}

.btn-primary {
  background: var(--grad);
  color: #0a0c16;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover {
  color: #0a0c16;
  transform: translateY(-2px);
  box-shadow: 0 0 70px -8px rgba(124, 108, 255, 0.6);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover {
  color: var(--text);
  transform: translateY(-2px);
  border-color: var(--accent-soft);
  background: var(--surface-2);
}

.btn-block { width: 100%; margin-top: 0.4rem; }

/* ----------  Header  ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease),
              backdrop-filter 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(7, 9, 15, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.9rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.wordmark:hover { color: var(--text); }
.wordmark-glyph { display: inline-flex; }
.wordmark-glyph .glyph-core { fill: url(#coreGrad); fill: var(--primary); }
.wordmark-glyph .glyph-dot  { fill: var(--accent); }
.wordmark-glyph .glyph-lines line {
  stroke: rgba(255, 255, 255, 0.3);
  stroke-width: 1;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.9rem;
}
.site-nav > a:not(.btn) {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}
.site-nav > a:not(.btn):hover { color: var(--text); }
.nav-cta { --btn-pad-y: 0.6rem; --btn-pad-x: 1.1rem; font-size: 0.9rem; }

/* ----------  Hero  ---------- */
.hero {
  position: relative;
  padding-top: clamp(3.5rem, 8vw, 6rem);
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
  min-height: min(86vh, 760px);
  display: flex;
  align-items: center;
}
.hero-inner { max-width: 880px; }

.hero-title {
  font-size: clamp(2.4rem, 1.3rem + 4.6vw, 4.6rem);
  font-weight: 700;
  margin-top: 0.4rem;
}

.hero-sub {
  margin-top: 1.5rem;
  font-size: clamp(1.08rem, 1rem + 0.55vw, 1.35rem);
  color: var(--text-muted);
  max-width: 60ch;
  line-height: 1.6;
}

.hero-actions {
  margin-top: 2.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.hero-foot {
  margin-top: 2rem;
  font-size: 0.92rem;
  color: var(--text-faint);
  letter-spacing: 0.01em;
}

/* ----------  Problem section  ---------- */
.pairs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.pair-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.4rem 1.2rem;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 500;
  position: relative;
  isolation: isolate;
}
.pair-lang { color: var(--text); }
.pair-link {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 0.15rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.pairs-caption {
  margin-top: 1.5rem;
  color: var(--text-faint);
  font-size: 0.98rem;
  max-width: 56ch;
}

/* ----------  Idea section, centerpiece  ---------- */
.section-idea {
  position: relative;
  background:
    radial-gradient(1000px 700px at 50% 32%, rgba(124, 108, 255, 0.10), transparent 65%);
}
.section-idea::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(124, 108, 255, 0.04), transparent);
  pointer-events: none;
}
.section-idea .section-head { margin-inline: auto; text-align: center; }
.section-idea .section-lead { margin-inline: auto; }

.constellation-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.constellation-wrap {
  width: min(620px, 100%);
  aspect-ratio: 1 / 1;
  position: relative;
}
.constellation { width: 100%; height: 100%; overflow: visible; }

/* Connection lines */
.lines line {
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 5 9;
  animation: lineFlow 2.4s linear infinite;
}
@keyframes lineFlow {
  to { stroke-dashoffset: -28; }
}

/* Core node */
.core-halo {
  fill: rgba(124, 108, 255, 0.16);
  animation: haloPulse 3.4s var(--ease) infinite;
  transform-origin: 300px 300px;
}
@keyframes haloPulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50%      { transform: scale(1.16); opacity: 0.35; }
}
.core-circle { transform-origin: 300px 300px; }
.core-icon {
  font-size: 38px;
  paint-order: stroke;
}

/* Satellite nodes (built in JS) */
.sat-node { cursor: default; }
.sat-circle {
  fill: rgba(12, 16, 32, 0.92);
  stroke: var(--border-strong);
  stroke-width: 1.4;
  transition: stroke 0.3s var(--ease), fill 0.3s var(--ease);
}
.sat-node:hover .sat-circle { stroke: var(--accent-soft); }
.sat-lang {
  fill: var(--text-faint);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sat-word {
  fill: var(--text);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
}
.sat-fade { transition: opacity 0.45s var(--ease); }

.constellation-caption {
  margin-top: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 1.05rem;
}
.cap-live {
  color: var(--accent-soft);
  font-family: var(--font-display);
  font-weight: 600;
}

/* Idea supporting points */
.idea-points {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.idea-point {
  padding: 1.6rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease),
              background 0.3s var(--ease);
}
.idea-point:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  background: var(--surface-2);
}
.idea-point h3 { margin-bottom: 0.5rem; }
.idea-point p { color: var(--text-muted); font-size: 0.98rem; }

/* ----------  Audience  ---------- */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.audience-card {
  padding: 2rem 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease),
              box-shadow 0.3s var(--ease);
}
.audience-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-soft);
}
.audience-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  margin-bottom: 1.2rem;
  color: var(--accent-soft);
  background: linear-gradient(135deg, rgba(124, 108, 255, 0.22), rgba(61, 215, 208, 0.18));
  border: 1px solid var(--border);
}
.audience-card h3 { margin-bottom: 0.55rem; }
.audience-card p { color: var(--text-muted); }

/* ----------  Demo placeholder  ---------- */
.demo-stage {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 4vw, 3rem);
  justify-content: center;
  align-items: center;
}
.phone-frame {
  position: relative;
  width: clamp(220px, 64vw, 270px);
  aspect-ratio: 9 / 19;
  border-radius: 34px;
  padding: 12px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-soft);
}
.phone-frame-alt { transform: translateY(28px) rotate(3deg); }
.phone-frame:first-child { transform: rotate(-3deg); }
.phone-notch {
  position: absolute;
  top: 12px; left: 50%;
  transform: translateX(-50%);
  width: 38%;
  height: 18px;
  background: #05070d;
  border-radius: 0 0 12px 12px;
  z-index: 2;
}
.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 24px;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(124, 108, 255, 0.18), transparent 60%),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.018) 0 12px, transparent 12px 24px),
    #090c16;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  text-align: center;
}
.placeholder-tag {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  background: rgba(0, 0, 0, 0.25);
}

/* ----------  Contact  ---------- */
.section-contact {
  background: radial-gradient(900px 600px at 80% 20%, rgba(61, 215, 208, 0.10), transparent 60%);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.contact-intro .section-lead { margin-top: 1.1rem; }
.contact-direct {
  margin-top: 1.4rem;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.contact-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: var(--shadow-soft);
}

.contact-form { display: flex; flex-direction: column; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: 0.45rem; }
.field label {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}
.field input,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: rgba(5, 7, 13, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.95rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease),
              background 0.2s var(--ease);
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--text-faint); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary-soft);
  background: rgba(5, 7, 13, 0.85);
  box-shadow: 0 0 0 3px rgba(124, 108, 255, 0.18);
}
.field input:user-invalid,
.field textarea:user-invalid {
  border-color: rgba(255, 126, 182, 0.7);
}

/* Honeypot, hidden from people */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  opacity: 0;
  overflow: hidden;
}

.form-status {
  font-size: 0.92rem;
  min-height: 1.2em;
  margin-top: -0.2rem;
}
.form-status.is-error { color: var(--pink); }
.form-status.is-success { color: var(--accent-soft); }

.privacy-note {
  margin-top: 0.3rem;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-faint);
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

/* ----------  Footer  ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 2.75rem;
  background: rgba(5, 7, 13, 0.5);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  text-align: center;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}
.footer-tag { color: var(--text-muted); font-size: 0.96rem; }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.3rem;
  margin-top: 0.2rem;
}
.footer-nav a { color: var(--text-muted); font-size: 0.92rem; }
.footer-nav a:hover { color: var(--text); }
.footer-copy { color: var(--text-faint); font-size: 0.85rem; margin-top: 0.4rem; }

/* ----------  Scroll reveal  ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
.reveal.in-view {
  opacity: 1;
  transform: none;
}
/* Stagger children of grids a touch */
.reveal.in-view { transition-delay: var(--reveal-delay, 0s); }

/* ----------  Responsive  ---------- */
@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .site-nav > a:not(.btn) { display: none; }
  .phone-frame-alt { display: none; }
  .phone-frame:first-child { transform: none; }
}

@media (max-width: 460px) {
  .pair-card { padding: 1.15rem 1rem; }
  .hero-actions .btn { flex: 1 1 auto; }
}

/* ----------  Reduced motion  ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .lines line { stroke-dasharray: none; }
}
