@font-face { font-family: "Shippori"; src: url("/assets/fonts/shippori-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Shippori"; src: url("/assets/fonts/shippori-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Shippori Kanji"; src: url("/assets/fonts/kanji.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --paper: #EDF0E6;
  --paper-deep: #E2E7D8;
  --ink: #26302A;
  --ink-soft: #56625A;
  --line: #C6CEBA;
  --sencha: #4F7A28;
  --gyokuro: #2E6650;
  --kabusecha: #4E7D5A;
  --hojicha: #8B4F2C;
  --genmaicha: #8A6A1E;
  --kukicha: #7A6A42;
  --tea: var(--sencha);
  --serif: "Shippori", "Shippori Kanji", "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", Georgia, serif;
  --kanji: "Shippori Kanji", "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1B201C;
    --paper-deep: #232A24;
    --ink: #E3E8DA;
    --ink-soft: #A9B3A6;
    --line: #3A443B;
    --sencha: #9CC26A;
    --gyokuro: #7FC0A0;
    --kabusecha: #9CC8A6;
    --hojicha: #D9A07A;
    --genmaicha: #E0BE6A;
    --kukicha: #CDBB8C;
    color-scheme: dark;
  }
}
[data-tea="sencha"] { --tea: var(--sencha); }
[data-tea="gyokuro"] { --tea: var(--gyokuro); }
[data-tea="kabusecha"] { --tea: var(--kabusecha); }
[data-tea="hojicha"] { --tea: var(--hojicha); }
[data-tea="genmaicha"] { --tea: var(--genmaicha); }
[data-tea="kukicha"] { --tea: var(--kukicha); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 17px/1.75 var(--serif);
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("/assets/washi.png") repeat;
  pointer-events: none;
  z-index: -1;
}
@media (prefers-color-scheme: dark) {
  body::before { filter: invert(1); opacity: .45; }
}

a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--tea); outline-offset: 3px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 24px; }

.site-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 0 16px;
  border-bottom: 1px solid var(--line);
}
.mark { font-weight: 700; font-size: 1.3rem; text-decoration: none; letter-spacing: .01em; }
.mark span { font-weight: 400; color: var(--ink-soft); font-size: .95rem; margin-left: .45em; }
.site-head nav { display: flex; gap: 1.3em; font-size: .95rem; }
.site-head nav a { color: var(--ink-soft); text-decoration: none; }
.site-head nav a:hover, .site-head nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }

/* brew: the timer is the page */
.brew {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(20px, 5vw, 64px);
  padding: clamp(32px, 7vw, 72px) 0 56px;
  align-items: start;
}
.brew .kanji {
  writing-mode: vertical-rl;
  font-family: var(--kanji);
  font-weight: 700;
  font-size: clamp(5rem, 12vw, 9rem);
  line-height: 1;
  letter-spacing: .04em;
  color: var(--tea);
  margin: 0;
  transition: color .4s;
}
.brew h2 { font-size: clamp(2rem, 4.2vw, 2.8rem); line-height: 1.15; margin: 0 0 .35em; font-weight: 700; }
.brew .desc { margin: 0 0 1.4em; max-width: 34em; color: var(--ink-soft); }

.params { display: flex; flex-wrap: wrap; gap: 0 2.4em; margin: 0 0 1.6em; }
.params div { padding-top: .5em; border-top: 2px solid var(--tea); min-width: 6.5em; transition: border-color .4s; }
.params dt { font: 500 .8rem/1.4 var(--sans); color: var(--ink-soft); }
.params dd { margin: 0; font-size: 1.35rem; font-weight: 700; }

.clock { display: flex; align-items: flex-end; gap: 22px; margin: 0 0 1.2em; }
.cup {
  position: relative;
  width: 62px;
  height: 78px;
  border: 2px solid var(--ink);
  border-top: 0;
  border-radius: 0 0 20px 20px;
  overflow: hidden;
  flex: none;
  margin-bottom: 14px;
}
.cup::before {
  content: "";
  position: absolute;
  left: -6px; right: -6px; top: 0;
  border-top: 2px solid var(--ink);
}
.liquor {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: calc(var(--fill, 0) * 100%);
  background: var(--tea);
  opacity: .82;
  transition: height .25s linear, background-color .4s;
}
.time {
  margin: 0;
  font-size: clamp(4.2rem, 12vw, 7.5rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -.01em;
}
.time .d { display: inline-block; width: .62em; text-align: center; }
.time .colon { display: inline-block; width: .32em; text-align: center; position: relative; top: -.06em; }
.brew.running .time .colon { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: .25; } }

.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
button {
  font: 600 .95rem/1 var(--sans);
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .8em 1.4em;
  cursor: pointer;
}
button:hover { border-color: var(--ink-soft); }
button:disabled { opacity: .35; cursor: default; }
button.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); min-width: 7.5em; }
.steps { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; font: 500 .9rem/1 var(--sans); color: var(--ink-soft); }
.steps button { padding: .55em .8em; font-size: 1.1rem; }
.status { margin: 1.1em 0 0; min-height: 1.75em; font-style: italic; color: var(--ink-soft); }

/* shelf of tins */
.section { padding: 48px 0; border-top: 1px solid var(--line); }
.section h2 { font-size: 1.7rem; margin: 0 0 .25em; }
.lede { margin: 0 0 1.6em; color: var(--ink-soft); max-width: 36em; }
.tins { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.tin {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 0 0 16px;
  border-radius: 10px 10px 6px 6px;
  border: 1px solid var(--line);
  background: var(--paper-deep);
  font-family: var(--serif);
  overflow: hidden;
  transition: transform .2s, border-color .2s;
}
.tin::before { content: ""; display: block; width: 100%; height: 14px; background: var(--tea); }
.tin-kanji { writing-mode: vertical-rl; font: 700 1.9rem/1.05 var(--kanji); color: var(--tea); min-height: 4.2em; display: flex; align-items: center; }
.tin-name { font-weight: 700; font-size: 1rem; }
.tin-temp { font: 500 .8rem/1 var(--sans); color: var(--ink-soft); }
.tin[aria-pressed="true"] { border-color: var(--ink); transform: translateY(-6px); }

/* notes */
.notes { list-style: none; margin: 0; padding: 0; }
.notes li { display: grid; grid-template-columns: 9em 1fr; gap: 4px 24px; padding: 18px 0; border-bottom: 1px dashed var(--line); }
.notes li:last-child { border-bottom: 0; }
.notes time { font: 500 .85rem/1.9 var(--sans); color: var(--ink-soft); }
.notes h2, .notes h3 { margin: 0; font-size: 1.15rem; line-height: 1.5; }
.notes p { margin: .2em 0 0; max-width: 38em; }
.more { display: inline-block; margin-top: 10px; }

.about p { max-width: 36em; margin: 0; }

.site-foot { padding: 28px 0 40px; border-top: 1px solid var(--line); font: 400 .85rem/1.6 var(--sans); color: var(--ink-soft); }

.page-title { font-size: clamp(2.2rem, 5vw, 3rem); margin: 48px 0 .2em; }
.lost { padding: 12vh 0 18vh; }
.lost .kanji404 { font: 700 clamp(5rem, 14vw, 9rem)/1 var(--kanji); color: var(--hojicha); margin: 0 0 .2em; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .brew { grid-template-columns: 1fr; }
  .brew .kanji { writing-mode: horizontal-tb; font-size: clamp(3.4rem, 18vw, 5rem); letter-spacing: .02em; }
  .steps { margin-left: 0; width: 100%; }
  .tins { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .notes li { grid-template-columns: 1fr; }
  .site-head { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
