/* ============================================================
   Kraemon — Shared Design System
   ============================================================ */

/* ── Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── Design tokens ── */
:root {
  --teal:          #1A535C;
  --teal-dark:     #0d2f35;
  --teal-mid:      #2c6e78;
  --teal-light:    #e8f4f5;
  --mustard:       #FFE66D;
  --mustard-dark:  #d4bc38;
  --coral:         #FF6B6B;
  --mint:          #4ECDC4;
  --white:         #ffffff;
  --off-white:     #f7fafa;
  --ink:           #12282d;
  --body:          #384d54;
  --muted:         #6b8891;
  --line:          #e0eaec;
  --radius-sm:     8px;
  --radius-md:     14px;
  --radius-lg:     24px;
  --radius-full:   9999px;
  --shadow-sm:     0 1px 4px rgba(13,47,53,.08);
  --shadow-md:     0 4px 16px rgba(13,47,53,.12);
  --shadow-lg:     0 12px 40px rgba(13,47,53,.16);
  --transition:    0.2s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--body);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── Layout ── */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 80px 0; }
.section--tight { padding: 56px 0; }
.section--dark { background: var(--teal-dark); color: var(--white); }
.section--teal { background: var(--teal); color: var(--white); }
.section--off { background: var(--off-white); }

/* ── Typography ── */
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--teal);
}
.eyebrow--light { color: var(--mustard); }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.15; }
.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--teal h1,
.section--teal h2,
.section--teal h3 { color: var(--white); }

.display {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.05;
}
.headline { font-size: clamp(26px, 3.5vw, 40px); font-weight: 800; }
.subhead { font-size: clamp(18px, 2.5vw, 22px); font-weight: 600; }
.body-lg { font-size: 18px; line-height: 1.7; }
.body-sm { font-size: 14px; }
.caption { font-size: 12px; }

.text-muted { color: var(--muted); }
.text-center { text-align: center; }
.text-light { color: rgba(255,255,255,.75); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--mustard);
  color: var(--ink);
}
.btn-primary:hover { background: #f0d640; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,.4);
}
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,.1); }
.btn-ghost {
  background: transparent;
  color: var(--teal);
  border: 2px solid var(--line);
}
.btn-ghost:hover { border-color: var(--teal); }
.btn-sm { padding: 10px 20px; font-size: 13px; }

/* ── Navigation ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,47,53,.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 24px;
  max-width: 1160px;
  margin: 0 auto;
}
.nav__logo {
  font-size: 20px;
  font-weight: 900;
  color: var(--white);
  letter-spacing: -.02em;
}
.nav__logo span { color: var(--mustard); }
.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav__links a {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,.7);
  transition: var(--transition);
}
.nav__links a:hover { color: var(--white); }
.nav__cta { font-size: 14px !important; font-weight: 700 !important; color: var(--mustard) !important; }
.nav__mobile-toggle { display: none; color: var(--white); font-size: 22px; line-height: 1; }

/* ── Hero ── */
.hero {
  background: var(--teal-dark);
  padding: 96px 0 80px;
  overflow: hidden;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(78,205,196,.12) 0%, transparent 65%),
              radial-gradient(ellipse at 20% 80%, rgba(255,230,109,.06) 0%, transparent 50%);
  pointer-events: none;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.hero__copy { position: relative; z-index: 1; }
