/* =============================================================
   StudyNect — Base Stylesheet
   Tokens · Typography · Reset · Motion primitives
   ============================================================= */

/* Fonts: Poppins (400/500/600) + Instrument Serif italic.
   Loaded via <link> in each page's <head> with preconnect, NOT @import here,
   so font discovery isn't blocked by CSS parsing. Slimmed face list saves
   ~5 font files / ~120 KB vs the default Google Fonts URL. */

:root {
  /* Brand — hero, grounded white */
  --bg: #ffffff;
  --bg-soft: #f5f5f5;
  --bg-ink: #0a0a0a;
  --ink: #111111;
  --ink-soft: #666666;
  --ink-hairline: rgba(17, 17, 17, 0.08);
  --ink-hairline-strong: rgba(17, 17, 17, 0.14);

  /* Four figures in orbit — pink, blue, orange, green */
  --pink: #ff1fa9;
  --blue: #38b6ff;
  --orange: #fea51f;
  --green: #74cc00;

  /* Gentle tinted backgrounds (~6% of each hue) for chapter moments */
  --pink-wash: #fff2fa;
  --blue-wash: #ebf8ff;
  --orange-wash: #fff7e8;
  --green-wash: #f3fbe0;

  /* Glows used behind the orbit hero */
  --pink-glow: rgba(255, 31, 169, 0.35);
  --blue-glow: rgba(56, 182, 255, 0.35);
  --orange-glow: rgba(254, 165, 31, 0.35);
  --green-glow: rgba(116, 204, 0, 0.35);

  /* Fluid type — based on viewport width, but bounded */
  --step--1: clamp(0.9rem, 0.85rem + 0.25vw, 1rem);
  --step-0: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  --step-1: clamp(1.125rem, 1rem + 0.6vw, 1.35rem);
  --step-2: clamp(1.35rem, 1.15rem + 1vw, 1.75rem);
  --step-3: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem);
  --step-4: clamp(2.25rem, 1.6rem + 3vw, 3.75rem);
  --step-5: clamp(3rem, 2rem + 5vw, 6rem);
  --step-6: clamp(4rem, 2.2rem + 9vw, 10rem);
  --step-7: clamp(5rem, 2.5rem + 13vw, 14rem);

  /* Rhythm */
  --space-1: clamp(0.25rem, 0.2rem + 0.2vw, 0.375rem);
  --space-2: clamp(0.5rem, 0.4rem + 0.3vw, 0.75rem);
  --space-3: clamp(0.75rem, 0.6rem + 0.5vw, 1.125rem);
  --space-4: clamp(1rem, 0.8rem + 0.7vw, 1.5rem);
  --space-5: clamp(1.5rem, 1.1rem + 1.2vw, 2.5rem);
  --space-6: clamp(2rem, 1.4rem + 2vw, 4rem);
  --space-7: clamp(3rem, 2rem + 3.5vw, 6rem);
  --space-8: clamp(4rem, 2.5rem + 5vw, 8rem);
  --space-9: clamp(6rem, 3rem + 8vw, 12rem);

  /* Layout */
  --max: 1440px;
  --gutter: clamp(1.25rem, 1rem + 1.5vw, 2.5rem);
  --radius-s: 10px;
  --radius-m: 18px;
  --radius-l: 28px;
  --radius-xl: 40px;

  /* Motion */
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-in-out: cubic-bezier(0.65, 0.05, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast: 160ms;
  --t-med: 320ms;
  --t-slow: 640ms;
  --t-cinematic: 1200ms;

  /* Header shell */
  --nav-h: 72px;
}

/* --------- Skip link (a11y) ---------
   Hidden until focused via Tab. Lets keyboard / screen-reader users jump
   past the nav directly to <main id="content"> instead of stepping through
   every nav item on every page. */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 9999;
  padding: 0.75em 1.2em;
  background: #111;
  color: #fff;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  transition: top 200ms ease-out;
}
.skip-link:focus {
  top: 0.75rem;
  outline: 2px solid var(--pink);
  outline-offset: 2px;
}

/* Respect system preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

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

html,
body {
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--ink);
}

body {
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 400;
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  overflow-x: clip;
  min-height: 100vh;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.02;
}

p {
  margin: 0;
}

::selection {
  background: var(--pink);
  color: #fff;
}

/* --------- Typography scale --------- */
.eyebrow {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow::before {
  content: "";
  width: 20px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
  display: inline-block;
}

.display {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: clamp(2.5rem, 1.6rem + 4vw, 5.5rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.display--xl {
  font-size: var(--step-7);
  font-weight: 700;
  line-height: 0.88;
  letter-spacing: -0.04em;
}

.serif {
  font-family: "Instrument Serif", "Times New Roman", serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.h1 {
  font-size: var(--step-5);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 0.98;
}

.h2 {
  font-size: var(--step-4);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.02;
}

.h3 {
  font-size: var(--step-3);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.lead {
  font-size: var(--step-2);
  color: var(--ink-soft);
  font-weight: 400;
  line-height: 1.35;
  max-width: 52ch;
}

.body {
  font-size: var(--step-0);
  color: var(--ink-soft);
  line-height: 1.6;
  max-width: 62ch;
}

.muted {
  color: var(--ink-soft);
}

.mono {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

/* Highlighting words in display copy (brand colors) */
.hl {
  position: relative;
  display: inline-block;
  color: var(--ink);
}
.hl[data-hl="pink"] {
  color: var(--pink);
}
.hl[data-hl="blue"] {
  color: var(--blue);
}
.hl[data-hl="orange"] {
  color: var(--orange);
}
.hl[data-hl="green"] {
  color: var(--green);
}

/* Underline swash — used on hero verbs */
.swash {
  position: relative;
  white-space: nowrap;
}
.swash::after {
  content: "";
  position: absolute;
  left: -0.04em;
  right: -0.04em;
  bottom: 0.02em;
  height: 0.12em;
  background: currentColor;
  opacity: 0.18;
  border-radius: 999px;
  transform-origin: left center;
  transform: scaleX(0);
  animation: swashIn 900ms var(--ease-out) 600ms forwards;
}
@keyframes swashIn {
  to {
    transform: scaleX(1);
  }
}

/* --------- Layout helpers --------- */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: var(--space-9) 0;
  position: relative;
}

.section--tight {
  padding: var(--space-7) 0;
}

.grid {
  display: grid;
  gap: var(--space-5);
}
.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 880px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

.flex {
  display: flex;
}
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}
.stack {
  display: flex;
  flex-direction: column;
}
.stack > * + * {
  margin-top: var(--gap, var(--space-4));
}

/* Hairline divider like a thin-film */
.hr {
  height: 1px;
  background: var(--ink-hairline);
  border: 0;
  margin: 0;
}

/* Noise / film grain — subtle paper warmth */
.grain::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.045;
  z-index: 9998;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.8 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
}

/* --------- Buttons & pill ctas --------- */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: #fff;
  --btn-border: transparent;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.95em 1.4em;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-border);
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.98rem;
  letter-spacing: -0.005em;
  transition:
    transform var(--t-fast) var(--ease-out),
    background var(--t-med) var(--ease-out),
    color var(--t-med) var(--ease-out),
    box-shadow var(--t-med) var(--ease-out);
  will-change: transform;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.3);
}
.btn:active {
  transform: translateY(0);
}
.btn .arrow {
  width: 1em;
  height: 1em;
  transition: transform var(--t-med) var(--ease-out);
}
.btn:hover .arrow {
  transform: translateX(3px);
}

