/* Milkrice — site. Coconut cream, banana leaf, one pinch of chili. */
:root {
  --cream: #fbf5e6;
  --cream-2: #f5ecd7;
  --cream-3: #ebdfc4;
  --rice: #fffdf6;
  --ink: #1f1a14;
  --ink-2: #5b5145;
  --ink-3: #776c5e;
  --hair: rgba(31, 26, 20, 0.12);
  --hair-2: rgba(31, 26, 20, 0.22);
  --leaf: #2e6b34;
  --leaf-deep: #1d4526;
  --leaf-soft: #e3ead0;
  --clay: #c4602f;
  --chili: #d2381f;
  --chili-ink: #b32c15;
  --band: #1d4526;          /* the banana-leaf band */
  --band-ink: #f6f0df;
  --band-ink-2: #c6d3bd;
  --term-bg: #1c1914;
  --term-ink: #ece5d5;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 24px 48px -28px rgba(60, 40, 10, 0.35);
  --serif: "Fraunces", "New York", ui-serif, "Iowan Old Style", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gutter: 20px;
  --wrap: 1120px;
  color-scheme: light dark;
}
@media (min-width: 760px) { :root { --gutter: 40px; } }
@media (prefers-color-scheme: dark) {
  :root {
    --cream: #14120e;
    --cream-2: #1b1813;
    --cream-3: #27231b;
    --rice: #211e17;
    --ink: #f3ecdc;
    --ink-2: #c3baa8;
    --ink-3: #9c9282;
    --hair: rgba(243, 236, 220, 0.11);
    --hair-2: rgba(243, 236, 220, 0.22);
    --leaf: #8cc084;
    --leaf-deep: #a9d3a0;
    --leaf-soft: #1c2a1c;
    --clay: #d97a4c;
    --chili: #ec5a3f;
    --chili-ink: #f0745b;
    --band: #142e1b;
    --term-bg: #0d0c09;
    --shadow: 0 24px 48px -28px rgba(0, 0, 0, 0.7);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
::selection { background: color-mix(in srgb, var(--chili) 22%, transparent); }
:focus-visible { outline: 2px solid var(--chili); outline-offset: 3px; border-radius: 4px; }
a { color: inherit; text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: 0.22em; text-decoration-color: var(--hair-2); }
a:hover { text-decoration-color: var(--chili); }
h1, h2, h3, p, ul, ol, dl, dd, figure, pre { margin: 0; }
h1, h2, .display { font-family: var(--serif); font-weight: 400; font-variation-settings: "SOFT" 100; letter-spacing: -0.02em; text-wrap: balance; }
code, .path { font-family: var(--mono); font-size: .86em; background: var(--cream-2); padding: 1px 5px; border-radius: 5px; color: var(--ink); overflow-wrap: break-word; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--cream); padding: 8px 12px; border-radius: 8px; z-index: 20; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- header */
.top { display: flex; align-items: center; gap: 28px; height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 500 21px/1 var(--serif); font-variation-settings: "SOFT" 100; letter-spacing: -0.01em; text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.nav { display: none; gap: 26px; margin-left: auto; font-size: 15px; }
.nav a { text-decoration: none; color: var(--ink-2); }
.nav a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--chili); }
.top .btn-sm { margin-left: auto; }
@media (min-width: 860px) { .nav { display: flex; } .top .btn-sm { margin-left: 0; } }

/* ---------- buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px 14px 18px; border-radius: 999px;
  background: var(--leaf-deep); color: #fbf5e6;
  font-weight: 600; font-size: 16px; line-height: 1; text-decoration: none; white-space: nowrap;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .14) inset, 0 14px 28px -16px rgba(20, 60, 30, .7);
  transition: transform .15s ease, background-color .15s ease;
}
.btn:hover { background: #26582f; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-sm { padding: 9px 15px; font-size: 14px; box-shadow: none; }
.btn-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--hair-2); }
.btn-line:hover { background: var(--cream-2); }
@media (prefers-color-scheme: dark) { .btn { background: #3c7f45; } .btn:hover { background: #468f50; } .btn-line { background: transparent; } }
.link-quiet { font-size: 16px; color: var(--ink-2); }

.brew {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%;
  padding: 5px 5px 5px 16px; border-radius: 999px;
  background: var(--rice); box-shadow: inset 0 0 0 1px var(--hair);
  font: 13.5px/1.2 var(--mono); color: var(--ink-2);
}
.brew code { background: none; padding: 0; font-size: 1em; color: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.brew code::before { content: "$ "; color: var(--ink-3); }
.brew button {
  flex: none; border: 0; cursor: pointer; border-radius: 999px; padding: 7px 12px;
  background: var(--cream-2); color: var(--ink); font: 600 12.5px/1 var(--sans);
}
.brew button:hover { background: var(--cream-3); }
.brew button[data-done] { background: var(--leaf-soft); color: var(--leaf-deep); }

/* ---------- small type */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 600 12.5px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--leaf); }
.eyebrow::before { content: ""; width: 9px; height: 9px; background: var(--chili); transform: rotate(45deg); border-radius: 1.5px; flex: none; }
.req { font-size: 14px; color: var(--ink-3); }