.hero__copy .eyebrow { margin-bottom: 16px; }
.hero__copy .display { color: var(--white); margin-bottom: 24px; }
.hero__copy .display em { color: var(--mustard); font-style: normal; }
.hero__copy .body-lg { color: rgba(255,255,255,.75); margin-bottom: 36px; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__visual { position: relative; z-index: 1; }

/* ── Phone mockup ── */
@keyframes phone-float {
  0%, 100% { transform: rotateY(-15deg) rotateX(6deg) rotate(1deg) translateY(0); }
  50%       { transform: rotateY(-15deg) rotateX(6deg) rotate(1deg) translateY(-10px); }
}
.phone-wrap {
  display: flex;
  justify-content: center;
  perspective: 700px;
  position: relative;
  padding: 16px 40px 52px;
}
/* Floor shadow — device hovering over a surface */
.phone-wrap::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 52%;
  height: 24px;
  background: radial-gradient(ellipse, rgba(0,0,0,.45) 0%, transparent 75%);
  filter: blur(8px);
  pointer-events: none;
}
/* Ambient screen glow */
.phone-wrap::before {
  content: '';
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 65%;
  background: radial-gradient(ellipse, rgba(26,83,92,.28) 0%, transparent 70%);
  filter: blur(28px);
  pointer-events: none;
}
.phone {
  width: 252px;
  height: 516px;
  /* Gradient frame — top-left lighter = catches ambient light */
  background: linear-gradient(155deg, #282828 0%, #111 35%, #050505 100%);
  border-radius: 46px;
  /* Padding = visible bezel around the screen */
  padding: 8px 5px 14px;
  border: none;
  overflow: hidden;
  position: relative;
  box-shadow:
    /* Left lit edge — most visible at this rotation angle */
    -2px 0 0 2px rgba(255,255,255,.22),
    /* Top lit edge */
    0 -1px 0 1.5px rgba(255,255,255,.14),
    /* Inner frame bevel */
    inset 1px 1px 0 rgba(255,255,255,.1),
    inset -1px -1px 0 rgba(0,0,0,.35),
    /* Multi-layer drop shadow */
    8px 12px 20px rgba(0,0,0,.8),
    20px 32px 56px rgba(0,0,0,.6),
    40px 60px 100px rgba(0,0,0,.4);
  transform: rotateY(-15deg) rotateX(6deg) rotate(1deg);
}
.phone__notch {
  /* Floating Dynamic Island pill — overlays the screen */
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 88px;
  height: 26px;
  background: #000;
  border-radius: 30px;
  z-index: 10;
  box-shadow: inset 0 1px 4px rgba(0,0,0,.9);
}
.phone__screen {
  /* Full height — notch is absolute so doesn't push screen down */
  height: 100%;
  background: #000;
  overflow: hidden;
  position: relative;
  /* Inner corners show the dark bezel edge */
  border-radius: 40px;
}
/* Glass reflection — screen behind real glass */
.phone__screen::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    140deg,
    rgba(255,255,255,.13) 0%,
    rgba(255,255,255,.06) 20%,
    transparent           48%,
    rgba(0,0,0,.05)       100%
  );
  pointer-events: none;
  z-index: 2;
  border-radius: 40px;
}
/* Hero phone floats gently */
.hero__visual .phone {
  animation: phone-float 5s ease-in-out infinite;
}
.phone__bar {
  height: 6px;
  border-radius: 4px;
  margin: 10px 16px;
  background: rgba(255,255,255,.12);
}
.phone__bar--short { width: 60%; }
.phone__bar--accent { background: var(--mustard); opacity: .8; height: 4px; }
.phone__bar--mint   { background: var(--mint);    opacity: .7; height: 4px; }
.phone__card {
  margin: 8px 12px;
  padding: 12px;
  background: rgba(255,255,255,.08);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.06);
}
.phone__label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  color: rgba(255,255,255,.5);
  text-transform: uppercase;
  font-family: 'Inter', sans-serif;
}
.phone__stat {
  font-size: 22px;
  font-weight: 900;
  color: var(--mustard);
  font-family: 'Inter', sans-serif;
  line-height: 1.2;
}
.phone__row {
  display: flex;
  gap: 6px;
  margin: 8px 12px;
}
.phone__pill {
  height: 28px;
  border-radius: 14px;
  flex: 1;
  background: rgba(255,255,255,.1);
}
.phone__pill--hard  { background: rgba(255,107,107,.3); }
.phone__pill--good  { background: rgba(255,230,109,.3); }
.phone__pill--easy  { background: rgba(78,205,196,.3);  }

/* ── Stats bar ── */
.stats-bar {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 28px 0;
}
.stats-bar__grid {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-item__num {
  font-size: 30px;
  font-weight: 900;
  color: var(--teal);
  line-height: 1;
}
.stat-item__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 4px;
}

/* ── Section headers ── */
.section-header { margin-bottom: 52px; }
.section-header .eyebrow { margin-bottom: 12px; }
.section-header .headline { margin-bottom: 16px; }
.section-header .body-lg { max-width: 640px; }
.section-header.centered { text-align: center; }
.section-header.centered .body-lg { margin: 0 auto; }

/* ── Cards ── */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card--dark {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
}
.card--dark:hover { background: rgba(255,255,255,.1); }
.card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--teal-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 20px;
}
.card__icon--mustard { background: rgba(255,230,109,.25); }
.card__icon--coral   { background: rgba(255,107,107,.15); }
.card__icon--mint    { background: rgba(78,205,196,.15);  }
.card h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.card p  { font-size: 15px; color: var(--muted); line-height: 1.6; }
.card a.learn-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--teal);
  margin-top: 16px;
  transition: var(--transition);
}
.card a.learn-more:hover { gap: 8px; }

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ── Audience tabs ── */
.audience-section { padding: 80px 0; }
.audience-section--students { background: var(--teal-dark); }
.audience-section--parents  { background: var(--white); }
.audience-section--teachers { background: var(--off-white); }

.audience-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.audience-copy .eyebrow { margin-bottom: 12px; }
.audience-copy .headline { margin-bottom: 20px; }
.audience-copy .body-lg  { margin-bottom: 28px; opacity: .85; }