.btn--pink {
  --btn-bg: var(--pink);
}
.btn--blue {
  --btn-bg: var(--blue);
}
.btn--orange {
  --btn-bg: var(--orange);
}
.btn--green {
  --btn-bg: var(--green);
}
.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-border: var(--ink-hairline-strong);
}
.btn--ghost:hover {
  --btn-bg: var(--ink);
  --btn-fg: #fff;
  --btn-border: var(--ink);
}

/* Oversized rallying-call CTA */
.rally {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4em;
  font-size: var(--step-3);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  padding: 0.7em 1em;
  border: 1px solid var(--ink-hairline-strong);
  border-radius: 999px;
  color: var(--ink);
  background: #fff;
  transition:
    background var(--t-med) var(--ease-out),
    color var(--t-med) var(--ease-out),
    border-color var(--t-med) var(--ease-out);
}
.rally:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* --------- Reveal on scroll --------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 900ms var(--ease-out),
    transform 900ms var(--ease-out);
}
[data-reveal].is-in {
  opacity: 1;
  transform: none;
}
[data-reveal="stagger"] > * {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 800ms var(--ease-out),
    transform 800ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms);
}
[data-reveal="stagger"].is-in > * {
  opacity: 1;
  transform: none;
}

/* Split text — letter-by-letter reveal */
.split .ch {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 900ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 18ms);
}
.split .word {
  display: inline-block;
  overflow: hidden;
  line-height: 1.05;
  padding-bottom: 0.05em;
}
.split.is-in .ch {
  transform: none;
}

/* =============================================================
   Mobile refinements (≤640px / ≤480px)
   Token overrides + global tweaks for phone-class viewports.
   ============================================================= */

@media (max-width: 640px) {
  :root {
    /* Tighten vertical rhythm on phones — sections feel less endless */
    --space-7: clamp(2rem, 1.5rem + 2vw, 3.5rem);
    --space-8: clamp(2.5rem, 1.8rem + 2.5vw, 4.5rem);
    --space-9: clamp(3rem, 2rem + 3vw, 5rem);
    /* Slightly tighter side padding on small phones */
    --gutter: clamp(1rem, 0.8rem + 1vw, 1.5rem);
    /* Slimmer header so hero gets more room */
    --nav-h: 64px;
  }

  /* Cap the largest display step so hero/CTA titles don't dominate */
  body {
    line-height: 1.5;
  }

  .h1 {
    line-height: 1.02;
  }
  .h2,
  .h3 {
    line-height: 1.08;
  }
  .lead {
    line-height: 1.4;
  }

  /* Buttons keep a comfortable 44px touch target on phones */
  .btn {
    padding: 0.85em 1.2em;
    font-size: 0.96rem;
    min-height: 44px;
  }
  .rally {
    font-size: var(--step-2);
    padding: 0.6em 0.9em;
  }

  /* Section spacing: keep top/bottom equal but trimmer */
  .section {
    padding: var(--space-8) 0;
  }
  .section--tight {
    padding: var(--space-6) 0;
  }
}

@media (max-width: 480px) {
  :root {
    --space-7: clamp(1.75rem, 1.2rem + 2vw, 3rem);
    --space-8: clamp(2rem, 1.4rem + 2.5vw, 4rem);
    --space-9: clamp(2.5rem, 1.6rem + 3vw, 4.5rem);
    --gutter: 1rem;
  }

  /* Reduce expensive split-letter staggers on tiny screens */
  .split .ch {
    transition-duration: 600ms;
  }
}
/* =============================================================
   StudyNect — Site Stylesheet
   Nav · Hero · Chapters · Pinwall · Footer
   ============================================================= */

/* ---------------- Navigation ---------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(1.6) blur(18px);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid transparent;
  transition:
    background var(--t-med) var(--ease-out),
    border-color var(--t-med) var(--ease-out);
}
.nav.is-scrolled {
  background: rgba(255, 255, 255, 0.9);
  border-bottom-color: var(--ink-hairline);
}
.nav__inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-weight: 600;
  font-size: 1.08rem;
  letter-spacing: -0.015em;
  color: var(--ink);
  transition: opacity var(--t-fast) var(--ease-out);
}
.nav__brand:hover {
  opacity: 0.7;
}
.nav__brand svg,
.nav__brand img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}
.nav__link {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ink);
  padding: 0.5em 0;
  position: relative;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.3em;
  height: 2px;
  background: var(--pink);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--t-med) var(--ease-out);
}
.nav__link:hover::after,
.nav__link.is-active::after {
  transform: scaleX(1);
}
.nav__right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Language toggle pill — HIDDEN by design.
   Site auto-detects language from navigator.languages on every visit.
   Keeping the markup so the i18n JS still has a hook (no DOM changes needed),
   but the pill never renders. */
