/* ===== N3ST Landing - shared styles ===== */

:root {
  --paper: #FAF8F4;
  --chalkboard: #242220;
  --chalkboard-deep: #1C1A18;
  --chalkboard-deeper: #121110;
  --rose: #E8758A;
  --rose-deep: #C84A64;
  --rose-soft: #F4B6C2;
  --mint: #87CEBC;
  --mint-soft: #C7E8DE;
  --yellow: #F5C46B;
  --yellow-soft: #FBE5B6;
  --ink: #1C1C1E;
  --slate: #5C5958;
  --slate-soft: #8A8784;
  --stone: #E8E4DF;
  --stone-soft: #F0EDE8;
  --white: #FFFFFF;

  --max: 1500px;
  --max-prose: 64ch;
  --gutter: clamp(20px, 4vw, 56px);

  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;

  /* Fluid spacing scale - interpolates between phone & 1600px+ viewports */
  --space-1: clamp(6px, 0.5vw, 8px);
  --space-2: clamp(12px, 1vw, 16px);
  --space-3: clamp(18px, 1.6vw, 28px);
  --space-4: clamp(28px, 3vw, 48px);
  --space-5: clamp(40px, 4.5vw, 80px);
  --space-6: clamp(56px, 7vw, 128px);
  --space-7: clamp(80px, 10vw, 180px);

  --shadow-sm: 0 1px 2px rgba(28, 28, 30, 0.04), 0 1px 3px rgba(28, 28, 30, 0.06);
  --shadow: 0 4px 12px rgba(28, 28, 30, 0.06), 0 1px 3px rgba(28, 28, 30, 0.04);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 68px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .marquee-track, .testi-track { animation: none; }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.menu-open { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ===== Type ===== */
h1, h2, h3, h4 {
  font-family: 'Manrope', sans-serif;
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 { font-weight: 700; font-size: clamp(38px, 4.6vw, 72px); line-height: 1.08; }
h2 { font-weight: 700; font-size: clamp(28px, 3.2vw, 48px); line-height: 1.12; }
h3 { font-weight: 700; font-size: clamp(20px, 1.8vw, 28px); line-height: 1.25; }
h4 { font-weight: 600; font-size: clamp(16px, 1.1vw, 20px); line-height: 1.35; }
p { margin: 0; line-height: 1.65; color: var(--slate); font-size: clamp(15px, 0.95vw, 17px); }

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 16px;
  display: inline-block;
}
.eyebrow.rose { color: var(--rose); }
.eyebrow.mint { color: var(--mint); }

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
section { padding-block: var(--space-6); }

/* ===== Icons (inline SVG sprite) ===== */
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.star {
  width: 16px;
  height: 16px;
  fill: var(--yellow);
  flex-shrink: 0;
}
.stars {
  display: inline-flex;
  gap: 3px;
  align-items: center;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 700;
  transition: transform 0.2s var(--ease-out),
              background 0.15s ease,
              color 0.15s ease,
              border-color 0.15s ease,
              box-shadow 0.2s var(--ease-out);
  white-space: nowrap;
  border: 1.5px solid transparent;
  min-height: 44px;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--rose); color: white; }
.btn-primary:hover { background: var(--rose-deep); box-shadow: 0 6px 16px rgba(232, 117, 138, 0.25); }
.btn-secondary { background: var(--ink); color: white; }
.btn-ghost-light { background: transparent; color: white; border-color: rgba(255,255,255,0.4); }
.btn-ghost-light:hover { background: rgba(255,255,255,0.08); border-color: white; }
.btn-ghost-dark { background: transparent; color: var(--ink); border-color: var(--stone); }
.btn-ghost-dark:hover { border-color: var(--ink); background: rgba(28,28,30,0.03); }

/* Larger rectangular CTA — used by the hero "Join the waitlist" button */
.btn-cta-lg {
  padding: 20px 44px;
  border-radius: 10px;
  font-size: clamp(16px, 1.2vw, 19px);
  font-weight: 700;
  min-height: 60px;
  letter-spacing: 0.005em;
}

/* ===== Nav ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--stone);
  height: var(--nav-h);
}
.nav-inner {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.nav-logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--ink);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.04em;
}
.nav-links {
  display: flex;
  gap: 38px;
  align-items: center;
}

/* center the nav links block within the header */

/* fallback centering — overridden on larger screens */
.nav-links { margin-inline: auto; }

@media (min-width: 861px) {
  .nav-inner { position: relative; }
  .nav-links {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
}
.nav-link {
  font-size: 16px;
  font-weight: 600;
  color: var(--slate);
  padding: 8px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.nav-link:hover { color: var(--ink); }
.nav-link.active { color: var(--ink); border-bottom-color: var(--rose); }
.nav-cta { display: flex; gap: 12px; align-items: center; }
.nav-cta .login {
  font-size: 15px;
  font-weight: 600;
  color: var(--slate);
}
.nav-cta .login:hover { color: var(--ink); }
.nav-cta .btn { padding: 10px 20px; font-size: 14px; min-height: 40px; }

/* Hamburger toggle */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.nav-toggle:hover { background: var(--stone-soft); }
.nav-toggle .bars {
  position: relative;
  width: 22px;
  height: 16px;
  display: block;
}
.nav-toggle .bars::before,
.nav-toggle .bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.25s var(--ease-out), top 0.2s var(--ease-out), opacity 0.15s ease;
}
.nav-toggle .bars::before { top: 3px; }
.nav-toggle .bars::after { top: 11px; }
.nav-toggle[aria-expanded="true"] .bars::before { top: 7px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { top: 7px; transform: rotate(-45deg); }

/* Mobile menu overlay */
/* Floating dropdown panel, NOT a full-screen overlay.
   Always rendered in the DOM so transitions work reliably in in-app browsers
   (Telegram, Instagram, WeChat). Closed state is hidden via visibility +
   opacity + translate, NOT via display:none. */
.mobile-menu {
  position: fixed;
  top: calc(var(--nav-h) + 6px);
  left: 12px;
  right: 12px;
  background-color: #FAF8F4;
  background: var(--paper);
  z-index: 9999;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-radius: 18px;
  border: 1px solid var(--stone);
  box-shadow:
    0 18px 40px rgba(28, 26, 58, 0.14),
    0 2px 6px rgba(28, 26, 58, 0.06);
  max-height: calc(100dvh - var(--nav-h) - 24px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform-origin: top center;

  /* Closed (default) — invisible, non-interactive, slightly raised + scaled */
  visibility: hidden;
  opacity: 0;
  transform: translateY(-10px) scale(0.97);
  pointer-events: none;
  transition:
    opacity 0.20s ease,
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.28s;
}
.mobile-menu[data-open="true"] {
  visibility: visible;
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  /* On open, visibility flips immediately so the opacity/transform
     transitions are visible. On close, visibility waits 0.28s (above). */
  transition:
    opacity 0.20s ease,
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0s;
}
/* Override the UA stylesheet's [hidden] → display:none so the menu can stay
   always-rendered while controlling visibility via the rules above. */
.mobile-menu[hidden] { display: flex; }
.mobile-menu .m-link {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  padding: 16px 4px;
  border-bottom: 1px solid var(--stone);
  min-height: 56px;
  display: flex;
  align-items: center;
}
.mobile-menu .m-link.active { color: var(--rose); }
.mobile-menu .m-cta { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.mobile-menu .m-cta .btn { width: 100%; }
.mobile-menu .m-cta .login {
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--slate);
  padding: 14px;
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-cta .login { display: none; }
  .nav-cta .btn { display: none; }
  .nav-toggle { display: inline-flex; }
}

@media (min-width: 861px) {
  .mobile-menu { display: none; }
}

/* ===== Hero ===== */
/* Full-bleed hero: owns its own gutter padding so text aligns with the nav logo
   and the image aligns with the right-edge nav CTA. Any nested .container is
   neutralized so the grid takes the full available width. */
.hero {
  background: var(--paper);
  /* remove bottom padding so hero image can sit flush with the next section */
  padding-block: clamp(24px, 3vw, 56px) 0;
  padding-inline: var(--gutter);
  position: relative;
  overflow: hidden;
}
.hero > .container {
  max-width: none;
  width: 100%;
  padding: 0;
  margin: 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 5vw, 96px);
  align-items: center;
  width: 100%;
}
.hero-text {
  max-width: 720px;
  justify-self: start;
}
.hero-text h1 {
  font-size: clamp(32px, 3.2vw, 52px);
  color: var(--ink);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: clamp(14px, 1.4vw, 22px);
  letter-spacing: clamp(-0.025em, calc(-0.018em - 0.03vw), -0.012em);
  max-width: 22ch;
}
.hero-text .lede {
  font-size: clamp(18px, 1.4vw, 22px);
  line-height: 1.55;
  color: var(--slate);
  margin-bottom: clamp(20px, 2vw, 32px);
  max-width: 48ch;
}
.hero-ctas { display: flex; gap: 16px; margin-bottom: 8px; flex-wrap: wrap; }
.hero-stars {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stars-label { font-size: 14px; font-weight: 600; color: var(--ink); }

.hero-visual {
  position: relative;
  min-height: clamp(330px, 31vw, 540px);
  justify-self: end;
  align-self: end;
  margin-top: clamp(0px, 1vw, 12px);
  width: 100%;
  max-width: clamp(420px, 42vw, 680px);
}
.hero-image {
  position: relative;
  z-index: 1;
  width: min(100%, clamp(480px, 48vw, 740px));
  height: auto;
  object-fit: contain;
  object-position: center right;
  margin-left: auto;
  filter: drop-shadow(0 28px 48px rgba(28, 28, 30, 0.10));
}
.hero-glow {
  position: absolute;
  inset: 4% -2% 4% 8%;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 244, 199, 0.98) 0%, rgba(255, 236, 170, 0.82) 30%, rgba(255, 236, 170, 0.18) 56%, transparent 70%),
    radial-gradient(ellipse at 46% 54%, rgba(120, 104, 212, 0.18) 0%, rgba(120, 104, 212, 0.08) 34%, transparent 68%),
    linear-gradient(180deg, rgba(255, 252, 247, 0.95), rgba(255, 248, 238, 0.72));
  border-radius: 44% 56% 50% 50% / 48% 40% 60% 52%;
  z-index: 0;
  pointer-events: none;
  filter: blur(8px);
  transform: rotate(-6deg);
}
.hero-glow::before,
.hero-glow::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}
.hero-glow::before {
  width: clamp(120px, 12vw, 168px);
  height: clamp(42px, 4vw, 62px);
  background: rgba(135, 206, 188, 0.38);
  top: 16%;
  right: 4%;
  transform: rotate(14deg);
}
.hero-glow::after {
  width: clamp(88px, 9vw, 132px);
  height: clamp(88px, 9vw, 132px);
  background: rgba(232, 117, 138, 0.18);
  left: 8%;
  bottom: 12%;
  border-radius: 40% 60% 58% 42% / 50% 44% 56% 50%;
}

.hero .btn-primary {
  background: var(--rose);
  color: white;
  box-shadow: none;
}
.hero .btn-primary:hover {
  background: var(--rose-deep);
  box-shadow: 0 6px 16px rgba(232, 117, 138, 0.25);
}
.hero .btn-ghost-dark {
  border-color: var(--stone);
}
.hero .btn-ghost-dark:hover {
  border-color: var(--ink);
  background: rgba(28,28,30,0.03);
}
.hero .stars-label {
  color: var(--ink);
}
.hero .stars-label strong {
  color: inherit;
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-text { max-width: none; }
  .hero-visual {
    justify-self: stretch;
    max-width: none;
    min-height: 320px;
    margin-top: 0;
  }
  .hero-image {
    width: min(100%, 640px);
    margin-inline: auto;
    object-position: center center;
  }
  .hero-glow {
    inset: 4% 4% 4% 4%;
    transform: none;
  }
}
@media (max-width: 600px) {
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { width: 100%; }
}

/* ===== Featured-in marquee ===== */
.featured {
  --award-logo-width: clamp(200px, 18vw, 280px);
  --award-logo-height: clamp(60px, 5vw, 82px);
  background: var(--ink);
  color: white;
  /* tightened vertical spacing to lift the slider upward */
  padding-block: clamp(12px, 1.5vw, 24px) clamp(20px, 2.5vw, 40px);
  overflow: hidden;
}
.featured-title {
  text-align: center;
  font-size: clamp(14px, 1vw, 17px);
  font-weight: 700;
  margin-bottom: clamp(8px, 1vw, 14px);
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.marquee {
  display: flex;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0, black 12%, black 88%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, black 12%, black 88%, transparent 100%);
  pointer-events: none;
}
.marquee-track {
  display: flex;
  gap: 44px;
  flex-shrink: 0;
  padding-right: 44px;
  animation: marquee-scroll 44s linear infinite;
  align-items: center;
  width: max-content;
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee.reverse .marquee-track { animation-direction: reverse; }
.award-logo {
  min-width: var(--award-logo-width);
  height: var(--award-logo-height);
  border-radius: 14px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  pointer-events: none;
}
.award-logo img {
  max-width: 100%;
  max-height: calc(var(--award-logo-height) - 18px);
  width: auto;
  height: auto;
  object-fit: contain;
}
.award-text-inner {
  font-family: 'Playfair Display', serif;
  font-weight: 500;
  font-size: clamp(11px, 0.9vw, 14px);
  line-height: 1.08;
  text-align: center;
  color: rgba(255,255,255,0.96);
  max-width: 220px;
  display: block;
  hyphens: auto;
  letter-spacing: 0;
}
.award-logo.award-text {
  /* match the same tile sizing and appearance as other award-logo items */
  min-width: var(--award-logo-width);
  height: var(--award-logo-height);
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.award-logo.award-text .award-text-inner {
  background: transparent;
  padding: 0;
  max-width: calc(var(--award-logo-width) - 28px);
  font-size: clamp(11px, 0.9vw, 14px);
  line-height: 1.05;
  text-align: center;
}

/* Modifier for Olive Tree logo to visually match other badges */
.award-logo--olive { padding: 8px 12px; }
.award-logo--olive img { max-height: calc(var(--award-logo-height) - 12px); }
.award-placeholder {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.partner-logo {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: rgba(255,255,255,0.75);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0.85;
  transition: opacity 0.2s, color 0.2s;
}
.partner-logo:hover { opacity: 1; color: white; }
.partner-logo .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--mint);
}
@media (max-width: 600px) {
  .featured {
    --award-logo-width: 156px;
    --award-logo-height: 54px;
  }
  .award-logo {
    padding: 8px 12px;
  }
  .award-placeholder {
    font-size: 12px;
  }
  .partner-logo { font-size: 18px; }
  .marquee-track { gap: 30px; padding-right: 30px; }
}

/* ===== Generic two-column ===== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 96px);
  align-items: center;
}
@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; gap: 40px; }
}

/* ===== Problem section ===== */
.problem-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 1.6vw, 28px);
  margin-top: clamp(40px, 5vw, 80px);
}
@media (max-width: 860px) {
  .problem-cards { grid-template-columns: 1fr; }
}
.problem-card {
  background: white;
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--stone);
  transition: border-color 0.2s ease, transform 0.2s var(--ease-out);
}
.problem-card:hover { border-color: var(--slate-soft); transform: translateY(-2px); }
.problem-card .icon-wrap {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  margin-bottom: 18px;
}
.problem-card h4 {
  margin-bottom: 10px;
  font-size: 18px;
  color: var(--ink);
}
.problem-card p {
  font-size: 14px;
  color: var(--slate);
  line-height: 1.55;
}

