/* =========================================================
   KAI LONDON — BE A MEDICI
   ========================================================= */

@font-face {
  font-family: "Fabiola";
  src: url("../fonts/FabiolaCapitals-Thin.woff2?v=2") format("woff2"),
       url("../fonts/FabiolaCapitals-Thin.otf") format("opentype");
  font-weight: 300; font-style: normal; font-display: swap;
}
/* Fabiola Regular: the record's PLAY / PAUSE / BE A MEDICI lettering */
@font-face {
  font-family: "Fabiola";
  src: url("../fonts/FabiolaCapitals-Regular.woff2") format("woff2"),
       url("../fonts/FabiolaCapitals-Regular.otf") format("opentype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "FabiolaFallback";
  src: url("../fonts/AdobeDevanagari-Bold.woff2") format("woff2"),
       url("../fonts/AdobeDevanagari-Bold.otf") format("opentype");
  font-weight: 700; font-display: swap;
}

/* Adobe Devanagari: body text on desktop / larger screens */
@font-face {
  font-family: "Devanagari";
  src: url("../fonts/AdobeDevanagari-Regular.woff2") format("woff2"),
       url("../fonts/AdobeDevanagari-Regular.otf") format("opentype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Devanagari";
  src: url("../fonts/AdobeDevanagari-Italic.woff2") format("woff2"),
       url("../fonts/AdobeDevanagari-Italic.otf") format("opentype");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Devanagari";
  src: url("../fonts/AdobeDevanagari-Bold.woff2") format("woff2"),
       url("../fonts/AdobeDevanagari-Bold.otf") format("opentype");
  font-weight: 700; font-style: normal; font-display: swap;
}

/* Literata (SIL Open Font License, fonts/literata/OFL.txt): body text on phones. Variable weight + optical size. */
@font-face {
  font-family: "Literata";
  src: url("../fonts/literata/Literata-Variable.woff2") format("woff2-variations"),
       url("../fonts/literata/Literata-Variable.woff2") format("woff2");
  font-weight: 300 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("../fonts/literata/Literata-Italic-Variable.woff2") format("woff2-variations"),
       url("../fonts/literata/Literata-Italic-Variable.woff2") format("woff2");
  font-weight: 300 700; font-style: italic; font-display: swap;
}

:root {
  color-scheme: dark;          /* the design is natively dark — dark-mode extensions should leave it alone */
  --cream: #EFE6D5;
  --sand: #C2B293;
  --gold: #D4AF37;
  --scrub: #FF5A45;
  --obsidian: rgba(12, 11, 10, 0.88);
  --hair: 1px solid rgba(239, 230, 213, 0.14);
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
  --ink: #434a5d;               /* slate lettering on the white disc (matches reference) */

  --display: "Fabiola", "FabiolaFallback", "Times New Roman", serif;
  --body: "Devanagari", "Iowan Old Style", Georgia, serif;       /* desktop */
  --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* Record disc size: 2/3 of window height on desktop */
  --D: min(66vh, 90vw);
  /* Innermost red ring of record.png, measured from the artwork:
     ring centre-line sits 208px from centre on a 500px disc = 41.6% of the diameter. */
}
@media (max-width: 767.98px) {
  :root { --D: min(80vw, 64svh); --body: "Literata", "Iowan Old Style", Georgia, serif; }   /* 4/5 of window width; phones read in Literata */
}
/* --gb: glow boost. Touch screens have no hover pop-out, so the glow has to say "tap me" on its own. */
:root { --gb: 1; }
@media (hover: none) and (pointer: coarse) { :root { --gb: 1.9; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
 html { scroll-behavior: auto; } }
/* Declares native dark-mode support (extensions such as Noir look for this before repainting a site) */
@media (prefers-color-scheme: dark) { :root { color-scheme: dark; } }
body {
  margin: 0;
  color: var(--cream);
  background: #0b0a09;
  font-family: var(--body);
  font-size: 20px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
html { overflow-x: hidden; }
img, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }

/* ---------- unified painted canvas (fixed; works on iOS too) ---------- */
.bg {
  position: fixed; inset: 0; z-index: -1;
  background: url("../images/medici-background.jpg") center / cover no-repeat;
}
.bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(8,7,6,0) 45%, rgba(8,7,6,0.3) 100%),
    rgba(8, 7, 6, 0.34);
}

/* =========================================================
   HERO / RECORD STAGE  (flat — no 3D)
   ========================================================= */
.hero {
  position: relative;
  overflow: hidden;           /* glow halos must never widen the page (kept the layout off-centre in Safari) */
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
}
.stage { position: relative; width: var(--D); height: var(--D); }
.assembly { position: absolute; inset: 0; }
.disc {
  position: absolute; inset: 0;
  border-radius: 50%;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5), 0 8px 18px rgba(0,0,0,0.4);
  cursor: grab;
  touch-action: none;              /* the record is a turntable: drags scratch it instead of scrolling */
  -webkit-touch-callout: none;
  -webkit-user-select: none; user-select: none;
}
.disc.holding { cursor: grabbing; }
.spinner { position: absolute; inset: 0; pointer-events: none; }
.record { width: 100%; height: 100%; pointer-events: none; }
/* glints: soft light catching the painted rings. They turn with the record, so the spin reads at a glance
   (the rings themselves are perfectly round, so on their own they never look like they're moving). */