.lang-toggle { display: none !important; }
.lang-toggle.is-actually-shown {
  display: inline-flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--ink-hairline-strong);
  border-radius: 999px;
  padding: 3px;
  position: relative;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.lang-toggle button {
  padding: 0.35em 0.8em;
  border-radius: 999px;
  color: var(--ink-soft);
  transition: color var(--t-med) var(--ease-out);
  position: relative;
  z-index: 2;
}
.lang-toggle button.is-active {
  color: #fff;
}
.lang-toggle__thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  background: var(--ink);
  border-radius: 999px;
  transition: transform var(--t-med) var(--ease-out);
  z-index: 1;
}
.lang-toggle[data-lang="en"] .lang-toggle__thumb {
  transform: translateX(100%);
}

/* Mobile nav hamburger */
.nav__toggle {
  display: none;
  width: 38px;
  height: 38px;
  position: relative;
  border-radius: 999px;
  border: 1px solid var(--ink-hairline-strong);
}
.nav__toggle span {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 1.5px;
  background: var(--ink);
  transition: transform var(--t-med) var(--ease-out), top var(--t-med) var(--ease-out), opacity var(--t-med) var(--ease-out);
}
.nav__toggle span:nth-child(1) {
  top: 14px;
}
.nav__toggle span:nth-child(2) {
  top: 22px;
}
.nav.is-open .nav__toggle span:nth-child(1) {
  top: 18px;
  transform: rotate(45deg);
}
.nav.is-open .nav__toggle span:nth-child(2) {
  top: 18px;
  transform: rotate(-45deg);
}

@media (max-width: 880px) {
  /* On mobile Safari, backdrop-filter + scroll causes a visible horizontal
     seam at the bottom of the nav (sub-pixel rounding). Drop the blur and
     use a solid background — looks identical at this size. */
  .nav {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .nav.is-scrolled {
    background: #ffffff;
  }
  .nav__toggle {
    display: inline-flex;
  }
  /* Use viewport-relative units (vw/dvh) instead of inset because the parent
     .nav (when blur is on) becomes a containing block for fixed descendants
     and inset:nav-h 0 0 0 would resolve top+bottom against the tiny nav box
     and collapse height to 0. Keeping vw/dvh is also safe for Safari. */
  .nav__links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    width: 100vw;
    height: calc(100vh - var(--nav-h));
    height: calc(100dvh - var(--nav-h));
    z-index: 90;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: var(--space-5) var(--gutter) var(--space-7);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateY(-4%);
    opacity: 0;
    pointer-events: none;
    transition:
      transform var(--t-med) var(--ease-out),
      opacity var(--t-med) var(--ease-out);
  }
  .nav.is-open .nav__links {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
  .nav__link {
    width: 100%;
    padding: 0.9em 0;
    font-size: var(--step-2);
    font-weight: 500;
    border-bottom: 1px solid var(--ink-hairline);
  }
  .nav__right {
    gap: var(--space-2);
  }
  .nav__right .btn {
    padding: 0.7em 1em;
    font-size: 0.85rem;
  }
}

/* ---------------- Hero — Orbit of four ---------------- */
.hero {
  position: relative;
  min-height: 100vh;
  padding-top: calc(var(--nav-h) + var(--space-5));
  padding-bottom: var(--space-8);
  overflow: hidden;
  isolation: isolate;
}

/* Colored glow washes that drift behind the orbit */
.hero__glows {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  filter: blur(80px);
  opacity: 0.9;
}
.hero__glow {
  position: absolute;
  width: 42vmax;
  height: 42vmax;
  border-radius: 50%;
  mix-blend-mode: multiply;
  animation: driftA 24s ease-in-out infinite alternate;
}
.hero__glow--pink {
  background: var(--pink-glow);
  top: -10%;
  left: 55%;
}
.hero__glow--blue {
  background: var(--blue-glow);
  top: 30%;
  left: -12%;
  animation-name: driftB;
  animation-duration: 30s;
}
.hero__glow--orange {
  background: var(--orange-glow);
  top: 55%;
  left: 60%;
  animation-name: driftC;
  animation-duration: 28s;
}
.hero__glow--green {
  background: var(--green-glow);
  top: 5%;
  left: 10%;
  animation-name: driftD;
  animation-duration: 34s;
}
@keyframes driftA {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(-8%, 6%) scale(1.15);
  }
}
@keyframes driftB {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(10%, -4%) scale(1.1);
  }
}
@keyframes driftC {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(-6%, -10%) scale(1.2);
  }
}
@keyframes driftD {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(8%, 8%) scale(1.1);
  }
}

.hero__inner {
  position: relative;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: var(--space-5);
  align-items: center;
  min-height: calc(100vh - var(--nav-h) - var(--space-5) - var(--space-8));
}
@media (max-width: 980px) {
  .hero__inner {
    grid-template-columns: 1fr;
    /* Generous breathing room between phone visual and copy on mobile —
       the phone's chassis + notch + tilt pulls visual mass past its frame */
    gap: var(--space-8);
    text-align: center;
  }
  .hero__copy {
    justify-self: center;
  }
  .hero__stage {
    order: -1;
    width: 100%;
    max-width: 460px;
    margin: 0 auto var(--space-3);
  }
}

.hero__copy {
  position: relative;
  z-index: 2;
  max-width: 640px;
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.4em 0.9em 0.4em 0.5em;
  border: 1px solid var(--ink-hairline-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: var(--space-4);
}
.hero__eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(116, 204, 0, 0.18);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    box-shadow: 0 0 0 8px rgba(116, 204, 0, 0);
  }
}