/* ===== Timeline ===== */
.timeline {
  background: white;
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  border: 1px solid var(--stone);
}
.timeline-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 24px;
}
.tl-step {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 16px;
  align-items: start;
  position: relative;
}
.tl-node {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--mint);
  margin-top: 6px;
  border: 3px solid white;
  box-shadow: 0 0 0 2px var(--mint);
  grid-column: 1;
  position: relative;
  z-index: 2;
}
.tl-line {
  grid-column: 1;
  grid-row: span 1;
  width: 2px;
  background: var(--stone);
  justify-self: center;
  margin: -4px 0;
  min-height: 28px;
}
.tl-content { padding-bottom: 4px; }
.tl-label { font-weight: 600; font-size: 15px; color: var(--ink); }
.tl-wait {
  display: inline-block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 700;
  color: var(--rose);
  margin-bottom: clamp(18px, 1.8vw, 28px);
  padding: 3px 10px;
  letter-spacing: clamp(-0.05em, calc(-0.035em - 0.05vw), -0.022em);
}
.tl-caption {
  font-size: clamp(16px, 1vw, 18px);
  line-height: 1.7;
  color: var(--slate);
  margin-bottom: clamp(24px, 2.2vw, 34px);
  max-width: 54ch;
}

/* ===== Problem stats — taped-pill design on paper background ===== */
.problem-stats {
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 4.5vw, 64px);
  padding: clamp(8px, 1vw, 16px) 0;
}
.stat-tile {
  position: relative;
  padding-block: clamp(8px, 1.2vw, 16px);
  padding-inline: clamp(8px, 2vw, 28px);
}
.ps-tag {
  position: absolute;
  display: inline-block;
  padding: 6px 16px;
  border-radius: 4px;
  font-size: clamp(11px, 0.95vw, 14px);
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.06),
    0 6px 14px rgba(28, 28, 30, 0.08);
  z-index: 2;
}
.ps-tag.rose  { background: #f4b6c2; color: #6b1f30; }
.ps-tag.lilac { background: #d8cef3; color: #2b1f5e; }
.ps-tag.mint  { background: #b8e3d6; color: #1e5448; }

/* Each tile's pill sits OVER its number, with a slight taped-sticker tilt.
   Positioned relative to the number's text (which is left-aligned), not the full tile width. */
.problem-stats .stat-tile:nth-child(1) .ps-tag {
  top: -14px;
  left: 30%;
  transform: rotate(7deg);
}
.problem-stats .stat-tile:nth-child(2) .ps-tag {
  top: -14px;
  left: -2%;
  transform: rotate(-9deg);
}
.problem-stats .stat-tile:nth-child(3) .ps-tag {
  top: -14px;
  left: 28%;
  transform: rotate(6deg);
}

.ps-num {
  font-size: clamp(34px, 4.4vw, 54px);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-top: 14px;
}
.ps-sub {
  margin-top: 8px;
  font-size: clamp(14px, 1.05vw, 17px);
  color: var(--slate);
  line-height: 1.5;
  max-width: 38ch;
}

@media (max-width: 600px) {
  .problem-stats { gap: 40px; }
  .stat-tile { padding-inline: 0; }
  .ps-tag {
    position: static;
    transform: rotate(0) !important;
    margin-bottom: 10px;
  }
  .ps-num { margin-top: 0; }
}

/* ===== Solution / three steps ===== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.4vw, 40px);
  margin-top: clamp(40px, 5vw, 80px);
}
@media (max-width: 860px) {
  .steps-grid { grid-template-columns: 1fr; }
}
.step-card {
  display: flex;
  flex-direction: column;
}
.step-image {
  border-radius: var(--radius-lg);
  /* remove backdrop so images sit on page background */
  background: transparent;
  overflow: hidden;
  margin-bottom: 20px;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-image image-slot { width: 100%; height: 100%; }
.step-image img { max-width: 88%; max-height: 88%; object-fit: contain; display: block; margin: 0 auto; }

/* hide small STEP 01/02/03 labels — visual clutter on narrow layouts */
.step-num { display: none; }
.step-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 14px;
  align-self: flex-start;
}
.step-badge.yellow { background: var(--yellow-soft); color: #8a5d10; }
.step-badge.mint { background: var(--mint-soft); color: #1e5448; }
.step-badge.rose { background: #fbdde2; color: #8b2c41; }
.step-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--slate);
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}
.step-card h3 {
  margin-bottom: 10px;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.step-card p { font-size: 15px; color: var(--slate); }
.step-modules {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.step-modules span {
  font-size: 12px;
  font-weight: 600;
  color: var(--slate);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--stone-soft);
  border: 1px solid var(--stone);
}

/* ===== Tabs / panels ===== */
.tabs {
  display: flex;
  gap: 12px;
  margin: 40px 0 48px;
  border-bottom: 1px solid var(--stone);
  flex-wrap: wrap;
}
.tab {
  background: none;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: var(--slate);
  padding: 14px 4px;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  display: flex;
  gap: 10px;
  align-items: center;
  margin-right: 24px;
  transition: color 0.15s, border-color 0.15s;
  min-height: 48px;
}
.tab .tab-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--stone);
  color: var(--slate);
  display: grid; place-items: center;
  font-size: 13px;
  font-weight: 700;
  transition: background 0.15s, color 0.15s;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); border-bottom-color: var(--rose); }
.tab.active .tab-num { background: var(--rose); color: white; }
@media (max-width: 600px) {
  .tab { padding: 14px 8px; margin-right: 12px; font-size: 15px; }
}

.panel { display: none; }
.panel.active {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 96px);
  align-items: center;
}
@media (max-width: 860px) {
  .panel.active { grid-template-columns: 1fr; gap: 40px; }
}
.panel-image { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/3; }
.panel-image image-slot { width: 100%; height: 100%; }
.panel-text .label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 12px;
}
.panel-text h3 { margin-bottom: 16px; font-size: 26px; }
.panel-text p { font-size: 16px; color: var(--slate); line-height: 1.65; }
.panel-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 24px;
}
@media (max-width: 600px) {
  .panel-cards { grid-template-columns: 1fr; }
}
.panel-cards .pc {
  border: 1px solid var(--stone);
  background: var(--stone-soft);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.panel-cards .pc small { display: block; font-weight: 500; color: var(--slate); margin-top: 4px; }
.disclaimer {
  font-style: italic;
  font-size: 13px;
  color: var(--slate);
  margin-top: 18px;
  line-height: 1.5;
}

/* ===== Clinical validation ===== */
.proof-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 32px 0 24px;
}
@media (max-width: 720px) { .proof-row { grid-template-columns: 1fr; } }
.proof-card {
  background: var(--yellow-soft);
  border-radius: var(--radius);
  padding: 18px;
}
.proof-card strong {
  display: block;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 4px;
}
.proof-card span { font-size: 13px; color: #6b4d12; line-height: 1.45; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--rose);
  font-weight: 700;
  font-size: 15px;
  transition: color 0.15s ease;
}
.link-arrow:hover { color: var(--rose-deep); }
.link-arrow svg { transition: transform 0.2s var(--ease-out); }
.link-arrow:hover svg { transform: translateX(3px); }

