/* Ocha — a field guide to Japanese tea */

@property --bg { syntax: '<color>'; inherits: true; initial-value: #f2eee3; }
@property --fg { syntax: '<color>'; inherits: true; initial-value: #1b1a16; }

:root {
  --paper: #f2eee3;
  --ink: #1b1a16;
  --cream: #f6f2e3;
  --seal: #c23b22;
  --matcha: #4f6c26;
  --serif: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  --sans: "Zen Kaku Gothic New", "Hiragino Sans", "Helvetica Neue", Arial, sans-serif;
  --pad: clamp(20px, 4vw, 64px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  --fg-2: color-mix(in oklab, var(--fg) 66%, var(--bg));
  --rule: color-mix(in oklab, var(--fg) 20%, transparent);
  font-family: var(--serif);
  font-size: clamp(16px, 1.1vw + 6px, 20px);
  line-height: 1.62;
  transition: --bg .9s var(--ease), --fg .9s var(--ease);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* paper grain: black or white specks at low alpha, so it reads on any colour */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 90; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 .055'/%3E%3CfeComponentTransfer%3E%3CfeFuncR type='discrete' tableValues='0 1'/%3E%3CfeFuncG type='discrete' tableValues='0 1'/%3E%3CfeFuncB type='discrete' tableValues='0 1'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img, svg, canvas, video { display: block; max-width: 100%; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }
a { color: inherit; }
i { font-style: italic; }

.eyebrow {
  font-family: var(--sans); font-size: 11.5px; font-weight: 500;
  letter-spacing: .2em; text-transform: uppercase; color: var(--fg-2);
}
.wrap { padding: 0 var(--pad); max-width: 1400px; margin: 0 auto; }

/* ── fixed furniture ─────────────────────────────── */
.progress {
  position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 60;
  background: var(--seal); transform-origin: 0 50%; transform: scaleX(var(--scroll, 0));
}
/* language switch */
html.i18n-wait body { opacity: 0; animation: i18n-show 0s 2s forwards; }
@keyframes i18n-show { to { opacity: 1; } }
.lang {
  position: fixed; top: 11px; right: calc(var(--pad) - 6px); z-index: 56; display: flex; gap: 2px; padding: 3px;
  border-radius: 99px; background: color-mix(in oklab, var(--bg) 70%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-family: var(--sans);
}
.lang button {
  appearance: none; border: 0; background: none; color: var(--fg-2); cursor: pointer;
  font: inherit; font-size: 11px; font-weight: 500; letter-spacing: .14em; line-height: 1; padding: 7px 10px; border-radius: 99px;
  transition: color .3s, background-color .3s;
}
.lang button:hover { color: var(--fg); }
.lang button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.lang button:focus-visible { outline: 2px solid var(--seal); outline-offset: 2px; }
/* Japanese has no italic, and breaks lines by its own rules */
/* Polish runs longer: keep the hero title to two lines */
html[lang="pl"] .hero h1 { font-size: clamp(34px, 4.4vw, 74px); }
html[lang="ja"] body { line-break: strict; }
html[lang="ja"] i, html[lang="ja"] .t-sig { font-style: normal; }
.hero__mark { position: absolute; left: var(--pad); top: 18px; font-size: 19px; font-weight: 600; letter-spacing: .1em; }
.index {
  position: fixed; right: 12px; top: 50%; transform: translateY(-50%); z-index: 55;
  display: flex; flex-direction: column; gap: 4px;
}
.index a {
  position: relative; display: grid; place-items: center; width: 26px; height: 26px;
  font-size: 13px; text-decoration: none; color: var(--fg-2); border-radius: 2px;
  transition: background-color .4s, color .4s;
}
.index a.is-active { background: var(--seal); color: #f8f1e3; }
.index .tip {
  position: absolute; right: 34px; top: 50%; transform: translate(6px, -50%);
  font-family: var(--sans); font-style: normal; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase;
  white-space: nowrap; color: var(--fg); opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s;
}
.index a:hover .tip, .index a:focus-visible .tip { opacity: 1; transform: translate(0, -50%); }

/* ── hero ────────────────────────────────────────── */
.hero { position: relative; height: 300vh; height: 300svh; }
.hero__stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  --cx: 61vw; --cy: 52svh; --d: min(64svh, 46vw);
}
.hero__paper, .hero__flood { position: absolute; inset: 0; }
.hero__flood {
  background: var(--matcha); color: var(--cream);
  clip-path: circle(calc(var(--d) * .435) at var(--cx) var(--cy));
  will-change: clip-path;
}
.hero__flood .eyebrow { color: color-mix(in oklab, var(--cream) 72%, var(--matcha)); }
.hero__bowl {
  position: absolute; left: var(--cx); top: var(--cy); width: var(--d); height: var(--d);
  transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #57514a, #201e1b 58%, #121110);
  box-shadow: 0 46px 80px -34px rgba(30, 20, 0, .6), 0 10px 22px -10px rgba(30, 20, 0, .45), inset 0 2px 3px rgba(255, 255, 255, .14);
}
.hero__foam {
  position: absolute; left: var(--cx); top: var(--cy);
  width: calc(var(--d) * .87); height: calc(var(--d) * .87);
  transform: translate(-50%, -50%); border-radius: 50%;
  background:
    radial-gradient(circle at 42% 38%, rgba(216, 230, 152, .96) 0, rgba(178, 204, 106, .9) 22%, rgba(134, 165, 62, .7) 48%, rgba(96, 128, 44, 0) 74%),
    radial-gradient(circle, #7d9d37 0, #5f7f2c 70%, #4f6c26 100%);
  box-shadow: inset 0 12px 34px rgba(0, 0, 0, .38);
}
.hero__foam::before, .hero__foam::after {
  content: ''; position: absolute; inset: 9%; border-radius: 50%;
  background-image: radial-gradient(circle, rgba(255, 255, 255, .55) 0 .9px, transparent 1.5px);
  background-size: 9px 9px; opacity: .34;
  -webkit-mask-image: radial-gradient(circle at 44% 40%, #000 0, transparent 66%);
  mask-image: radial-gradient(circle at 44% 40%, #000 0, transparent 66%);
  animation: drift 90s linear infinite;
}
.hero__foam::after { background-size: 13px 13px; opacity: .26; animation-duration: 140s; animation-direction: reverse; rotate: 31deg; }
@keyframes drift { to { transform: rotate(360deg); } }

.hero__kanji {
  position: absolute; right: max(var(--pad), 6.5vw); top: 50%; transform: translateY(-50%);
  writing-mode: vertical-rl; white-space: nowrap;
  font-size: clamp(72px, 24svh, 250px); font-weight: 800; line-height: 1; letter-spacing: .02em;
}
.hero__copy {
  position: absolute; left: var(--pad); bottom: clamp(36px, 9svh, 96px); max-width: min(33vw, 520px);
}
.hero h1 {
  font-size: clamp(40px, 6.6vw, 108px); font-weight: 500; line-height: .98; letter-spacing: -.025em;
  margin: .22em 0 .32em;
}
.hero__deck { font-size: clamp(15px, 1.25vw, 20px); line-height: 1.5; color: var(--fg-2); max-width: 30em; }
.hero__label {
  position: absolute; left: calc(var(--cx) - var(--d) * .5); top: calc(var(--cy) + var(--d) * .5 + 16px);
  font-family: var(--sans); font-size: 11px; letter-spacing: .08em; line-height: 1.55; color: var(--fg-2);
}
.hero__label span { font-family: var(--serif); font-size: 13px; margin-right: .3em; color: var(--fg); }
.hero__cue {
  position: absolute; right: max(var(--pad), 6.5vw); bottom: 20px;
  font-family: var(--sans); font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--fg-2);
  display: flex; align-items: center; gap: 12px;
}
.hero__cue::after {
  content: ''; width: 1px; height: 34px; background: currentColor; transform-origin: 50% 0;
  animation: cue 2.2s var(--ease) infinite;
}
@keyframes cue { 0% { transform: scaleY(0); } 55% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
.hero__statement {
  position: absolute; left: var(--pad); top: 50%; max-width: min(62vw, 880px);
  transform: translateY(-50%); opacity: 0;
}
.hero__big {
  font-size: clamp(32px, 5.6vw, 92px); line-height: 1.05; font-weight: 500; letter-spacing: -.02em;
  margin: .32em 0 .5em;
}
.hero__small { font-size: clamp(16px, 1.4vw, 22px); line-height: 1.5; max-width: 27em; opacity: .86; }

/* ── chapters ────────────────────────────────────── */
.chapter { position: relative; padding-top: clamp(90px, 17vh, 210px); }
.chapter-head {
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: clamp(16px, 2.4vw, 40px);
  padding: 0 var(--pad); max-width: 1500px; margin: 0 auto clamp(30px, 7vh, 110px);
}
.seal {
  grid-row: 1 / span 3; align-self: start;
  width: clamp(40px, 4.4vw, 62px); aspect-ratio: 1; display: grid; place-items: center;
  background: var(--seal); color: #f8f1e3; border-radius: 3px; rotate: -3deg;
  font-size: clamp(20px, 2.3vw, 32px); font-weight: 600; line-height: 1;
}
.chapter-head .eyebrow { align-self: center; padding-top: .9em; }
.chapter-head h2 {
  grid-column: 2;
  font-size: clamp(46px, 9vw, 148px); font-weight: 500; line-height: .96; letter-spacing: -.028em;
  margin: .1em 0 .26em;
}
.chapter-head .deck {
  grid-column: 2; font-size: clamp(17px, 1.5vw, 24px); line-height: 1.5; max-width: 35em; color: var(--fg-2);
}
.mask { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.mask > span { display: block; transform: translateY(108%); transition: transform 1.2s var(--ease); }
.in .mask > span { transform: none; }
.in .mask + .mask > span { transition-delay: .12s; }

.reveal > * {
  opacity: 0; transform: translateY(22px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.reveal.in > * { opacity: 1; transform: none; }

/* ── scrolly scaffold ────────────────────────────── */
.scrolly {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 0 clamp(24px, 5vw, 96px); align-items: start;
  padding: 0 var(--pad); max-width: 1500px; margin: 0 auto;
}
.scrolly__figure { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; place-items: center; }
.scrolly__steps { padding-bottom: 18vh; }
.step {
  min-height: 88svh; display: flex; flex-direction: column; justify-content: center;
  max-width: 30em; opacity: .26; transition: opacity .6s;
}
.step.is-active { opacity: 1; }
.step__k { font-size: clamp(40px, 5.2vw, 84px); line-height: 1; font-weight: 600; margin-bottom: .28em; color: var(--seal); }
.step__k i { font-size: .46em; font-weight: 400; color: var(--fg-2); letter-spacing: 0; }
.step h3 { font-size: clamp(26px, 3vw, 46px); font-weight: 500; line-height: 1.08; letter-spacing: -.012em; margin-bottom: .5em; }

/* ── 一 the shoot ────────────────────────────────── */
.shoot__svg { height: min(84svh, 780px); width: auto; overflow: visible; }
.shoot .part { transition: opacity .8s var(--ease); }
.shoot .lab { opacity: 0; transition: opacity .5s; font-family: var(--sans); font-size: 14px; fill: currentColor; letter-spacing: .04em; }
.shoot .lab line { stroke: currentColor; stroke-width: 1; }
.shoot .lab tspan.jp { font-family: var(--serif); font-size: 18px; font-weight: 600; }
.shoot[data-step="1"] .part:not([data-g="top"]),
.shoot[data-step="2"] .part:not([data-g="low"]),
.shoot[data-step="3"] .part:not([data-g="stem"]) { opacity: .12; }
.shoot[data-step="1"] .lab[data-for="1"],
.shoot[data-step="2"] .lab[data-for="2"],
.shoot[data-step="3"] .lab[data-for="3"] { opacity: 1; transition-delay: .25s; }
.calendar {
  position: absolute; left: 0; right: 0; bottom: 5svh; padding: 14px 0 0;
  font-family: var(--sans); opacity: 0; transform: translateY(14px); transition: opacity .6s, transform .6s var(--ease);
  background: linear-gradient(to top, var(--bg) 70%, transparent);
}
.shoot[data-step="4"] .calendar { opacity: 1; transform: none; }
.calendar__bars { position: relative; height: 36px; }
.calendar__bars i {
  position: absolute; bottom: 8px; height: 8px; border-radius: 4px; background: var(--matcha); opacity: .5;
  left: calc(var(--a) / 12 * 100%); width: calc((var(--b) - var(--a)) / 12 * 100%);
}
.calendar__bars i:first-child { opacity: 1; background: var(--seal); }
.calendar__bars b { position: absolute; left: 0; bottom: 12px; font-size: 11px; font-weight: 500; font-style: normal; white-space: nowrap; }
.calendar__months {
  display: grid; grid-template-columns: repeat(12, 1fr); padding-top: 6px; border-top: 1px solid var(--rule);
  font-size: 10px; letter-spacing: .1em; color: var(--fg-2);
}

/* ── 二 history ──────────────────────────────────── */
.history .chapter-head { margin-bottom: 0; }
.hscroll { position: relative; }
.hscroll__stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
}
.hscroll__track {
  display: flex; align-items: flex-start; width: max-content; will-change: transform;
  padding: 0 calc(100vw - min(74vw, 640px) - var(--pad)) 0 var(--pad);
}
.era { flex: none; width: min(74vw, 640px); --gap: clamp(40px, 7vw, 120px); padding-right: var(--gap); opacity: .28; transition: opacity .6s; }
.era.is-current { opacity: 1; }
.era__jp { font-size: 13px; letter-spacing: .34em; color: var(--fg-2); margin-bottom: .5em; }
.era__year {
  font-size: clamp(88px, 23svh, 250px); font-weight: 800; line-height: .9; letter-spacing: -.03em; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1px var(--fg); transition: color .7s; margin-bottom: .3em;
}
.era.is-current .era__year { color: var(--fg); }
.era h3 {
  position: relative; padding-top: 1.05em;
  font-size: clamp(21px, 2.3vw, 34px); font-weight: 500; line-height: 1.15; margin-bottom: .5em;
}
.era h3::after { content: ''; position: absolute; left: 0; top: 0; height: 1px; width: calc(100% + var(--gap)); background: var(--rule); }
.era h3::before {
  content: ''; position: absolute; left: 0; top: 0; z-index: 1; width: 9px; height: 9px; border-radius: 50%;
  background: var(--seal); transform: translateY(-50%) scale(.6); transition: transform .5s var(--ease);
}
.era.is-current h3::before { transform: translateY(-50%) scale(1.25); }
.era > p:last-child { font-size: clamp(15px, 1.15vw, 18px); line-height: 1.62; max-width: 31em; }
.hscroll__rule { position: absolute; left: var(--pad); right: var(--pad); bottom: 5svh; height: 1px; background: var(--rule); }
.hscroll__rule i { position: absolute; inset: -1px 0 0; background: var(--seal); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

/* ── 三 the matrix ───────────────────────────────── */
.matrix { width: 100%; }
.mx { display: grid; grid-template-columns: minmax(96px, 1.5fr) repeat(5, minmax(0, 1fr)); width: 100%; max-width: 700px; font-family: var(--sans); }
.mx__h { text-align: center; padding-bottom: 12px; transition: opacity .5s, transform .5s var(--ease); }
.mx__h b { display: block; font-family: var(--serif); font-size: clamp(22px, 3.4svh, 32px); font-weight: 600; line-height: 1.1; transition: color .4s; }
.mx__h small { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--fg-2); }
.mx__name {
  display: flex; align-items: baseline; gap: .5em; padding: 0; border-top: 1px solid var(--rule);
  height: 100%; align-items: center; font-family: var(--serif); font-size: clamp(15px, 1.5vw, 19px); white-space: nowrap;
}
.mx__name small { font-size: .68em; color: var(--fg-2); }
.mx__c {
  display: grid; justify-items: center; align-content: center; gap: 1px; height: clamp(34px, 6.6svh, 54px);
  border-top: 1px solid var(--rule); color: var(--fg);
  opacity: 0; transform: translateY(8px);
  transition: opacity .5s, transform .5s var(--ease), color .4s; transition-delay: calc(var(--r) * 28ms);
}
.mx__c svg { width: clamp(16px, 3svh, 24px); height: clamp(16px, 3svh, 24px); fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.mx__c small { font-size: 9.5px; line-height: 1.15; text-align: center; color: var(--fg-2); letter-spacing: .02em; }
.mx__h:not(.is-on) { opacity: .0; transform: translateY(8px); }
.mx__c.is-on { opacity: .62; transform: none; }
.mx__c.is-now { opacity: 1; }
.mx__h.is-now b { color: var(--seal); }

/* ── 四 teas ─────────────────────────────────────── */
.tea-stage {
  grid-template-columns: auto minmax(0, 1fr); grid-template-rows: minmax(0, 1.25fr) minmax(0, 1fr);
  column-gap: clamp(10px, 2vw, 28px); place-items: stretch;
  padding: clamp(56px, 9svh, 96px) 0 clamp(18px, 5svh, 56px);
}
.tea-stage__kanji { grid-row: 1 / 3; position: relative; width: 1.1em; font-size: clamp(60px, 15svh, 170px); }
.tea-stage__kanji span {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  writing-mode: vertical-rl; white-space: nowrap; font-weight: 800; line-height: 1; letter-spacing: .02em;
  opacity: 0; transform: translateY(7%); transition: opacity .6s, transform .9s var(--ease);
}
.tea-stage__kanji span.is-on { opacity: 1; transform: none; }
.tea-stage__kanji span.is-past { transform: translateY(-7%); }
.tea-stage__cup { grid-column: 2; grid-row: 1; display: grid; place-items: center; min-height: 0; }
.cup {
  position: relative; width: min(38svh, 100%, 400px); aspect-ratio: 1; border-radius: 50%; background-color: var(--cup, #fbf8f1);
  transform: scale(var(--cup-scale, 1)); transition: transform 1.1s var(--ease), background-color .9s;
  box-shadow: 0 34px 60px -26px rgba(20, 14, 0, .55), 0 6px 14px -6px rgba(20, 14, 0, .35),
    inset 0 -6px 14px rgba(0, 0, 0, .1), inset 0 3px 4px rgba(255, 255, 255, .45);
}
.cup__tea, .cup__foam { position: absolute; inset: 7.5%; border-radius: 50%; }
.cup__tea {
  background-color: var(--liquor, #c5cf4f); transition: background-color .9s;
  background-image: radial-gradient(circle at 36% 30%, rgba(255, 255, 255, .36), transparent 46%), radial-gradient(circle, transparent 52%, rgba(0, 0, 0, .17));
  box-shadow: inset 0 8px 22px rgba(0, 0, 0, .24);
}
.cup__foot {
  position: absolute; inset: 31%; border-radius: 50%; transition: opacity .8s;
  border: 1px solid rgba(0, 0, 0, .1); background: rgba(255, 255, 255, .12);
}
.cup.is-opaque .cup__foot { opacity: 0; }
.cup__foam {
  opacity: 0; transition: opacity .9s;
  background: radial-gradient(circle at 44% 40%, rgba(216, 230, 152, .96), rgba(178, 204, 106, .8) 28%, rgba(134, 165, 62, 0) 70%);
}
.cup.is-foam .cup__foam { opacity: 1; }
.cup__shine {
  position: absolute; inset: 13%; border-radius: 50%; border-top: 3px solid rgba(255, 255, 255, .6);
  filter: blur(1.5px); transform: rotate(-38deg);
}
.tea-stage__low {
  grid-column: 2; grid-row: 2; min-height: 0;
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; justify-items: center;
}
.tea-stage__pile { position: relative; width: min(28svh, 100%, 290px); aspect-ratio: 1; transform: rotate(-7deg); }
.kaishi {
  position: absolute; inset: 7%; background-color: #fbf8ef;
  background-image: linear-gradient(135deg, transparent 49.7%, rgba(0, 0, 0, .07) 50%, transparent 50.5%);
  box-shadow: 0 18px 34px -18px rgba(20, 14, 0, .55), 0 2px 5px rgba(20, 14, 0, .14);
}
.pile { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .8s; }
.pile.is-on { opacity: 1; }
/* photographed on white paper: multiply drops the white so the heap and its shadow land on the kaishi */
.pile--photo { inset: 7%; width: 86%; height: 86%; object-fit: cover; mix-blend-mode: multiply; }
.tea-stage__radar { width: min(31svh, 100%, 300px); overflow: visible; font-family: var(--sans); }
.radar__ring { fill: none; stroke: currentColor; stroke-opacity: .2; }
.radar__axis { stroke: currentColor; stroke-opacity: .2; }
.radar__shape { fill: currentColor; fill-opacity: .15; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.radar__dot { fill: currentColor; }
.radar__label { font-size: 13px; letter-spacing: .02em; fill: currentColor; fill-opacity: .8; }

.tea-card { min-height: 105svh; }
.tea-card__no { font-family: var(--sans); font-size: 12px; letter-spacing: .18em; color: var(--fg-2); }
.tea-card h3 { font-size: clamp(38px, 5vw, 84px); line-height: 1; letter-spacing: -.022em; margin: .14em 0 .12em; }
.tea-card__gloss { color: var(--fg-2); margin-bottom: 1.1em; }
.tea-card__gloss span { margin-right: .7em; }
.tea-card__lede { font-size: clamp(20px, 1.9vw, 30px); line-height: 1.25; margin-bottom: .55em; }
.tea-card__body { margin-bottom: .9em; }
.tea-card__notes { font-family: var(--sans); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-2); margin-bottom: 1.5em; }
.spec {
  display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; gap: 0 10px;
  padding: .7em 0 .8em; margin-bottom: 1em; border-top: 1px solid var(--fg); border-bottom: 1px solid var(--rule);
}
.spec dt { font-family: var(--sans); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--fg-2); }
.spec dd { font-size: clamp(27px, 3.3vw, 54px); line-height: 1.08; font-weight: 500; letter-spacing: -.02em; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.spec dd small { font-family: var(--sans); font-size: .36em; font-weight: 500; letter-spacing: 0; margin-left: .18em; }
.meta { list-style: none; padding: 0; margin: 0; display: grid; gap: .32em; font-family: var(--sans); font-size: 13.5px; line-height: 1.5; }
.meta li { display: grid; grid-template-columns: 6.2em 1fr; gap: .8em; }
.meta b { font-weight: 500; color: var(--fg-2); letter-spacing: .05em; }
.caff i { display: inline-block; width: 8px; height: 8px; margin-right: 4px; border-radius: 50%; border: 1px solid currentColor; }
.caff i.on { background: currentColor; }
.tastebars { display: none; }
@media (max-width: 999px) {
  .tea-stage__radar { display: none; }
  .tea-stage__low { grid-template-columns: minmax(0, 1fr); justify-items: end; padding-right: 4%; }
  .tastebars { display: grid; gap: 6px; margin-top: 1.2em; font-family: var(--sans); font-size: 11.5px; }
  .tastebars div { display: grid; grid-template-columns: 6.4em 1fr; align-items: center; gap: 10px; }
  .tastebars i { display: block; height: 4px; border-radius: 2px; background: var(--rule); }
  .tastebars b { display: block; height: 100%; border-radius: 2px; background: currentColor; width: calc(var(--v) * 20%); }
}

/* ── photo plates (shown only when the asset exists) ── */
.plate { position: relative; height: 135svh; margin-top: clamp(60px, 12vh, 150px); }
.plate[hidden] { display: none; }
.plate__frame img { opacity: 0; transition: opacity .8s; }
.plate__frame img.is-loaded { opacity: 1; }
.plate__frame { position: sticky; top: 0; height: 100svh; overflow: hidden; background: #171613; }
.plate__frame img, .plate__frame video {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(calc(1.2 - var(--p, 0) * .2)); will-change: transform;
}
.plate__frame::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 8, 4, .62), transparent 46%); }
.plate figcaption {
  position: absolute; z-index: 1; left: var(--pad); right: var(--pad); bottom: clamp(28px, 7svh, 72px); max-width: 24em;
  color: #f6f2e3; font-size: clamp(20px, 2.5vw, 38px); line-height: 1.22; letter-spacing: -.01em;
}
/* portrait screens crop the plates hard: keep the subject in the cut */
@media (max-aspect-ratio: 1/1) {
  .plate[data-plate="whisk"] img { object-position: 72% 50%; }
  .plate[data-plate="pour"] img { object-position: 56% 50%; }
  .plate[data-plate="field"] img { object-position: 30% 50%; }
}
.hero__foam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
/* with film in the bowl the drawn bubbles go, and ::after becomes the shadow the rim casts on the tea */
.hero__foam.has-video::before { display: none; }
.hero__foam.has-video::after {
  inset: 0; background: none; opacity: 1; rotate: none; animation: none;
  -webkit-mask-image: none; mask-image: none;
  box-shadow: inset 0 14px 36px rgba(0, 0, 0, .46), inset 0 0 0 1px rgba(0, 0, 0, .25);
}

/* ── 五 water ────────────────────────────────────── */
.thermo { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(18px, 3.4vw, 64px); align-items: center; width: 100%; }
.thermo__num { display: flex; align-items: flex-start; line-height: .82; font-weight: 500; letter-spacing: -.045em; }
.thermo__num b { font-weight: 500; font-size: clamp(76px, 12.5vw, 210px); font-variant-numeric: tabular-nums lining-nums; }
.thermo__num span { font-size: clamp(22px, 3vw, 48px); letter-spacing: 0; padding-top: .25em; color: var(--seal); }
.meters { margin-top: clamp(20px, 5svh, 54px); display: grid; gap: 10px; font-family: var(--sans); max-width: 340px; transition: opacity .5s; }
.meter span { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; font-weight: 500; letter-spacing: .04em; }
.meter small { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-2); font-weight: 400; }
.meter i { display: block; height: 6px; margin-top: 5px; background: var(--rule); border-radius: 3px; overflow: hidden; }
.meter b { display: block; height: 100%; background: var(--fg); border-radius: 3px; transform-origin: 0 50%; transform: scaleX(var(--v, 0)); }
.meter[data-m="umami"] b { background: var(--matcha); }
.meter[data-m="bitter"] b { background: var(--seal); }
.meters__note { font-size: 10px; letter-spacing: .1em; color: var(--fg-2); }
.pours {
  list-style: none; margin: clamp(16px, 3svh, 30px) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px;
  font-family: var(--sans); font-size: 12px; letter-spacing: .04em;
  opacity: 0; transform: translateY(8px); transition: opacity .5s, transform .5s var(--ease);
}
.thermo.is-pouring .pours { opacity: 1; transform: none; }
.pours li { opacity: .3; transition: opacity .4s; }
.pours li.is-on { opacity: 1; }
.pours span { font-family: var(--serif); margin-right: .2em; }
.pours b { color: var(--seal); font-weight: 700; margin-left: .2em; }
.thermo__scale { position: relative; height: min(72svh, 640px); width: clamp(132px, 17vw, 230px); }
.thermo__tube { position: absolute; left: 0; top: 0; bottom: 0; width: 8px; border-radius: 4px; background: var(--rule); overflow: hidden; }
.thermo__tube i { position: absolute; inset: 0; background: var(--seal); transform-origin: 50% 100%; transform: scaleY(var(--t, 0)); }
.thermo__tick {
  position: absolute; left: 16px; bottom: calc(var(--at) * 100%); transform: translateY(50%);
  font-family: var(--sans); font-size: 10.5px; letter-spacing: .08em; color: var(--fg-2); font-variant-numeric: tabular-nums;
}
.thermo__pin {
  position: absolute; left: 50px; bottom: calc(var(--at) * 100%); transform: translate(-6px, 50%);
  font-size: clamp(13px, 1.25vw, 18px); line-height: 1.2; opacity: .22;
  transition: opacity .45s, transform .45s var(--ease);
}
.thermo__pin.is-on { opacity: 1; transform: translate(0, 50%); }
.thermo__pin i { display: inline-block; width: .55em; height: .55em; border-radius: 50%; margin-right: .4em; font-size: 1em; vertical-align: .05em; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); }
.thermo__pin span { display: block; }

/* ── 六 tools ────────────────────────────────────── */
.tools {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
  gap: clamp(30px, 5vw, 72px) clamp(22px, 3.4vw, 60px); padding-bottom: clamp(80px, 15vh, 190px);
}
.tool svg {
  width: 100%; max-width: 240px; aspect-ratio: 4 / 3; margin-bottom: 8px;
  fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.tool path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2s var(--ease) .2s; }
.tool.in path { stroke-dashoffset: 0; }
.tool h3 { font-size: clamp(21px, 2vw, 30px); font-weight: 500; padding-top: .55em; margin-bottom: .35em; border-top: 1px solid var(--rule); }
.tool h3 span { font-size: .6em; color: var(--fg-2); margin-left: .5em; }
.tool p { font-family: var(--sans); font-size: 14.5px; line-height: 1.6; color: var(--fg-2); }

/* ── 七 world ────────────────────────────────────── */
.spectrum { position: relative; margin-bottom: 176px; }
.spectrum__bar { display: flex; justify-content: space-between; align-items: center; padding: 0 12px; font-family: var(--sans); font-size: 10.5px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; }
.spectrum__bar span:first-child { color: #1b1a16; }
.spectrum__bar span:last-child { color: #f6f2e3; }
.spectrum__title { font-family: var(--sans); font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--fg-2); margin-bottom: clamp(104px, 15vh, 130px); }
.spectrum__bar {
  height: clamp(40px, 8vh, 84px); border-radius: 2px;
  background: linear-gradient(90deg, #9db53a 0%, #c9c95a 12%, #dcc35a 26%, #d99a3c 46%, #b9622a 68%, #7a3418 88%, #4a1d10 100%);
  clip-path: inset(0 calc((1 - var(--p, 0)) * 100%) 0 0);
}
.spectrum__marks { list-style: none; margin: 0; padding: 0; position: relative; height: 0; }
.spectrum__marks li {
  position: absolute; left: var(--x); white-space: nowrap; line-height: 1.25;
  opacity: clamp(0, calc((var(--p, 0) - var(--at)) * 9), 1);
}
.spectrum__marks li::after { content: ''; position: absolute; left: 0; width: 1px; background: currentColor; opacity: .5; }
.spectrum__marks b { display: block; font-weight: 500; font-size: clamp(13.5px, 1.3vw, 19px); padding-left: 8px; }
.spectrum__marks small { display: block; font-family: var(--sans); font-size: 10.5px; letter-spacing: .06em; color: var(--fg-2); padding-left: 8px; }
.spectrum__marks--jp li { bottom: 0; padding-bottom: 12px; }
.spectrum__marks--jp li::after { bottom: 0; top: 0; }
.spectrum__marks--jp li.r2 { padding-bottom: 54px; }
.spectrum__marks--world li { top: 0; padding-top: 14px; }
.spectrum__marks--world li::after { top: 0; bottom: 0; }
.spectrum__marks--world li.r2 { padding-top: 62px; }
.spectrum__marks--world li.r3 { padding-top: 110px; }
.spectrum__marks li.end { transform: translateX(-100%); text-align: right; }
.spectrum__marks li.end::after { left: auto; right: 0; }
.spectrum__marks li.end b, .spectrum__marks li.end small { padding: 0 8px 0 0; }
.world__note { max-width: 44em; font-size: clamp(17px, 1.45vw, 23px); line-height: 1.55; padding-top: clamp(40px, 6vh, 70px); }

.versus { margin: clamp(70px, 13vh, 150px) 0; max-width: 1040px; }
.versus__head, .versus dl > div { display: grid; grid-template-columns: minmax(84px, .62fr) 1fr 1fr; gap: 0 clamp(14px, 3vw, 48px); }
.versus__head { align-items: end; padding-bottom: 18px; }
.versus__k { display: block; font-size: clamp(54px, 8vw, 124px); line-height: 1; font-weight: 600; }
.versus__head > div:nth-child(2) .versus__k { color: #a9c35a; }
.versus__head > div:nth-child(3) .versus__k { color: #d9a441; }
.versus__head b { display: block; font-size: clamp(19px, 2vw, 30px); font-weight: 500; margin-top: .3em; line-height: 1.2; }
.versus__head small { font-family: var(--sans); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--fg-2); }
.versus dl > div { border-top: 1px solid var(--rule); padding: .8em 0; }
.versus dt { font-family: var(--sans); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-2); padding-top: .4em; }
.versus dd { font-size: clamp(15.5px, 1.4vw, 21px); line-height: 1.4; }

.onepct { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); gap: clamp(24px, 6vw, 100px); align-items: center; margin: clamp(70px, 13vh, 150px) 0; }
.onepct__dots { display: grid; grid-template-columns: repeat(10, 1fr); gap: clamp(5px, 1vw, 12px); max-width: 430px; }
.onepct__dots i {
  aspect-ratio: 1; border-radius: 50%; background: color-mix(in oklab, var(--fg) 24%, transparent);
  transform: scale(0); transition: transform .6s var(--ease); transition-delay: calc(var(--n) * 11ms + .2s);
}
.onepct.in .onepct__dots i { transform: none; }
.onepct__dots i.jp { background: var(--seal); }
.onepct__big { font-size: clamp(54px, 9vw, 144px); line-height: .95; font-weight: 500; letter-spacing: -.03em; margin-bottom: .22em; }
.onepct__text p:last-child { max-width: 30em; }

.traditions { padding-bottom: clamp(90px, 16vh, 200px); }
.traditions > h3 { font-size: clamp(27px, 3.2vw, 48px); font-weight: 500; letter-spacing: -.01em; margin-bottom: .8em; }
.traditions__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 0 clamp(18px, 3vw, 48px); }
.traditions article { border-top: 1px solid var(--fg); padding: .9em 0 1.8em; }
.traditions article:first-child { border-top-color: var(--seal); }
.traditions h4 { font-size: clamp(21px, 2vw, 30px); font-weight: 500; }
.t-sig { font-style: italic; color: var(--fg-2); margin-bottom: .8em; }
.traditions ul { list-style: none; margin: 0; padding: 0; font-family: var(--sans); font-size: 14px; line-height: 1.5; }
.traditions li { border-top: 1px solid var(--rule); padding: .5em 0; }

/* ── 八 card ─────────────────────────────────────── */
.brewtable { font-family: var(--sans); margin-bottom: clamp(60px, 11vh, 130px); overflow-x: auto; }
.brewtable table { width: 100%; min-width: 600px; border-collapse: collapse; }
.brewtable th {
  font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; font-weight: 500; color: var(--fg-2);
  text-align: right; padding: 0 0 10px; border-bottom: 1px solid var(--fg);
}
.brewtable td { padding: .68em 0; border-bottom: 1px solid var(--rule); text-align: right; font-size: 15px; font-variant-numeric: tabular-nums; }
.brewtable th:first-child, .brewtable td:first-child { text-align: left; }
.brewtable td:first-child { font-family: var(--serif); font-size: clamp(18px, 1.6vw, 24px); white-space: nowrap; }
.brewtable td:first-child i { display: inline-block; width: .72em; height: .72em; border-radius: 50%; margin-right: .6em; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .16); }
.brewtable td:first-child span { font-size: .64em; color: var(--fg-2); margin-left: .6em; }
.brewtable td small { font-size: .78em; color: var(--fg-2); margin-left: .2em; }
.brewtable .vessel { text-align: left; padding-left: clamp(16px, 3vw, 48px); color: var(--fg-2); }
.brewtable tr { transition: background-color .3s; }
.brewtable tbody tr:hover { background: color-mix(in oklab, var(--fg) 5%, transparent); }

.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: clamp(24px, 4vw, 64px); margin-bottom: clamp(60px, 11vh, 130px); }
.rules__n { font-size: clamp(34px, 4vw, 60px); font-weight: 600; line-height: 1; color: var(--seal); margin-bottom: .3em; }
.rules h3 { font-size: clamp(21px, 2vw, 30px); font-weight: 500; line-height: 1.15; margin-bottom: .45em; }
.rules p:last-child { color: var(--fg-2); }

.also > h3 { font-size: clamp(27px, 3.2vw, 48px); font-weight: 500; margin-bottom: .7em; }
.also dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 0 clamp(24px, 4vw, 64px); }
.also dl > div { border-top: 1px solid var(--rule); padding: .9em 0 1.3em; }
.also dt { font-size: clamp(19px, 1.7vw, 25px); }
.also dt span { font-size: .66em; color: var(--fg-2); margin-left: .5em; }
.also dd { font-family: var(--sans); font-size: 14.5px; line-height: 1.6; color: var(--fg-2); }

.colophon { padding: clamp(100px, 20vh, 240px) var(--pad) clamp(50px, 9vh, 100px); text-align: center; }
.colophon__jp { font-size: clamp(36px, 6vw, 92px); font-weight: 600; letter-spacing: .08em; margin-bottom: .5em; }
.colophon p:last-child { font-family: var(--sans); font-size: 12.5px; line-height: 1.7; color: var(--fg-2); max-width: 46em; margin: 0 auto; }

/* ── narrow ──────────────────────────────────────── */
@media (max-width: 719px) {
  .index { display: none; }
  .hero__stage { --cx: 44vw; --cy: 35svh; --d: min(74vw, 44svh); }
  .hero__kanji { right: 4vw; top: 7svh; transform: none; font-size: clamp(60px, 16svh, 140px); }
  .hero__copy { right: var(--pad); max-width: none; bottom: 8svh; }
  .hero__label, .hero__cue { display: none; }
  .hero__statement { right: var(--pad); max-width: none; }

  .chapter-head { grid-template-columns: 1fr; }
  .seal { grid-row: auto; margin-bottom: 14px; }
  .chapter-head h2, .chapter-head .deck { grid-column: 1; }
  .chapter-head .eyebrow { padding-top: 0; }

  /* block, not a one-column grid: a grid item's sticky range can be limited to its own row */
  .scrolly { display: block; }
  .scrolly__figure { height: 50svh; z-index: 3; background: var(--bg); box-shadow: 0 14px 18px -4px var(--bg); }
  .scrolly__steps { padding-bottom: 10vh; }
  .step { min-height: 68svh; justify-content: flex-start; padding-top: 7svh; max-width: none; }

  .shoot__svg { height: 46svh; }
  .shoot .lab { display: none; }
  .calendar { bottom: 6px; }

  .mx__c small, .mx__h small { display: none; }
  .mx__c { height: 3.7svh; }
  .mx__h { padding-bottom: 4px; }
  .mx { grid-template-columns: minmax(84px, 1.3fr) repeat(5, minmax(0, 1fr)); }
  .mx__name small { display: none; }

  .tea-stage { grid-template-rows: minmax(0, 1fr); padding: 52px 0 8px; }
  .tea-stage__kanji { grid-row: 1; font-size: clamp(34px, 8.5svh, 70px); }
  .cup { width: min(27svh, 78%); }
  .tea-stage__low { position: absolute; right: 0; bottom: 6px; width: 17svh; display: block; }
  .tea-stage__pile { width: 100%; }
  .tea-card { min-height: 88svh; }

  .thermo { grid-template-columns: minmax(0, 1fr) auto; }
  .thermo__scale { height: 42svh; width: 128px; }
  .thermo__pin { left: 40px; font-size: 12.5px; }
  .thermo__num b { font-size: clamp(64px, 20vw, 110px); }
  .meters { margin-top: 14px; gap: 6px; }
  .meters__note { display: none; }
  .pours { font-size: 11px; gap: 3px 12px; margin-top: 10px; }

  .spectrum__marks small { display: none; }
  .spectrum__marks b { font-size: 12px; }
  .versus__head, .versus dl > div { grid-template-columns: 1fr 1fr; }
  .versus__head > div:first-child { display: none; }
  .versus dt { grid-column: 1 / -1; padding-bottom: .3em; }
  .onepct { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  /* not motion: the timer that shows the page if a language pack stalls */
  html.i18n-wait body { animation: i18n-show 0s 2s forwards !important; }
  html { scroll-behavior: auto; }
  /* history becomes a plain list instead of a sideways pan */
  .hscroll__stage { position: static; height: auto; display: block; }
  .hscroll__track { flex-direction: column; width: auto; padding: 0 var(--pad); gap: clamp(48px, 9vh, 110px); transform: none !important; }
  .era { width: auto; max-width: 640px; opacity: 1; }
  .era .era__year { color: var(--fg); }
  .era h3::before { transform: translateY(-50%) scale(1.25); }
  .hscroll__rule { display: none; }
  /* no parallax on the photographs, no wipe on the spectrum */
  .plate__frame img, .plate__frame video { transform: none; }
  .spectrum__bar { clip-path: none; }
  .spectrum__marks li { opacity: 1; }
}
