/* Aaron Chung Music
   Concept: stillness that slowly grows. A single amber line (an additive-synthesis
   drone) rises out of the opening photograph and carries the page; everything else
   stays quiet, set like a score: italic titles, tabular years, plain sans for reading. */

:root {
  --bg: #EDEFE9;            /* pale celadon-grey paper */
  --bg-alt: #E0E5DC;
  --fg: #12161B;            /* blue-black ink */
  --fg-soft: #46524B;
  --rule: rgba(18, 22, 27, 0.18);
  --rule-strong: rgba(18, 22, 27, 0.45);
  --accent: #B8641A;        /* oolong amber, graphic use */
  --accent-ink: #8A460A;    /* amber for text on paper */
  --btn-bg: #D68B3A;
  --btn-bg-hover: #E3A055;
  --btn-fg: #12161B;
  --band: #12161B;
  --band-fg: #EDEFE9;
  --band-soft: #A9B4AB;
  --band-rule: rgba(237, 239, 233, 0.22);
  --focus: #8A460A;
  --danger: #9B2C1F;

  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-cjk: "Noto Serif HK", "Noto Serif TC", "Noto Serif CJK TC", "Songti TC", "PMingLiU", serif;

  --maxw: 1180px;
  --gutter: clamp(1rem, 4vw, 3rem);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1216;
    --bg-alt: #151B21;
    --fg: #E8EBE4;
    --fg-soft: #A3AEA6;
    --rule: rgba(232, 235, 228, 0.16);
    --rule-strong: rgba(232, 235, 228, 0.45);
    --accent: #E39A4F;
    --accent-ink: #EDA962;
    --focus: #F0B36A;
    --band: #1A2229;
    --band-fg: #E8EBE4;
    --band-soft: #A3AEA6;
    --band-rule: rgba(232, 235, 228, 0.2);
    --danger: #FF9A8A;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0E1216;
  --bg-alt: #151B21;
  --fg: #E8EBE4;
  --fg-soft: #A3AEA6;
  --rule: rgba(232, 235, 228, 0.16);
  --rule-strong: rgba(232, 235, 228, 0.45);
  --accent: #E39A4F;
  --accent-ink: #EDA962;
  --focus: #F0B36A;
  --band: #1A2229;
  --band-fg: #E8EBE4;
  --band-soft: #A3AEA6;
  --band-rule: rgba(232, 235, 228, 0.2);
  --danger: #FF9A8A;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 1.0625rem/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent-ink); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
::selection { background: var(--accent); color: #12161B; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 380;
  line-height: 1.1;
  letter-spacing: -0.012em;
  font-variation-settings: "opsz" 144, "SOFT" 60, "WONK" 0;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: clamp(2.6rem, 6.5vw, 5rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
h3 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); font-variation-settings: "opsz" 48, "SOFT" 80, "WONK" 0; font-weight: 420; }
p { margin: 0 0 1.1em; }
.zh, [lang="zh-HK"] { font-family: var(--font-cjk); font-style: normal; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--btn-bg); color: var(--btn-fg); padding: 0.7rem 1rem; text-decoration: none; font-weight: 600;
}
.skip:focus { top: 1rem; }

.wrap {
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.section { padding-block: clamp(4rem, 8vw, 7rem); }
.section-tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.after-seam { padding-top: clamp(7rem, 12vw, 9.5rem); }
.measure { max-width: 62ch; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.9rem 1.7rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: 600 1rem/1.1 var(--font-body);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.btn:hover { background: var(--btn-bg-hover); text-decoration: none; }
.btn-quiet { background: transparent; color: inherit; border-color: currentColor; }
.btn-quiet:hover { background: rgba(127, 127, 127, 0.16); }

/* ---------- header ---------- */
.site-header { position: relative; z-index: 30; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 1.25rem; }
.wordmark {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 480;
  font-variation-settings: "opsz" 36, "SOFT" 100;
  color: inherit;
  text-decoration: none;
  letter-spacing: 0.005em;
  white-space: nowrap;
}
.wordmark:hover { text-decoration: none; }
.nav > ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 0.25rem 1.7rem; }
.nav a, .nav button.sub-toggle {
  color: inherit;
  font: 500 0.98rem/1 var(--font-body);
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0.6rem 0;
  cursor: pointer;
}
.nav a:hover, .nav button.sub-toggle:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.4em; }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }
.has-sub { position: relative; }
.sub-toggle::after { content: ""; display: inline-block; width: 0.38em; height: 0.38em; margin-left: 0.5em; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-0.18em) rotate(45deg); }
.sub {
  display: none;
  position: absolute; top: 100%; left: -1rem; min-width: 14rem;
  padding: 0.6rem 1rem 0.8rem;
  background: var(--band); color: var(--band-fg);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}