.hero__title {
  font-size: clamp(2.5rem, 1.6rem + 4vw, 5.5rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 0 0 var(--space-4);
}
.hero__title .serif {
  font-size: 0.82em;
  line-height: 0.9;
  display: inline-block;
  margin-top: 0.1em;
}
@media (max-width: 980px) {
  .hero__title {
    text-align: center;
  }
}

.hero__lead {
  font-size: var(--step-1);
  color: var(--ink-soft);
  max-width: 48ch;
  margin-bottom: var(--space-5);
  line-height: 1.45;
}
@media (max-width: 980px) {
  .hero__lead {
    margin-left: auto;
    margin-right: auto;
  }
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}
@media (max-width: 980px) {
  .hero__ctas {
    justify-content: center;
  }
}

.hero__meta {
  display: flex;
  gap: var(--space-5);
  flex-wrap: wrap;
  color: var(--ink-soft);
  font-size: 0.88rem;
}
.hero__meta strong {
  color: var(--ink);
  font-weight: 600;
  font-size: 1.15rem;
  display: block;
  line-height: 1.2;
  margin-bottom: 0.1em;
}

/* Stage — where the orbit lives */
.hero__stage {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 580px;
  justify-self: end;
}
@media (max-width: 980px) {
  .hero__stage {
    justify-self: center;
  }
}

/* Scroll nudge */
.hero__scroll {
  position: absolute;
  bottom: var(--space-4);
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  pointer-events: none;
}
.hero__scroll::after {
  content: "";
  width: 1px;
  height: 36px;
  background: currentColor;
  opacity: 0.3;
  animation: scrollLine 1.8s var(--ease-in-out) infinite;
  transform-origin: top center;
}
@keyframes scrollLine {
  0%, 100% {
    transform: scaleY(1);
    opacity: 0.3;
  }
  50% {
    transform: scaleY(0.4);
    opacity: 0.9;
  }
}

/* ---------------- Orbit component ---------------- */
/* SVG-driven; JS rotates the group slowly + reacts to cursor */
.orbit {
  position: absolute;
  inset: 0;
}
.orbit svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.orbit__ring {
  fill: none;
  stroke: var(--ink-hairline);
  stroke-dasharray: 2 8;
}
.orbit__figure {
  transform-origin: center;
  transform-box: fill-box;
  transition: transform var(--t-med) var(--ease-spring);
}
.orbit__figure:hover {
  transform: scale(1.06);
}
.orbit__label {
  font-family: "Poppins", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-anchor: middle;
}

/* Moving ticker around the outside */
.orbit__ticker {
  font-family: "Poppins", sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  fill: var(--ink-soft);
}

/* Bold brand-colored statement bubble over the orbit */
.orbit__tag {
  position: absolute;
  padding: 0.45em 0.85em;
  background: #fff;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.18);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(12px);
  animation: tagIn 900ms var(--ease-out) forwards;
}
.orbit__tag--pink {
  color: var(--pink);
  top: 6%;
  right: -4%;
  animation-delay: 1.2s;
}
.orbit__tag--blue {
  color: var(--blue);
  bottom: 28%;
  left: -8%;
  animation-delay: 1.5s;
}
.orbit__tag--orange {
  color: var(--orange);
  top: 42%;
  right: -10%;
  animation-delay: 1.8s;
}
.orbit__tag--green {
  color: var(--green);
  bottom: 4%;
  left: 8%;
  animation-delay: 2.1s;
}
@keyframes tagIn {
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 980px) {
  .orbit__tag {
    font-size: 0.72rem;
  }
  .orbit__tag--pink {
    right: 0;
  }
  .orbit__tag--orange {
    right: -2%;
  }
  .orbit__tag--blue {
    left: 0;
  }
}

/* ---------------- Marquee ---------------- */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--ink-hairline);
  border-bottom: 1px solid var(--ink-hairline);
  padding: var(--space-4) 0;
  background: #fff;
}
.marquee__track {
  display: flex;
  gap: var(--space-6);
  white-space: nowrap;
  animation: marquee 40s linear infinite;
  will-change: transform;
}
.marquee__track > * {
  flex: 0 0 auto;
  font-size: var(--step-2);
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: var(--space-6);
}
.marquee__track .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pink);
  display: inline-block;
}
.marquee__track .dot--blue {
  background: var(--blue);
}
.marquee__track .dot--orange {
  background: var(--orange);
}
.marquee__track .dot--green {
  background: var(--green);
}
@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ---------------- Chapter blocks (one per brand color) ---------------- */
.chapters {
  display: grid;
  gap: 0;
}

.chapter {
  padding: var(--space-9) 0;
  position: relative;
  overflow: hidden;
}
.chapter--pink {
  background: var(--pink-wash);
}
.chapter--blue {
  background: var(--blue-wash);
}
.chapter--orange {
  background: var(--orange-wash);
}
.chapter--green {
  background: var(--green-wash);
}

.chapter__inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: var(--space-6);
  align-items: center;
}
.chapter--flip .chapter__inner {
  grid-template-columns: 1.1fr 1fr;
}
.chapter--flip .chapter__visual {
  order: -1;
}
@media (max-width: 980px) {
  .chapter__inner,
  .chapter--flip .chapter__inner {
    grid-template-columns: 1fr;
  }
  .chapter--flip .chapter__visual {
    order: 0;
  }
}

.chapter__copy {
  max-width: 560px;
}
.chapter__number {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-size: var(--step-3);
  font-weight: 400;
  color: var(--ink-soft);
  margin-bottom: var(--space-3);
  display: block;
  letter-spacing: -0.01em;
}
.chapter__title {
  font-size: var(--step-5);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-4);
}
.chapter--pink .chapter__title .hl {
  color: var(--pink);
}
.chapter--blue .chapter__title .hl {
  color: var(--blue);
}
.chapter--orange .chapter__title .hl {
  color: var(--orange);
}
.chapter--green .chapter__title .hl {
  color: var(--green);
}
.chapter__lead {
  font-size: var(--step-1);
  line-height: 1.45;
  color: var(--ink-soft);
  margin-bottom: var(--space-5);
  max-width: 48ch;
}
.chapter__bullets {
  display: grid;
  gap: var(--space-3);
  list-style: none;
  padding: 0;
  margin: 0;
}
.chapter__bullets li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: var(--space-3);
  font-size: 0.98rem;
  color: var(--ink);
  line-height: 1.5;
}
.chapter__bullets li::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-top: 0.45em;
  background: currentColor;
}
.chapter--pink .chapter__bullets li::before {
  background: var(--pink);
}
.chapter--blue .chapter__bullets li::before {
  background: var(--blue);
}
.chapter--orange .chapter__bullets li::before {
  background: var(--orange);
}
.chapter--green .chapter__bullets li::before {
  background: var(--green);
}

