/* =========================================================
   AROXWELL — "Obsidian & Gold"
   One stylesheet for every page on aroxwell.com.
   Brand tokens live in :root. Glass recipes: .glass, .btn-gold, .glass-bar
   ========================================================= */

@font-face { font-family: "Space Grotesk"; src: url("fonts/space-grotesk-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("fonts/cormorant-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("fonts/cormorant-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --obsidian: #060606;
  --ink: #f2f0ea;
  --text: rgba(242, 240, 234, 0.74);
  --muted: rgba(242, 240, 234, 0.48);
  --faint: rgba(242, 240, 234, 0.12);

  --gold-hi: #f6e3b8;
  --gold: #d6b06f;
  --gold-lo: #9a7140;
  --gold-text: linear-gradient(180deg, #f8e7c1 0%, #dcb878 45%, #a8793f 100%);
  --silver-text: linear-gradient(180deg, #ffffff 0%, #d9d7d1 45%, #8f8c86 100%);

  --error: #f2a49a;

  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--obsidian);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold-hi); }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
::selection { background: rgba(214, 176, 111, 0.35); color: #fff; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- atmosphere: glow + marble + vignette + film grain ---------- */

.atmosphere { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--obsidian); }
.atmosphere::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 45% at 50% 32%, rgba(214, 176, 111, 0.13), transparent 70%),
    radial-gradient(40% 30% at 85% 90%, rgba(214, 176, 111, 0.05), transparent 70%),
    url("bg.jpg") center / cover no-repeat;
  opacity: 0.9;
}
.atmosphere::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 50% 40%, transparent 40%, rgba(0, 0, 0, 0.75) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.55;
  mix-blend-mode: overlay;
}
@media (max-width: 700px) {
  .atmosphere::before {
    background:
      radial-gradient(90% 40% at 50% 25%, rgba(214, 176, 111, 0.14), transparent 70%),
      url("bg-mobile.jpg") center / cover no-repeat;
  }
}

/* ---------- glass recipes ---------- */