.sub li { display: block; }
.sub a { display: block; padding: 0.55rem 0; }
.sub small { display: block; color: var(--band-soft); font-size: 0.82rem; font-weight: 400; margin-top: 0.15rem; }
.has-sub:hover > .sub, .has-sub:focus-within > .sub, .has-sub.open > .sub { display: block; }
.nav-toggle { display: none; }

.home .site-header { position: absolute; inset: 0 0 auto 0; color: #F1F3EE; }

/* ---------- hero ---------- */
.hero {
  --focus: #F0B36A;
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: end;
  min-height: clamp(540px, 84svh, 880px);
  background: #090B0E;
  color: #F1F3EE;
  overflow: hidden;
}
.hero-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 63% 38%; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(8, 10, 13, 0.62) 0%, rgba(8, 10, 13, 0) 24%, rgba(8, 10, 13, 0) 42%, rgba(8, 10, 13, 0.82) 100%);
}
.hero .wrap { padding-block: 8rem 9.5rem; }
.name { display: grid; line-height: 0.9; font-size: clamp(3.5rem, 9.6vw, 8.6rem); font-weight: 330; letter-spacing: -0.03em; font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 0; margin: 0; }
.name span { display: block; }
.name-zh { margin: 1.1rem 0 0; font-size: clamp(1.25rem, 2.1vw, 1.7rem); letter-spacing: 0.32em; color: #F0B36A; }
.bars { list-style: none; display: flex; flex-wrap: wrap; margin: 1.7rem 0 2.2rem; padding: 0; font-size: 1.02rem; letter-spacing: 0.04em; }
.bars li { padding: 0 1.1rem; }
.bars li:first-child { padding-left: 0; }
.bars li + li { border-left: 1px solid rgba(241, 243, 238, 0.55); }
.seam { position: relative; height: 0; z-index: 5; pointer-events: none; }
.seam canvas { position: absolute; left: 0; top: -120px; width: 100%; height: 240px; display: block; color: #D98A35; }

/* ---------- home sections ---------- */
.statement { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.lead {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.75rem);
  line-height: 1.22;
  font-weight: 300;
  letter-spacing: -0.012em;
  font-variation-settings: "opsz" 96, "SOFT" 70, "WONK" 0;
  max-width: 26em;
  margin: 0 0 1.6rem;
  text-wrap: pretty;
}
.statement p:not(.lead) { max-width: 54ch; }
.photo { margin: 0; }
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo figcaption { margin-top: 0.55rem; font-size: 0.85rem; color: var(--fg-soft); }
.ratio-45 { aspect-ratio: 4 / 5; overflow: hidden; }
.ratio-32 { aspect-ratio: 3 / 2; overflow: hidden; }
.ratio-219 { aspect-ratio: 21 / 8; overflow: hidden; }

.doors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2.5vw, 2rem); align-items: start; }
.door { display: block; color: inherit; text-decoration: none; }
.door:nth-child(2) { margin-top: 3rem; }
.door .photo { overflow: hidden; }
.door img { transition: transform 1.2s ease; }
.door:hover img { transform: scale(1.035); }
.door h3 { margin-top: 1rem; }
.door:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
.door p { margin: 0.35rem 0 0; color: var(--fg-soft); max-width: 30ch; }