.glint {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 20deg,
    rgba(255,255,255,0) 0deg,
    rgba(255,255,255,calc(0.42 * var(--glint, 1) * var(--gpulse))) 14deg,
    rgba(255,255,255,0) 30deg,
    rgba(255,255,255,0) 168deg,
    rgba(255,255,255,calc(0.2 * var(--glint, 1) * var(--gpulse))) 184deg,
    rgba(255,255,255,0) 198deg,
    rgba(255,255,255,0) 360deg);
  /* only on the coloured rings (from just inside the red ring to the rim), fading at both edges */
  -webkit-mask: radial-gradient(closest-side, transparent 80%, #000 84%, #000 96%, transparent 100%);
          mask: radial-gradient(closest-side, transparent 80%, #000 84%, #000 96%, transparent 100%);
  animation: glintPulse 3.2s ease-in-out infinite;     /* the light breathes as it travels */
}
@property --gpulse { syntax: "<number>"; inherits: false; initial-value: 1; }
@keyframes glintPulse { 0%, 100% { --gpulse: 0.5; } 50% { --gpulse: 1.45; } }
@media (hover: none) and (pointer: coarse) { .glint { --glint: 1.5; } }   /* phones: a touch brighter */

/* ---------- soft white glow ----------
   --pulse breathes 0→1→0; --lvl: idle 1, playing 1.8, the playing sign 2.6 */
@property --pulse { syntax: "<number>"; inherits: true; initial-value: 0; }
/* Gentle "breathing" on the signs: no size change — a slow (4s), synchronised pulse of glow and brightness.
   Everything breathes until music plays; then only the playing song's sign. --pa = amplitude (1 on, 0 off). */
.glow { --lvl: 1; --pa: 1; animation: pulse 4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { --pulse: 0; } 50% { --pulse: 1; } }
body.is-playing .glow { --lvl: 1.8; --pa: 0; }
body.is-playing .glyph.active { --lvl: 2.6; --pa: 1; }

/* centre circle: a light warm glow only while music plays; also works as play / pause */
.hub {
  position: absolute; left: 49.8%; top: 49.6%;
  width: 8%; height: 8%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  --lvl: 0;
  filter:
    brightness(calc(1 + var(--pulse) * 0.05 * var(--lvl)))
    drop-shadow(0 0 calc((2px + var(--pulse) * 3px) * var(--lvl)) rgba(255, 196, 110, calc((0.35 + var(--pulse) * 0.35) * var(--lvl))))
    drop-shadow(0 0 calc((5px + var(--pulse) * 6px) * var(--lvl)) rgba(255, 170, 90, calc((0.15 + var(--pulse) * 0.2) * var(--lvl))));
  transition: filter .8s;
}
body.is-playing .hub { --lvl: 1; }
body.is-loading .hub { --lvl: 1.4; animation-duration: 0.6s; transform: translate(-50%, -50%) scale(calc(1 + 0.2 * var(--pulse))); }
.hub img { width: 100%; height: 100%; display: block; }
.hub-shine {
  position: absolute; inset: -30%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 236, 200, 0.9) 0%, rgba(255, 220, 170, 0.35) 50%, rgba(255, 220, 170, 0) 100%);
  opacity: calc((0.08 + var(--pulse) * 0.12) * var(--lvl));
  transition: opacity .8s;
}
.hub-btn {
  position: absolute; left: 50%; top: 50%;
  width: 10%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.hub-btn:focus-visible { outline-offset: 2px; }

/* front-page buttons — live webfont text, centred between the centre circle and the inner red ring
   Set 19% of the diameter from the centre: a little inside the exact midpoint (22.2%), which reads better
   visually and matches the original layout reference. */
.disc-btn {
  position: absolute;
  left: 50%;
  font-family: var(--display);
  font-weight: 400;                 /* Fabiola Regular (headings elsewhere stay Thin) */
  opacity: 0.95;                    /* lets the disc's painted texture show through a touch */
  font-size: calc(var(--D) * 0.083);
  line-height: 1;
  letter-spacing: 0.06em;
  color: var(--ink);
  /* during the glow the letters briefly lighten toward a soft silver-slate */
  color: color-mix(in srgb, var(--ink), #9aa6c2 calc(var(--pulse) * var(--pa, 0) * 15%));   /* never more than a slight shift */
  white-space: nowrap;
  padding: 0.3em 0.4em;
  /* --ink-shift is measured in JS so the letters (not the box) are centred in every browser */
  transform: translate(-50%, -50%) translateY(var(--ink-shift, 0px)) scale(calc(1 + 0.5 * var(--near, 0)));
  /* clean white glow (a faint cool silver underneath so it reads on the cream disc) */
  text-shadow:
    0 0 calc(var(--D) * 0.012 * var(--gb)) rgba(255, 255, 255, calc(0.95 * var(--pulse) * var(--pa, 0))),
    0 0 calc(var(--D) * 0.03 * var(--gb)) rgba(140, 168, 228, calc(0.75 * var(--gb) * var(--pulse) * var(--pa, 0)));   /* cool silver-blue haze */
  transition: color .4s;
  -webkit-tap-highlight-color: transparent;
}
#playBtn   { top: 31%; }
#mediciBtn { top: 69%; }
.disc-btn:hover, .disc-btn:focus-visible { color: #2e3446; }
/* PLAY and BE A MEDICI: together — ~2.6s with no glow, then a ~1.4s glow, at the same strength as PAUSE's steady glow.
   While playing, PAUSE holds a steady glow and BE A MEDICI keeps the same occasional swell. */
.disc-btn.glow { animation: discPulse 4s ease-in-out infinite; }
@keyframes discPulse { 0%, 65%, 100% { --pulse: 0; } 82.5% { --pulse: 1; } }
body.is-playing #mediciBtn { --pa: 1; }
body.is-playing #playBtn {
  animation: none;
  text-shadow:
    0 0 calc(var(--D) * 0.012 * var(--gb)) rgba(255, 255, 255, 0.95),
    0 0 calc(var(--D) * 0.03 * var(--gb)) rgba(140, 168, 228, calc(0.6 * var(--gb)));
}

/* zodiac glyphs — each glows in its complementary colour
   (rose → mint, white → lavender, grey → amber, gold → blue) */
.glyph[data-track="0"] { --gc: 110, 232, 205; }
.glyph[data-track="1"] { --gc: 182, 150, 255; }
.glyph[data-track="2"] { --gc: 255, 172, 105; }
.glyph[data-track="3"] { --gc: 105, 160, 255; }
.glyph {
  position: absolute;
  left: calc(50% + var(--x) * 1%);
  top: calc(50% + var(--y) * 1%);
  width: calc(var(--w) * 1%);
  transform: translate(-50%, -50%) scale(calc(1 + 0.5 * var(--near, 0)));   /* size changes only on pointer pop-out */
  -webkit-tap-highlight-color: transparent;
}
.glyph::before {  /* soft coloured halo */
  content: ""; position: absolute; inset: -80%;
  background: radial-gradient(closest-side, rgba(var(--gc), 0.42) 0%, rgba(var(--gc), 0.14) 45%, rgba(var(--gc), 0) 100%);
  opacity: calc((0.11 * var(--lvl) + 0.14 * var(--pulse) * var(--pa, 0)) * var(--gb) + var(--near, 0) * 0.15);
  pointer-events: none;
}
.glyph img {
  position: relative;
  width: 100%; height: auto; pointer-events: none;
  filter:
    brightness(calc(1 + 0.14 * var(--pulse) * var(--pa, 0)))
    drop-shadow(0 0 calc((3px * var(--lvl) + 2.5px * var(--pulse) * var(--pa, 0)) * var(--gb) + var(--near, 0) * 6px) rgba(var(--gc), calc((0.3 + 0.22 * var(--pulse) * var(--pa, 0)) * var(--gb) + var(--near, 0) * 0.12)))
    drop-shadow(0 0 calc((9px * var(--lvl) + 5px * var(--pulse) * var(--pa, 0)) * var(--gb)) rgba(var(--gc), calc((0.1 * var(--lvl) + 0.08 * var(--pulse) * var(--pa, 0)) * var(--gb))));
}

/* scroll hint */
.scroll-hint {
  position: absolute; left: 50%; bottom: calc(74px + env(safe-area-inset-bottom));
  width: 44px; height: 30px;
  transform: translateX(-50%);
  display: grid; place-items: center;
  color: var(--sand);
  opacity: 0.55;
  transition: opacity .6s;
  animation: hintBob 2.6s ease-in-out infinite;
}
.scroll-hint svg { width: 22px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.scroll-hint:hover { opacity: 0.9; }
@keyframes hintBob { 0%, 100% { transform: translate(-50%, 0); opacity: .3; } 50% { transform: translate(-50%, 6px); opacity: .7; } }
body.scrolled .scroll-hint { opacity: 0 !important; pointer-events: none; animation: none; }

/* =========================================================
   MANIFESTO
   ========================================================= */
/* Normal block flow (not flex) so vertical margins collapse: one standard rhythm, no doubled gaps.
   Rhythm: paragraphs 1em apart · heading → text 0.6em · media 30px above / 56px below on desktop (40 / 40 on phones). */
.manifesto { position: relative; padding: 14vh 0 0; }
.manifesto > * { max-width: 660px; margin-left: auto; margin-right: auto; }
.manifesto > .media { max-width: 740px; }

.m-head { margin-bottom: 0; }
.m-title, .manifesto h3, .modal-title, .thanks h2 {
  font-family: var(--display);
  font-weight: 300;
  letter-spacing: 0.14em;
  color: var(--cream);
}
.m-title { font-size: clamp(54px, 8vw, 96px); line-height: 1; margin: 0 0 28px; text-align: center; }
.nb { color: var(--sand); margin: 0 0 0.5em; font-style: italic; }
.nb .nb-tag { font-style: normal; }   /* "NB:" stays upright in Fabiola */
.nb-tag { font-family: var(--display); letter-spacing: 0.14em; color: var(--cream); margin-right: .25em; }
.shortcut { color: var(--sand); margin: 0; }
.shortcut .triggers { margin-left: 0.7em; }        /* breathing room after "Ready to contribute?" */
.m-head + .media { margin-top: 36px; }

.manifesto h3 { font-size: clamp(30px, 3.6vw, 40px); line-height: 1.1; margin: 0 0 0.6em; }
.manifesto section { margin: 0 auto; }
.manifesto p { margin: 0 0 1em; }
.manifesto em { font-style: italic; }
.lead { font-size: 1.15em; color: var(--cream); }
/* key lines set apart, like a pull quote in a printed essay (no bold) */
.manifesto p.pull { margin: 1.3em 0; line-height: 1.45; }

.media {
  margin: 30px auto 56px;     /* close to the text it follows, room before the next heading */
  border: var(--hair);
  box-shadow: var(--shadow);
  background: rgba(0,0,0,0.3);
}
.media img, .media video { width: 100%; height: auto; }
.media.last { margin: 40px auto 0; }
.manifesto::after { content: ""; display: block; height: 96px; } /* room for the floating mini-player */

/* engraved antique-gold triggers */
.triggers { white-space: nowrap; }
.triggers a {
  color: var(--gold);
  text-decoration: none;
  font-family: var(--display);
  letter-spacing: 0.14em;
  font-size: 1.12em;
  padding-left: .14em;        /* letter-spacing adds space after the last letter; mirror it before the first */
  display: inline-block;
  line-height: 1;             /* keeps the hairline rule just under the letters */
  padding-bottom: 0.05em;
  border-bottom: 1px solid rgba(212,175,55,0.35);
  text-shadow: 0 1px 0 rgba(0,0,0,0.6), 0 -1px 0 rgba(255,240,200,0.08);
  transition: color .3s, border-color .3s;
}
.triggers a:hover, .triggers a:focus-visible { color: #e6c45a; border-color: rgba(212,175,55,0.8); }
.triggers .sep { color: rgba(212,175,55,0.5); margin: 0 .32em; }
.triggers-bottom { text-align: center; font-size: 26px; margin: 30px auto 22px !important; }
.manifesto > p.disclaimer { margin: 0 auto 1em; }
.manifesto > p.legal { margin: 0 auto 1em; }
.legal { color: var(--sand); font-size: 13px; line-height: 1.7; text-align: center; opacity: .7; max-width: 520px !important; }
.legal a, .legal .inline-link { color: var(--sand); border-bottom-color: rgba(194,178,147,0.35); text-decoration: none; }
.legal a { border-bottom: 1px solid rgba(194,178,147,0.35); }
.safety { font-size: 14px; color: var(--sand); margin: 0 0 14px !important; }
.safety a { color: var(--gold); text-decoration: none; border-bottom: 1px solid rgba(212,175,55,0.4); }

/* consent: one quiet line, never blocks the page */
.consent {
  position: fixed; z-index: 45;
  left: 16px; bottom: calc(16px + env(safe-area-inset-bottom));
  max-width: 330px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(12, 11, 10, 0.92);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: var(--hair);
  font: 12.5px/1.45 var(--sans);
  color: rgba(239,230,213,0.75);
  opacity: 0; transform: translateY(8px);
  transition: opacity .4s, transform .4s;
}
.consent.show { opacity: 1; transform: none; }
.consent p { margin: 0; flex: 1 1 180px; }
.consent a { color: inherit; }
.consent-actions { display: flex; gap: 6px; }
.consent button {
  font: 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  padding: 7px 10px 6px; border-radius: 999px;
  color: rgba(239,230,213,0.7); border: 1px solid rgba(239,230,213,0.18);
}
.consent #consentYes { color: var(--gold); border-color: rgba(212,175,55,0.5); }
.consent button:hover { border-color: rgba(239,230,213,0.45); }
@media (max-width: 767.98px) {
  .consent { left: 12px; right: 12px; max-width: none; bottom: calc(64px + env(safe-area-inset-bottom)); }   /* sits just above the player */
}

.disclaimer { color: var(--sand); font-size: 15px; line-height: 1.6; text-align: center; opacity: .85; max-width: 520px !important; }
.signoff { margin: 1.6em 0 0 !important; }
.sig { font-family: var(--display); letter-spacing: .14em; font-size: 1.5em; }

.inline-link {
  color: var(--gold);
  border-bottom: 1px solid rgba(212,175,55,0.4);
  line-height: inherit;
  text-align: left;
}
.inline-link:hover { border-color: var(--gold); }
.manifesto a[href^="https://instagram"] { color: var(--gold); text-decoration: none; border-bottom: 1px solid rgba(212,175,55,0.4); }

/* video: no native controls; white play button over the first frame, plays once through,
   a white pause button appears on hover (or on tap, on phones) */
.video-wrap { position: relative; }
.video-wrap video { cursor: pointer; }
.video-btn {
  position: absolute; left: 50%; top: 50%;
  width: clamp(64px, 10vw, 92px); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  transition: transform .35s, opacity .35s;
  -webkit-tap-highlight-color: transparent;
}
.video-btn svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 2px 10px rgba(0,0,0,0.45)); }
.video-btn circle { fill: rgba(0,0,0,0.28); stroke: #fff; stroke-width: 1.2; }
.video-btn path { fill: #fff; }
.video-btn:hover { transform: translate(-50%, -50%) scale(1.06); }
.video-wrap.playing .video-play { opacity: 0; pointer-events: none; }
.video-pause { opacity: 0; pointer-events: none; }
.video-wrap.playing:hover .video-pause,
.video-wrap.playing.show-pause .video-pause,
.video-wrap.playing .video-pause:focus-visible { opacity: 1; pointer-events: auto; }
@media (hover: none) { .video-wrap.playing:hover .video-pause { opacity: 0; pointer-events: none; } .video-wrap.playing.show-pause .video-pause { opacity: 1; pointer-events: auto; } }

/* =========================================================
   PANELS / FORMS
   ========================================================= */
.panel, .modal-card {
  background: var(--obsidian);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: var(--hair);
  box-shadow: var(--shadow);
}
.callback { margin: 6px 0 28px; }
.panel { padding: 26px 26px 24px; border-radius: 4px; }
.panel-intro { color: var(--sand); margin-top: 0 !important; }
.confirm p { margin: 0 !important; }

label { display: block; font-size: 16px; color: var(--sand); margin: 0 0 14px; line-height: 1.4; }
label .opt { opacity: .7; }
input[type="text"], input[type="email"], input[type="tel"], textarea {
  display: block; width: 100%;
  margin-top: 6px;
  background: rgba(239,230,213,0.04);
  border: 1px solid rgba(239,230,213,0.18);
  border-radius: 3px;
  color: var(--cream);
  font: 17px/1.4 var(--body);
  padding: 10px 12px 8px;
  transition: border-color .25s, background .25s;
}
input::placeholder, textarea::placeholder { color: rgba(194,178,147,0.5); }
input:focus, textarea:focus { outline: none; border-color: rgba(212,175,55,0.7); background: rgba(239,230,213,0.07); }
textarea { resize: vertical; }
.hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; }
label.check { display: flex; gap: 10px; align-items: center; color: var(--cream); cursor: pointer; font-size: 17px; }
label.check input { width: 17px; height: 17px; accent-color: var(--gold); margin: 0; }
.form-msg { font-size: 15px; color: var(--sand); min-height: 0; margin: 0 0 10px !important; }
.form-msg.err { color: #e79b86; }

.gold-btn {
  display: inline-block;
  font-family: var(--display);
  letter-spacing: 0.14em;
  font-size: 18px;
  color: var(--gold);
  border: 1px solid rgba(212,175,55,0.55);
  padding: 12px 22px 9px;
  border-radius: 2px;
  background: rgba(212,175,55,0.04);
  transition: background .3s, border-color .3s, color .3s;
}
.gold-btn:hover, .gold-btn:focus-visible { background: rgba(212,175,55,0.1); border-color: var(--gold); color: #e6c45a; }
.gold-btn[disabled] { opacity: .5; cursor: progress; }
.gold-btn.ghost { border-color: rgba(212,175,55,0.25); }

/* =========================================================
   MODALS
   ========================================================= */
.modal {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  padding: 24px;
  background: rgba(4,3,3,0.55);
  animation: fadeIn .3s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  position: relative;
  width: 100%; max-width: 640px;
  max-height: calc(100svh - 48px);
  display: flex; flex-direction: column;
  border-radius: 6px;
  overflow: hidden;
  animation: rise .35s cubic-bezier(.2,.8,.2,1);
}
.modal-card.narrow { max-width: 520px; }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-title { margin: 0; padding: 26px 30px 12px; font-size: 30px; line-height: 1; }
.modal-close {
  position: absolute; top: 14px; right: 16px;
  width: 38px; height: 38px;
  font-size: 28px; line-height: 1; color: var(--sand);
  border-radius: 50%;
}
.modal-close:hover { color: var(--cream); background: rgba(239,230,213,0.06); }
.modal-bar {
  display: flex; gap: 22px; flex-wrap: wrap;
  padding: 4px 30px 14px;
  border-bottom: var(--hair);
  font-family: var(--display); letter-spacing: .14em; font-size: 21px;
}
.modal-bar a, .modal-bar .bar-btn { color: var(--gold); text-decoration: none; font: inherit; letter-spacing: inherit; }
.modal-bar a:last-child:not(:only-child) { margin-left: 0; }
.modal-bar .push { margin-left: auto; }
.modal-bar .bar-break { display: none; }
@media (max-width: 767.98px) {
  /* phones: U.S. · International on the first line, Email Me These · Download PDF on the second */
  .modal-bar { row-gap: 0; }
  .modal-bar > a, .modal-bar > .bar-btn { padding: 3px 0; }
  .modal-bar .bar-break { display: block; flex-basis: 100%; height: 0; }
  .modal-bar .push { margin-left: 0; }
}
.modal-bar a:hover, .modal-bar .bar-btn:hover { text-decoration: underline; text-underline-offset: 4px; }
.modal-bar .bar-btn[aria-expanded="true"] { text-decoration: underline; text-underline-offset: 4px; }
/* "Email Me These" form at the top of the wire box */
.email-wire { margin: 0 0 18px; padding: 14px 16px 6px; border: var(--hair); border-radius: 4px; background: rgba(239,230,213,0.03); }
.email-wire-row { display: flex; gap: 10px; align-items: stretch; margin-top: 6px; }
.email-wire-row input { margin: 0; flex: 1; min-width: 0; }
.email-wire-row .gold-btn { flex: none; padding: 10px 18px 8px; }
.modal-body { padding: 18px 30px 28px; overflow-y: auto; overscroll-behavior: contain; font-size: 17px; line-height: 1.55; }
.modal-body p { margin: 0 0 14px; }
.note {
  color: var(--cream);
  border-left: 2px solid var(--gold);
  padding: 4px 0 4px 14px;
  background: linear-gradient(90deg, rgba(212,175,55,0.07), rgba(212,175,55,0));
}
.quiet { color: var(--sand); font-size: 15px; }
.quiet.small { font-size: 13px; opacity: .75; margin-top: 16px !important; }

.details { padding: 8px 0 6px; scroll-margin-top: 10px; }
.details + .details { border-top: var(--hair); margin-top: 8px; padding-top: 18px; }
.details-note { color: var(--sand); font-size: 14px; opacity: .85; margin: 0 0 6px !important; }
.details h4 { font-family: var(--display); font-weight: 300; letter-spacing: .12em; font-size: 15px; color: var(--cream); margin: 14px 0 2px; }
.details h4 span { color: var(--sand); opacity: .75; letter-spacing: .08em; }
.notify-top { margin: 2px 0 14px; }
.details h3 { font-family: var(--display); font-weight: 300; letter-spacing: .14em; font-size: 20px; margin: 0 0 10px; color: var(--cream); }
.details dl { margin: 0; }
.details dl > div { display: grid; grid-template-columns: 170px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px dashed rgba(239,230,213,0.08); }
.details dl > div.sub dt { opacity: .7; }
.details dt { color: var(--sand); font-size: 14px; letter-spacing: .02em; padding-top: 2px; }
.details dd { margin: 0; display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.details dd span { font-variant-numeric: tabular-nums; word-break: break-word; }
.copy {
  flex: none;
  font-family: var(--sans); font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(212,175,55,0.35);
  border-radius: 2px;
  padding: 5px 8px 4px;
  transition: background .25s, border-color .25s;
}
.copy:hover { background: rgba(212,175,55,0.08); border-color: var(--gold); }
.copy.done { color: var(--cream); border-color: rgba(239,230,213,0.4); }
.notify { margin-top: 22px; padding-top: 18px; border-top: var(--hair); }
.notify-fields { margin-top: 14px; }

/* card */
.money { display: flex; align-items: stretch; margin-top: 6px; }
.money .cur { display: grid; place-items: center; padding: 0 12px; border: 1px solid rgba(239,230,213,0.18); border-right: 0; border-radius: 3px 0 0 3px; color: var(--sand); font-size: 18px; }
.money input { margin: 0; border-radius: 0 3px 3px 0; font-size: 20px; }

/* crypto */
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.pill {
  font-family: var(--sans); font-size: 12px; letter-spacing: .08em;
  color: var(--sand);
  border: 1px solid rgba(239,230,213,0.16);
  border-radius: 999px;
  padding: 8px 14px 7px;
  text-align: left;
  transition: all .25s;
}
.pill small { display: block; font-size: 10px; letter-spacing: .12em; opacity: .7; margin-top: 1px; }
.pill[aria-selected="true"] { color: var(--gold); border-color: rgba(212,175,55,0.7); background: rgba(212,175,55,0.06); }
.chain { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 18px; }
.qr { width: 196px; height: 196px; border-radius: 8px; border: var(--hair); background: #fff; }
.addr-row { display: flex; gap: 10px; align-items: center; max-width: 100%; }
.addr-row code { font: 13px/1.4 ui-monospace, "SF Mono", Menlo, monospace; color: var(--cream); word-break: break-all; background: rgba(239,230,213,0.05); padding: 6px 9px; border-radius: 3px; }
.warn { color: #e7b07a; font-size: 14px; text-align: center; margin: 0 !important; }

/* =========================================================
   THANK YOU
   ========================================================= */
.thanks {
  min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center;
  padding: 80px 22px 120px;
}
.thanks-inner { max-width: 660px; text-align: center; animation: rise .8s cubic-bezier(.2,.8,.2,1); }
.thanks h2 { font-size: clamp(36px, 5.2vw, 58px); line-height: 1.12; margin: 0 0 36px; }
.thanks p { margin: 0 0 1.1em; }
.thanks-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 36px; }
body.thanks-mode #site { display: none; }

/* =========================================================
   MINI PLAYER
   ========================================================= */
.mini {
  position: fixed; z-index: 40;
  left: 50%; bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  height: 42px;
  width: min(440px, calc(100vw - 24px));
  display: flex; align-items: center; gap: 2px;
  padding: 0 16px 0 8px;
  border-radius: 999px;
  background: rgba(12, 11, 10, 0.94);   /* a little more solid than other panels: text scrolls beneath it */
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: var(--hair);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.mini-btn { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: rgba(239,230,213,0.78); flex: none; }
.mini-btn:hover { color: var(--cream); background: rgba(239,230,213,0.06); }
.mini-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }
.mini-btn svg path { fill: currentColor; }
#miniPrev svg path, #miniNext svg path { fill: none; }
.i-pause path { fill: none !important; stroke-width: 2; }
.mini-btn .i-pause { display: none; }
body.is-playing .mini-btn .i-pause { display: block; }
body.is-playing .mini-btn .i-play { display: none; }
.mini-title {
  font-family: var(--sans); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: rgba(239,230,213,0.62);
  white-space: nowrap; overflow: hidden;
  margin: 0 12px 0 8px;
  width: 92px; flex: none;
}
.mini-track { display: inline-flex; }
.mini-title.scroll {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10%, #000 88%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 10%, #000 88%, transparent 100%);
}
.mini-title.scroll .mini-track { animation: marquee var(--dur, 10s) linear infinite; }
.mini-title.scroll .mini-track span { padding-right: 3em; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.mini-bar { position: relative; flex: 1; height: 22px; cursor: pointer; touch-action: none; }
.mini-bar::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(239,230,213,0.2); }
.mini-fill { position: absolute; left: 0; top: 50%; height: 1px; width: 0; background: linear-gradient(90deg, rgba(212,175,55,0.7), var(--scrub)); }
.mini-dot {
  position: absolute; top: 50%; left: 0; width: 14px; height: 14px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  object-fit: cover;
  pointer-events: none;
  filter: drop-shadow(0 0 4px rgba(255,150,90,0.7));
}

/* toast */
.toast {
  position: fixed; left: 50%; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 60;
  transform: translate(-50%, 10px);
  font-family: var(--sans); font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--cream);
  background: var(--obsidian); border: var(--hair); border-radius: 999px;
  padding: 9px 16px 8px;
  opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* =========================================================
   MOBILE
   ========================================================= */
@media (max-width: 767.98px) {
  /* Literata on phones. Light text on a dark ground looks bolder than it is ("irradiation"), so the usual
     advice is to go slightly lighter than Regular and add a little air. opsz 24 uses Literata's finer
     display-leaning drawing (thinner hairlines) while staying sturdy enough at 18px. */
  body {
    font-size: 18px; line-height: 1.6; letter-spacing: 0.005em;
    font-weight: 340;
    font-optical-sizing: none; font-variation-settings: "opsz" 24;
  }
  .disclaimer { font-size: 15px; }
  .manifesto { padding: 10vh 22px 0; }
  .media { margin: 40px auto; }
  .m-head + .media { margin-top: 28px; }
  .m-title { margin-bottom: 20px; }
  .shortcut .triggers { display: block; margin: 4px 0 0 -0.14em; }   /* own line on phones, aligned with the text */

  .modal { padding: 0; place-items: end center; }
  .modal-card { max-height: 92svh; border-radius: 12px 12px 0 0; }
  .modal-title { padding: 22px 22px 10px; font-size: 26px; }
  .modal-bar { padding: 2px 22px 12px; gap: 0 18px; font-size: 19px; }
  .modal-body { padding: 16px 22px 30px; font-size: 17px; }
  .details dl > div { grid-template-columns: 1fr; gap: 2px; }
  .mini-title { width: 98px; margin: 0 8px 0 2px; letter-spacing: 0.18em; }
  .mini { padding: 0 14px 0 6px; }
  .triggers-bottom { font-size: 23px; }
}

@media (prefers-reduced-motion: reduce) {
  .mini-title.scroll .mini-track { animation-duration: calc(var(--dur, 10s) * 1.6); }
  .modal, .modal-card, .thanks-inner { animation: none; }
}

/* privacy page */
.doc-page h3 { font-size: clamp(22px, 2.6vw, 28px); margin: 1.6em 0 0.5em; }
.doc-page code { font-family: ui-monospace, Menlo, monospace; font-size: 0.85em; color: var(--sand); }
.doc-page a { color: var(--gold); text-decoration: none; border-bottom: 1px solid rgba(212,175,55,0.4); }
.doc-page .back { margin-top: 2.4em; }