.image-tall {
  aspect-ratio: 4/5;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.image-tall image-slot { width: 100%; height: 100%; }
.image-caption { font-size: 13px; color: var(--slate); margin-top: 12px; }

/* ===== Clinical validation video panel ===== */
.video-compare-panel {
  background: transparent;
  border-radius: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2vw, 28px);
}
.video-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}
.video-frame .vid {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Face-cover removed per request */
.video-label {
  text-align: center;
  font-size: clamp(15px, 1.05vw, 17px);
  font-weight: 700;
  color: #1e5448;
  letter-spacing: 0.01em;
}

/* ===== Clinical validation narrative band (arrow + teaser + charts) ===== */
.validation-band {
  margin-top: clamp(48px, 6vw, 96px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(24px, 3vw, 48px);
}
.vb-arrow {
  width: clamp(200px, 20vw, 260px);
  display: flex;
  align-items: center;
  justify-content: center;
  /* Leave room so a rotated arrow does not get cropped by neighbouring elements.
     Bump min-height up if you rotate the arrow towards vertical (90deg / 270deg). */
  min-height: clamp(120px, 14vw, 200px);
  overflow: visible;
}
.vb-arrow img {
  width: 100%;
  height: auto;
  display: block;

  /* ===== ROTATE THE ARROW HERE =====
     Change the number inside rotate(). Positive = clockwise, negative = anti-clockwise.
       rotate(0deg)    original
       rotate(45deg)   tilted clockwise
       rotate(90deg)   quarter turn clockwise
       rotate(180deg)  upside-down
       rotate(-45deg)  tilted anti-clockwise

     To MIRROR the arrow, use scale BEFORE rotate:
       transform: scaleX(-1);                  mirror horizontally
       transform: scaleX(-1) rotate(45deg);    mirror AND rotate
       transform: scaleY(-1);                  flip upside-down without rotating
  */
  transform: translate(50px, -50px) rotate(140deg);
  transform-origin: center center;
  transition: transform 0.4s var(--ease-out);
}

/* On mobile the desktop translate(150px, -50px) pushes the arrow up into
   the image-caption above it. Reset the translate so the arrow stays inside
   its own container; keep the rotation. Bump the band's top gap so the
   arrow has breathing room from the caption. */
@media (max-width: 760px) {
  .vb-arrow img {
    transform: translate(0, -15px) rotate(120deg);
  }
  .validation-band {
    margin-top: clamp(56px, 10vw, 96px);
    gap: 28px;
  }
  .vb-arrow {
    width: 140px;
    min-height: 100px;
  }
}

.vb-teaser {
  text-align: center;
  font-size: clamp(20px, 2.2vw, 32px);
  font-weight: 700;
  color: var(--ink);
  max-width: 32ch;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0;
}
.vb-teaser strong {
  color: var(--rose);
  font-weight: 800;
}
.vb-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 2.2vw, 36px);
  width: 100%;
  margin-top: clamp(8px, 1vw, 16px);
}
@media (max-width: 760px) {
  .vb-charts { grid-template-columns: 1fr; }
}
.vb-chart {
  background: white;
  border: 1px solid var(--stone);
  border-radius: var(--radius-lg);
  padding: clamp(16px, 1.6vw, 24px);
  margin: 0;
  box-shadow: 0 6px 20px rgba(28, 28, 30, 0.04);
}
.vb-chart img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
}
.vb-chart-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(15px, 1.15vw, 18px);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 14px;
}
.vb-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--stone);
  color: var(--slate);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
}