.quote-block { background: var(--bg-alt); }
.quote { margin: 0; max-width: 36ch; font-family: var(--font-display); font-style: italic; font-weight: 300; font-size: clamp(1.5rem, 3vw, 2.35rem); line-height: 1.3; font-variation-settings: "opsz" 72, "SOFT" 80, "WONK" 1; text-wrap: pretty; }
.stars { color: var(--accent); letter-spacing: 0.18em; margin: 1.1rem 0 0; font-size: 0.95rem; }
.quote-more { margin-top: 1.4rem; }

.band { background: var(--band); color: var(--band-fg); --focus: #F0B36A; }
.band a { color: inherit; }
.band .btn { color: var(--btn-fg); }
.band-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: end; }
.band p { color: var(--band-soft); margin: 0.8rem 0 0; max-width: 46ch; }

/* ---------- footer ---------- */
.site-footer { background: var(--band); color: var(--band-fg); --focus: #F0B36A; padding-block: 3.5rem 2.5rem; border-top: 1px solid var(--band-rule); }
.band + .site-footer { border-top: 0; padding-top: 1rem; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: start; }
.site-footer h2 { font-size: 1.35rem; font-variation-settings: "opsz" 36, "SOFT" 80, "WONK" 0; margin-bottom: 0.8rem; }
.site-footer a { color: inherit; }
.foot-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }
.foot-mail { margin: 0 0 0.9rem; user-select: all; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.8rem 2rem; margin-top: 2.8rem; padding-top: 1.4rem; border-top: 1px solid var(--band-rule); color: var(--band-soft); font-size: 0.92rem; }
.foot-base p { margin: 0; }
.fine { display: inline-flex; align-items: center; gap: 0.7rem; }
.fine-bar { display: inline-flex; gap: 3px; height: 1.5em; }
.fine-bar i { display: block; width: 1px; background: currentColor; }
.fine-bar i + i { width: 4px; }

/* ---------- inner pages ---------- */
.page-head { padding-top: clamp(2.5rem, 6vw, 4.5rem); padding-bottom: clamp(1.8rem, 4vw, 3rem); }
.page-head p { color: var(--fg-soft); margin: 1rem 0 0; max-width: 54ch; }
.back { display: inline-block; margin-bottom: 1.4rem; font-size: 0.95rem; }

.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.about .photo { position: sticky; top: 1.5rem; }
.prose p { max-width: 60ch; font-size: 1.1rem; line-height: 1.72; }
.about-wide { margin-top: clamp(3rem, 7vw, 5.5rem); }

/* works */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.6rem; }
.chip {
  font: 500 0.95rem/1 var(--font-body);
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  padding: 0.6rem 1.05rem;
  cursor: pointer;
}
.chip:hover { background: var(--bg-alt); }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.works-count { margin: 1.1rem 0 0; color: var(--fg-soft); font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.work-group { margin-top: clamp(2.5rem, 5vw, 3.6rem); }
.work-group > h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); padding-bottom: 0.8rem; border-bottom: 1px solid var(--rule-strong); display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.work-group > h2 small { font: 400 0.9rem var(--font-body); color: var(--fg-soft); font-variant-numeric: tabular-nums; }
.work-list { list-style: none; margin: 0; padding: 0; }
.work { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr) auto; gap: 0.2rem 1.5rem; padding: 1.1rem 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.work-year { font-family: var(--font-display); color: var(--fg-soft); font-variant-numeric: tabular-nums lining-nums; font-variation-settings: "opsz" 24, "SOFT" 0, "WONK" 0; }
.work-title { margin: 0; font-family: var(--font-display); font-style: italic; font-weight: 420; font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.22; font-variation-settings: "opsz" 48, "SOFT" 100, "WONK" 1; }
.work-title [lang="zh-HK"] { font-style: normal; font-variation-settings: normal; letter-spacing: 0.06em; }
.work-scoring { margin: 0.2rem 0 0; color: var(--fg-soft); font-size: 0.98rem; }
.work-dur { color: var(--fg-soft); font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 0.95rem; }
.work-watch { margin-left: 0.7rem; font: 500 0.88rem var(--font-body); font-style: normal; font-variation-settings: normal; white-space: nowrap; }

