/* wholehuman.studio v4 · "Observatory": obsidian + champagne, hairline precision, glass light.
   Motion: CSS scroll-driven animations where supported (static final state otherwise); site.js adds
   reveal-on-enter. Animates transform/opacity only. CSP: no inline styles or scripts. */
@font-face { font-family: "Jakarta"; src: url("fonts/plus-jakarta-sans-var.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
  --obsidian: #0b0a0d;
  --obsidian-2: #131117;
  --obsidian-3: #1b1820;
  --ivory: #f3eee6;
  --ivory-2: #e9e2d6;
  --ink: #17151b;
  --ink-2: #5d5762;
  --brass: #d8c29a;
  --on-dark: #f3eee6;
  --on-dark-2: rgba(243, 238, 230, .64);
  --on-dark-3: rgba(243, 238, 230, .54);
  --hair-dark: rgba(243, 238, 230, .1);
  --hair-light: rgba(23, 21, 27, .1);
  --paper: var(--ivory);
  --paper-2: var(--ivory-2);
  --line: var(--hair-light);
  --display: "Jakarta", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  --gutter: clamp(18px, 5vw, 72px);
  --max: 1240px;
  --r-xl: clamp(26px, 3vw, 40px);
  --spring: cubic-bezier(.32, .72, 0, 1);
  --soft: cubic-bezier(.22, 1, .36, 1);
  color-scheme: dark;
}
body.page { color-scheme: light dark; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.page { --paper: #141217; --paper-2: #1c1a20; --ink: #f1ece4; --ink-2: #aaa3ad; --line: rgba(241, 236, 228, .12); }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--obsidian); color: var(--on-dark); font: 17px/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: clip; }
body.page { background: var(--paper); color: var(--ink); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; top: 8px; }
.skip:focus { left: 8px; z-index: 30; background: var(--ivory); color: var(--ink); padding: 8px 14px; border-radius: 10px; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 8px; }

/* Film grain: one fixed layer, never on scrolling content. */
body::after { content: ""; position: fixed; inset: 0; z-index: 40; pointer-events: none; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
body.page::after { opacity: .03; }

/* ---------- Floating island nav ---------- */
.nav { position: fixed; z-index: 20; top: calc(14px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); width: min(calc(100% - 24px), 1000px);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 6px 6px 6px 16px; border-radius: 999px;
  background: rgba(19, 17, 23, .6); border: 1px solid rgba(243, 238, 230, .09); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 24px 60px -24px rgba(0, 0, 0, .7);
  -webkit-backdrop-filter: blur(22px) saturate(1.4); backdrop-filter: blur(22px) saturate(1.4); color: var(--on-dark); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; min-height: 44px; }
.brand .mark { width: 34px; height: 34px; flex: none; }
.brand .word { display: grid; line-height: 1; }
.brand .word b { font: 600 15px/1 var(--display); letter-spacing: .005em; }
.brand .word small { margin-top: 5px; font: 500 8.5px/1 var(--display); letter-spacing: .34em; text-transform: uppercase; opacity: .55; }
.nav .links { display: flex; align-items: center; gap: 2px; }
.nav .links a { padding: 11px 15px; border-radius: 999px; font: 500 14px/1 var(--display); text-decoration: none; color: var(--on-dark-2); transition: color .5s var(--spring), background .5s var(--spring); }
.nav .links a:hover { color: var(--on-dark); background: rgba(243, 238, 230, .06); }
.nav .menu-btn { display: none; }

/* Button-in-button pill */
.pill { display: inline-flex; align-items: center; gap: 14px; min-height: 52px; padding: 6px 6px 6px 24px; border-radius: 999px; text-decoration: none;
  font: 600 15px/1 var(--display); transition: transform .6s var(--spring), background .6s var(--spring); }
.pill .arrow { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; transition: transform .6s var(--spring); }
.pill .arrow svg { width: 14px; height: 14px; }
.pill:hover .arrow { transform: translate(2px, -2px) scale(1.06); }
.pill:active { transform: scale(.98); }
.pill.light { background: #f3eee6; color: #17151b; box-shadow: 0 18px 44px -18px rgba(216, 194, 154, .6); }
.pill.light .arrow { background: #17151b; color: #f3eee6; }
.pill.dark { background: var(--ink); color: var(--paper); }
.pill.dark .arrow { background: rgba(255, 255, 255, .12); }
.pill.small { min-height: 44px; padding-left: 18px; font-size: 14px; }
.pill.small .arrow { width: 32px; height: 32px; }
.textlink { font: 500 15px/1 var(--display); color: var(--on-dark-2); text-decoration: none; padding: 14px 2px; border-bottom: 1px solid var(--hair-dark); transition: color .5s var(--spring), border-color .5s var(--spring); }
.textlink:hover { color: var(--on-dark); border-color: var(--brass); }

/* Mobile menu: native popover, no JS. */
.icon-btn { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(243, 238, 230, .14); background: rgba(243, 238, 230, .06); color: var(--on-dark); cursor: pointer; padding: 0; }
.icon-btn span { position: relative; display: block; width: 16px; height: 1.5px; }
.icon-btn span::before, .icon-btn span::after { content: ""; position: absolute; left: 0; top: 0; width: 16px; height: 1.5px; background: currentColor; border-radius: 2px; transition: transform .6s var(--spring); }
.menu-btn span::before { transform: translateY(-3.5px); } .menu-btn span::after { transform: translateY(3.5px); }
.close span::before { transform: rotate(45deg); } .close span::after { transform: rotate(-45deg); }
.sheet { position: fixed; margin: 0; inset: 0; width: 100%; height: 100dvh; max-width: none; max-height: none; border: 0; padding: calc(110px + env(safe-area-inset-top)) var(--gutter) 40px;
  background: rgba(11, 10, 13, .92); -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px); color: var(--on-dark); }
.sheet nav { display: grid; gap: 4px; }
.sheet nav a { font: 300 clamp(40px, 12vw, 64px)/1.18 var(--display); text-decoration: none; letter-spacing: -.03em; opacity: 0; transform: translateY(40px); transition: opacity .8s var(--spring), transform .8s var(--spring); }
.sheet:popover-open nav a { opacity: 1; transform: none; }
.sheet:popover-open nav a:nth-child(2) { transition-delay: .06s; } .sheet:popover-open nav a:nth-child(3) { transition-delay: .12s; } .sheet:popover-open nav a:nth-child(4) { transition-delay: .18s; }
.sheet .close { position: absolute; top: calc(20px + env(safe-area-inset-top)); right: 18px; }
.sheet p { margin-top: 44px; color: var(--on-dark-2); font-size: 15px; }
@media (max-width: 860px) { .nav .links, .nav .cta { display: none; } .nav .menu-btn { display: grid; } }

/* ---------- Hero: pinned convergence ---------- */
.hero-track { position: relative; }
.hero { position: sticky; top: 0; height: 100vh; height: 100dvh; min-height: 660px; overflow: hidden; isolation: isolate;
  background: radial-gradient(110% 90% at 72% 46%, #1b1621 0%, var(--obsidian) 60%); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(34% 40% at 71% 48%, rgba(216, 194, 154, .11), transparent 70%), radial-gradient(30% 30% at 18% 92%, rgba(170, 157, 255, .07), transparent 70%); }
.stage { position: relative; aspect-ratio: 1; }
.hero .stage { position: absolute; top: 50%; left: 73%; width: min(42vw, 600px); transform: translate(-50%, -48%); }
.stage img { position: absolute; }
.stage .assembled { inset: 0; width: 100%; height: 100%; object-fit: contain; }
.stage .ring { width: 52%; height: auto; }
.stage .r1 { left: 22%; top: 2%; } .stage .r2 { left: 46%; top: 30%; } .stage .r3 { left: 6%; top: 36%; }
.dial { position: absolute; aspect-ratio: 1; color: var(--brass); pointer-events: none; }
.hero .dial { top: 50%; left: 73%; width: min(60vw, 820px); transform: translate(-50%, -50%); opacity: .5; }
.dial svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: turn 160s linear infinite; }
.dial svg.inner { inset: 15%; width: 70%; height: 70%; animation-duration: 100s; animation-direction: reverse; }
@keyframes turn { to { transform: rotate(360deg); } }
.hero .copy { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center; padding-top: 70px; }
.hero h1 { font-size: clamp(44px, min(6.7vw, 11.4vh), 112px); font-weight: 230; line-height: .96; letter-spacing: -.045em; }
.hero .copy h1 { max-width: 6.3em; }
@media (max-height: 800px) { .scroll-cue { display: none; } }
.hero .copy > * { max-width: min(100%, 50vw); }
.hero h1 em { font-style: normal; font-weight: 600; background: linear-gradient(100deg, #f4cfdb 0%, #f3eee6 38%, #e6d39f 70%, #c4b9ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lede { margin-top: clamp(28px, 3vw, 40px); max-width: min(29em, 36vw); font-size: clamp(16px, 1.3vw, 19px); color: var(--on-dark-2); }
.hero .lede b { color: var(--on-dark); font-weight: 500; }
.hero .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: clamp(34px, 3.4vw, 48px); }
.scroll-cue { position: absolute; left: var(--gutter); bottom: 34px; display: flex; align-items: center; gap: 14px; font: 500 10px/1 var(--display); letter-spacing: .32em; text-transform: uppercase; color: var(--on-dark-3); }
.scroll-cue i { position: relative; width: 1px; height: 46px; background: var(--hair-dark); overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--brass); animation: cue 2.4s var(--soft) infinite; }
@keyframes cue { to { transform: translateY(350%); } }

/* Default (no scroll-timeline, reduced motion, phones): the assembled state, still. */
.stage .ring { opacity: 0; }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) and (min-width: 861px) {
    .hero-track { height: 240vh; view-timeline: --hero block; }
    .hero .ring { animation: linear both; animation-timeline: --hero; animation-range: contain 0% contain 62%; }
    .stage .r1 { animation-name: r1; } .stage .r2 { animation-name: r2; } .stage .r3 { animation-name: r3; }
    @keyframes r1 { from { opacity: 1; transform: translate(30%, -30%) rotate(-24deg) scale(1.06); } 80% { opacity: 1; } to { opacity: 0; transform: translate(4%, 6%) rotate(0) scale(.9); } }
    @keyframes r2 { from { opacity: 1; transform: translate(44%, 18%) rotate(20deg) scale(1.06); } 80% { opacity: 1; } to { opacity: 0; transform: translate(-10%, 4%) rotate(0) scale(.9); } }
    @keyframes r3 { from { opacity: 1; transform: translate(4%, 58%) rotate(-10deg) scale(1.06); } 80% { opacity: 1; } to { opacity: 0; transform: translate(10%, -4%) rotate(0) scale(.9); } }
    .hero .assembled { animation: assemble linear both; animation-timeline: --hero; animation-range: contain 42% contain 70%; }
    @keyframes assemble { from { opacity: 0; transform: scale(.86) rotate(-8deg); } to { opacity: 1; transform: none; } }
    .hero .copy { animation: lift linear both; animation-timeline: --hero; animation-range: contain 0% contain 100%; }
    @keyframes lift { 0%, 40% { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-80px); } }
    .scroll-cue { animation: fadeout linear both; animation-timeline: --hero; animation-range: contain 0% contain 14%; }
    @keyframes fadeout { to { opacity: 0; } }
    .hero .dial { animation: dialin linear both; animation-timeline: --hero; animation-range: contain 0% contain 76%; }
    @keyframes dialin { from { opacity: .18; transform: translate(-50%, -50%) scale(1.1); } to { opacity: .55; transform: translate(-50%, -50%) scale(1); } }
  }
}

@media (max-width: 860px) {
  .hero-track { height: auto; }
  .hero { position: relative; height: auto; min-height: 100svh; display: flex; flex-direction: column; padding-bottom: 56px; }
  .hero .stage { position: relative; top: auto; left: auto; transform: none; width: min(92vw, 460px); margin: 100px auto 0; }
  .hero .dial { top: calc(100px + min(46vw, 230px)); left: 50%; width: min(118vw, 600px); }
  .hero .copy { height: auto; padding-top: 26px; }
  .hero .copy > * { max-width: 100%; }
  .scroll-cue { display: none; }
}

/* ---------- Manifesto (ivory, word reveal) ---------- */
.manifesto { background: var(--ivory); color: var(--ink); padding: clamp(120px, 16vw, 230px) 0; }
.manifesto p.big { font: 350 clamp(32px, 4.9vw, 74px)/1.1 var(--display); letter-spacing: -.03em; max-width: 19ch; }
.manifesto .big b { font-weight: 600; }
.manifesto .big .c1 { color: #b83f6a; } .manifesto .big .c2 { color: #5a42c9; } .manifesto .big .c3 { color: #8a6a1f; }
.manifesto .sub { margin-top: 48px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 32px; align-items: start; border-top: 1px solid var(--hair-light); padding-top: 28px; }
.manifesto .sub p { grid-column: 2; color: var(--ink-2); font-size: clamp(16px, 1.35vw, 19px); max-width: 34em; }
@media (max-width: 720px) { .manifesto .sub { grid-template-columns: 1fr; } .manifesto .sub p { grid-column: auto; } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .manifesto .w { animation: word linear both; animation-timeline: view(); animation-range: cover 12% cover 40%; }
    @keyframes word { from { opacity: .12; } to { opacity: 1; } }
  }
}

/* ---------- Section heads ---------- */
.head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px 48px; margin-bottom: clamp(40px, 5vw, 68px); }
.head h2 { font-size: clamp(42px, 5.8vw, 88px); font-weight: 250; line-height: 1; letter-spacing: -.04em; }
.head h2 b { font-weight: 600; }
.head p { max-width: 27em; color: var(--on-dark-2); }

/* ---------- Apps: stacking double-bezel cards ---------- */
.apps { padding: clamp(120px, 14vw, 200px) 0 clamp(80px, 10vw, 140px); }
.stack { display: grid; gap: clamp(28px, 7vh, 72px); }
.shell { position: relative; padding: 7px; border-radius: var(--r-xl); background: rgba(243, 238, 230, .045); border: 1px solid rgba(243, 238, 230, .08); }
.shell:nth-child(2) { --i: 1; } .shell:nth-child(3) { --i: 2; }
.app { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: clamp(24px, 4vw, 64px); min-height: min(74vh, 660px); padding: clamp(28px, 4.6vw, 68px);
  border-radius: calc(var(--r-xl) - 7px); overflow: hidden; isolation: isolate; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
.app::before { content: ""; position: absolute; z-index: -1; width: 80%; aspect-ratio: 1; border-radius: 50%; right: -22%; top: -34%; filter: blur(90px); }
.app.bloom { background: linear-gradient(155deg, #1d0a15 0%, #3d0f28 55%, #63193f 100%); } .app.bloom::before { background: #ff8fb4; opacity: .36; }
.app.cosmic { background: linear-gradient(155deg, #0a0820 0%, #1a1348 55%, #31256f 100%); } .app.cosmic::before { background: #9c86ff; opacity: .4; }
.app.cosmicx { background: linear-gradient(155deg, #08081a 0%, #131135 55%, #1f1b4c 100%); } .app.cosmicx::before { background: #dfff6a; opacity: .13; }
.kicker { display: flex; align-items: center; gap: 14px; }
.kicker .icon { width: 58px; height: 58px; border-radius: 14px; box-shadow: 0 12px 30px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(255, 255, 255, .12); }
.kicker strong { display: block; font: 600 18px/1.2 var(--display); letter-spacing: -.005em; }
.app h3 { margin-top: clamp(26px, 4vw, 46px); font-size: clamp(32px, 4vw, 60px); font-weight: 300; line-height: 1.02; letter-spacing: -.035em; }
.app h3 b { font-weight: 600; }
.app p.desc { margin-top: 18px; max-width: 30em; color: var(--on-dark-2); font-size: clamp(16px, 1.3vw, 18px); }
.app ul { list-style: none; padding: 0; margin: 26px 0 0; font-size: 15px; max-width: 30em; }
.app li { padding: 12px 0; border-top: 1px solid rgba(243, 238, 230, .1); color: rgba(243, 238, 230, .82); }
.app .foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 30px; }
.status { font: 500 10.5px/1 var(--display); letter-spacing: .24em; text-transform: uppercase; color: var(--on-dark-3); }
.media { display: grid; place-items: center; }
.phone { --tilt: -3deg; width: min(290px, 74%); padding: 5px; border-radius: 46px; background: linear-gradient(160deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, .04) 40%, rgba(255, 255, 255, .14));
  box-shadow: 0 50px 90px -30px rgba(0, 0, 0, .75); transform: rotate(var(--tilt)); }
.app.cosmic .phone { --tilt: 3deg; }
.phone .screen { overflow: hidden; border-radius: 41px; background: #050507; padding: 6px; }
.phone img { width: 100%; aspect-ratio: 600 / 1125; object-fit: cover; object-position: top; border-radius: 35px; }
.orbit { --tilt: 0deg; position: relative; width: min(360px, 86%); aspect-ratio: 1; display: grid; place-items: center; }
.orbit::before, .orbit::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(223, 255, 106, .2); }
.orbit::after { inset: 17%; border-style: dashed; border-color: rgba(223, 255, 106, .16); animation: turn 60s linear infinite; }
.orbit img:not(.glass) { width: 44%; border-radius: 22%; box-shadow: 0 0 90px rgba(223, 255, 106, .3), 0 24px 60px rgba(0, 0, 0, .55); }
.orbit .spin { position: absolute; inset: 0; animation: turn 24s linear infinite; }
.orbit .dot { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: #dfff6a; top: -4.5px; left: calc(50% - 4.5px); box-shadow: 0 0 18px #dfff6a; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) and (min-width: 861px) and (min-height: 820px) {
    .shell:not(:last-child) { position: sticky; top: calc(100px + var(--i, 0) * 20px); animation: recede linear both; animation-timeline: view(); animation-range: exit-crossing 0% exit-crossing 100%; }
    @keyframes recede { to { transform: scale(.92); opacity: .3; } }
  }
  @media (prefers-reduced-motion: no-preference) and (min-width: 861px) {
    .phone, .orbit { animation: drift linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
    @keyframes drift { from { transform: translateY(70px) rotate(var(--tilt)); } to { transform: translateY(-70px) rotate(var(--tilt)); } }
  }
}
@media (max-width: 860px) {
  .shell { position: relative; top: auto; }
  .app { grid-template-columns: 1fr; min-height: 0; }
  .phone { width: min(250px, 70%); }
  .phone img { aspect-ratio: 600 / 900; }
}

/* ---------- Contact ---------- */
.contact { padding: clamp(110px, 14vw, 200px) 0 clamp(70px, 9vw, 120px); position: relative; overflow: hidden; isolation: isolate; border-top: 1px solid var(--hair-dark); }
.contact::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 0; width: min(90vw, 1100px); aspect-ratio: 1; transform: translate(-50%, -30%); border-radius: 50%;
  background: radial-gradient(circle, rgba(216, 194, 154, .13), transparent 62%); }
.contact h2 { font-size: clamp(58px, 11.5vw, 176px); font-weight: 250; line-height: .9; letter-spacing: -.05em; }
.contact h2 b { font-weight: 600; }
.lines { display: grid; gap: 12px; margin-top: clamp(40px, 5vw, 68px); max-width: 780px; }
.line { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 7px 7px 7px 28px; min-height: 76px; border-radius: 999px; text-decoration: none;
  background: rgba(243, 238, 230, .05); border: 1px solid rgba(243, 238, 230, .1); transition: background .6s var(--spring), transform .6s var(--spring); }
.line:hover { background: rgba(243, 238, 230, .09); }
.line:active { transform: scale(.99); }
.line .label { display: grid; gap: 7px; min-width: 0; }
.line small { font: 500 10px/1 var(--display); letter-spacing: .28em; text-transform: uppercase; color: var(--on-dark-3); }
.line strong { font: 500 clamp(18px, 2.4vw, 28px)/1.1 var(--display); letter-spacing: -.015em; overflow-wrap: anywhere; }
.line .arrow { flex: none; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: #f3eee6; color: #17151b; transition: transform .6s var(--spring); }
.line:hover .arrow { transform: translate(2px, -2px) scale(1.05); }
.line .arrow svg { width: 16px; height: 16px; }
.sms-terms { margin-top: 22px; max-width: 48em; font-size: 13.5px; color: var(--on-dark-3); }
.sms-terms a { color: var(--on-dark-2); }
.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: clamp(60px, 8vw, 110px); padding-top: 28px; border-top: 1px solid var(--hair-dark); font-size: 15px; }
.cols h3 { margin: 0 0 10px; font: 600 16px/1.3 var(--display); letter-spacing: -.005em; color: var(--on-dark); }
.cols p, .cols address { color: var(--on-dark-2); font-style: normal; }
@media (max-width: 760px) { .cols { grid-template-columns: 1fr; } .line { padding-left: 20px; min-height: 68px; } .line .arrow { width: 52px; height: 52px; } }

/* ---------- Legal pages ---------- */
.doc { padding: calc(140px + env(safe-area-inset-top)) 0 clamp(70px, 10vw, 130px); }
.doc .wrap { max-width: calc(760px + 2 * var(--gutter)); }
.doc h1 { font-size: clamp(46px, 6.8vw, 84px); font-weight: 250; line-height: 1; letter-spacing: -.04em; }
.doc .meta { margin-top: 18px; color: var(--ink-2); font-size: 15px; }
.doc .summary { margin: 38px 0 8px; padding: 6px; border-radius: 28px; background: rgba(127, 120, 130, .07); border: 1px solid var(--line); }
.doc .summary > div { padding: 24px 26px; border-radius: 22px; background: var(--paper); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5); }
.doc .summary h2 { margin: 0 0 10px; font-size: 20px; font-weight: 600; }
.doc .summary ul { margin: 0; padding-left: 20px; }
.doc .summary li + li { margin-top: 8px; }
.doc h2 { margin: 54px 0 12px; font-size: clamp(22px, 2.4vw, 28px); font-weight: 600; line-height: 1.2; letter-spacing: -.015em; scroll-margin-top: 110px; }
.doc p, .doc ul { margin: 0 0 14px; }
.doc ul { padding-left: 22px; }
.doc li + li { margin-top: 6px; }
.doc table { width: 100%; border-collapse: collapse; margin: 8px 0 18px; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.doc th { font-weight: 600; }
.doc .toc { columns: 2; column-gap: 32px; padding-left: 20px; margin-top: 30px; color: var(--ink-2); }
.doc address { font-style: normal; }
.doc .actions { margin-top: 34px; }
@media (max-width: 560px) { .doc .toc { columns: 1; } .doc table { display: block; overflow-x: auto; } }

/* ---------- Reveal on enter (site.js adds .js and .in) ---------- */
.js .reveal { opacity: 0; transform: translateY(48px); filter: blur(8px); transition: opacity 1.1s var(--spring), transform 1.1s var(--spring), filter 1.1s var(--spring); transition-delay: calc(var(--d, 0) * 90ms); }
.js .reveal.in { opacity: 1; transform: none; filter: none; }
.d1 { --d: 1; } .d2 { --d: 2; } .d3 { --d: 3; } .d4 { --d: 4; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; filter: none; }
}

/* ================= v3 additions ================= */
:root { interpolate-size: allow-keywords; }

/* Mask-reveal headings: the words slide up from behind a clean edge. */
.mask { display: inline-block; overflow: hidden; vertical-align: bottom; padding: .04em 0 .1em; margin-bottom: -.1em; }
.mask > span { display: inline-block; }
.js .reveal:has(> .mask) { opacity: 1; transform: none; filter: none; }
.js .reveal .mask > span { transform: translateY(108%); transition: transform 1.25s var(--spring); }
.js .reveal.in .mask > span { transform: none; }

/* Portfolio cards: glass emblem, stats, chips */
.app .emblem { position: absolute; z-index: -1; right: -4%; top: 50%; width: min(48%, 520px); transform: translateY(-50%); opacity: .55; pointer-events: none; }
.app.cosmicx .emblem { display: none; }
.app .media { position: relative; }
.orbit img.glass { width: 62%; border-radius: 0; box-shadow: none; filter: drop-shadow(0 0 40px rgba(223, 255, 106, .35)); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 28px 0 0; max-width: 32em; border-top: 1px solid rgba(243, 238, 230, .12); }
.stats div { display: flex; flex-direction: column-reverse; gap: 6px; padding: 16px 12px 4px 0; }
.stats div + div { padding-left: 14px; border-left: 1px solid rgba(243, 238, 230, .1); }
.stats dd { margin: 0; font: 300 clamp(26px, 2.6vw, 38px)/1 var(--display); letter-spacing: -.03em; }
.stats dt { font-size: 12.5px; line-height: 1.35; color: var(--on-dark-3); }
.app.cosmic .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; padding: 0; max-width: 32em; }
.chips li { padding: 8px 13px; border-radius: 999px; border: 1px solid rgba(243, 238, 230, .14); background: rgba(243, 238, 230, .04); font: 500 12.5px/1 var(--display); color: rgba(243, 238, 230, .78); }
.app ul.chips li { border-top: 1px solid rgba(243, 238, 230, .14); }
@media (max-width: 560px) { .stats, .app.cosmic .stats { grid-template-columns: 1fr 1fr; } .stats div:nth-child(3) { padding-left: 0; border-left: 0; } .app.cosmic .stats div:nth-child(3) { grid-column: 1 / -1; } }
@media (max-width: 860px) { .app .emblem { top: auto; bottom: 2%; right: -12%; width: 78%; transform: none; opacity: .3; } }

/* Numbers band: count-up on scroll where supported, plain numbers otherwise */
.numbers { padding: clamp(70px, 9vw, 120px) 0; }
.rule { display: block; height: 1px; background: linear-gradient(90deg, transparent, rgba(216, 194, 154, .55), transparent); transform-origin: left; }
.js .rule.reveal { transform: scaleX(0); filter: none; opacity: 1; transition: transform 1.6s var(--spring); }
.js .rule.reveal.in { transform: scaleX(1); }
.ngrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; padding: clamp(40px, 6vw, 72px) 0; }
.count { display: block; font: 250 clamp(64px, 8vw, 128px)/.9 var(--display); letter-spacing: -.05em;
  background: linear-gradient(180deg, #f3eee6 30%, rgba(216, 194, 154, .7)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ngrid p { margin-top: 18px; max-width: 16em; color: var(--on-dark-2); font-size: 15px; }
@media (max-width: 700px) { .ngrid { grid-template-columns: 1fr; row-gap: 40px; } }
@property --n { syntax: "<integer>"; inherits: false; initial-value: 0; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .count:not(.zero) { font-size: 0; counter-reset: n var(--n); animation: count linear both; animation-timeline: view(); animation-range: entry 10% cover 45%; }
    .count:not(.zero)::after { content: counter(n); font-size: clamp(64px, 8vw, 128px); }
    .count[data-n="331"] { --to: 331; } .count[data-n="18"] { --to: 18; }
    @keyframes count { from { --n: 0; } to { --n: var(--to); } }
  }
}

/* Spotlight that follows the pointer (site.js sets --mx/--my) */

/* FAQ */
.faq { padding: clamp(100px, 12vw, 170px) 0; border-top: 1px solid var(--hair-dark); }
.fwrap { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr); gap: clamp(28px, 6vw, 96px); align-items: start; }
.fwrap .head { position: sticky; top: 120px; display: block; margin: 0; }
.fwrap .head p { margin-top: 22px; }
.qs { border-top: 1px solid var(--hair-dark); }
.qs details { border-bottom: 1px solid var(--hair-dark); }
.qs summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; padding: 18px 0; cursor: pointer; list-style: none;
  font: 400 clamp(18px, 1.8vw, 23px)/1.3 var(--display); letter-spacing: -.01em; transition: color .5s var(--spring); }
.qs summary::-webkit-details-marker { display: none; }
.qs summary:hover { color: #fff; }
.qs summary i { position: relative; flex: none; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(243, 238, 230, .16); transition: transform .7s var(--spring), background .5s var(--spring); }
.qs summary i::before, .qs summary i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; margin: -.75px 0 0 -6px; background: currentColor; border-radius: 2px; }
.qs summary i::after { transform: rotate(90deg); transition: transform .7s var(--spring); }
.qs details[open] summary i { transform: rotate(180deg); background: rgba(243, 238, 230, .08); }
.qs details[open] summary i::after { transform: rotate(0); }
.qs details p { padding: 0 64px 26px 0; color: var(--on-dark-2); max-width: 40em; }
.qs details p a { color: var(--on-dark); }
.qs details::details-content { block-size: 0; overflow: hidden; transition: block-size .7s var(--spring), content-visibility .7s allow-discrete; }
.qs details[open]::details-content { block-size: auto; }
@media (max-width: 860px) { .fwrap { grid-template-columns: 1fr; } .fwrap .head { position: static; } .qs details p { padding-right: 0; } }

.contact-lede { margin-top: 26px; max-width: 34em; color: var(--on-dark-2); font-size: clamp(16px, 1.4vw, 19px); }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) and (min-width: 861px) {
    .app .emblem { animation: float linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
    @keyframes float { from { transform: translateY(-30%) rotate(-8deg) scale(.92); } to { transform: translateY(-70%) rotate(8deg) scale(1.04); } }
    .contact h2 { animation: track-in linear both; animation-timeline: view(); animation-range: entry 0% cover 40%; }
    @keyframes track-in { from { letter-spacing: .02em; } to { letter-spacing: -.05em; } }
  }
}

/* ================= v4 (2026-11-25) ================= */
/* The manifesto rises over the pinned hero like a sheet (only while the hero is pinned). */
.manifesto { position: relative; z-index: 3; border-radius: var(--r-xl) var(--r-xl) 0 0; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) and (min-width: 861px) {
    .manifesto { margin-top: -16vh; box-shadow: 0 -40px 90px -20px rgba(0, 0, 0, .6); }
  }
}