.benefit-list { display: flex; flex-direction: column; gap: 16px; }
.benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 15px;
  line-height: 1.5;
}
.benefit-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  background: var(--mustard);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  margin-top: 1px;
}

/* ── Board coverage ── */
.board-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.board-card {
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  padding: 28px 20px;
  text-align: center;
  background: var(--white);
}
.board-card__name { font-size: 22px; font-weight: 900; color: var(--teal); }
.board-card__count { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* ── How it works ── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.step { position: relative; }
.step__num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--mustard);
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.step h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.step p  { font-size: 15px; color: var(--muted); }

/* ── App store badges ── */
.store-badges { display: flex; gap: 12px; flex-wrap: wrap; }
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: var(--ink);
  border-radius: var(--radius-md);
  color: var(--white);
  border: 1px solid rgba(255,255,255,.12);
  transition: var(--transition);
}
.store-badge:hover { background: #1a3840; }
.store-badge__text { display: flex; flex-direction: column; }
.store-badge__sub  { font-size: 10px; opacity: .65; letter-spacing: .02em; }
.store-badge__name { font-size: 16px; font-weight: 700; }
.store-badge--disabled {
  opacity: .45;
  cursor: default;
  pointer-events: none;
}

/* ── Notify / waitlist form ── */
.hero__notify { margin-top: 28px; }
.notify-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 440px;
}
.notify-form--centered {
  justify-content: center;
  margin: 0 auto;
}
.notify-input {
  flex: 1;
  min-width: 200px;
  padding: 14px 20px;
  border-radius: var(--radius-full);
  border: 2px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.1);
  color: var(--white);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}
.notify-input::placeholder { color: rgba(255,255,255,.4); }
.notify-input:focus { border-color: var(--mustard); background: rgba(255,255,255,.14); }
.notify-caption {
  font-size: 12px;
  color: rgba(255,255,255,.4);
  margin-top: 10px;
}
.notify-form--success {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--mint);
}

/* ── CTA section ── */
.cta-section {
  background: var(--teal-dark);
  padding: 96px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 100%, rgba(255,230,109,.08) 0%, transparent 60%);
  pointer-events: none;
}

/* ── Feature page hero ── */
.feature-hero {
  background: var(--teal-dark);
  padding: 72px 0 56px;
  position: relative;
  overflow: hidden;
}
.feature-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 50%, rgba(78,205,196,.1) 0%, transparent 60%);
  pointer-events: none;
}
.feature-hero .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.55);
  margin-bottom: 28px;
  transition: var(--transition);
}
.feature-hero .back-link:hover { color: rgba(255,255,255,.9); }
.feature-hero .eyebrow { margin-bottom: 14px; }
.feature-hero .display { color: var(--white); max-width: 700px; margin-bottom: 20px; }
.feature-hero .body-lg { color: rgba(255,255,255,.75); max-width: 600px; }

/* ── Feature content sections ── */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.detail-grid--flip .detail-visual { order: -1; }

.detail-copy h2   { font-size: 28px; font-weight: 800; margin-bottom: 16px; }
.detail-copy p    { color: var(--muted); margin-bottom: 16px; line-height: 1.7; }
.detail-copy ul   { margin: 0; }
.detail-copy ul li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 15px;
  color: var(--body);
}
.detail-copy ul li::before {
  content: '✓';
  color: var(--teal);
  font-weight: 700;
  min-width: 18px;
}

.detail-visual {
  display: flex;
  justify-content: center;
}

/* ── Footer ── */
.footer {
  background: var(--ink);
  color: rgba(255,255,255,.6);
  padding: 56px 0 36px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer__brand { font-size: 22px; font-weight: 900; color: var(--white); margin-bottom: 12px; }
.footer__brand span { color: var(--mustard); }
.footer__tagline { font-size: 14px; line-height: 1.6; }
.footer__col h4 { font-size: 13px; font-weight: 700; color: var(--white); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 16px; }
.footer__col a {
  display: block;
  font-size: 14px;
  color: rgba(255,255,255,.55);
  margin-bottom: 10px;
  transition: var(--transition);
}
.footer__col a:hover { color: var(--white); }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
}
.footer__legal { display: flex; gap: 24px; }
.footer__legal a { color: rgba(255,255,255,.4); transition: var(--transition); }
.footer__legal a:hover { color: rgba(255,255,255,.8); }

/* ── Chip / badge ── */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  background: var(--teal-light);
  color: var(--teal);
}
.chip--dark { background: rgba(255,230,109,.2); color: var(--mustard); }