/* ---------- hero */
.hero { display: grid; gap: 36px; align-items: center; padding-block: clamp(28px, 6vh, 64px) clamp(48px, 9vh, 96px); }
.hero { overflow-x: clip; }
.hero > * { min-width: 0; }
.hero h1 { margin-top: 22px; font-size: clamp(2.7rem, 6.1vw, 5rem); line-height: 1; }
.hero h1 em { font-style: italic; font-weight: 300; color: var(--leaf); }
.lede { margin-top: 26px; max-width: 33rem; font-size: 1.14rem; line-height: 1.58; color: var(--ink-2); text-wrap: pretty; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 16px; margin-top: 34px; }
.hero .req { margin-top: 18px; }
.hero-art { justify-self: center; width: min(100%, 600px); display: grid; gap: clamp(30px, 5vw, 48px); }
.hero-stage { position: relative; aspect-ratio: 1; }
.hero-stage::before {          /* the diamond the plate sits on */
  content: ""; position: absolute; inset: 11%;
  background: var(--leaf-soft); border-radius: 7%;
  transform: rotate(45deg);
}
.hero-plate { position: absolute; inset: 6%; filter: drop-shadow(0 30px 34px rgba(70, 40, 10, .28)) drop-shadow(0 4px 6px rgba(70, 40, 10, .2)); }
.hero-plate img { width: 100%; height: 100%; }
.hero-cap { text-align: center; font: italic 300 15px/1.3 var(--serif); color: var(--ink-3); }
@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 48px; min-height: calc(100svh - 76px); padding-block: 24px 72px; }
}

/* ---------- the name */
.name { border-block: 1px solid var(--hair); }
.name .wrap { display: grid; gap: 14px 56px; padding-block: 44px; }
.name p { color: var(--ink-2); max-width: 40rem; text-wrap: pretty; }
.name .display { font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.15; color: var(--ink); }
.name .display span { color: var(--ink-3); font-style: italic; font-weight: 300; }
@media (min-width: 900px) { .name .wrap { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: center; } }

/* ---------- sections */
.sec { padding-block: clamp(72px, 11vw, 128px); }
.sec-h { display: grid; gap: 18px; margin-bottom: clamp(32px, 5vw, 56px); max-width: 46rem; }
.sec-h h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); line-height: 1.04; }
.sec-h p { color: var(--ink-2); font-size: 1.08rem; max-width: 38rem; text-wrap: pretty; }
.tint { background: var(--cream-2); }

/* ---------- story: sound → rice → diamonds → notes */
.story { position: relative; view-timeline: --story block; }
.story-pin { display: grid; gap: 40px; padding-block: 72px; align-items: center; }
.story h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); line-height: 1.04; margin-top: 18px; }
.beats { list-style: none; padding: 0; margin-top: 28px; display: grid; gap: 28px; }
.beat-k { display: block; font: italic 300 1.02rem/1.3 var(--serif); color: var(--leaf); margin-bottom: 8px; }
.beat h3 { font: 500 1.34rem/1.25 var(--serif); font-variation-settings: "SOFT" 100; letter-spacing: -0.01em; }
.beat p { margin-top: 10px; color: var(--ink-2); max-width: 30rem; text-wrap: pretty; }
.pips { display: none; gap: 12px; margin-top: 30px; }
.pips i { width: 11px; height: 11px; transform: rotate(45deg); border-radius: 2px; box-shadow: inset 0 0 0 1.5px var(--hair-2); }

.scene { position: relative; container-type: inline-size; width: min(100%, 560px); aspect-ratio: 1; justify-self: center; }
.scene > *, .lines > *, .cuts > i { position: absolute; }
.a, .chili::after { animation-duration: 1s; animation-timing-function: linear; animation-fill-mode: both; animation-play-state: paused; animation-delay: calc(var(--p, 1) * -1s); }