/* In every app: six qualities, one hairline grid, pointer spotlight per cell. */
.feats-shell { border: 1px solid var(--hair-dark); border-radius: 30px; overflow: hidden; background: var(--obsidian-2); }
.feats { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 -1px -1px 0; padding: 0; }
.feat { position: relative; display: flex; flex-direction: column; padding: clamp(28px, 3vw, 44px) clamp(28px, 3vw, 44px) clamp(36px, 3.6vw, 52px);
  border-right: 1px solid var(--hair-dark); border-bottom: 1px solid var(--hair-dark);
  background: radial-gradient(460px circle at var(--mx, 50%) var(--my, -60%), rgba(216, 194, 154, .1), transparent 62%), linear-gradient(170deg, var(--obsidian-3), var(--obsidian-2)); }
.feat .ico { width: 42px; height: 42px; color: var(--brass); transition: transform .8s var(--spring); }
.feat:hover .ico { transform: translateY(-3px) rotate(-4deg); }
.feat h3 { margin-top: clamp(40px, 4.6vw, 68px); font-size: clamp(22px, 1.9vw, 28px); font-weight: 450; line-height: 1.15; letter-spacing: -.022em; }
.feat p { margin-top: 12px; color: var(--on-dark-2); font-size: 15.5px; line-height: 1.6; }
.feat .textlink { align-self: flex-start; margin-top: 16px; padding: 10px 0; font-size: 14.5px; }
.js .feat.reveal { transform: translateY(24px); filter: none; }
.js .feat.reveal.in { transform: none; }
@media (max-width: 1000px) { .feats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .feats { grid-template-columns: 1fr; } .feat { min-height: 0; } .feat h3 { margin-top: 30px; } }