/* Chapter visual — device mock / card cluster */
.chapter__visual {
  position: relative;
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (max-width: 980px) {
  .chapter__visual {
    aspect-ratio: 1 / 1;
    max-width: 480px;
    margin: 0 auto;
  }
}

/* Phone chassis */
.phone {
  position: relative;
  width: min(320px, 78%);
  aspect-ratio: 9 / 19;
  background: #0a0a0a;
  border-radius: 44px;
  padding: 10px;
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.25),
    0 8px 18px -6px rgba(0, 0, 0, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  transform: rotate(-4deg);
  transition: transform 800ms var(--ease-out);
}
.chapter--flip .phone {
  transform: rotate(4deg);
}
.phone:hover {
  transform: rotate(0);
}
.phone__screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: #fff;
  border-radius: 34px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.phone__notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 24px;
  background: #0a0a0a;
  border-radius: 999px;
  z-index: 5;
}
.phone__status {
  padding: 14px 22px 6px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
}
.phone__bar {
  padding: 22px 18px 6px;
}
.phone__title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.phone__sub {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 2px;
}
.phone__body {
  flex: 1;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}
.phone__card {
  background: #fff;
  border: 1px solid var(--ink-hairline);
  border-radius: 18px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.04);
  transition: transform var(--t-med) var(--ease-spring);
}
.phone__card:hover {
  transform: translateY(-2px);
}
.phone__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}
.phone__avatar--pink {
  background: var(--pink);
}
.phone__avatar--blue {
  background: var(--blue);
}
.phone__avatar--orange {
  background: var(--orange);
}
.phone__avatar--green {
  background: var(--green);
}
.phone__meta {
  flex: 1;
  min-width: 0;
}
.phone__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.phone__msg {
  font-size: 11px;
  color: var(--ink-soft);
  line-height: 1.3;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.phone__pill {
  font-size: 10px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}
.phone__pill--new {
  background: var(--pink);
  color: #fff;
}

.phone__tabs {
  display: flex;
  border-top: 1px solid var(--ink-hairline);
  padding: 10px 14px 16px;
  gap: 0;
  justify-content: space-around;
}
.phone__tab {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--ink-hairline);
}
.phone__tab.is-active {
  background: var(--ink);
}

/* Floating badges around the phone */
.floater {
  position: absolute;
  background: #fff;
  border: 1px solid var(--ink-hairline);
  box-shadow: 0 14px 28px -12px rgba(0, 0, 0, 0.14);
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  animation: floatA 6s ease-in-out infinite;
}
.floater svg {
  width: 18px;
  height: 18px;
}
.floater--a {
  top: 12%;
  right: -2%;
  animation-delay: 0s;
}
.floater--b {
  bottom: 18%;
  left: -6%;
  animation-delay: -2s;
  animation-name: floatB;
}
.floater--c {
  bottom: 0;
  right: 4%;
  animation-delay: -4s;
  animation-name: floatC;
}
@keyframes floatA {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes floatB {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-10px) rotate(-2deg); }
}
@keyframes floatC {
  0%, 100% { transform: translateY(0) rotate(3deg); }
  50% { transform: translateY(-6px) rotate(3deg); }
}

/* ---------------- Pinwall ---------------- */
.pinwall {
  position: relative;
  padding: var(--space-9) 0;
  background: var(--bg-soft);
  overflow: hidden;
}
.pinwall__header {
  max-width: var(--max);
  margin: 0 auto var(--space-6);
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-5);
  align-items: end;
}
@media (max-width: 880px) {
  .pinwall__header {
    grid-template-columns: 1fr;
  }
}

.pinwall__grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-3);
}
.pin {
  position: relative;
  border-radius: var(--radius-l);
  padding: var(--space-5);
  background: #fff;
  border: 1px solid var(--ink-hairline);
  overflow: hidden;
  transition:
    transform var(--t-med) var(--ease-spring),
    box-shadow var(--t-med) var(--ease-out);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
}
.pin:hover {
  transform: translateY(-4px) rotate(-0.5deg);
  box-shadow: 0 28px 48px -20px rgba(0, 0, 0, 0.22);
  z-index: 2;
}
.pin__tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.pin__body {
  font-size: var(--step-1);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-top: var(--space-4);
}
.pin__foot {
  margin-top: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.pin--pink {
  background: var(--pink);
  color: #fff;
  border-color: transparent;
}
.pin--pink .pin__tag,
.pin--pink .pin__foot {
  color: rgba(255, 255, 255, 0.75);
}
.pin--blue {
  background: var(--blue);
  color: #fff;
  border-color: transparent;
}
.pin--blue .pin__tag,
.pin--blue .pin__foot {
  color: rgba(255, 255, 255, 0.85);
}
.pin--orange {
  background: var(--orange);
  color: var(--ink);
  border-color: transparent;
}
.pin--green {
  background: var(--green);
  color: var(--ink);
  border-color: transparent;
}
.pin--ink {
  background: var(--bg-ink);
  color: #fff;
  border-color: transparent;
}
.pin--ink .pin__tag,
.pin--ink .pin__foot {
  color: rgba(255, 255, 255, 0.65);
}

/* Pinwall spans */
.pin--span-4 { grid-column: span 4; }
.pin--span-5 { grid-column: span 5; }
.pin--span-6 { grid-column: span 6; }
.pin--span-7 { grid-column: span 7; }
.pin--span-8 { grid-column: span 8; }
.pin--tall { min-height: 320px; }
.pin--xtall { min-height: 380px; }

@media (max-width: 980px) {
  .pinwall__grid {
    grid-template-columns: repeat(6, 1fr);
  }
  .pin--span-4,
  .pin--span-5,
  .pin--span-6,
  .pin--span-7,
  .pin--span-8 {
    grid-column: span 6;
  }
}

/* Event / avatar stacks inside pins */
.avatar-stack {
  display: flex;
}
.avatar-stack > * {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid currentColor;
  margin-left: -8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
}
.avatar-stack > *:first-child {
  margin-left: 0;
}

/* ---------------- Stat band ---------------- */
.stats {
  padding: var(--space-8) 0;
  background: var(--bg-ink);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.stats::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(255, 31, 169, 0.18) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(56, 182, 255, 0.18) 0%, transparent 50%);
  pointer-events: none;
}
.stats__grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
  position: relative;
  z-index: 2;
}
@media (max-width: 880px) {
  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.stat__n {
  font-size: var(--step-5);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.9;
}
.stat__label {
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.65);
  max-width: 24ch;
  line-height: 1.4;
}
.stat--pink .stat__n { color: var(--pink); }
.stat--blue .stat__n { color: var(--blue); }
.stat--orange .stat__n { color: var(--orange); }
.stat--green .stat__n { color: var(--green); }