.plate {
  inset: 1cqw; border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, #dc7f4d, #c4602f 62%, #a94e24);
  box-shadow: inset 0 0 0 .5cqw rgba(255, 220, 190, .18), 0 3cqw 5cqw -2cqw rgba(70, 40, 10, .45);
  animation-name: plate;
}
.plate::after {
  content: ""; position: absolute; inset: 4.6cqw; border-radius: 50%;
  background:
    linear-gradient(118deg, transparent 49.4%, rgba(255, 255, 255, .22) 49.6%, rgba(255, 255, 255, .22) 50.4%, transparent 50.6%),
    repeating-linear-gradient(28deg, rgba(255, 255, 255, .075) 0 .22cqw, transparent .22cqw 2.6cqw),
    radial-gradient(circle at 34% 28%, #57a340, #37842f 58%, #276d27);
  box-shadow: inset 0 .6cqw 1.6cqw rgba(0, 0, 0, .28);
}
.g {
  left: 50%; top: 50%; width: 2.7cqw; height: 1.2cqw; margin: -.6cqw 0 0 -1.35cqw; border-radius: 50%;
  background: #fffbef; box-shadow: 0 .18cqw .25cqw rgba(20, 50, 15, .4);
  animation-name: grain;
}
.slab {
  left: 50%; top: 50%; width: 57cqw; height: 57cqw; margin: -28.5cqw 0 0 -28.5cqw; border-radius: 1cqw;
  background: #fffaec url(../assets/rice.webp?v=3) 0 0 / 19cqw 19cqw;
  box-shadow: .5cqw .5cqw 0 #e6dabd, 1.4cqw 1.4cqw 2.2cqw rgba(15, 45, 10, .4);
  animation-name: slab;
}
.d {
  left: 50%; top: 50%; width: 19cqw; height: 19cqw; margin: -9.5cqw 0 0 -9.5cqw; border-radius: .9cqw;
  background: #fffaec url(../assets/rice.webp?v=3) center / 100% 100%;
  box-shadow: .5cqw .5cqw 0 #e6dabd, 1.2cqw 1.2cqw 1.8cqw rgba(15, 45, 10, .38);
  animation-name: dia;
}
.cuts { left: 50%; top: 50%; width: 0; height: 0; }
.cuts.c1 { transform: rotate(45deg); }
.cuts.c2 { transform: rotate(-45deg); }
.cuts > i { left: -29.5cqw; width: 59cqw; height: .5cqw; margin-top: -.25cqw; background: #2b6f2a; border-radius: 1cqw; transform-origin: 0 50%; }
.cuts > i:nth-child(1) { top: -9.5cqw; }
.cuts > i:nth-child(2) { top: 9.5cqw; }
.c1 > i:nth-child(1) { animation-name: cut1; }
.c2 > i:nth-child(1) { animation-name: cut2; }
.c1 > i:nth-child(2) { animation-name: cut3; }
.c2 > i:nth-child(2) { animation-name: cut4; }
.chili {
  left: 50%; top: 50%; width: 7cqw; height: 7cqw; margin: -3.5cqw 0 0 -3.5cqw;
  border-radius: 46% 54% 50% 50% / 55% 48% 52% 45%;
  background: radial-gradient(circle at 35% 30%, #f0603c, #d2381f 60%, #a82a14);
  box-shadow: 0 .4cqw .8cqw rgba(90, 20, 0, .35);
  animation-name: chili;
}
.chili::after {
  content: ""; position: absolute; left: 27%; top: 12%; width: 34%; height: 58%;
  border: solid #fff; border-width: 0 .9cqw .9cqw 0; transform: rotate(40deg);
  animation-name: txt;
}
.win {
  left: 4cqw; right: 4cqw; top: 12cqw; height: 75cqw; border-radius: 2.6cqw;
  background: var(--rice); box-shadow: 0 0 0 1px var(--hair), 0 5cqw 9cqw -4cqw rgba(60, 40, 10, .4);
  animation-name: win;
}
.win::before { content: ""; position: absolute; left: 3.4cqw; top: 2.5cqw; width: 1.5cqw; height: 1.5cqw; border-radius: 50%; background: var(--cream-3); box-shadow: 2.4cqw 0 0 var(--cream-3), 4.8cqw 0 0 var(--cream-3); }
.win::after { content: ""; position: absolute; left: 0; right: 0; top: 6.4cqw; border-top: 1px solid var(--hair); }
.lines { inset: 0; animation-name: txt; color: var(--ink); font-size: 2.75cqw; line-height: 1; }
.ln { left: 11cqw; white-space: nowrap; transform: translateY(-50%); }
.ln.t { top: 26cqw; font: 400 5.3cqw/1 var(--serif); font-variation-settings: "SOFT" 100; letter-spacing: -0.02em; }
.ln.m { top: 32.6cqw; font: 2.1cqw/1 var(--mono); color: var(--ink-3); }
.ln.h { font: 500 3.3cqw/1 var(--serif); font-variation-settings: "SOFT" 100; }
.ln.b { left: 12cqw; padding-left: 3.2cqw; }
.ln.b::before { content: ""; position: absolute; left: .4cqw; top: 50%; width: 1.1cqw; height: 1.1cqw; margin-top: -.55cqw; background: var(--leaf); transform: rotate(45deg); border-radius: .15cqw; }
.ln.c { left: 11cqw; padding-left: 4.7cqw; }
.ln.c::before { content: ""; position: absolute; left: 0; top: 50%; width: 3.1cqw; height: 3.1cqw; margin-top: -1.55cqw; border-radius: .7cqw; box-shadow: inset 0 0 0 .3cqw var(--hair-2); }
.ln.c.done { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--hair-2); }
.ln.c.done::before { box-shadow: none; }
.ln.by { top: 82.4cqw; font: 1.9cqw/1 var(--mono); color: var(--ink-3); }
.ln.by b { color: var(--chili-ink); font-weight: 400; }

@keyframes slab {
  0%, 23% { opacity: 0; transform: rotate(45deg) scale(1.14); box-shadow: 0 0 0 #e6dabd, 3cqw 3cqw 4cqw rgba(15, 45, 10, .25); animation-timing-function: cubic-bezier(.3, 0, .2, 1); }
  33%, 50% { opacity: 1; transform: rotate(45deg) scale(1); box-shadow: .5cqw .5cqw 0 #e6dabd, 1.4cqw 1.4cqw 2.2cqw rgba(15, 45, 10, .4); }
  50.1%, 100% { opacity: 0; transform: rotate(45deg) scale(1); }
}
@keyframes plate { 0%, 70% { opacity: 1; transform: none; } 80%, 100% { opacity: 0; transform: scale(.88); } }
@keyframes grain {
  0% { opacity: 1; transform: translate(var(--sx), var(--sy)) rotate(var(--sr)); animation-timing-function: ease-in-out; }
  8% { opacity: 1; transform: translate(var(--sx), calc(var(--sy) * 1.55)) rotate(var(--sr)); animation-timing-function: cubic-bezier(.5, 0, .2, 1); }
  21%, 27% { opacity: 1; transform: translate(var(--hx), var(--hy)) rotate(var(--hr)); }
  33%, 100% { opacity: 0; transform: translate(var(--hx), var(--hy)) rotate(var(--hr)); }
}
@keyframes dia {
  0%, 49.9% { opacity: 0; transform: translate(calc(var(--dx) * 19cqw), calc(var(--dy) * 19cqw)) rotate(45deg) scale(1, 1); box-shadow: 0 0 0 transparent, 0 0 0 transparent; }
  50% { opacity: 1; transform: translate(calc(var(--dx) * 19cqw), calc(var(--dy) * 19cqw)) rotate(45deg) scale(1, 1); box-shadow: 0 0 0 transparent, 0 0 0 transparent; animation-timing-function: ease-out; }
  56%, 73% { opacity: 1; transform: translate(calc(var(--dx) * 20.5cqw), calc(var(--dy) * 20.5cqw)) rotate(45deg) scale(1, 1); box-shadow: .5cqw .5cqw 0 #e6dabd, 1.2cqw 1.2cqw 1.8cqw rgba(15, 45, 10, .38); animation-timing-function: cubic-bezier(.6, 0, .25, 1); }
  90% { opacity: 1; transform: translate(var(--tx), var(--ty)) rotate(0deg) scale(var(--kx), var(--ky)); box-shadow: 0 0 0 transparent, 0 0 0 transparent; }
  97%, 100% { opacity: 0; transform: translate(var(--tx), var(--ty)) rotate(0deg) scale(var(--kx), var(--ky)); box-shadow: 0 0 0 transparent, 0 0 0 transparent; }
}
@keyframes cut1 { 0%, 38% { transform: scaleX(0); opacity: 1; } 41%, 50% { transform: scaleX(1); opacity: 1; } 55%, 100% { transform: scaleX(1); opacity: 0; } }
@keyframes cut2 { 0%, 41% { transform: scaleX(0); opacity: 1; } 44%, 50% { transform: scaleX(1); opacity: 1; } 55%, 100% { transform: scaleX(1); opacity: 0; } }
@keyframes cut3 { 0%, 44% { transform: scaleX(0); opacity: 1; } 47%, 50% { transform: scaleX(1); opacity: 1; } 55%, 100% { transform: scaleX(1); opacity: 0; } }
@keyframes cut4 { 0%, 47% { transform: scaleX(0); opacity: 1; } 50% { transform: scaleX(1); opacity: 1; } 55%, 100% { transform: scaleX(1); opacity: 0; } }
@keyframes chili {
  0%, 56% { transform: translate(0, 0) scale(0); border-radius: 46% 54% 50% 50% / 55% 48% 52% 45%; }
  61% { transform: translate(0, 0) scale(1.18); }
  64%, 73% { transform: translate(0, 0) scale(1); border-radius: 46% 54% 50% 50% / 55% 48% 52% 45%; box-shadow: 0 .4cqw .8cqw rgba(90, 20, 0, .35); animation-timing-function: cubic-bezier(.6, 0, .25, 1); }
  90%, 100% { transform: translate(-37.45cqw, 15cqw) scale(.443); border-radius: 22%; box-shadow: 0 0 0 transparent; }
}
@keyframes win { 0%, 74% { opacity: 0; transform: translateY(3cqw) scale(.96); } 86%, 100% { opacity: 1; transform: none; } }
@keyframes txt { 0%, 89% { opacity: 0; } 97%, 100% { opacity: 1; } }
@keyframes b1 { 0%, 17% { opacity: 1; transform: none; visibility: visible; } 22%, 100% { opacity: 0; transform: translateY(-14px); visibility: hidden; } }
@keyframes b2 { 0%, 21% { opacity: 0; transform: translateY(14px); visibility: hidden; } 26%, 38% { opacity: 1; transform: none; visibility: visible; } 43%, 100% { opacity: 0; transform: translateY(-14px); visibility: hidden; } }
@keyframes b3 { 0%, 42% { opacity: 0; transform: translateY(14px); visibility: hidden; } 47%, 68% { opacity: 1; transform: none; visibility: visible; } 73%, 100% { opacity: 0; transform: translateY(-14px); visibility: hidden; } }
@keyframes b4 { 0%, 72% { opacity: 0; transform: translateY(14px); visibility: hidden; } 78%, 100% { opacity: 1; transform: none; visibility: visible; } }
@keyframes p2 { 0%, 22% { background: transparent; } 25%, 100% { background: var(--leaf); } }
@keyframes p3 { 0%, 43% { background: transparent; } 46%, 100% { background: var(--leaf); } }
@keyframes p4 { 0%, 73% { background: transparent; } 76%, 100% { background: var(--chili); } }

/* Live (scroll-driven) mode: set by a one-line script in <head> when motion is welcome. */
.live .story { height: 520svh; }
.live .story-pin { position: sticky; top: 0; height: 100svh; padding-block: 20px; gap: 12px; grid-template-rows: auto minmax(0, 1fr); align-content: center; }
.live .scene { width: min(100%, 46svh); grid-row: 1; }
.live .story-copy { align-self: start; }
.live .story h2 { font-size: clamp(1.5rem, 6vw, 2rem); margin-top: 10px; }
.live .beats { margin-top: 14px; gap: 0; }
.live .beat { grid-area: 1 / 1; }
.live .beat h3 { font-size: 1.14rem; }
.live .beat p { font-size: .98rem; line-height: 1.5; margin-top: 6px; }
.live .beat:nth-child(1) { animation-name: b1; }
.live .beat:nth-child(2) { animation-name: b2; }
.live .beat:nth-child(3) { animation-name: b3; }
.live .beat:nth-child(4) { animation-name: b4; }
.live .pips { display: flex; margin-top: 16px; }
.live .pips i:nth-child(1) { background: var(--leaf); }
.live .pips i:nth-child(2) { animation-name: p2; }
.live .pips i:nth-child(3) { animation-name: p3; }
.live .pips i:nth-child(4) { animation-name: p4; }
@media (min-width: 900px) {
  .story-pin { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 56px; }
  .story-pin .scene { order: 2; }
  .live .story-pin { grid-template-rows: none; gap: 56px; padding-block: 0; }
  .live .scene { width: min(100%, 82svh, 640px); grid-row: auto; }
  .live .story-copy { align-self: center; }
  .live .story h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); margin-top: 18px; }
  .live .beats { margin-top: 30px; }
  .live .beat h3 { font-size: 1.34rem; }
  .live .beat p { font-size: 1rem; line-height: 1.6; margin-top: 10px; }
  .live .pips { margin-top: 34px; }
}
.sda .story .a, .sda .story .chili::after { animation-timeline: --story; animation-range: contain 0% contain 100%; animation-duration: auto; animation-delay: 0s; animation-play-state: running; }

/* ---------- reveal on scroll */
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes turn { from { transform: none; } to { transform: translateY(-6%) rotate(32deg); } }
.sda .rv { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% cover 24%; }
.sda .hero-plate img { animation: turn linear both; animation-timeline: view(); animation-range: exit -20% exit 100%; }
.no-sda .rv { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.no-sda .rv.in { opacity: 1; transform: none; }

/* ---------- privacy: the banana-leaf band */
.band {
  background:
    repeating-linear-gradient(118deg, rgba(255, 255, 255, .028) 0 2px, transparent 2px 34px),
    var(--band);
  color: var(--band-ink);
}
.band .eyebrow { color: #a9d3a0; }
.band .sec-h p, .band .muted { color: var(--band-ink-2); }
.band a { text-decoration-color: rgba(246, 240, 223, .4); }
.big { font: 400 clamp(1.4rem, 2.5vw, 1.9rem)/1.28 var(--serif); font-variation-settings: "SOFT" 100; letter-spacing: -0.012em; text-wrap: balance; }
.flow { display: grid; gap: 18px; }
.mac { display: flex; flex-direction: column; background: var(--cream); color: var(--ink); border-radius: 22px; padding: 22px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .55); }
.mac-label { display: flex; align-items: center; gap: 9px; font: 600 12.5px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--leaf); }
.mac-label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--leaf); }
.nodes { display: grid; gap: 10px; margin-top: 18px; }
.node { background: var(--rice); border-radius: 14px; padding: 16px 18px; box-shadow: inset 0 0 0 1px var(--hair); }
.node strong { display: block; font: 500 1.08rem/1.25 var(--serif); font-variation-settings: "SOFT" 100; }
.node span { display: block; margin-top: 4px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.arrow { justify-self: center; width: 9px; height: 9px; border: solid var(--ink-3); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); margin: -2px 0 2px; }
.stays { margin-top: auto; padding-top: 16px; font-size: 14px; color: var(--ink-3); }
.out { display: grid; gap: 14px; }
.out-branch { border-radius: 18px; padding: 18px 20px; box-shadow: inset 0 0 0 1px rgba(246, 240, 223, .22); }
.out-branch .tag { font: 600 12px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: #f2a48f; }
.out-branch.local .tag { color: #a9d3a0; }
.out-branch strong { display: block; margin-top: 12px; font: 500 1.08rem/1.25 var(--serif); font-variation-settings: "SOFT" 100; }
.out-branch span.d2 { display: block; margin-top: 4px; font-size: 14px; color: var(--band-ink-2); }
.facts { list-style: none; padding: 0; display: grid; gap: 16px; margin-top: clamp(36px, 5vw, 56px); }
.facts li { position: relative; padding-left: 24px; color: var(--band-ink-2); text-wrap: pretty; }
.facts li::before { content: ""; position: absolute; left: 2px; top: .6em; width: 8px; height: 8px; background: #a9d3a0; transform: rotate(45deg); border-radius: 1.5px; }
.band .path { background: rgba(246, 240, 223, .12); color: var(--band-ink); }
.more { margin-top: 28px; }
@media (min-width: 900px) {
  .flow { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 22px; align-items: stretch; }
  .nodes { grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; gap: 12px; }
  .arrow { align-self: center; transform: rotate(-45deg); margin: 0; }
  .out { grid-template-rows: 1fr 1fr; }
  .facts { grid-template-columns: repeat(3, 1fr); gap: 32px; }
}

/* ---------- features */
.shot { margin-bottom: clamp(40px, 6vw, 72px); }
.shot img { width: 100%; border-radius: clamp(8px, 1.2vw, 14px); box-shadow: 0 0 0 1px var(--hair-2), 0 40px 80px -40px rgba(60, 40, 10, .45); }
.shot figcaption { margin-top: 16px; font: italic 300 15px/1.4 var(--serif); color: var(--ink-3); text-align: center; }
.feats { display: grid; gap: 0 56px; }
.feats > div { padding: 22px 0 24px; border-top: 1px solid var(--hair); display: grid; grid-template-columns: 26px 1fr; }
.feats > div::before { content: ""; width: 9px; height: 9px; margin-top: .52em; background: var(--leaf); transform: rotate(45deg); border-radius: 1.5px; }
.feats dt { grid-column: 2; font: 500 1.16rem/1.3 var(--serif); font-variation-settings: "SOFT" 100; }
.feats dd { grid-column: 2; margin-top: 6px; color: var(--ink-2); font-size: .98rem; text-wrap: pretty; }
@media (min-width: 760px) { .feats { grid-template-columns: 1fr 1fr; } }

/* ---------- bring your own AI */
.cards { display: grid; gap: 16px; }
.card { background: var(--rice); border-radius: 20px; padding: 26px 26px 28px; box-shadow: inset 0 0 0 1px var(--hair); display: flex; flex-direction: column; gap: 10px; }
.card .k { font: 600 12px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.card.local .k { color: var(--leaf); }
.card h3 { font: 500 1.5rem/1.15 var(--serif); font-variation-settings: "SOFT" 100; letter-spacing: -0.012em; }
.card p { color: var(--ink-2); font-size: .97rem; text-wrap: pretty; }
.card .cmd { margin-top: auto; padding-top: 10px; font: 13px/1.4 var(--mono); color: var(--ink-3); }
.aside-note { margin-top: 26px; color: var(--ink-2); max-width: 44rem; }
@media (min-width: 860px) { .cards { grid-template-columns: repeat(3, 1fr); } }

/* ---------- agents */
.split { display: grid; gap: 36px; align-items: start; }
.split > div > p { color: var(--ink-2); max-width: 34rem; }
.split > div > p + p { margin-top: 14px; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 64px; } .split.flip > :first-child { order: 2; } .split.flip { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); } }
.term { background: var(--term-bg); color: var(--term-ink); border-radius: 18px; padding: 18px 20px 20px; overflow-x: auto; box-shadow: 0 30px 60px -34px rgba(40, 25, 5, .6); }
.term .dots { display: flex; gap: 6px; margin-bottom: 14px; }
.term .dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(236, 229, 213, .18); }
.term pre { font: 12.5px/1.65 var(--mono); white-space: pre; }
.term .p { color: #e9795f; }
.term .c { color: rgba(236, 229, 213, .5); }
.term .h { color: #a9d3a0; }
.labels { list-style: none; padding: 0; margin-top: 26px; display: grid; gap: 10px; }
.labels li { display: grid; grid-template-columns: 108px 1fr; gap: 14px; align-items: baseline; color: var(--ink-2); font-size: .97rem; }
.labels b { font: 600 11.5px/1 var(--mono); letter-spacing: .06em; color: var(--leaf); }

/* ---------- obsidian */
.file { background: var(--rice); border-radius: 18px; box-shadow: inset 0 0 0 1px var(--hair), var(--shadow); overflow: hidden; }
.file-tab { display: flex; align-items: center; gap: 9px; padding: 13px 18px; border-bottom: 1px solid var(--hair); font: 12.5px/1 var(--mono); color: var(--ink-3); }
.file-tab::before { content: ""; width: 8px; height: 8px; background: var(--chili); transform: rotate(45deg); border-radius: 1.5px; }
.file pre { padding: 18px 20px 22px; font: 12.5px/1.7 var(--mono); color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.file .y { color: var(--ink-3); }
.file .hd { color: var(--ink); font-weight: 600; }
.file .wl { color: var(--leaf); }
.file .mk { color: var(--chili-ink); }
.ticks { list-style: none; padding: 0; margin-top: 22px; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 24px; color: var(--ink-2); text-wrap: pretty; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .6em; width: 8px; height: 8px; background: var(--leaf); transform: rotate(45deg); border-radius: 1.5px; }

/* ---------- open source */
.oss { display: grid; gap: 30px; align-items: end; }
.oss .big { font-size: clamp(1.8rem, 3.8vw, 2.9rem); line-height: 1.08; max-width: 18em; }
.oss-meta { display: grid; gap: 14px; }
.oss-meta p { color: var(--ink-2); max-width: 34rem; }
@media (min-width: 900px) { .oss { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 64px; } }

/* ---------- faq */
.faq { border-bottom: 1px solid var(--hair); max-width: 50rem; }
.faq details { border-top: 1px solid var(--hair); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 0; font: 500 1.18rem/1.3 var(--serif); font-variation-settings: "SOFT" 100; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 9px; height: 9px; border: solid var(--ink-3); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); transition: transform .2s ease; margin-right: 4px; }
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details > div { padding: 0 0 22px; color: var(--ink-2); max-width: 42rem; }
.faq details p + p { margin-top: 12px; }

/* ---------- closing */
.end { text-align: center; }
.end .wrap { display: grid; justify-items: center; gap: 0; }
.end .wrap > * { max-width: 100%; min-width: 0; }
.mark { display: grid; grid-template-columns: repeat(3, 26px); gap: 4px; rotate: 45deg; margin: 26px 0 60px; }
.mark i { width: 26px; height: 26px; border-radius: 4px; background: var(--rice); box-shadow: inset 0 0 0 1px var(--hair-2); }
.mark i:nth-child(5) { background: var(--chili); box-shadow: none; border-radius: 50%; transform: scale(.62); }
.end h2 { font-size: clamp(2.2rem, 5.2vw, 4rem); line-height: 1.02; max-width: 14em; }
.end .cta { justify-content: center; }
.end .req { margin-top: 20px; }

/* ---------- footer */
.foot { border-top: 1px solid var(--hair); padding-block: 40px 56px; font-size: 14px; color: var(--ink-3); }
.foot .wrap { display: grid; gap: 22px; align-items: start; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--ink-2); font-size: 15px; }
.foot nav a { text-decoration: none; }
.foot nav a:hover { text-decoration: underline; text-decoration-color: var(--chili); }
.foot p { max-width: 46rem; }
.foot-body { display: grid; gap: 10px; }
@media (min-width: 900px) { .foot .wrap { grid-template-columns: 220px 1fr; } }

/* ---------- legal pages */
.doc { display: grid; gap: 28px; padding-block: clamp(32px, 7vh, 72px) 96px; }
.doc-aside { font-size: 14.5px; }
.doc-aside nav { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.doc-aside a { text-decoration: none; color: var(--ink-2); padding: 7px 13px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--hair); }
.doc-aside a:hover { background: var(--cream-2); }
.doc-aside a[aria-current] { background: var(--leaf-soft); color: var(--leaf-deep); box-shadow: none; font-weight: 600; }
.doc-body { max-width: 42rem; min-width: 0; }
.doc-body h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1.02; }
.doc-body .updated { margin: 14px 0 34px; font-size: 14px; color: var(--ink-3); }
.doc-body h2 { margin: 2.2em 0 .5em; font-size: 1.55rem; line-height: 1.2; letter-spacing: -0.012em; }
.doc-body h3 { margin: 1.6em 0 .4em; font: 600 1.02rem/1.4 var(--sans); }
.doc-body p { margin: 0 0 1em; }
.doc-body p, .doc-body li { color: var(--ink-2); }
.doc-body strong { color: var(--ink); }
.doc-body ul { padding-left: 0; list-style: none; margin: 0 0 1em; }
.doc-body li { position: relative; padding-left: 22px; margin-bottom: .55em; }
.doc-body li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; background: var(--leaf); transform: rotate(45deg); border-radius: 1.5px; }
.note { margin: 24px 0; padding: 18px 20px; background: var(--leaf-soft); border-radius: 16px; color: var(--ink-2); }
.note p { margin: 0; }
.tbl-wrap { overflow-x: auto; margin: 16px 0 8px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--hair); background: var(--rice); }
.tbl { border-collapse: collapse; width: 100%; min-width: 620px; font-size: 14px; line-height: 1.45; }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--hair); color: var(--ink-2); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl th { font: 600 11.5px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); background: var(--cream-2); }
.tbl td:first-child { color: var(--ink); font-weight: 500; }
.uv { display: inline-block; font: 600 10.5px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--chili-ink); background: color-mix(in srgb, var(--chili) 12%, transparent); padding: 3px 6px; border-radius: 5px; vertical-align: 1px; }
@media (min-width: 900px) {
  .doc { grid-template-columns: 200px minmax(0, 1fr); gap: 72px; }
  .doc-aside nav { position: sticky; top: 28px; display: grid; gap: 4px; justify-items: start; }
  .doc-aside a { box-shadow: none; }
}

@media (prefers-color-scheme: dark) {
  .brand img { box-shadow: 0 0 0 1px rgba(243, 236, 220, .16); }
  .hero-plate { filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .6)); }
  .mac { box-shadow: none; }
}
@media print { .story { height: auto !important; } .story-pin { position: static !important; height: auto !important; } }