/* ===== Program section ===== */
.program-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(32px, 4vw, 72px);
  margin-top: clamp(40px, 5vw, 80px);
  align-items: start;
}
@media (max-width: 900px) { .program-grid { grid-template-columns: 1fr; } }

.lead-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--stone);
}
.lead-photo {
  width: 96px; height: 96px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 18px;
  background: var(--stone);
}
.lead-photo image-slot { width: 100%; height: 100%; }
.lead-name { font-size: 18px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.lead-title { font-size: 14px; font-weight: 700; color: var(--rose); margin-bottom: 18px; }
.lead-bullets { list-style: none; padding: 0; margin: 0; }
.lead-bullets li {
  font-size: 14px;
  color: var(--slate);
  padding-left: 22px;
  position: relative;
  margin-bottom: 10px;
  line-height: 1.55;
}
.lead-bullets li::before {
  content: "";
  position: absolute;
  left: 4px; top: 8px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--mint);
}

.results-title { font-size: 22px; font-weight: 700; color: var(--ink); margin-bottom: 18px; }
.results-tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--stone); margin-bottom: 24px; flex-wrap: wrap; }
.results-tab {
  background: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--slate);
  padding: 10px 0;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  min-height: 44px;
}
.results-tab.active { color: var(--ink); border-bottom-color: var(--rose); }
.result-panel {
  background: white;
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--stone);
}
.result-panel .small-label { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mint); margin-bottom: 6px; }
.result-panel h4 { font-size: 18px; color: var(--ink); margin-bottom: 8px; }
.result-panel p.sub { font-size: 14px; color: var(--slate); margin-bottom: 22px; }
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 600px) { .stat-grid { grid-template-columns: 1fr; } }
.stat-block {
  background: var(--ink);
  color: white;
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.stat-block .num { font-size: 26px; font-weight: 800; color: var(--rose); letter-spacing: -0.02em; }
.stat-block .lbl { font-size: 12px; color: rgba(255,255,255,0.85); line-height: 1.35; }
.partner-row {
  margin-top: 28px;
}
.partner-row .lbl {
  font-size: 11px;
  letter-spacing: 0.12em;

/* Program validation note */
.program-note {
  font-size: 15px;
  color: #8b2c41; /* subtle rose */
  max-width: 760px;
  margin: 6px auto 0;
}

@media (min-width: 860px) {
  .center { position: relative; }
  .program-note { text-align: right; margin-right: 0; }
}
  text-transform: uppercase;
  color: var(--slate);
  font-weight: 700;
  margin-bottom: 14px;
}
.partner-logos {
  display: flex;
  gap: 32px;
  align-items: center;
  flex-wrap: wrap;
}
.partner-logos .pl {
  font-size: 16px;
  font-weight: 700;
  color: var(--slate);
  letter-spacing: -0.01em;
  opacity: 0.7;
}

/* ===== Testimonials ===== */
.testi-head { text-align: center; margin-bottom: 12px; }
.testi-rating {
  display: flex;
  justify-content: center;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  margin-bottom: 56px;
}
.testi-rating .stars { gap: 2px; }
.testi-rating .star { width: 16px; height: 16px; }
.testi-rating .label { font-size: 14px; font-weight: 600; color: var(--ink); }

.testi-marquee {
  display: flex;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0, black 12%, black 88%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, black 12%, black 88%, transparent 100%);
  margin-bottom: 20px;
}
.testi-marquee .testi-track {
  display: flex;
  gap: 20px;
  flex-shrink: 0;
  padding-right: 20px;
  animation: testi-scroll 90s linear infinite;
}
.testi-marquee.reverse .testi-track { animation-direction: reverse; }
.testi-marquee:hover .testi-track { animation-play-state: paused; }
@keyframes testi-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}
.testi-card {
  width: clamp(280px, 24vw, 380px);
  flex-shrink: 0;
  background: white;
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  padding: clamp(20px, 1.6vw, 28px);
}
.testi-card .quote {
  font-size: clamp(14px, 1.1vw, 17px);
  color: var(--ink);
  line-height: 1.6;
  margin-bottom: 18px;
}
.testi-card .who {
  display: flex;
  align-items: center;
  gap: 12px;
}
.testi-card .who .av {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--mint-soft);
  display: grid; place-items: center;
  font-weight: 700;
  color: #1e5448;
  font-size: 13px;
}
.testi-card .who .info .name { font-size: 13px; font-weight: 700; color: var(--ink); }
.testi-card .who .info .role { font-size: 12px; color: var(--slate); }

/* ===== FAQ ===== */
.faq-wrap {
  max-width: 760px;
  margin: 48px auto 0;
}
.faq-item {
  border-bottom: 1px solid var(--stone);
}
.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 0;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  min-height: 48px;
}
.faq-q .chev {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--stone-soft);
  display: grid; place-items: center;
  font-size: 14px;
  color: var(--slate);
  transition: transform 0.25s var(--ease-out), background 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
  margin-left: 12px;
  font-weight: 700;
}
.faq-item.open .chev { transform: rotate(45deg); background: var(--rose); color: white; }
.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s var(--ease-out);
  color: var(--slate);
  font-size: 15px;
  line-height: 1.65;
}
.faq-a > * { overflow: hidden; }
.faq-a > div > p { padding-bottom: 0; }
.faq-item.open .faq-a { grid-template-rows: 1fr; }
.faq-item.open .faq-a > div { padding-bottom: 24px; }

/* ===== Contact form + FAQ split ===== */
.faq-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 4vw, 72px);
  align-items: start;
  max-width: 1180px;
  margin-inline: auto;
}
@media (max-width: 860px) {
  .faq-contact-grid { grid-template-columns: 1fr; gap: 48px; }
}