/* ---------------- Voice quotes ---------------- */
.voices {
  padding: var(--space-9) 0;
}
.voices__title {
  max-width: var(--max);
  margin: 0 auto var(--space-6);
  padding: 0 var(--gutter);
}
.voices__rail {
  display: flex;
  gap: var(--space-4);
  padding: 0 var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.voices__rail::-webkit-scrollbar {
  display: none;
}
.voices__rail:focus-visible {
  outline: 2px solid var(--ink, #111);
  outline-offset: 4px;
  border-radius: 8px;
}
.voice {
  flex: 0 0 min(420px, 80vw);
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid var(--ink-hairline);
  border-radius: var(--radius-l);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition: transform var(--t-med) var(--ease-spring);
}
.voice:hover {
  transform: translateY(-4px);
}
.voice__quote {
  font-family: "Instrument Serif", serif;
  font-size: var(--step-2);
  font-style: italic;
  line-height: 1.25;
  color: var(--ink);
}
.voice__who {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: auto;
}
.voice__who strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
}
.voice__who span {
  display: block;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* ---------------- CTA banner ---------------- */
.cta {
  padding: var(--space-9) 0;
  background: var(--bg-ink);
  color: #fff;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.cta__rings {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.cta__rings svg {
  width: min(880px, 140%);
  height: auto;
  opacity: 0.3;
}
.cta__inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 2;
}
.cta__title {
  font-size: clamp(2.5rem, 1.6rem + 4vw, 5.25rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin-bottom: var(--space-5);
}
.cta__title .hl[data-hl="pink"] { color: var(--pink); }
.cta__title .hl[data-hl="blue"] { color: var(--blue); }
.cta__title .hl[data-hl="orange"] { color: var(--orange); }
.cta__title .hl[data-hl="green"] { color: var(--green); }
.cta__sub {
  font-size: var(--step-1);
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: var(--space-6);
}
.cta__ctas {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.cta .btn--ghost {
  --btn-fg: #fff;
  --btn-border: rgba(255, 255, 255, 0.2);
}
.cta .btn--ghost:hover {
  --btn-bg: #fff;
  --btn-fg: var(--ink);
  --btn-border: #fff;
}

/* ---------------- Footer ---------------- */
.foot {
  padding: var(--space-8) 0 var(--space-5);
  background: var(--bg);
  border-top: 1px solid var(--ink-hairline);
}
.foot__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-5);
}
@media (max-width: 880px) {
  .foot__inner {
    grid-template-columns: 1fr 1fr;
  }
}
.foot__brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 360px;
}
.foot__brand-mark {
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.foot__brand-mark svg,
.foot__brand-mark img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}
.foot__tagline {
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.5;
}
.foot__col h4 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 var(--space-3);
}
.foot__col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7em;
}
.foot__col a {
  font-size: 0.95rem;
  color: var(--ink);
  transition: color var(--t-fast) var(--ease-out);
}
.foot__col a:hover {
  color: var(--pink);
}
.foot__bottom {
  max-width: var(--max);
  margin: var(--space-7) auto 0;
  padding: var(--space-4) var(--gutter) 0;
  border-top: 1px solid var(--ink-hairline);
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--ink-soft);
  flex-wrap: wrap;
  gap: var(--space-3);
}
.foot__tag {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink);
}