/* ── Visual blocks ── */
.visual-box {
  width: 100%;
  max-width: 420px;
  background: var(--teal-dark);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: var(--shadow-lg);
}
.visual-box--light {
  background: var(--off-white);
  border: 1px solid var(--line);
}
.progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.progress-row__label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.75);
  width: 110px;
  min-width: 110px;
  font-family: 'Inter', sans-serif;
}
.progress-row__track {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,.1);
  border-radius: 4px;
  overflow: hidden;
}
.progress-row__fill {
  height: 100%;
  border-radius: 4px;
  background: var(--mint);
}
.progress-row__pct {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,.5);
  width: 34px;
  text-align: right;
  font-family: 'Inter', sans-serif;
}

/* ── Interval widget ── */
.interval-demo {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.interval-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.interval-pill__dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--mint);
}
.interval-pill__dot--dim { background: rgba(255,255,255,.15); }
.interval-pill__label { font-size: 9px; color: rgba(255,255,255,.4); font-family: 'Inter', sans-serif; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .feature-grid    { grid-template-columns: repeat(2, 1fr); }
  .board-grid      { grid-template-columns: repeat(2, 1fr); }
  .steps-grid      { grid-template-columns: 1fr; gap: 32px; }
  .hero__grid      { grid-template-columns: 1fr; }
  .hero__visual    { display: none; }
  .audience-grid   { grid-template-columns: 1fr; gap: 36px; }
  .audience-grid .detail-visual { display: none; }
  .footer__grid    { grid-template-columns: 1fr 1fr; }
  .detail-grid     { grid-template-columns: 1fr; gap: 40px; }
  .detail-grid--flip .detail-visual { order: 0; }
}
@media (max-width: 600px) {
  .feature-grid  { grid-template-columns: 1fr; }
  .board-grid    { grid-template-columns: repeat(2, 1fr); }
  .nav__links    { display: none; }
  .nav__mobile-toggle { display: block; }
  .hero          { padding: 64px 0 56px; }
  .footer__grid  { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
  .stats-bar__grid { gap: 28px; }

  /* Mobile nav open state */
  .nav--open .nav__inner { flex-wrap: wrap; height: auto; padding-bottom: 16px; }
  .nav--open .nav__links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
    padding: 8px 0 0;
    border-top: 1px solid rgba(255,255,255,.08);
    margin-top: 12px;
  }
  .nav--open .nav__links a {
    padding: 12px 0;
    font-size: 16px;
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,.06);
  }
  .nav--open .nav__links a:last-child { border-bottom: none; }
  .nav__mobile-toggle[aria-expanded="true"] { color: var(--mustard); }
}

/* ── Brain preloader (first-load intro, once per session) ── */
html.preloading, html.preloading body { overflow: hidden; }
#brain-preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(120% 120% at 50% 40%, #20616B 0%, var(--teal) 44%, var(--teal-dark) 100%);
  opacity: 1;
  transition: opacity .7s ease;
}
#brain-preloader.is-hiding { opacity: 0; pointer-events: none; }
.brain-preloader__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.brain-preloader__wordmark {
  position: absolute; left: 0; right: 0; bottom: 13%;
  text-align: center; color: var(--cream, #F4F0EA);
  letter-spacing: .42em; text-indent: .42em; font-weight: 700;
  font-size: clamp(15px, 2.6vw, 24px);
  opacity: 0; animation: brainFadeUp 1.1s ease .4s forwards;
}
.brain-preloader__tagline {
  position: absolute; left: 0; right: 0; bottom: 9%;
  text-align: center; color: rgba(244,240,234,.55);
  letter-spacing: .18em; text-transform: uppercase; font-weight: 500;
  font-size: clamp(9px, 1.5vw, 12px);
  opacity: 0; animation: brainFadeUp 1.1s ease .75s forwards;
}
.brain-preloader__dots { position: absolute; left: 0; right: 0; bottom: 4.5%; text-align: center; }
.brain-preloader__dots i {
  display: inline-block; width: 6px; height: 6px; margin: 0 4px; border-radius: 50%;
  background: var(--mustard, #FFE66D); opacity: .25;
  animation: brainBlink 1.4s ease-in-out infinite;
}
.brain-preloader__dots i:nth-child(2) { animation-delay: .2s; }
.brain-preloader__dots i:nth-child(3) { animation-delay: .4s; }
@keyframes brainBlink { 0%,80%,100% { opacity: .2; transform: scale(.8); } 40% { opacity: 1; transform: scale(1.15); } }
@keyframes brainFadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ── Ambient brain backdrop (CTA section) ── */
.cta-section__brain {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; z-index: 0; pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .brain-preloader__wordmark,
  .brain-preloader__tagline,
  .brain-preloader__dots i { animation: none; opacity: 1; }
}

/* ── Ambient brain backdrop (hero) ── */
.hero__brain {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; z-index: 0; pointer-events: none;
}