.contact-form-wrap {
  position: relative;
  max-width: 900px;
  margin-inline: auto;
  /* add bottom spacing so forms (like join-waitlist) don't sit flush with footer */
  margin-bottom: clamp(40px, 6vw, 72px);
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}
.contact-form h2 {
  color: var(--ink);
  margin-bottom: 6px;
}
.contact-form .contact-lede {
  font-size: 15px;
  color: var(--slate);
  margin-bottom: 14px;
  line-height: 1.55;
}
.cf-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.cf-half {
  min-width: 0;
}
.cf-field { display: flex; flex-direction: column; gap: 6px; }
.cf-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.cf-optional { color: var(--slate-soft); font-weight: 500; }
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: white;
  border: 1.5px solid var(--stone);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--slate-soft);
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(232, 117, 138, 0.15);
}
.contact-form textarea { resize: vertical; min-height: 96px; }
.cf-submit { align-self: flex-start; margin-top: 6px; }
@media (max-width: 720px) {
  .cf-row { grid-template-columns: 1fr; }
}

/* FAQ side — centered standalone block, reuse accordion styles */
.faq-side {
  max-width: 760px;
  margin-inline: auto;
}
.faq-side h2 { margin-bottom: 14px; }
.faq-side .faq-tagline {
  font-size: 14px;
  color: var(--slate);
  margin-bottom: 24px;
}
.faq-side .faq-tagline a { color: var(--rose); font-weight: 600; }
.faq-side .faq-wrap { margin-top: 0; }  /* override default 48px top margin */

/* ===== CTA close ===== */
.cta-close {
  background: var(--chalkboard);
  color: white;
  text-align: center;
  /* reduce vertical padding so CTA sits closer to the footer */
  padding-block: clamp(36px, 6vw, 64px);
  padding-inline: var(--gutter);
}
.cta-close h2 { color: white; margin-bottom: 18px; max-width: 880px; margin-left: auto; margin-right: auto; }
.cta-close p { color: var(--mint-soft); font-size: clamp(16px, 1.3vw, 20px); margin-bottom: 32px; max-width: 640px; margin-left: auto; margin-right: auto; }
.cta-close .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 600px) {
  .cta-close .actions { flex-direction: column; align-items: stretch; }
  .cta-close .actions .btn { width: 100%; }
}

/* ===== Footer ===== */
.footer {
  background: var(--chalkboard-deep);
  color: rgba(255,255,255,0.7);
  padding-top: clamp(56px, 6vw, 112px);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.4fr;
  gap: clamp(32px, 4vw, 72px);
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }

.footer-brand .nav-logo { color: white; margin-bottom: 18px; }
.footer-brand .nav-logo .nav-logo-mark { background: white; color: var(--ink); }
.footer-tag { font-size: 14px; color: rgba(255,255,255,0.6); max-width: 280px; line-height: 1.6; }

.footer-col h5 {
  color: white;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 18px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 12px; }
.footer-col a { font-size: 14px; color: rgba(255,255,255,0.7); transition: color 0.15s ease; }
.footer-col a:hover { color: white; }

.footer-cta .email { font-size: 14px; color: rgba(255,255,255,0.85); margin-bottom: 18px; word-break: break-all; }
.footer-bar {
  background: var(--chalkboard-deeper);
  margin-top: 64px;
  padding: 18px 0;
}
.footer-bar-inner {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  gap: 24px;
  line-height: 1.6;
}
@media (max-width: 720px) { .footer-bar-inner { flex-direction: column; gap: 8px; } }

/* ===== Page-banner (for sub-pages) ===== */
.page-banner {
  background: var(--paper);
  padding: 80px 0 48px;
  text-align: center;
}
.page-banner h1 { max-width: 760px; margin: 0 auto 18px; font-size: clamp(32px, 4vw, 52px); }
.page-banner p { font-size: 18px; max-width: 600px; margin: 0 auto; }

/* ===== Generic image placeholders styled ===== */
image-slot {
  --slot-bg: var(--stone-soft);
  --slot-border: var(--stone);
}

/* ===== Utility ===== */
.center { text-align: center; }
.mb-sm { margin-bottom: 8px; }
.mb { margin-bottom: 16px; }
.mb-lg { margin-bottom: 32px; }
.mt-lg { margin-top: 32px; }
.maxw-prose { max-width: var(--max-prose); }

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ===== For Parents specific blocks ===== */
.lifecycle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.4vw, 40px);
  margin-top: clamp(40px, 5vw, 80px);
}
@media (max-width: 860px) { .lifecycle-grid { grid-template-columns: 1fr; } }
.lc-card {
  background: white;
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s ease, transform 0.2s var(--ease-out);
}
.lc-card:hover { border-color: var(--slate-soft); transform: translateY(-2px); }
.lc-card .num { font-size: 13px; font-weight: 700; color: var(--rose); margin-bottom: 12px; letter-spacing: 0.1em; }
.lc-card h4 { margin-bottom: 10px; }
.lc-card p { font-size: 14px; color: var(--slate); }

/* ===== Research page specifics ===== */
.research-meta {
  display: flex;
  gap: 32px;
  font-size: 14px;
  color: var(--slate);
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.research-meta .item strong { color: var(--ink); font-weight: 700; }
.paper-card {
  background: white;
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  padding: 28px;
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: 24px;
  margin-bottom: 16px;
  transition: border-color 0.2s ease;
}
.paper-card:hover { border-color: var(--slate-soft); }
@media (max-width: 720px) { .paper-card { grid-template-columns: 1fr; } }
.paper-icon {
  width: 80px; height: 100px;
  border-radius: 8px;
  background: var(--mint-soft);
  display: grid; place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #1e5448;
  letter-spacing: 0.08em;
}
.paper-title { font-size: 18px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.paper-sub { font-size: 14px; color: var(--slate); line-height: 1.55; }
.paper-meta { font-size: 12px; color: var(--slate-soft); margin-top: 8px; }

.method-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 1.6vw, 28px);
  margin-top: clamp(40px, 5vw, 80px);
}
@media (max-width: 720px) { .method-grid { grid-template-columns: 1fr; } }
.method-card {
  background: white;
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--stone);
  transition: border-color 0.2s ease, transform 0.2s var(--ease-out);
}
.method-card:hover { border-color: var(--slate-soft); transform: translateY(-2px); }
.method-card .lbl { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mint); margin-bottom: 8px; }
.method-card h4 { margin-bottom: 8px; }
.method-card p { font-size: 14px; color: var(--slate); }

/* =================================================================
   WORKFLOW LOOP (home page) — Joon-inspired role cycle
   ================================================================= */
.workflow-section {
  background: var(--paper);
  position: relative;
  overflow: hidden;
  padding-block: clamp(56px, 7vw, 112px);
}
.workflow-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.workflow-bg .bg-leaf {
  position: absolute;
  bottom: 14%;
  left: -120px;
  width: 360px;
  height: 320px;
  background: radial-gradient(ellipse at 65% 45%, rgba(135, 206, 188, 0.65) 0%, rgba(135, 206, 188, 0.22) 55%, transparent 78%);
  border-radius: 58% 42% 64% 36% / 62% 56% 44% 38%;
  transform: rotate(-14deg);
}

.workflow-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto clamp(36px, 4vw, 64px);
  position: relative;
  z-index: 1;
}
.workflow-head h2 {
  color: #2c2570;
  font-size: clamp(28px, 3.4vw, 44px);
  margin-bottom: 16px;
  line-height: 1.15;
}
.workflow-head p {
  color: #4a4480;
  font-size: clamp(15px, 1.1vw, 18px);
  max-width: 56ch;
  margin-inline: auto;
}

/* Triangular layout — DESKTOP uses absolute positioning for exact x/y control.
   Mobile (<= 820px) overrides to a flex column further below. */
.workflow-loop {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  min-height: clamp(960px, 75vw, 1120px);
  z-index: 1;
}

.slot-parents-img,
.slot-parents-card,
.slot-kids-card,
.slot-kids-img,
.slot-clinic-img,
.slot-clinic-card {
  position: absolute;
}

/* Parents block — TOP-LEFT vertex of the triangle */
.slot-parents-img  { top: 0;     left: 4%;   width: 17%; }
.slot-parents-card { top: 4%;    left: 26%;  width: 38%; }

/* Kids block — MIDDLE-RIGHT vertex, offset down from Parents */
.slot-kids-card    { top: 36%;   left: 30%;  width: 34%; }
.slot-kids-img     { top: 38%;   left: 68%;  width: 26%; }

