/* The home page. Shared brand pieces live in style.css. */

/* the 3D stage sits between the colour fields and the words */
#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 1; pointer-events: none; opacity: 0; transition: opacity 1s var(--ease); }
#gl.on { opacity: 1; }
section { position: relative; }
section > * { position: relative; z-index: 2; }

/* ---------- hero ---------- */
.hero { min-height: 100svh; padding: clamp(110px, 15svh, 150px) clamp(18px, 3.4vw, 44px) 60px; display: flex; align-items: flex-end; }
.hero-text { width: min(58vw, 980px); }
.hero h1 { font-size: clamp(64px, 11.2vw, 196px); margin: 0; cursor: default; }
.hero h1 .row { display: block; white-space: nowrap; }
.lede { font-size: clamp(18px, 1.5vw, 21px); max-width: 27em; margin: 26px 0 0; color: var(--ink2); text-wrap: pretty; }
.spec { margin: 30px 0 0; display: grid; grid-template-columns: auto auto; width: max-content; max-width: 100%; border: 2px solid var(--ink); font-stretch: 75%; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.spec dt, .spec dd { margin: 0; padding: 9px 14px; border-top: 2px solid var(--ink); }
.spec dt { font-weight: 700; border-right: 2px solid var(--ink); }
.spec dd { font-weight: 900; }
.spec dt:first-of-type, .spec dd:first-of-type { border-top: 0; }

/* the sticker: a round label that spins slowly */
.sticker { position: absolute; right: clamp(18px, 4vw, 64px); bottom: clamp(28px, 6svh, 70px); width: 148px; height: 148px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--paper); text-decoration: none; z-index: 3; transition: transform .6s var(--ease); }
.sticker:hover { transform: scale(1.08) rotate(-8deg); }
.sticker .ring { position: absolute; inset: 0; animation: spin 18s linear infinite; }
.sticker .ring text { fill: currentColor; font: 800 12.5px Archivo, sans-serif; font-stretch: 75%; letter-spacing: .2em; text-transform: uppercase; }
.sticker .apple { width: 34px; height: 34px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- the band ---------- */
.band { position: relative; z-index: 3; background: var(--ink); color: var(--paper); overflow: hidden; padding: 18px 0; transform: rotate(-1.6deg); margin: 10px -3vw 0; }
.band .track { display: flex; width: max-content; animation: marq 28s linear infinite; }
.band span { font-stretch: 62%; font-weight: 900; font-size: clamp(34px, 4.4vw, 64px); text-transform: uppercase; line-height: 1; padding-right: .5em; white-space: nowrap; }
.band span i { display: inline-block; width: .55em; height: .55em; border-radius: 26%; margin: 0 .5em; vertical-align: .08em; }
@keyframes marq { to { transform: translateX(-50%); } }

/* ---------- chapters: colour fields with liquid edges ---------- */
/* The field is the tile's hue lifted a touch toward white, so the 3D tile of the same
   hue still stands off it. */
.chap { --field: color-mix(in srgb, var(--c) 80%, #fff); min-height: 125svh; padding: 18svh clamp(18px, 3.4vw, 44px) 16svh; background: var(--field); display: flex; flex-direction: column; justify-content: center; }
/* z 0: under the 3D mark (z 1), so a chapter's wave never slices a tile (2026-10-02). */
.chap .wave { position: absolute; left: 0; right: 0; top: -78px; height: 80px; width: 100%; z-index: 0; }
.chap .wave path { fill: var(--field); }
.chap .tag { align-self: flex-start; margin-bottom: 22px; padding: 7px 14px; border: 2px solid var(--ink); border-radius: 999px; font-stretch: 75%; font-weight: 800; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.chap .big { font-size: clamp(84px, 13.5vw, 260px); margin: 0; max-width: 62vw; text-wrap: balance; }
.chap .copy { max-width: 29em; margin: clamp(22px, 3vw, 40px) 0 0; font-size: clamp(20px, 1.7vw, 25px); line-height: 1.38; font-weight: 500; text-wrap: pretty; }

/* Ask Cronin: the one ink chapter, as the band and the footer are */
.chap.dark { color: var(--paper); }
.chap.dark .tag { border-color: var(--paper); }
/* ⭐ Marble, whole and on its own: the Ask chapter's hero (owner, 2026-11-23: "Yes, orb as hero"), and the tiles
   circle it (home.js). A still of the app's own shader (Ink in water · 3). The chapter runs taller so the orb and the
   phone never meet. */
.chap.dark { min-height: 175svh; justify-content: flex-start; padding-top: 30svh; }
.chap .orb { position: absolute; z-index: 0; top: 20svh; right: clamp(24px, 6vw, 110px); width: clamp(320px, 36vw, 560px); height: auto; border-radius: 50%; }
/* the 3D scene draws Marble live on top of this still; the still keeps its place in the layout */
.gl-orb .chap .orb { visibility: hidden; }

/* One moment from the app per chapter, large and frameless: the real pixels that prove the headline, on a white card.
   ⭐ Owner, 2026-11-23 ("Yes, all six"), after the tiles covered the phone pictures: z 2, in front of the 3D mark,
   so the tiles pass behind a card, never over it. On a desk it is as wide as fits 78% of the screen's height (--ar). */
.chap .card { position: absolute; z-index: 2; margin: 0; right: clamp(24px, 6vw, 110px); bottom: 18svh; width: min(clamp(400px, 42vw, 620px), calc(78svh / var(--ar, 1)));
  background: #fff; border-radius: 30px; overflow: hidden; box-shadow: 0 2px 0 rgba(22,19,15,.06), 0 40px 80px -30px rgba(22,19,15,.45); }
.chap .card img { display: block; width: 100%; height: auto; }
.chap.dark .card { box-shadow: 0 40px 90px -30px rgba(0,0,0,.8); }
.chap:has(.card) .big { max-width: 56vw; }
.chap:has(.card) .copy { max-width: min(52vw, 29em); }

/* The app's moments drawn live in HTML, in the app's own world (src/theme/tokens.ts: ground #F7F7F9, surface #FFF,
   ink #151515 / #5B5B57, cards 24): SF on Apple devices, not the site's Archivo. They stay sharp at any size, and a
   change to the app is a change of words here, not a new picture. */
.chap .card.app { width: clamp(340px, 31vw, 430px); background: #F7F7F9; color: #151515; border-radius: 30px; }
.app-in { padding: 22px 20px 20px; font: 400 15px/1.32 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif; font-stretch: normal; letter-spacing: -.01em; text-transform: none; }
.app-in b { font-weight: 600; }
.app-in small { display: block; font-size: 12.5px; color: #5B5B57; line-height: 1.35; }
.app-in p { margin: 0; }
.app-in ul { list-style: none; margin: 0; padding: 0; }
.app-in .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--d); margin-right: 6px; vertical-align: 1px; }
.app-in .face { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); font-style: normal; font-size: 9px; font-weight: 500; color: #fff; position: relative; }
.app-in .face::before { content: ""; position: absolute; inset: 22%; border-radius: 50%; background: var(--d); z-index: -1; }
.app-in .face { isolation: isolate; } .app-in .face { text-indent: 0; }
.app-in .face.big { width: 52px; height: 52px; background: var(--d); font-size: 17px; font-weight: 500; }
.app-in .face.big::before { display: none; }
.app-in .face.sm { width: 34px; height: 34px; font-size: 8px; }
.app-in .tick { flex: none; width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 1.6px #8A8A86; }
.a-title { display: block; font-size: 26px; line-height: 1.1; letter-spacing: -.02em; }
.app-in .a-title { font-weight: 500; }
.a-meta { margin-top: 3px; }
.a-h, .a-sub { display: block; font-size: 17px; margin: 18px 0 10px; }
.a-sub { font-weight: 600; margin-top: 6px; }
/* Ask */
.a-me { margin-left: 18%; background: #EDEDEA; border-radius: 20px; padding: 10px 14px; }
.a-did { margin-top: 14px !important; font-size: 12.5px; color: #5B5B57; }
.a-say { margin-top: 8px !important; font-size: 15.5px; line-height: 1.4; }
.a-task { display: flex; align-items: center; gap: 12px; margin-top: 16px; background: #fff; border-radius: 18px; padding: 12px 12px 12px 14px; box-shadow: 0 0 0 1px rgba(0,0,0,.05); }
.a-task > div { flex: 1; min-width: 0; } .a-task b { font-size: 15px; }
.a-task .btn { background: #151515; color: #fff; font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 999px; }
/* Debrief */
.a-sum { margin-top: 14px; background: #C9603F; color: #fff; border-radius: 16px; padding: 10px 14px 12px; }
.a-sum small { color: rgba(255,255,255,.8); font-size: 11px; }
.a-sum p { font-size: 15px; line-height: 1.35; margin-top: 4px; }
.a-faces { display: flex; gap: 18px; font-size: 11.5px; }
.a-faces span { display: grid; justify-items: center; gap: 4px; }
.a-sheet { background: #fff; border-radius: 20px; padding: 2px 14px; }
.a-rows li { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.a-rows li + li { border-top: 1px solid #EEEEEC; }
.a-rows li > div { flex: 1; min-width: 0; }
.a-rows em { font-style: normal; font-size: 24px; font-weight: 300; min-width: 46px; display: flex; align-items: center; gap: 4px; line-height: 1; }
.a-rows em small { font-size: 10px; line-height: 1.1; }
/* People */
.a-who { display: flex; justify-content: space-between; align-items: flex-start; }
.a-co { color: #151515 !important; margin-top: 2px; }
.a-days { display: flex; align-items: center; gap: 10px; margin: 16px 0 4px; }
.a-days span { font-size: 64px; font-weight: 200; line-height: .9; letter-spacing: -.02em; }
.a-days small { font-size: 13px; }
.a-sheet .a-month { display: block; font-size: 22px; padding: 12px 0 4px; }
.a-month + li { border-top: 0 !important; }
.a-days + .a-meta + .a-sheet { margin-top: 14px; }
.a-who ~ .a-sheet em { flex-direction: column; align-items: flex-start; gap: 1px; min-width: 34px; font-size: 18px; font-weight: 400; }
/* Companies */
.a-tree { margin-top: 16px; position: relative; }
.a-tree li { display: flex; align-items: center; gap: 12px; padding: 7px 0 7px 32px; position: relative; }
.a-tree li.root { padding-left: 0; }
.a-tree li:not(.root)::before { content: ""; position: absolute; left: 16px; top: -12px; bottom: 50%; width: 14px; border-left: 1.5px solid #D2D2CF; border-bottom: 1.5px solid #D2D2CF; border-bottom-left-radius: 8px; }
.a-tree small { font-size: 11.5px; }
/* Events */
.app-in:has(.a-photo) { padding-top: 0; }
.a-photo { position: relative; margin: 0 -20px; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 30px 30px 18px 18px; }
.chap .card .a-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.a-photo div { position: absolute; inset: auto 0 0; padding: 30px 16px 12px; background: linear-gradient(transparent, rgba(0,0,0,.55)); color: #fff; }
.a-photo small { color: rgba(255,255,255,.9); font-size: 11px; }
.a-photo b { display: block; font-size: 26px; font-weight: 500; line-height: 1.1; }
.a-tiles { display: grid; grid-template-columns: 1fr 1.6fr; gap: 6px; margin: 6px 0 14px; }
.a-tiles > div { border-radius: 14px; padding: 10px 12px; min-height: 92px; }
.a-left { background: #2A8F8C; color: #fff; display: flex; flex-direction: column; justify-content: space-between; }
.a-left small { color: rgba(255,255,255,.85); font-size: 11px; }
.a-left b { font-size: 32px; font-weight: 300; line-height: 1; } .a-left b small { display: inline; color: #fff; font-size: 11px; margin-left: 2px; }
.a-plan { background: #fff; } .a-plan small { font-size: 11px; } .a-plan p { margin-top: 6px; color: #8A8A86; font-size: 15px; line-height: 1.3; }
/* Actions */
.a-list li { align-items: flex-start; }
.a-list .tick { margin-top: 1px; }
.a-list .due, .a-list .soon { color: #94700F; } .a-list .due i { font-style: normal; color: #D65582; }
.chap.dark .card.app { box-shadow: 0 40px 90px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.06); }

/* ---------- and more: the hero's spec table, on paper ---------- */
.more .spec { margin-top: clamp(26px, 3vw, 40px); font-size: 15px; }

/* ---------- finale ---------- */
.finale { min-height: 130svh; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; text-align: center; padding: 0 20px 10svh; }
.finale h2 { font-size: clamp(56px, 9vw, 150px); margin: 0; text-wrap: balance; }
.finale p { font-size: clamp(18px, 1.5vw, 21px); margin: 22px 0 30px; color: var(--ink2); }
.pill { display: inline-flex; align-items: center; gap: 10px; background: var(--ink); color: var(--paper); padding: 17px 28px; border-radius: 999px; font-weight: 800; font-stretch: 80%; font-size: 15px; letter-spacing: .1em; text-transform: uppercase; will-change: transform; }
.pill svg { width: 18px; height: 18px; margin-top: -3px; }

@media (max-width: 860px) {
  .hero { align-items: flex-start; padding-top: 108px; min-height: 150svh; }
  /* min-width 0: a flex item grows to its widest child, and the spec table
     (max-content) pushed the headline past the screen on narrow phones and
     Safari page zoom (owner's screenshot, 2026-10-05). */
  .hero-text { width: auto; min-width: 0; }
  .spec { width: 100%; grid-template-columns: auto 1fr; }
  .hero h1 { font-size: 15vw; }
  .hero h1 .row { white-space: normal; }
  .sticker { width: 112px; height: 112px; bottom: 22px; }
  .sticker .ring text { font-size: 16.5px; }
  /* the top band is the 3D mark's stage: it rides there, above the words (home.js stageOf) */
  .chap { min-height: 115svh; justify-content: flex-end; padding-top: 50svh; padding-bottom: 12svh; }
  .chap .big { font-size: 17vw; max-width: none; }
  .chap.dark { min-height: 0; padding-top: 16svh; }
  .chap .orb { position: relative; order: -1; top: auto; right: auto; align-self: center; width: min(80vw, 340px); margin: 0 0 40px; }
  .chap .card { position: relative; right: auto; bottom: auto; width: 100%; max-width: 440px; margin: 36px 0 0; border-radius: 24px; }
  .chap .card.app { width: 100%; border-radius: 26px; }
  .app-in { font-size: 14.5px; padding: 18px 16px 16px; }
  .a-photo { margin: 0 -16px; }
  .chap:has(.card) .copy { max-width: none; }
  /* Its table is tall: more room above, so the mark clears the heading. */
  .more { min-height: 150svh; }
  /* The 3D mark floats behind the words here: a halo in the chapter's own
     colour keeps them readable over it (2026-10-02). */
  .chap .copy, .chap .tag, .lede, .spec { text-shadow: 0 0 2px var(--field, var(--paper)), 0 0 16px var(--field, var(--paper)); }
}

/* hero entrance in CSS, so the headline never waits on a script */
@media (prefers-reduced-motion: no-preference) {
  .hero h1 .ch { animation: rise 1.2s var(--ease) calc(var(--i) * 28ms + 380ms) backwards; }
  .hero .lede, .hero .spec { animation: settle 1s var(--ease) 1s backwards; }
  .sticker { animation: pop .9s var(--ease) 1.3s backwards; }
}
@keyframes rise { from { transform: translateY(60%) rotate(4deg); opacity: 0; } }
@keyframes settle { from { opacity: 0; transform: translateY(16px); } }
@keyframes pop { from { opacity: 0; transform: scale(.6) rotate(-30deg); } }

/* reduced motion: the 3D mark stays in the hero, nothing drifts or spins */
@media (prefers-reduced-motion: reduce) {
  #gl { position: absolute; height: 100svh; }
  .band .track, .sticker .ring { animation: none; }
}