/* watch */
.reel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 3.2rem) clamp(1.2rem, 3vw, 2.4rem); }
.piece h2 { font-size: clamp(1.35rem, 2.4vw, 1.8rem); font-style: italic; font-weight: 420; font-variation-settings: "opsz" 48, "SOFT" 100, "WONK" 1; margin-top: 1rem; }
.piece p { margin: 0.3rem 0 0; color: var(--fg-soft); }
.piece-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; margin-top: 0.7rem; font-size: 0.97rem; }
.poster { position: relative; aspect-ratio: 16 / 9; background: var(--band); color: #D98A35; overflow: hidden; display: block; }
.poster svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.poster iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.poster .play { position: absolute; inset: 0; width: 100%; border: 0; padding: 0; background: transparent; cursor: pointer; color: #F1F3EE; }
.poster .play img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.9; }
.poster .play span { position: absolute; left: 1rem; bottom: 1rem; background: #D68B3A; color: #12161B; font: 600 0.95rem/1 var(--font-body); padding: 0.7rem 1rem; border-radius: 2px; }
.poster-note { position: absolute; left: 1rem; bottom: 1rem; margin: 0; }
.poster-note a { display: inline-block; background: #D68B3A; color: #12161B; font: 600 0.95rem/1 var(--font-body); padding: 0.7rem 1rem; border-radius: 2px; text-decoration: none; }
.poster-note a:hover { background: #E3A055; }

.piece-page { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.piece-meta { margin: 0 0 1.6rem; color: var(--fg-soft); }
.piece-meta span + span::before { content: "\00a0\00a0|\00a0\00a0"; opacity: 0.5; }
.credit { color: var(--fg-soft); font-size: 0.98rem; border-top: 1px solid var(--rule); padding-top: 1rem; margin-top: 1.6rem; }
.credit p { margin: 0 0 0.3rem; }

/* lessons */
.lessons-top { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.lessons-top .lead { font-size: clamp(1.45rem, 2.6vw, 2rem); max-width: 30em; }
.lessons-top .photo img { object-position: 50% 30%; }
.offer { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 1.6rem; border-top: 1px solid var(--rule-strong); }
.offer > div { padding: 1.5rem 1.8rem 0.4rem 0; }
.offer > div + div { padding-left: 1.8rem; border-left: 1px solid var(--rule); }
.offer p { color: var(--fg-soft); margin: 0.5rem 0 0; }
.testimonies { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 3rem) clamp(1.5rem, 4vw, 3.5rem); margin-top: 2rem; }
.testimonies blockquote { margin: 0; }
.testimonies blockquote p { margin: 0; font-family: var(--font-display); font-size: clamp(1.15rem, 1.7vw, 1.35rem); line-height: 1.45; font-weight: 340; font-variation-settings: "opsz" 24, "SOFT" 60, "WONK" 0; }
.testimonies .stars { margin-top: 0.7rem; }
.cta-line { margin-top: clamp(2.5rem, 5vw, 4rem); display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; }
.cta-line p { margin: 0; color: var(--fg-soft); }

/* contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.form { display: grid; gap: 1.3rem; }
.field label, .field legend { display: block; font-weight: 600; margin-bottom: 0.4rem; padding: 0; }
.field .hint { font-weight: 400; color: var(--fg-soft); }
.field input[type="text"], .field input[type="email"], .field select, .field textarea {
  width: 100%;
  font: 400 1.05rem/1.4 var(--font-body);
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  padding: 0.8rem 0.9rem;
}
.field textarea { min-height: 9.5rem; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.3rem; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.choice { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice label { margin: 0; font-weight: 500; border: 1px solid var(--rule-strong); border-radius: 999px; padding: 0.6rem 1.05rem; cursor: pointer; line-height: 1.1; }
.choice label:hover { background: var(--bg-alt); }
.choice input:checked + label { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.choice input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 3px; }
.lesson-fields { display: grid; gap: 1.3rem; padding: 1.3rem 0 0.2rem; border-top: 1px solid var(--rule); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 0; min-height: 1.6em; font-weight: 500; }
.form-status[data-state="error"] { color: var(--danger); }
.form-status[data-state="ok"] { color: var(--accent-ink); }
.form-sent { border-top: 2px solid var(--accent); padding-top: 1.2rem; }
.aside-block { margin-bottom: 2rem; }
.aside-block h2 { font-size: 1.35rem; font-variation-settings: "opsz" 36, "SOFT" 80, "WONK" 0; margin-bottom: 0.5rem; }
.aside-block p { margin: 0 0 0.4rem; }
.mail { user-select: all; }

/* shop */
.shop-note { max-width: 52ch; }
[data-shop-link][hidden] { display: none; }

/* 404 */
.lost { min-height: 52svh; display: grid; align-content: center; }
.lost h1 { font-size: clamp(3rem, 9vw, 7rem); font-style: italic; font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .statement, .about, .lessons-top, .contact-grid, .piece-page { grid-template-columns: minmax(0, 1fr); }
  .about .photo { position: static; max-width: 30rem; }
  .statement .photo { max-width: 24rem; }
  .lessons-top .photo { max-width: 26rem; }
  .doors { grid-template-columns: minmax(0, 1fr); gap: 2.4rem; }
  .door:nth-child(2) { margin-top: 0; }
  .door .ratio-45 { aspect-ratio: 3 / 2; }
  .offer { grid-template-columns: minmax(0, 1fr); }
  .offer > div, .offer > div + div { padding: 1.3rem 0 0.6rem; border-left: 0; }
  .offer > div + div { border-top: 1px solid var(--rule); }
  .testimonies, .reel { grid-template-columns: minmax(0, 1fr); }
  .band-inner, .foot-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 0.6rem;
    color: inherit; background: none; border: 1px solid currentColor; border-radius: 2px;
    font: 500 0.98rem/1 var(--font-body); padding: 0.65rem 0.95rem; cursor: pointer;
  }
  .nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--band); color: var(--band-fg);
    padding: 0.8rem max(var(--gutter), env(safe-area-inset-right, 0px)) 1.6rem max(var(--gutter), env(safe-area-inset-left, 0px));
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.3);
  }
  .nav.open { display: block; }
  .nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav li { border-bottom: 1px solid var(--band-rule); }
  .nav a, .nav button.sub-toggle { display: block; width: 100%; text-align: left; padding: 0.95rem 0; font-size: 1.05rem; }
  .sub-toggle::after { display: none; }
  .sub { display: block; position: static; box-shadow: none; padding: 0 0 0.6rem 1rem; min-width: 0; background: transparent; }
  .sub a { padding: 0.55rem 0; font-size: 1rem; color: var(--band-soft); }
  .nav a[aria-current="page"] { box-shadow: none; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 0.4em; }
  .site-header { position: relative; }
  .home .site-header { position: absolute; }
}

@media (max-width: 560px) {
  .hero { min-height: 800px; }
  .hero .wrap { padding-block: 7rem 8rem; }
  .hero-img { inset: 0 0 auto 0; height: 430px; object-position: 66% 18%; }
  .hero::after { background: linear-gradient(180deg, rgba(8, 10, 13, 0.6) 0%, rgba(8, 10, 13, 0) 14%, rgba(8, 10, 13, 0) 36%, #090B0E 54%, #090B0E 100%); }
  .name-zh { letter-spacing: 0.22em; }
  .work { grid-template-columns: 3.2rem minmax(0, 1fr); gap: 0.15rem 1rem; }
  .work-dur { grid-column: 2; }
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .seam canvas { top: -90px; height: 180px; }
  .after-seam { padding-top: 6rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .door:hover img { transform: none; }
}

/* piece pages */
.piece-h1 { font-style: italic; font-size: clamp(2.3rem, 5.5vw, 4rem); font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; }
.piece-text .prose p { font-size: 1.05rem; }
@media (max-width: 900px) { .piece-text { margin-top: 0.4rem; } }