/* Clinicians block — BOTTOM-LEFT vertex, offset down from Kids */
.slot-clinic-img   { top: 70%;   left: 6%;   width: 24%; }
.slot-clinic-card  { top: 70%;   left: 32%;  width: 38%; }

.loop-arrows {
  position: absolute;
  inset: -2%;
  width: 104%;
  height: 104%;
  z-index: 0;
  pointer-events: none;
  overflow: visible; /* let arrowhead markers render past the viewBox edge */
}

.loop-card {
  position: relative;
  z-index: 2;
  background: #e8e7ff;
  border-radius: 24px;
  padding: clamp(22px, 2.4vw, 36px);
  box-shadow: 0 4px 16px rgba(28, 26, 58, 0.04);
}
.loop-card.kids       { background: #d8f0e8; }
.loop-card.clinicians { background: #e8e7ff; }

.role-tag {
  display: inline-block;
  padding: 8px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: white;
  letter-spacing: 0.01em;
  margin-bottom: 18px;
}
.role-tag.tag-parent    { background: #2c2570; }
.role-tag.tag-kid       { background: #1e7a63; }
.role-tag.tag-clinician { background: #2c2570; }

.loop-card h3 {
  color: #2c2570;
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.3;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.loop-card.kids h3 { color: #1e5448; }

.loop-card p {
  color: #3a3360;
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

/* Device-frame placeholders — swap inner .device-screen content for <img> when ready */
.loop-slot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.device-frame {
  position: relative;
  background: #1c1a2e;
  padding: 10px;
  box-shadow: 0 18px 40px rgba(28, 26, 58, 0.18);
  width: 100%;
}
.device-frame.device-phone  { border-radius: 32px; aspect-ratio: 9 / 16;  max-width: 240px; }
.device-frame.device-tablet { border-radius: 22px; aspect-ratio: 16 / 11; max-width: 420px; }
.device-frame.device-laptop {
  border-radius: 14px 14px 4px 4px;
  aspect-ratio: 16 / 10;
  max-width: 420px;
  margin-bottom: 12px; /* room for the laptop base pseudo */
}
.device-frame.device-laptop::after {
  content: "";
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: -10px;
  height: 8px;
  background: #1c1a2e;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 6px 12px rgba(28, 26, 58, 0.18);
}
.device-screen {
  background: #f0eef9;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  color: #6e62d0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  object-fit: cover;
}
.device-frame.device-phone  .device-screen { border-radius: 22px; }
.device-frame.device-tablet .device-screen { border-radius: 14px; }
.device-frame.device-laptop .device-screen { border-radius: 8px 8px 0 0; }
.device-screen .ph-label { max-width: 22ch; }

@media (max-width: 820px) {
  .workflow-loop {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .slot-parents-img, .slot-parents-card,
  .slot-kids-card,   .slot-kids-img,
  .slot-clinic-img,  .slot-clinic-card {
    position: static;
    top: auto;
    left: auto;
    width: 100%;
    max-width: none;
  }
  .slot-parents-img  { order: 1; }
  .slot-parents-card { order: 2; }
  .slot-kids-img     { order: 3; }
  .slot-kids-card    { order: 4; }
  .slot-clinic-img   { order: 5; }
  .slot-clinic-card  { order: 6; }
  .loop-arrows { display: none; }
  .workflow-bg .bg-leaf { width: 200px; height: 160px; bottom: 8%; left: -60px; }
  .device-frame.device-phone  { max-width: 200px; }
  .device-frame.device-tablet { max-width: 360px; }
  .device-frame.device-laptop { max-width: 360px; }
}

/* =================================================================
   RESEARCH PAGE — Joon-inspired, N3ST-skinned
   ================================================================= */

/* ===== Research hero ===== */
.research-hero {
  position: relative;
  background: var(--paper);
  padding-block: clamp(48px, 6vw, 96px) clamp(40px, 5vw, 88px);
  overflow: hidden;
}
.research-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.research-hero-bg .dot {
  position: absolute;
  border-radius: 50%;
  background: rgba(120, 104, 212, 0.22);
}
.research-hero-bg .d1 { width: 18px; height: 18px; top: 14%; left: 8%; }
.research-hero-bg .d2 { width: 14px; height: 14px; top: 8%; left: 42%; background: rgba(120, 104, 212, 0.32); }
.research-hero-bg .d3 { width: 22px; height: 22px; top: 22%; right: 5%; }
.research-hero-bg .d4 { width: 10px; height: 10px; top: 60%; left: 4%; background: rgba(232, 117, 138, 0.28); }
.research-hero-bg .d5 { width: 16px; height: 16px; top: 70%; right: 14%; background: rgba(135, 206, 188, 0.55); }
.research-hero-bg .d6 { width: 12px; height: 12px; top: 50%; left: 48%; background: rgba(120, 104, 212, 0.18); }
.research-hero-bg .d7 { width: 20px; height: 20px; bottom: 14%; left: 30%; background: rgba(120, 104, 212, 0.22); }
.research-hero-bg .d8 { width: 14px; height: 14px; top: 38%; right: 22%; background: rgba(232, 117, 138, 0.22); }

.research-hero .container { position: relative; z-index: 1; }
.research-hero-text { text-align: center; margin-bottom: clamp(36px, 4vw, 64px); }
.research-hero-text h1 {
  font-size: clamp(40px, 5.4vw, 76px);
  line-height: 1.05;
  color: #1c1a3a;
  letter-spacing: -0.025em;
}

.research-hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  max-width: 1080px;
  margin-inline: auto;
}
/* Center the hero image visually: keep two-column layout but center image cell */
.research-hero-image { justify-self: center; }
@media (max-width: 860px) {
  .research-hero-grid { grid-template-columns: 1fr; gap: 36px; }
}

.research-hero-image {
  position: relative;
  display: grid;
  place-items: center;
  padding: clamp(20px, 3vw, 48px);
}
.research-hero-image .blob-frame {
  position: absolute;
  inset: 6% 4% 4% 6%;
  border-radius: 48% 52% 44% 56% / 52% 48% 56% 44%;
  border: 6px solid #6e62d0;
  background: radial-gradient(circle at 30% 30%, rgba(110, 98, 208, 0.16), rgba(110, 98, 208, 0.05) 60%, transparent 80%);
  transform: rotate(-6deg);
  z-index: 0;
}
.research-hero-image .hero-3gg {
  position: relative;
  z-index: 1;
  max-width: 78%;
  height: auto;
  filter: drop-shadow(0 24px 40px rgba(28, 28, 30, 0.18));
}
.research-hero-card {
  border-left: 4px solid #6e62d0;
  padding-left: clamp(20px, 2vw, 32px);
}
.research-hero-card h2 {
  font-size: clamp(22px, 2.2vw, 32px);
  color: #1c1a3a;
  margin-bottom: 16px;
  line-height: 1.2;
}
.research-hero-card p {
  font-size: clamp(15px, 1.05vw, 17px);
  color: #3a3360;
  line-height: 1.65;
}

/* ===== Interactive 3GG module ===== */
.egg-section {
  background: #eef0ff;
  position: relative;
  overflow: hidden;
}
.egg-section::before {
  content: "";
  position: absolute;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(120, 104, 212, 0.08);
  top: 8%;
  right: -40px;
  pointer-events: none;
}
.egg-head {
  max-width: 680px;
  margin-bottom: clamp(28px, 3vw, 48px);
}
.egg-head h2 {
  color: #1c1a3a;
  margin-bottom: 14px;
}
.egg-head p {
  font-size: clamp(15px, 1.05vw, 17px);
  color: #3a3360;
  line-height: 1.6;
}

.egg-stage-wrap {
  position: relative;
}
.egg-stage {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr);
  gap: clamp(24px, 3vw, 48px);
  background: white;
  border-radius: 28px;
  padding: clamp(20px, 2.4vw, 36px);
  box-shadow: 0 20px 48px rgba(28, 26, 58, 0.08), 0 2px 6px rgba(28, 26, 58, 0.04);
  align-items: stretch;
}
@media (max-width: 900px) {
  .egg-stage { grid-template-columns: 1fr; }
}

/* Image frame */
.egg-image-frame {
  position: relative;
  background: linear-gradient(155deg, #f7f6ff 0%, #eef0ff 100%);
  border-radius: 22px;
  padding: clamp(16px, 2vw, 28px);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.egg-image {
  display: block;
  width: 100%;
  max-width: 460px;
  height: auto;
  position: relative;
  z-index: 1;
}
.egg-hotspots {
  position: absolute;
  inset: clamp(16px, 2vw, 28px);
  max-width: 460px;
  width: calc(100% - 2 * clamp(16px, 2vw, 28px));
  height: auto;
  margin-inline: auto;
  aspect-ratio: 976 / 1080;
  z-index: 2;
  pointer-events: none;
}
.egg-hotspots .hotspot {
  fill: rgba(120, 104, 212, 0);
  stroke: rgba(120, 104, 212, 0);
  stroke-width: 0.4;
  cursor: pointer;
  pointer-events: auto;
  transition: fill 0.25s ease, stroke 0.25s ease, filter 0.25s ease;
}
.egg-hotspots .hotspot:hover {
  /* Box on hover disabled per request. The dot indicators still scale on hover
     (see .egg-dot:hover) so users still get visual feedback. */
  fill: rgba(120, 104, 212, 0);
  stroke: rgba(120, 104, 212, 0);
}
/* The polygons get tabindex=0 from scripts.js, which makes them focusable.
   On click, the browser would draw the global rose :focus-visible rectangle
   around the polygon's bounding box. Suppress that here. */
.egg-hotspots .hotspot:focus,
.egg-hotspots .hotspot:focus-visible {
  outline: none;
}
.egg-hotspots .hotspot.is-active {
  /* Box on click disabled per request. Feedback comes from the dot itself
     (the .egg-dot.is-active pulse) and the side panel content swap. */
  fill: rgba(120, 104, 212, 0);
  stroke: rgba(120, 104, 212, 0);
  filter: none;
  animation: none;
}
.egg-hotspots .hotspot.screen.is-active {
  fill: rgba(135, 206, 188, 0);
  stroke: rgba(135, 206, 188, 0);
  filter: none;
}
@keyframes hotspotPulse {
  0%, 100% { stroke-opacity: 1; }
  50%      { stroke-opacity: 0.5; }
}

/* Floating clickable dots (also signal where to click) */
.egg-dots {
  position: absolute;
  inset: clamp(16px, 2vw, 28px);
  max-width: 460px;
  width: calc(100% - 2 * clamp(16px, 2vw, 28px));
  margin-inline: auto;
  aspect-ratio: 976 / 1080;
  pointer-events: none;
  z-index: 3;
}
.egg-dot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 22px; height: 22px;
  border-radius: 50%;
  background: white;
  border: 2px solid #6e62d0;
  pointer-events: auto;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 4px 10px rgba(28, 26, 58, 0.18);
  transition: transform 0.2s var(--ease-out), background 0.2s ease, box-shadow 0.2s ease;
}
.egg-dot::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #6e62d0;
  transition: background 0.2s ease, transform 0.2s ease;
}
.egg-dot:hover { transform: translate(-50%, -50%) scale(1.12); }
/* Suppress the global :focus-visible rose rectangle on these dots.
   Accessibility feedback still comes from the .is-active pulse + side panel swap. */
.egg-dot:focus,
.egg-dot:focus-visible {
  outline: none;
}
.egg-dot.is-active {
  background: #6e62d0;
  box-shadow: 0 0 0 6px rgba(110, 98, 208, 0.22), 0 4px 10px rgba(28, 26, 58, 0.18);
  animation: dotPulse 1.6s ease-in-out infinite;
}
.egg-dot.is-active::after { background: white; transform: scale(0.9); }
.egg-dot[data-module="screen"] { border-color: #2f8d76; }
.egg-dot[data-module="screen"]::after { background: #2f8d76; }
.egg-dot[data-module="screen"].is-active { background: #2f8d76; box-shadow: 0 0 0 6px rgba(47, 141, 118, 0.22), 0 4px 10px rgba(28, 26, 58, 0.18); }
.egg-dot[data-module="screen"].is-active::after { background: white; }
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 6px rgba(110, 98, 208, 0.22), 0 4px 10px rgba(28, 26, 58, 0.18); }
  50%      { box-shadow: 0 0 0 14px rgba(110, 98, 208, 0.08), 0 4px 10px rgba(28, 26, 58, 0.18); }
}

/* Description panel */
.egg-panel {
  background: #f7f7ff;
  border-radius: 18px;
  padding: clamp(22px, 2.2vw, 36px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 320px;
  position: relative;
}
.egg-panel-default,
.egg-panel-item {
  display: none;
}
.egg-panel-default[data-default],
.egg-panel-item.is-active {
  display: block;
}
.egg-panel-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6e62d0;
  margin-bottom: 14px;
}
.egg-panel h3 {
  color: #1c1a3a;
  margin-bottom: 14px;
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.25;
}
.egg-panel p {
  color: #3a3360;
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 14px;
}
.egg-panel p.lede-strong {
  font-weight: 700;
  color: #2f8d76;
  font-size: 16px;
}
.egg-panel-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.egg-panel-list li {
  font-size: 14px;
  color: #3a3360;
  display: flex;
  align-items: center;
  gap: 10px;
}
.egg-panel-list .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.egg-panel-list .dot-rose   { background: var(--rose); }
.egg-panel-list .dot-mint   { background: var(--mint); }
.egg-panel-list .dot-yellow { background: var(--yellow); }

.egg-tag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}
.egg-tag.tag-rose   { background: #fbdde2; color: #8b2c41; }
.egg-tag.tag-mint   { background: var(--mint-soft); color: #1e5448; }
.egg-tag.tag-yellow { background: var(--yellow-soft); color: #8a5d10; }

.egg-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: white;
  border: 1px solid #e0dffa;
  border-radius: 12px;
  padding: 16px;
  margin: 14px 0 16px;
}
.egg-meta > div {
  font-size: 13px;
  color: #3a3360;
  line-height: 1.5;
}
.egg-meta strong {
  display: inline-block;
  min-width: 110px;
  color: #1c1a3a;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-right: 8px;
}

.egg-cite {
  border-top: 1px dashed #d3d0f0;
  padding-top: 14px;
}
.egg-cite .cite-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6e62d0;
  margin-bottom: 6px;
}
.egg-cite a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: #1c1a3a;
  border-bottom: 1.5px solid #6e62d0;
  padding-bottom: 1px;
}
.egg-cite a:hover { color: #6e62d0; }

/* ===== Studies grid (Joon-style) ===== */
.studies-section {
  background: #eef0ff;
  padding-block: clamp(48px, 6vw, 96px);
}
.studies-head {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: clamp(28px, 3vw, 48px);
  max-width: 760px;
}
.studies-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: white;
  display: grid; place-items: center;
  color: #6e62d0;
  flex-shrink: 0;
  box-shadow: 0 6px 14px rgba(28, 26, 58, 0.08);
}
.studies-head h2 { color: #1c1a3a; margin-bottom: 6px; }
.studies-head p { color: #3a3360; font-size: 15px; }

.studies-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(20px, 2vw, 32px);
  align-items: stretch;
}
@media (max-width: 900px) { .studies-grid { grid-template-columns: 1fr; } }

.study-card {
  background: white;
  border-radius: 20px;
  padding: clamp(24px, 2.4vw, 36px);
  position: relative;
  box-shadow: 0 12px 30px rgba(28, 26, 58, 0.06);
  display: flex;
  flex-direction: column;
}
.study-tag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
  align-self: flex-start;
}
.study-tag.mint { background: var(--mint-soft); color: #1e5448; }
.study-tag.rose { background: #dde2ff; color: #3a3a8a; }

.study-link {
  position: absolute;
  top: clamp(24px, 2.4vw, 36px);
  right: clamp(24px, 2.4vw, 36px);
  font-size: 13px;
  font-weight: 700;
  color: #6e62d0;
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.study-link:hover { text-decoration: underline; }

.study-card h3 {
  color: #1c1a3a;
  margin-bottom: 12px;
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.3;
}
.study-card p {
  color: #3a3360;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 18px;
}

.study-results {
  background: #f7f7ff;
  border-radius: 14px;
  padding: 18px;
  margin-top: auto;
}
.study-results-title {
  font-size: 13px;
  font-weight: 700;
  color: #1c1a3a;
  margin-bottom: 12px;
}
.study-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 540px) { .study-stats { grid-template-columns: 1fr; } }
.stat-pill {
  background: #1c1a3a;
  color: white;
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.stat-pill .num {
  font-size: 22px;
  font-weight: 800;
  color: white;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.stat-pill .lbl {
  font-size: 11px;
  color: rgba(255,255,255,0.85);
  line-height: 1.35;
}

.study-partner {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid #e0dffa;
}
.study-partner .partner-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #6e62d0;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.study-partner .partner-mark {
  font-size: 17px;
  font-weight: 700;
  color: #1c1a3a;
  letter-spacing: -0.01em;
}

/* ===== Evidence-based principles ===== */
.principles-section {
  background: white;
  padding-block: clamp(56px, 7vw, 112px);
}
.principles-head {
  text-align: center;
  max-width: 740px;
  margin: 0 auto clamp(36px, 4vw, 64px);
}
.principles-head h2 {
  color: #6e62d0;
  margin-bottom: 16px;
  font-size: clamp(28px, 3.4vw, 44px);
}
.principles-head p {
  color: #3a3360;
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.6;
}
.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.2vw, 32px);
}
@media (max-width: 900px) { .principles-grid { grid-template-columns: 1fr; } }
.principle-card {
  background: #eef0ff;
  border-radius: 18px;
  padding: clamp(22px, 2vw, 32px);
  position: relative;
  display: flex;
  flex-direction: column;
}
.principle-tag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
  align-self: flex-start;
}
.principle-tag.rose   { background: #6e62d0; color: white; }
.principle-tag.mint   { background: var(--mint); color: #1e5448; }
.principle-tag.yellow { background: var(--yellow); color: #8a5d10; }

.principle-card h3 {
  color: #6e62d0;
  font-size: clamp(17px, 1.3vw, 20px);
  line-height: 1.35;
  margin-bottom: 12px;
}
.principle-card p {
  color: #3a3360;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 14px;
}
.principle-cite {
  font-size: 12px !important;
  color: #6e62d0 !important;
  font-weight: 600;
  margin-top: auto;
  margin-bottom: 0 !important;
}
.principle-cite a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #6e62d0;
  border-bottom: 1px solid #6e62d0;
  padding-bottom: 1px;
}
.principle-cite a:hover { color: #4a3fb0; }

/* ===== Why parent engagement matters ===== */
.engage-section {
  background: #eef0ff;
  padding-block: clamp(56px, 7vw, 112px);
}
.engage-head {
  max-width: 760px;
  margin-bottom: clamp(28px, 3vw, 48px);
}
.engage-head h2 {
  color: #1c1a3a;
  margin-bottom: 12px;
  font-size: clamp(28px, 3.2vw, 40px);
}
.engage-head p {
  color: #3a3360;
  font-size: clamp(15px, 1.05vw, 17px);
}
.engage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(18px, 1.8vw, 28px);
}
@media (max-width: 760px) { .engage-grid { grid-template-columns: 1fr; } }
.engage-card {
  background: white;
  border-radius: 16px;
  padding: clamp(22px, 2vw, 32px);
  border-left: 4px solid #6e62d0;
}
.engage-quote {
  color: #1c1a3a !important;
  font-size: clamp(15px, 1.1vw, 17px) !important;
  line-height: 1.55 !important;
  margin-bottom: 22px !important;
}
.engage-quote strong { color: #1c1a3a; font-weight: 700; }
.engage-source { font-size: 13px; color: #3a3360; line-height: 1.55; }
.engage-source .src-label {
  font-size: 12px;
  font-weight: 700;
  color: #6e62d0;
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}
.engage-source p { margin: 0; font-size: 13px !important; color: #3a3360 !important; line-height: 1.55 !important; }
.engage-source .src-meta { margin-top: 10px; color: #6b6790 !important; font-size: 12px !important; }

/* ===== Paper section (overrides) ===== */
.paper-section {
  background: var(--paper);
  padding-block: clamp(56px, 7vw, 112px);
}
.paper-head { max-width: 720px; }
.paper-head h2 { color: #1c1a3a; margin-bottom: 16px; }
.paper-head p { color: #3a3360; font-size: 17px; }
.paper-card { text-decoration: none; }
.paper-card .paper-title { color: #1c1a3a; }
.paper-card:hover .btn { background: rgba(28,28,30,0.04); }

/* ===== Paper row layout (preview + description) ===== */
.papers-list {
  margin-top: clamp(28px, 3vw, 48px);
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 2.6vw, 40px);
}
.paper-row {
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) 1fr;
  gap: clamp(20px, 2.4vw, 40px);
  background: white;
  border: 1px solid var(--stone);
  border-radius: 22px;
  padding: clamp(18px, 1.8vw, 28px);
  box-shadow: 0 8px 24px rgba(28, 26, 58, 0.04);
}
@media (max-width: 820px) {
  .paper-row { grid-template-columns: 1fr; }
}

/* Left: first-page poster image (clickable, opens full PDF in new tab).
   Used to be an <iframe>, but Firebase Hosting's X-Frame-Options: DENY
   header blocks same-origin PDF embedding. Poster image is also lighter
   and faster than streaming the full PDF on initial page load. */
.paper-preview {
  position: relative;
  display: block;
  aspect-ratio: 8.5 / 11;
  background: var(--stone-soft);
  border: 1px solid var(--stone);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.paper-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  background: white;
}
.paper-preview-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 18px;
  background: linear-gradient(180deg, transparent 55%, rgba(28, 26, 58, 0.78) 100%);
  opacity: 0;
  transition: opacity 0.25s var(--ease-out);
}
.paper-preview:hover .paper-preview-overlay,
.paper-preview:focus-visible .paper-preview-overlay {
  opacity: 1;
}
.paper-preview-cta {
  color: white;
  font-size: clamp(14px, 1vw, 16px);
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 8px 18px;
  background: var(--rose);
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(232, 117, 138, 0.4);
}

/* Placeholder for papers without a real PDF yet */
.paper-preview--placeholder {
  background: linear-gradient(135deg, var(--paper) 0%, var(--stone-soft) 100%);
  display: grid;
  place-items: center;
}
.preview-coming {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.preview-coming-mark {
  width: 78px;
  height: 96px;
  border-radius: 10px;
  background: var(--mint-soft);
  color: #1e5448;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.preview-coming-text {
  font-size: 14px;
  color: var(--slate);
  font-weight: 600;
  line-height: 1.5;
}

/* Right: description column */
.paper-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(4px, 1vw, 16px);
}
.paper-tag {
  display: inline-block;
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.paper-tag.mint { background: var(--mint-soft); color: #1e5448; }
.paper-tag.rose { background: #fbdde2; color: #8b2c41; }

.paper-info .paper-title {
  font-size: clamp(18px, 1.6vw, 24px);
  font-weight: 700;
  color: #1c1a3a;
  line-height: 1.25;
  margin-bottom: 12px;
}
.paper-info .paper-sub {
  font-size: clamp(14px, 1vw, 16px);
  color: #3a3360;
  line-height: 1.6;
  margin-bottom: 14px;
}
.paper-info .paper-meta {
  font-size: 13px;
  color: var(--slate-soft);
  margin: 0 0 22px;
  font-style: italic;
}
.paper-cta { align-self: flex-start; }
.paper-cta.is-disabled {
  pointer-events: none;
  opacity: 0.55;
  cursor: not-allowed;
}

/* ===== Skip link for accessibility ===== */
.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  background: var(--ink);
  color: white;
  border-radius: 6px;
  font-weight: 700;
  z-index: 200;
  transform: translateY(-200%);
  transition: transform 0.2s var(--ease-out);
}
.skip-link:focus { transform: translateY(0); }