.glass {
  position: relative;
  /* liquid glass: almost clear body, light pooling at the bottom edge (refraction) */
  background:
    radial-gradient(90% 70% at 50% 125%, rgba(255, 255, 255, 0.13), transparent 60%),
    linear-gradient(170deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.012) 45%, rgba(255, 255, 255, 0.03));
  -webkit-backdrop-filter: blur(22px) saturate(170%) brightness(1.05);
  backdrop-filter: blur(22px) saturate(170%) brightness(1.05);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.38),      /* top specular edge */
    inset 0 -1px 1px rgba(255, 255, 255, 0.1),      /* bottom edge catch */
    inset 0 0 22px rgba(255, 255, 255, 0.035),      /* thickness */
    0 18px 50px rgba(0, 0, 0, 0.45);
  border-radius: 999px;
}
/* gradient rim — brighter top-left, fading, catching light bottom-right */
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.05) 38%, rgba(255, 255, 255, 0.03) 62%, rgba(246, 227, 184, 0.35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  border: 0; border-radius: 999px;
  font-family: var(--sans); font-weight: 600; font-size: 15px; letter-spacing: 0.04em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s var(--ease);
}
/* no lift on hover (the user only wants the colour/gradient change) */
.btn:active { transform: scale(0.98); }
.btn .arrow { transition: transform 0.35s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* liquid gold glass — tinted, see-through, glowing from inside */
.btn-gold {
  color: #fff7e6;
  text-shadow: 0 1px 2px rgba(70, 44, 12, 0.55);
  background:
    radial-gradient(75% 65% at 50% 118%, rgba(255, 222, 150, 0.6), transparent 70%),    /* light pooling at the bottom */
    linear-gradient(180deg, rgba(250, 226, 178, 0.38) 0%, rgba(214, 170, 98, 0.26) 50%, rgba(168, 118, 52, 0.4) 100%);
  -webkit-backdrop-filter: blur(16px) saturate(190%) brightness(1.15);
  backdrop-filter: blur(16px) saturate(190%) brightness(1.15);
  box-shadow:
    inset 0 1px 1px rgba(255, 250, 235, 0.85),       /* specular top edge */
    inset 0 -1px 1px rgba(255, 222, 160, 0.55),      /* bottom rim catch */
    inset 0 0 0 1px rgba(255, 228, 176, 0.32),       /* gold rim */
    inset 0 0 24px rgba(246, 210, 140, 0.22),        /* inner glow / thickness */
    0 10px 34px rgba(214, 176, 111, 0.26),
    0 2px 8px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.btn-gold::after { /* curved glossy highlight */
  content: ""; position: absolute; left: 5%; right: 5%; top: 1px; height: 48%;
  border-radius: 999px 999px 50% 50% / 999px 999px 100% 100%;
  background: linear-gradient(180deg, rgba(255, 248, 230, 0.3), rgba(255, 240, 210, 0) 90%);
  pointer-events: none;
}
.btn-gold::before { /* light sweep on hover */
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  transition: left 0.8s var(--ease);
  pointer-events: none;
}
.btn-gold:hover {
  color: #fff;
  background:
    radial-gradient(70% 70% at 50% 115%, rgba(255, 228, 165, 0.7), transparent 72%),
    linear-gradient(180deg, rgba(255, 238, 200, 0.42) 0%, rgba(222, 182, 112, 0.26) 50%, rgba(176, 128, 62, 0.38) 100%);
  box-shadow:
    inset 0 1px 1px rgba(255, 250, 235, 0.95), inset 0 -1px 1px rgba(255, 222, 160, 0.65),
    inset 0 0 0 1px rgba(255, 228, 176, 0.42), inset 0 0 28px rgba(246, 210, 140, 0.3),
    0 16px 44px rgba(214, 176, 111, 0.36), 0 2px 8px rgba(0, 0, 0, 0.35);
}
.btn-gold:hover::before { left: 120%; }

/* kintsugi — obsidian pill with a fine gold crack that fades out behind the words (cream text stays
   readable); the crack lights up on hover. Style E2 from the button lab, the user's pick for both hero buttons. */
.btn-kintsugi {
  color: #fbf0da;
  background: linear-gradient(180deg, #1b1916, #070707);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 0 0 1px rgba(214, 176, 111, 0.25), 0 10px 30px rgba(0, 0, 0, 0.6);
  overflow: hidden; isolation: isolate;
  transition: color 0.45s var(--ease), box-shadow 0.45s var(--ease), transform 0.35s var(--ease);
}
.btn-kintsugi .crack { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none;
  opacity: 0.55; transition: opacity 0.5s var(--ease), filter 0.5s var(--ease);
  -webkit-mask: radial-gradient(40% 65% at 50% 50%, transparent 35%, #000 90%);
  mask: radial-gradient(40% 65% at 50% 50%, transparent 35%, #000 90%); }
.btn-kintsugi .crack.flip { transform: scale(-1, -1); } /* second button: same crack, turned around */
.btn-kintsugi .crack path { fill: none; stroke: #e0b46a; stroke-width: 1.1; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.btn-kintsugi:hover { color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 0 0 1px rgba(224, 180, 106, 0.45), 0 10px 34px rgba(0, 0, 0, 0.6), 0 0 26px rgba(214, 176, 111, 0.18); }
.btn-kintsugi:hover .crack { opacity: 1; filter: drop-shadow(0 0 3px rgba(240, 190, 100, 0.9)); }

/* clear glass */
.btn-glass { color: var(--ink); }
.btn-glass:hover {
  color: #fff;
  background:
    radial-gradient(90% 70% at 50% 125%, rgba(255, 255, 255, 0.2), transparent 60%),
    linear-gradient(170deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03) 45%, rgba(255, 255, 255, 0.06));
}

/* ---------- labels & type ---------- */

.label {
  margin: 0;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--gold);
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.9), 0 1px 14px rgba(0, 0, 0, 0.9);
}
.label-muted { color: var(--muted); }

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

.serif-caps {
  font-family: var(--serif); font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.22em; line-height: 1.1;
}

/* ---------- header ---------- */

.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: 16px max(16px, env(safe-area-inset-left)) 0;
}
.site-header .bar {
  max-width: 1240px; margin-inline: auto;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
}
.logo { justify-self: start; line-height: 0; }
.logo img { height: 26px; width: auto; filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 18px rgba(214, 176, 111, 0.18)); }

.nav-pill { display: flex; gap: 2px; padding: 5px; }
.nav-pill a {
  padding: 9px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--text); text-decoration: none;
  transition: color 0.25s, background 0.25s;
}
.nav-pill a:hover, .nav-pill a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, 0.08); }