/* ---------------- Generic card rows for sub-pages ---------------- */
.page-hero {
  padding: calc(var(--nav-h) + var(--space-7)) 0 var(--space-7);
  position: relative;
  overflow: hidden;
}
.page-hero__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-5);
  align-items: end;
}
@media (max-width: 880px) {
  .page-hero__inner {
    grid-template-columns: 1fr;
  }
}
.page-hero__title {
  font-size: clamp(2.5rem, 1.6rem + 4vw, 5.5rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.page-hero__lead {
  font-size: var(--step-1);
  color: var(--ink-soft);
  line-height: 1.45;
  max-width: 48ch;
}

/* Feature row — full width cards */
.feat {
  padding: var(--space-7) 0;
  border-top: 1px solid var(--ink-hairline);
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-5);
  align-items: start;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
@media (max-width: 880px) {
  .feat {
    grid-template-columns: 1fr;
  }
}
.feat__n {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-size: var(--step-3);
  color: var(--ink-soft);
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}
.feat__n .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.feat--pink .feat__n .dot { background: var(--pink); }
.feat--blue .feat__n .dot { background: var(--blue); }
.feat--orange .feat__n .dot { background: var(--orange); }
.feat--green .feat__n .dot { background: var(--green); }
.feat__title {
  font-size: var(--step-4);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.025em;
  margin-bottom: var(--space-3);
}
.feat__body {
  font-size: var(--step-1);
  color: var(--ink-soft);
  line-height: 1.5;
  max-width: 56ch;
  margin-bottom: var(--space-4);
}
.feat__chips {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.chip {
  padding: 0.4em 0.9em;
  border: 1px solid var(--ink-hairline-strong);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink);
}
.chip--pink { border-color: var(--pink); color: var(--pink); }
.chip--blue { border-color: var(--blue); color: var(--blue); }
.chip--orange { border-color: var(--orange); color: var(--orange); }
.chip--green { border-color: var(--green); color: var(--green); }

/* Download page — phone app store cards */
.store-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  max-width: 720px;
  margin: 0 auto;
}
@media (max-width: 720px) {
  .store-cards {
    grid-template-columns: 1fr;
  }
}
.store-card {
  padding: var(--space-5);
  border: 1px solid var(--ink-hairline-strong);
  border-radius: var(--radius-l);
  background: #fff;
  text-align: left;
  transition:
    transform var(--t-med) var(--ease-spring),
    border-color var(--t-med) var(--ease-out);
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.store-card:hover {
  transform: translateY(-4px);
  border-color: var(--ink);
}
.store-card__icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.store-card__meta small {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: block;
}
.store-card__meta strong {
  font-size: 1.1rem;
  font-weight: 600;
}

/* Legal page — prose */
.prose {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-7) var(--gutter) var(--space-9);
}
.prose h2 {
  font-size: var(--step-2);
  font-weight: 600;
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
  letter-spacing: -0.015em;
}
.prose h2:first-child {
  margin-top: 0;
}
.prose p,
.prose li {
  color: var(--ink-soft);
  line-height: 1.65;
  margin-bottom: var(--space-3);
  font-size: 0.98rem;
}
.prose ul {
  padding-left: 1.2em;
}
.prose a {
  color: var(--pink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* Hide bilingual content by language */
html[data-lang="de"] [data-when="en"],
html[data-lang="en"] [data-when="de"] {
  display: none !important;
}

/* =============================================================
   Mobile refinements (≤640px / ≤480px)
   Component-level fine-tuning for phone-class viewports.
   ============================================================= */

@media (max-width: 640px) {
  /* ---------- Nav ---------- */
  .nav__inner {
    gap: var(--space-3);
  }
  .nav__brand span {
    /* Wordmark stays visible but a touch smaller */
    font-size: 1rem;
  }
  .nav__toggle {
    /* 44×44 minimum touch target */
    width: 44px;
    height: 44px;
  }
  .nav__toggle span {
    left: 12px;
    right: 12px;
  }
  .nav__toggle span:nth-child(1) {
    top: 17px;
  }
  .nav__toggle span:nth-child(2) {
    top: 25px;
  }
  .nav.is-open .nav__toggle span:nth-child(1),
  .nav.is-open .nav__toggle span:nth-child(2) {
    top: 21px;
  }
  /* On very small screens, the home page already shows a giant CTA in the hero,
     so we hide the header CTA there to keep the bar uncluttered. Subpages
     (features / about / download / impressum / datenschutz) don't have an
     immediate hero CTA — keep the header CTA visible so the primary action
     stays one tap away. Trigger via <body class="home"> on index.html. */
  body.home .nav__right .btn {
    display: none;
  }
  /* Tighter padding so the CTA fits next to the hamburger on small phones */
  .nav__right .btn {
    padding: 0.55em 0.9em;
    font-size: 0.82rem;
  }
  .lang-toggle {
    /* Larger hit area for the language pills */
    font-size: 0.82rem;
  }
  .lang-toggle button {
    padding: 0.45em 0.95em;
  }

  /* ---------- Hero ---------- */
  .hero {
    /* Use small-viewport height so iOS URL bar doesn't push content */
    min-height: 100svh;
    padding-top: calc(var(--nav-h) + var(--space-4));
    padding-bottom: var(--space-7);
  }
  .hero__inner {
    min-height: auto;
    gap: var(--space-5);
  }
  .hero__copy {
    text-align: center;
  }
  .hero__title {
    /* A touch tighter — keeps three lines from breaking the fold */
    font-size: clamp(2rem, 1.4rem + 5vw, 3.25rem);
    /* Stop line crashes (descender of "p" in "App" was hitting "h" of "herunter") */
    line-height: 1.06;
  }
  .hero__lead {
    font-size: var(--step-0);
  }
  .hero__ctas {
    gap: var(--space-2);
  }
  .hero__ctas .btn {
    /* Make the primary CTA wide so it's thumb-friendly */
    flex: 1 1 auto;
    justify-content: center;
  }
  .hero__meta {
    justify-content: center;
    gap: var(--space-4);
    font-size: 0.82rem;
  }
  .hero__meta strong {
    font-size: 1.05rem;
  }
  /* Tone down the glow blobs — heavy filters tank phone GPUs */
  .hero__glows {
    filter: blur(60px);
    opacity: 0.55;
  }
  .hero__glow {
    width: 60vmax;
    height: 60vmax;
    animation-duration: 40s;
  }
  /* Hide the scroll nudge on phones — the hero already fills the screen */
  .hero__scroll {
    display: none;
  }

  /* Shrink the orbit so the full stage fits inside the hero section on phones */
  .hero__stage {
    max-width: 300px;
    margin: 0 auto;
  }

  /* Floating tags around the orbit — push them to the four outer corners so
     they sit OUTSIDE the orbit ring and never collide with the centered
     "StudyNect" wordmark or the rotating colored figures. */
  .orbit__tag {
    font-size: 0.66rem;
    padding: 0.35em 0.65em;
  }
  .orbit__tag--pink   { top: 0;       right: -2%;  left: auto;  bottom: auto; }
  .orbit__tag--orange { top: 14%;     left: -2%;   right: auto; bottom: auto; }
  .orbit__tag--blue   { bottom: 14%;  right: -2%;  left: auto;  top: auto;    }
  .orbit__tag--green  { bottom: 0;    left: -2%;   right: auto; top: auto;    }

  /* ---------- Marquee ---------- */
  .marquee {
    padding: var(--space-3) 0;
  }
  .marquee__track {
    gap: var(--space-5);
    /* Slightly faster + smaller text so it reads as motion, not as labels */
    animation-duration: 32s;
  }
  .marquee__track > * {
    font-size: var(--step-1);
    gap: var(--space-5);
  }

  /* ---------- Chapters ---------- */
  .chapter {
    padding: var(--space-7) 0;
  }
  .chapter__inner,
  .chapter--flip .chapter__inner {
    gap: var(--space-5);
  }
  .chapter__title {
    font-size: clamp(2rem, 1.5rem + 4vw, 3rem);
  }
  .chapter__lead {
    font-size: var(--step-0);
  }
  /* Phone mock — let it breathe, drop the rotation so it sits flat & readable */
  .chapter__visual {
    aspect-ratio: auto;
    min-height: 380px;
    max-width: 320px;
  }
  .phone {
    width: 240px;
    transform: rotate(0);
  }
  .chapter--flip .phone {
    transform: rotate(0);
  }
  /* Floaters get pulled in so they don't escape the screen */
  .floater {
    font-size: 0.78rem;
    padding: 8px 12px;
  }
  .floater--a { top: 4%; right: 0; }
  .floater--b { bottom: 22%; left: 0; }
  .floater--c { bottom: -2%; right: 6%; }

  /* ---------- Pinwall ---------- */
  .pinwall {
    padding: var(--space-7) 0;
  }
  .pinwall__grid {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
  .pin--span-4,
  .pin--span-5,
  .pin--span-6,
  .pin--span-7,
  .pin--span-8 {
    grid-column: span 1;
  }
  .pin {
    min-height: 180px;
    padding: var(--space-4);
  }
  .pin--tall { min-height: 220px; }
  .pin--xtall { min-height: 260px; }

  /* ---------- Stats ---------- */
  .stats {
    padding: var(--space-7) 0;
  }
  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }
  .stat__n {
    font-size: clamp(2.5rem, 2rem + 4vw, 4rem);
  }
  .stat__label {
    font-size: 0.82rem;
  }

  /* ---------- Voices (horizontal rail) ---------- */
  .voices {
    padding: var(--space-7) 0;
  }
  .voice {
    flex: 0 0 min(320px, 86vw);
    padding: var(--space-4);
  }
  .voice__quote {
    font-size: var(--step-1);
  }

  /* ---------- CTA ---------- */
  .cta {
    padding: var(--space-7) 0;
  }
  .cta__title {
    font-size: clamp(2rem, 1.4rem + 5vw, 3.5rem);
  }
  .cta__sub {
    font-size: var(--step-0);
  }
  .cta__ctas {
    gap: var(--space-2);
  }
  .cta__ctas .btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  /* ---------- Footer ---------- */
  .foot {
    padding: var(--space-7) 0 var(--space-4);
  }
  .foot__inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4) var(--space-3);
  }
  .foot__brand {
    grid-column: 1 / -1;
  }
  .foot__bottom {
    margin-top: var(--space-5);
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }

  /* ---------- Sub-pages (features / about / download / legal) ---------- */
  .page-hero {
    padding: calc(var(--nav-h) + var(--space-5)) 0 var(--space-5);
  }
  .page-hero__inner {
    gap: var(--space-4);
    align-items: start;
  }
  .page-hero__title {
    font-size: clamp(2.25rem, 1.6rem + 5vw, 3.75rem);
  }
  .page-hero__lead {
    font-size: var(--step-0);
  }
  /* Download page: the phone is rotated -3deg via an inline style which
     visually overflows past the layout box. Combined with the tight default
     mobile gap, the phone's bottom-right corner crashes into the eyebrow +
     headline below. Cancel the tilt on phones and add real breathing room. */
  .page-hero .hero__stage {
    margin-bottom: var(--space-6);
  }
  .page-hero .hero__stage .phone {
    transform: rotate(0deg) !important;
    width: 220px;
  }
  .feat {
    padding: var(--space-5) var(--gutter);
    gap: var(--space-3);
  }
  .feat__title {
    font-size: clamp(1.75rem, 1.4rem + 3vw, 2.5rem);
  }
  .feat__body {
    font-size: var(--step-0);
  }
  .store-cards {
    gap: var(--space-3);
  }
  .store-card {
    padding: var(--space-4);
    gap: var(--space-3);
  }
  .store-card__icon {
    width: 46px;
    height: 46px;
  }
  .prose {
    padding: var(--space-5) var(--gutter) var(--space-7);
  }
  .prose p,
  .prose li {
    font-size: 0.95rem;
  }
}

/* ---------- Tiny phones (≤480px) ---------- */
@media (max-width: 480px) {
  .nav__brand span {
    /* Hide wordmark text — logo mark alone is plenty at this size */
    display: none;
  }
  .lang-toggle {
    font-size: 0.78rem;
  }
  .lang-toggle button {
    padding: 0.4em 0.75em;
  }

  .hero__title {
    font-size: clamp(1.85rem, 1.2rem + 6vw, 2.75rem);
    line-height: 1.08;
  }
  .hero__title br {
    /* Allow natural wrapping rather than forcing line breaks at narrow widths */
    display: none;
  }
  .hero__title .serif {
    display: block;
    margin-top: 0.2em;
  }

  /* Stats — single column on the smallest screens */
  .stats__grid {
    grid-template-columns: 1fr;
  }
  .stat__label {
    max-width: none;
  }

  /* Footer — single column on the smallest screens */
  .foot__inner {
    grid-template-columns: 1fr;
  }
  .foot__brand {
    grid-column: auto;
  }

  /* Chapter phone mock — even more compact */
  .chapter__visual {
    min-height: 340px;
  }
  .phone {
    width: 220px;
  }
}

/* ---------- Save data: pause always-running decorative animations ---------- */
@media (prefers-reduced-data: reduce) {
  .marquee__track,
  .hero__glow {
    animation-play-state: paused;
  }
}

/* ---------- Reduce motion cost on coarse pointers (touch devices) ---------- */
@media (pointer: coarse) {
  /* Disable hover-only flourishes that fire on tap-and-hold */
  .pin:hover {
    transform: none;
  }
  .voice:hover,
  .store-card:hover {
    transform: none;
  }
  .phone:hover,
  .chapter--flip .phone:hover {
    transform: rotate(0);
  }
}