/* ---------- Footer: a closing moment that echoes the hero ---------- */
footer { position: relative; overflow: hidden; isolation: isolate; background: var(--obsidian); color: var(--on-dark-2); border-top: 1px solid var(--hair-dark);
  padding: 0 0 calc(30px + env(safe-area-inset-bottom)); font-size: 14.5px; }
footer.plain { padding-top: clamp(64px, 8vw, 96px); }
.close { position: relative; display: grid; justify-items: center; text-align: center; padding: clamp(120px, 15vw, 210px) var(--gutter) clamp(72px, 7vw, 104px); view-timeline: --close block; }
.halo { position: relative; width: min(40vw, 420px); }
.halo::before { content: ""; position: absolute; z-index: -1; inset: -70%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(216, 194, 154, .15), rgba(170, 157, 255, .05) 55%, transparent); }
.halo .dial { left: 50%; top: 50%; width: 150%; transform: translate(-50%, -50%); opacity: .42; }
.halo .stage { width: 100%; }
.fline { position: relative; margin-top: clamp(88px, 9vw, 124px); max-width: 13em; font: 230 clamp(34px, 4.4vw, 68px)/1.02 var(--display); letter-spacing: -.04em; color: var(--on-dark); text-wrap: balance; }
.fline em { font-style: normal; font-weight: 600; background: linear-gradient(100deg, #f4cfdb 0%, #f3eee6 38%, #e6d39f 70%, #c4b9ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fgrid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, 1fr)); gap: 36px 28px; padding-top: clamp(44px, 5vw, 64px); border-top: 1px solid var(--hair-dark); }
footer.plain .fgrid { border-top: 0; padding-top: 0; }
.fgrid .brand { color: var(--on-dark); }
.fbrand address { margin-top: 22px; font-style: normal; line-height: 1.75; }
.ftag { margin-top: 18px; color: var(--on-dark-2); }
footer h2 { margin: 10px 0 14px; font: 600 14px/1.2 var(--display); letter-spacing: -.005em; color: var(--on-dark); }
footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
footer ul a { display: inline-block; padding: 7px 0; text-decoration: none; overflow-wrap: anywhere; transition: color .5s var(--spring); }
footer a:hover { color: var(--on-dark); }
.wordmark { margin: clamp(48px, 6vw, 92px) 0 0; display: flex; justify-content: center; gap: .26em; white-space: nowrap;
  font: 200 16.1cqi/.86 var(--display); letter-spacing: -.06em; user-select: none; pointer-events: none; }
footer .wrap { container-type: inline-size; }
.wordmark > span { flex: none; display: block; overflow: hidden; padding: 0 .02em .08em 0; }
.wordmark > span > span { display: block; background: linear-gradient(180deg, rgba(243, 238, 230, .3), rgba(216, 194, 154, .06) 92%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; margin-top: 18px; padding-top: 22px; border-top: 1px solid var(--hair-dark); font-size: 12.5px; color: var(--on-dark-3); }
@media (max-width: 1000px) { .fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fbrand { grid-column: 1 / -1; } }
@media (max-width: 860px) { .halo { width: min(70vw, 320px); } .close { padding-top: 96px; } }
@media (max-width: 560px) { .fgrid > div:nth-child(2), .fgrid > div:last-child { grid-column: 1 / -1; } }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) and (min-width: 861px) {
    /* Same three rings, same convergence as the hero, played by the footer's own view timeline. */
    .close .ring { animation: linear both; animation-timeline: --close; animation-range: cover 8% cover 42%; }
    .close .assembled { animation: assemble linear both; animation-timeline: --close; animation-range: cover 26% cover 46%; }
    .halo .dial { animation: settle linear both; animation-timeline: --close; animation-range: cover 0% cover 46%; }
    @keyframes settle { from { opacity: .08; transform: translate(-50%, -50%) scale(1.2) rotate(-40deg); } to { opacity: .42; transform: translate(-50%, -50%) scale(1) rotate(0); } }
    .halo::before { animation: aura linear both; animation-timeline: --close; animation-range: cover 10% cover 48%; }
    @keyframes aura { from { opacity: 0; transform: scale(.55); } to { opacity: 1; transform: none; } }
    .wordmark > span > span { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 100%; }
    .wordmark > span:last-child > span { animation-range: entry 15% entry 100%; }
    @keyframes rise { from { transform: translateY(100%); } to { transform: none; } }
  }
}