.header-cta { justify-self: end; min-height: 44px; padding: 0 20px; font-size: 14px; }

@media (max-width: 760px) {
  .site-header .bar { grid-template-columns: 1fr auto; }
  .nav-pill { display: none; }
  .logo img { height: 21px; }
  .header-cta { min-height: 40px; padding: 0 16px; font-size: 13px; }
}

/* ---------- hero ---------- */

main { flex: 1; }

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding: 110px 16px clamp(40px, 7vh, 80px);
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}

/* --- the 3D sculpture scene ---
   .hero-visual = camera (perspective). .stage = the scene, tilted by --mx/--my.
   Layers sit at different depths (translateZ), so they shift against each other
   when the scene tilts: halo far back, back rings, brain, front rings, gold dust in front. */
@property --mx { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --my { syntax: "<number>"; inherits: true; initial-value: 0; }

.hero-visual {
  --size: min(680px, 74vh, 100vw);
  position: absolute; z-index: -1;
  left: 50%; top: clamp(64px, 9vh, 110px);
  width: var(--size); aspect-ratio: 1312 / 1199;
  transform: translateX(-50%);
  perspective: 1100px;
  perspective-origin: 50% 45%;
  pointer-events: none;
}
.stage {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(calc(var(--my) * -9deg)) rotateY(calc(var(--mx) * 13deg));
}
/* the mouse values glide instead of jumping, so every layer moves smoothly */
.hero { transition: --mx 1.4s var(--ease), --my 1.4s var(--ease); }
.hero-visual .halo {
  position: absolute; inset: -10% -20%;
  background: radial-gradient(closest-side, rgba(214, 176, 111, 0.24), rgba(214, 176, 111, 0.06) 55%, transparent 75%);
  transform: translateZ(-160px) scale(1.18);
  animation: breathe 7s ease-in-out infinite;
}
.hero-visual picture, .hero-visual img { width: 100%; height: auto; }
.hero-visual .sculpture {
  position: relative;
  transform: translateZ(0);
  animation: float 9s ease-in-out infinite;
  filter: drop-shadow(calc(var(--mx) * -24px) calc(30px + var(--my) * -14px) 50px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 40px rgba(214, 176, 111, 0.12));
  /* fades the bottom into the page so the headline reads cleanly */
  -webkit-mask-image: linear-gradient(180deg, #000 40%, rgba(0, 0, 0, 0.35) 72%, transparent 96%);
  mask-image: linear-gradient(180deg, #000 40%, rgba(0, 0, 0, 0.35) 72%, transparent 96%);
}
/* moving light: a warm highlight that glides over the brain (only on the brain itself),
   so the gold veins catch the light as the scene turns */
.hero-visual .sheen {
  position: absolute; inset: 0;
  background:
    radial-gradient(38% 34% at calc(50% + var(--mx) * 34%) calc(38% + var(--my) * 30%), rgba(255, 238, 200, 0.75), rgba(255, 220, 160, 0.18) 45%, transparent 70%);
  -webkit-mask: url("brain-700.webp") center / 100% 100% no-repeat;
  mask: url("brain-700.webp") center / 100% 100% no-repeat;
  mix-blend-mode: soft-light;
  opacity: 0.95;
}
.hero-visual .sculpture::after { /* rim light on the far side, opposite the highlight */
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 55% at calc(50% - var(--mx) * 40%) calc(45% - var(--my) * 30%), transparent 55%, rgba(246, 214, 150, 0.35) 85%, transparent 100%);
  -webkit-mask: url("brain-700.webp") center / 100% 100% no-repeat;
  mask: url("brain-700.webp") center / 100% 100% no-repeat;
  mix-blend-mode: screen;
  opacity: 0.6;
}

.orbits {
  position: absolute; left: 50%; top: 50%;
  width: 165%; max-width: none; height: auto; aspect-ratio: 1;
  overflow: visible;
}
/* both ring layers must share exactly the same transform, or the halves stop meeting at the seam */
.orbits.back, .orbits.front { transform: translate(-50%, -48%); }
.orbits.front { clip-path: inset(52% 0 0 0); }
.orbits .ring { fill: none; stroke: url(#goldStroke); stroke-width: 1.8; opacity: 0.85; filter: drop-shadow(0 0 3px rgba(214, 176, 111, 0.5)); }
.orbits .ring.thin { stroke-width: 1; opacity: 0.45; }
.orbits .comet { fill: none; stroke: #fbe9c4; stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 45 955; filter: drop-shadow(0 0 6px rgba(246, 227, 184, 0.9)); animation: comet 9s linear infinite; }
.orbits .comet.slow { animation-duration: 14s; animation-direction: reverse; stroke-dasharray: 25 975; opacity: 0.8; }

/* gold dust floating at different depths (spans are added by site.js) */
.dust { position: absolute; inset: -10% -25%; transform-style: preserve-3d; }
.dust span {
  position: absolute; left: var(--x); top: var(--y);
  width: var(--s); height: var(--s); border-radius: 50%;
  background: radial-gradient(circle, #fff4d6 0%, #e2c084 45%, rgba(214, 176, 111, 0) 72%);
  transform: translateZ(var(--z));
  opacity: 0;
  animation: drift var(--d) linear var(--delay) infinite;
}

/* the scene slowly turns by itself (no mouse control, on every device) */
@media (prefers-reduced-motion: no-preference) {
  .hero { animation: turn 16s ease-in-out infinite; }
}

.hero-copy { position: relative; z-index: 2; width: 100%; max-width: 820px; }
.hero-copy > * { animation: rise 1.1s var(--ease) both; }
.hero-copy > *:nth-child(2) { animation-delay: 0.08s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.16s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.24s; }
.hero-copy > *:nth-child(5) { animation-delay: 0.32s; }
.hero-visual { animation: appear 1.6s var(--ease) both; }

.title { margin: 14px 0 0; display: flex; flex-direction: column; align-items: center; }
.title-top {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(42px, 11vw, 104px);
  line-height: 0.9; letter-spacing: -0.035em; text-transform: uppercase;
  background: var(--silver-text); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 24px rgba(0, 0, 0, 0.7));
}
.title-script {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(66px, 14vw, 168px);
  line-height: 0.82; letter-spacing: -0.03em;
  margin-top: -0.06em; padding: 0 0.12em 0.1em; /* room for swashes */
  background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 30px rgba(214, 176, 111, 0.25)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.lead {
  max-width: 34em; margin: 18px auto 0;
  font-size: clamp(15px, 1.8vw, 18px); line-height: 1.65;
  color: var(--text);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

/* side meta, poster style (desktop only) */
.hero-meta {
  position: absolute; z-index: 2; top: 50%;
  display: grid; gap: 10px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.28em; text-transform: uppercase; line-height: 1.7;
  color: var(--muted); text-align: left;
  animation: appear 2s var(--ease) 0.4s both;
}
.hero-meta .rule { width: 28px; height: 1px; background: var(--gold); opacity: 0.7; }
.hero-meta .gold { color: var(--gold); }
.hero-meta-l { left: clamp(24px, 4vw, 64px); }
.hero-meta-r { right: clamp(24px, 4vw, 64px); text-align: right; justify-items: end; }
.hero-meta .seal {
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid rgba(214, 176, 111, 0.55);
  font-family: var(--serif); font-size: 16px; letter-spacing: 0.08em; color: var(--gold); line-height: 1;
}
@media (max-width: 1100px) { .hero-meta { display: none; } }

/* ---------- signup (liquid glass bar) ---------- */

.signup { max-width: 560px; margin: 30px auto 0; }
.glass-bar { display: flex; align-items: center; gap: 8px; padding: 7px 7px 7px 26px; }
.glass-bar input {
  flex: 1 1 auto; min-width: 0; height: 50px;
  border: 0; background: transparent; outline: none;
  color: var(--ink); font: inherit; font-size: 16px; /* 16px stops iPhone zoom */
}
.glass-bar input::placeholder { color: rgba(242, 240, 234, 0.5); }
.glass-bar:focus-within { box-shadow: inset 0 1px 0 rgba(255,255,255,.25), inset 0 -1px 0 rgba(255,255,255,.04), 0 18px 50px rgba(0,0,0,.45), 0 0 0 4px rgba(214, 176, 111, 0.16); }
.glass-bar.invalid { box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 18px 50px rgba(0,0,0,.45), 0 0 0 2px rgba(242, 164, 154, 0.6); }
.signup .btn { min-height: 50px; padding: 0 24px; }
.signup .btn-label { transition: opacity 0.15s; display: inline-flex; gap: 10px; align-items: center; }
.signup.is-loading .btn-label { opacity: 0; }
.signup.is-loading .btn .spinner { opacity: 1; }
.spinner {
  position: absolute; top: 50%; left: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px;
  border: 2px solid rgba(242, 240, 234, 0.22); border-top-color: var(--ink); /* light: the button is clear glass */ border-radius: 50%;
  opacity: 0; animation: spin 0.7s linear infinite;
}
.signup button:disabled { cursor: default; transform: none; }

.signup-note { margin: 14px 0 0; font-size: 13px; letter-spacing: 0.02em; color: var(--muted); }
.signup-note a { color: var(--muted); }
.signup-note a:hover { color: var(--ink); }
.signup-error { margin: 12px 0 0; font-size: 14px; color: var(--error); }
.signup-error:empty { display: none; }

.signup-success {
  max-width: 520px; margin: 30px auto 0; padding: 22px 26px;
  display: flex; align-items: center; gap: 18px; text-align: left;
  border-radius: 28px;
}
.signup-success .check {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(180deg, #f9e8c2, #c39553);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 8px 24px rgba(214,176,111,.35);
  color: #1c1307; font-size: 22px; font-weight: 700;
}
.signup-success strong { display: block; color: var(--ink); font-size: 18px; }
.signup-success p { margin: 2px 0 0; font-size: 14.5px; color: var(--text); }

@media (max-width: 460px) {
  .glass-bar { flex-direction: column; align-items: stretch; padding: 8px; border-radius: 28px; }
  .glass-bar input { padding: 0 16px; text-align: center; }
  .signup .btn { width: 100%; min-height: 52px; }
}

/* ---------- sections ---------- */

.section { position: relative; padding: clamp(72px, 12vw, 140px) 16px; }
.section-head { text-align: center; margin-bottom: clamp(36px, 6vw, 64px); }
.section-title { margin: 14px 0 0; font-size: clamp(30px, 5vw, 54px); }
.section-title em { font-style: italic; text-transform: none; letter-spacing: -0.01em; font-weight: 400; }
.wrap { max-width: 1120px; margin-inline: auto; }

/* frosted cards — warm light blobs behind make the blur glow */
.cards { position: relative; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.cards::before {
  content: ""; position: absolute; inset: 10% 5%; z-index: -1;
  background:
    radial-gradient(30% 50% at 20% 50%, rgba(214, 176, 111, 0.28), transparent 70%),
    radial-gradient(30% 60% at 80% 40%, rgba(150, 105, 60, 0.25), transparent 70%);
  filter: blur(30px);
}
.card {
  border-radius: 28px; padding: 30px 28px 32px; text-align: left;
}
.card .num { font-family: var(--serif); font-weight: 500; font-size: 44px; line-height: 1; }
.card h3 { margin: 22px 0 6px; font-family: var(--sans); font-weight: 600; font-size: 19px; color: var(--ink); }
.card p { margin: 0; font-size: 15px; color: var(--text); }

/* library (homepage) */
.library { display: grid; gap: 16px; max-width: 860px; margin-inline: auto; }
.book {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px;
  padding: 22px 22px 22px 30px; border-radius: 30px;
  color: var(--ink); text-decoration: none;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.book:hover { transform: translateY(-3px); color: var(--ink); }
.book .num { font-family: var(--serif); font-size: 40px; line-height: 1; width: 1.4em; }
.book .name { display: block; font-family: var(--serif); font-weight: 500; font-size: clamp(24px, 3.2vw, 32px); line-height: 1.1; }
.book .what { display: block; margin-top: 4px; font-size: 14.5px; color: var(--muted); }
.book .go {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  font-size: 18px; color: #1c1307; padding: 0; min-height: 0;
}
.book .go.btn-glass { color: var(--ink); }
.book:hover .go.btn-glass { /* the whole card is the link, so hovering it lights the arrow too */
  color: #fff;
  background:
    radial-gradient(90% 70% at 50% 125%, rgba(255, 255, 255, 0.2), transparent 60%),
    linear-gradient(170deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03) 45%, rgba(255, 255, 255, 0.06));
}
.book.soon { opacity: 0.55; pointer-events: none; }
.book.soon .go { background: transparent; box-shadow: inset 0 0 0 1px var(--faint); color: var(--muted); }
.book.soon .go::after, .book.soon .go::before { display: none; }
@media (max-width: 520px) {
  .book { grid-template-columns: 1fr auto; padding: 20px 18px 20px 22px; gap: 14px; }
  .book .num { display: none; }
}

/* ---------- footer ---------- */

.site-footer { position: relative; padding: 0 16px calc(28px + env(safe-area-inset-bottom)); overflow: hidden; }
.footer-mark {
  display: block; width: min(1000px, 92%); height: auto; margin: 0 auto 28px;
  opacity: 0.16;
  -webkit-mask-image: linear-gradient(180deg, #000 20%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 20%, transparent 100%);
  user-select: none; pointer-events: none;
}
.footer-bar {
  max-width: 1240px; margin-inline: auto; padding-top: 22px;
  border-top: 1px solid var(--faint);
  display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between;
  font-size: 13px; color: var(--muted);
}
.footer-bar nav { display: flex; gap: 22px; }
.footer-bar a { color: var(--muted); text-decoration: none; }
.footer-bar a:hover { color: var(--ink); }

/* ---------- text pages ---------- */

.page { padding: 130px 16px 80px; }
.panel { max-width: 760px; margin-inline: auto; border-radius: 32px; padding: clamp(28px, 6vw, 60px); }
.prose h1 { margin: 12px 0 6px; font-size: clamp(36px, 7vw, 60px); }
.prose h2 { margin: 34px 0 6px; font-family: var(--sans); font-size: 18px; font-weight: 600; color: var(--ink); }
.prose p, .prose li { color: var(--text); }
.prose ul { padding-left: 20px; }
.prose strong { color: var(--ink); }
.prose .updated { margin: 0 0 22px; font-size: 13px; color: var(--muted); }

/* ---------- motion ---------- */

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes breathe { 0%, 100% { opacity: 0.8; transform: scale(1); } 50% { opacity: 1; transform: scale(1.05); } }
@keyframes comet { from { stroke-dashoffset: 1000; } to { stroke-dashoffset: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes drift {
  0% { opacity: 0; translate: 0 30px; }
  15% { opacity: 0.9; }
  85% { opacity: 0.5; }
  100% { opacity: 0; translate: 0 -90px; }
}
@keyframes turn {   /* half the swing it used to have (user: "turns too much") */
  0%, 100% { --mx: -0.35; --my: -0.08; }
  25% { --mx: 0; --my: 0.18; }
  50% { --mx: 0.35; --my: -0.05; }
  75% { --mx: 0.05; --my: -0.22; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .signup.is-loading .spinner { animation: spin 1.5s linear infinite !important; }
}

/* low-end / no backdrop-filter fallback: keep glass readable */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgba(28, 26, 22, 0.92); }
}

/* homepage hero buttons */
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }
@media (max-width: 460px) { .hero-actions .btn { flex: 1 1 100%; } }
.book.soon.reveal.in { opacity: 0.55; }

@media (max-width: 460px) {
  .label { font-size: 10.5px; letter-spacing: 0.2em; }
  .hero { padding-top: 96px; }
}
.hero-copy > .signup-success { animation: rise 0.6s var(--ease) both; animation-delay: 0s; }

/* header turns into a frosted glass bar once you scroll */
.site-header .bar { transition: background 0.4s var(--ease), padding 0.4s var(--ease), box-shadow 0.4s var(--ease); border-radius: 999px; }
.site-header.scrolled .bar {
  padding: 7px 7px 7px 22px;
  background: rgba(14, 13, 11, 0.55);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 14px 40px rgba(0, 0, 0, 0.5);
}
.site-header.scrolled .nav-pill { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.site-header.scrolled .nav-pill::before { display: none; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header.scrolled .bar { background: rgba(14, 13, 11, 0.95); }
}

/* ---------- real-time 3D brain (assets/brain3d.js) ---------- */
.brain-canvas {
  position: absolute; left: -45%; top: -32%; width: 190%; height: 164%;
  opacity: 0; transition: opacity 0.7s var(--ease);   /* was 1.6s: felt like slow loading */
  /* fade the lower part so the headline stays readable */
  -webkit-mask-image: linear-gradient(180deg, #000 52%, rgba(0, 0, 0, 0.5) 72%, rgba(0, 0, 0, 0.22) 100%);
  mask-image: linear-gradient(180deg, #000 52%, rgba(0, 0, 0, 0.5) 72%, rgba(0, 0, 0, 0.22) 100%);
}
.has-3d .brain-canvas { opacity: 1; }
.hero-visual .sculpture { transition: opacity 1.2s var(--ease); }
.has-3d .hero-visual .sculpture { opacity: 0; }
.brain-pending .hero-visual .sculpture { opacity: 0 !important; } /* set in <head> while the 3D brain loads */
.has-3d .hero-visual .sculpture { animation: none; filter: none; }   /* hidden behind the 3D brain: don't keep animating it */
/* hero scrolled out of view (site.js): pause its dust, comets and glow so phones don't keep working on them */
.hero.offscreen, .hero.offscreen * { animation-play-state: paused !important; }
/* with the 3D brain, the brain turns itself: keep the scene (and the SVG orbit rings) level */
.has-3d.hero { animation: none; }
.has-3d .stage { transform: none; }

/* The Cycles render (blender/make_sculpture.py) has its own studio lighting: the CSS moving
   highlight + rim light made for the old image would wash out its deep blacks, so they're off. */
.hero-visual .sheen, .hero-visual .sculpture::after { display: none; }
