/* Qin Builds, the homepage (2026-10-28).
   A paper wall with one round gate cut in it: the living ink is seen through
   the 月门, and only there. Below it the page is a folio of numbered bands on
   one twelve-column frame, bracketed by two night bands: the wall the rooms
   hang on, and the colophon where a reader writes back.
   纸 paper · 墨 pine ink · 朱 cinnabar · 青 celadon */
:root {
  --paper: #fbfaf6;
  --paper-raised: #fefdfa;
  --paper-deep: #f1efe8;
  /* mirrored by fluid.js INK_THEMES.*.ground; home-sheet.test.js pins the
     pair. It is the paper itself: the ink lands on the page, not in a dish. */
  --ground: #fbfaf6;
  --ink: #222a22;
  --ink-soft: #3c453c;
  --ink-mute: #525b50;
  --line: #e9e7df;
  --line-dark: #d3d0c5;
  --cinnabar: #d2352c;
  --cinnabar-deep: #b02e26;
  --celadon: #a9bfad;
  --celadon-deep: #48604c;
  /* the night bands: the rooms' wall and the colophon */
  --night: #182018;
  --grid: 8px;
  --space-1: calc(var(--grid) * .5);
  --space-2: var(--grid);
  --space-3: calc(var(--grid) * 1.5);
  --space-4: calc(var(--grid) * 2);
  --space-5: calc(var(--grid) * 3);
  --space-6: calc(var(--grid) * 4);
  --space-7: calc(var(--grid) * 6);
  --space-8: calc(var(--grid) * 8);
  --gutter: clamp(20px, 4.4vw, 64px);
  --frame: 1360px;
  --column-gap: clamp(16px, 2.2vw, 32px);
  --band-pad: clamp(88px, 11vw, 168px);
  --radius-sm: 6px;
  --radius-plate: 8px;
  --line-thin: 1px;
  --control-height: 48px;
  --z-page: 1;
  --z-skip-link: 20;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}

/* 科技: the night theme. The tokens are the whole theme; nothing below this
   block names a colour that the theme has to chase. Before site.js has run, an
   OS dark preference gets the same palette so a dark reader never sees paper
   flash first. */
:root[data-theme="tech"] {
  --paper: #10150f;
  --paper-raised: #151b13;
  --paper-deep: #1a2118;
  --ground: #10150f;
  --ink: #e8ede4;
  --ink-soft: #c2cabc;
  --ink-mute: #97a290;
  --line: #232b21;
  --line-dark: #364033;
  --cinnabar: #d05042;
  --cinnabar-deep: #eb695e;
  --celadon: #52685a;
  --celadon-deep: #9fb8a4;
  --night: #090c08;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --paper: #10150f;
    --paper-raised: #151b13;
    --paper-deep: #1a2118;
    --ground: #10150f;
    --ink: #e8ede4;
    --ink-soft: #c2cabc;
    --ink-mute: #97a290;
    --line: #232b21;
    --line-dark: #364033;
    --cinnabar: #d05042;
    --cinnabar-deep: #eb695e;
    --celadon: #52685a;
    --celadon-deep: #9fb8a4;
    --night: #090c08;
    color-scheme: dark;
  }
}

/* a night band re-points the tokens rather than overriding each leaf, so the
   form, the links and the captions inside it need no second set of rules. */
.on-night,
.band--wall,
.band--contact,
.site-footer {
  --paper: var(--night);
  --ink: #ece9df;
  --ink-soft: #cfcbbe;
  --ink-mute: #a9a699;
  --line: rgba(236, 233, 223, .14);
  --line-dark: rgba(236, 233, 223, .3);
  --cinnabar: #d9483d;
  --cinnabar-deep: #f07a6e;
  --celadon-deep: #9fb8a4;
  background: var(--paper);
  color: var(--ink);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-4);
  /* — the wall ends at the footer: no rubber band past the last row. Chrome
     and Safari 16+ honour this on the root scroller, so the sheet stops dead
     instead of peeling up to show --ground (the 裱绫 wall) behind it. iOS
     Safari bounces the document regardless, which is why html carries the
     paper itself: the strip it reveals is paper, not the green wall. */
  overscroll-behavior: none;
}
body {
  margin: 0;
  /* transparent on purpose: the ink stage is under the page, and the gate
     can only show it if nothing between them paints. html carries the paper. */
  background: transparent;
  font-size: 1rem;
  font-weight: var(--weight-body);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
/* artwork is looked at, not dragged off the page: no ghost preview */
.room img, .room-film, .feature-visual img, .moon-gate-still { -webkit-user-drag: none; user-select: none; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--cinnabar); color: #fff; }
:focus-visible { outline: 3px solid var(--cinnabar); outline-offset: 3px; border-radius: 2px; }
main:focus { outline: none; }
[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  z-index: var(--z-skip-link);
  top: var(--space-2);
  left: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-260%);
}
.skip-link:focus { transform: translateY(0); }

/* — the painting under the paper — */
.ink-stage { position: fixed; inset: 0; z-index: 0; height: 100dvh; min-height: 100svh; overflow: hidden; background: var(--ground); }
.ink-stage canvas, .art-fallback { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.art-fallback { background:
  radial-gradient(42% 55% at 47% 30%, rgba(34, 42, 34, .14), rgba(34, 42, 34, 0) 70%),
  radial-gradient(30% 38% at 62% 62%, rgba(34, 42, 34, .10), rgba(34, 42, 34, 0) 70%),
  radial-gradient(16% 22% at 36% 70%, rgba(198, 71, 46, .12), rgba(198, 71, 46, 0) 70%); }
:root[data-theme="tech"] .art-fallback { background:
  radial-gradient(42% 55% at 47% 30%, rgba(159, 184, 164, .14), rgba(159, 184, 164, 0) 70%),
  radial-gradient(30% 38% at 62% 62%, rgba(159, 184, 164, .10), rgba(159, 184, 164, 0) 70%),
  radial-gradient(16% 22% at 36% 70%, rgba(207, 81, 56, .10), rgba(207, 81, 56, 0) 70%); }

.page { position: relative; z-index: var(--z-page); }
.frame { width: min(100% - 2 * var(--gutter), var(--frame)); margin-inline: auto; }

/* — masthead — */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  width: min(100% - 2 * var(--gutter), var(--frame));
  margin-inline: auto;
  padding-block: clamp(18px, 2.4vw, 30px);
  background: var(--paper);
  box-shadow: 0 0 0 100vmax var(--paper);
  /* a pixel past the bottom: where two boxes meet on a fraction the living ink
     would otherwise show through as a moving hairline */
  clip-path: inset(0 -100vmax -1px);
}
.head-identity { display: flex; align-items: baseline; gap: var(--space-3); min-width: 0; }
.head-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: var(--weight-display);
  line-height: 1;
  letter-spacing: -.01em;
  text-decoration: none;
  white-space: nowrap;
}
.head-now { color: var(--ink-mute); font-size: var(--type-label); white-space: nowrap; }
.head-right { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 36px); }
.head-nav { display: flex; align-items: center; gap: clamp(16px, 2.2vw, 32px); }
.head-nav a {
  position: relative;
  padding-block: 10px;
  color: var(--ink-soft);
  font-size: .9375rem;
  text-decoration: none;
}
.head-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
}
.head-nav a:hover { color: var(--ink); }
.head-nav a:hover::after { transform: scaleX(1); }

.theme-col { position: relative; }
.theme-switch { display: flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid var(--line-dark); border-radius: 999px; }
.theme-button {
  display: inline-flex;
  position: relative;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-mute);
  cursor: pointer;
}
.theme-button::after { content: ""; position: absolute; inset: -6px 0; }
.theme-icon { width: 17px; height: 17px; fill: currentColor; }
.theme-button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.theme-button:hover:not([aria-pressed="true"]) { color: var(--ink); }
/* read aloud, never painted: display none would drop it from the tree */
.theme-live { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
html:not([data-enhanced="true"]) .theme-col { display: none; }

/* — 月门, the opening — */
.opening {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--column-gap);
  align-items: center;
  width: min(100% - 2 * var(--gutter), var(--frame));
  min-height: max(560px, calc(100svh - 92px));
  margin-inline: auto;
  padding-block: clamp(32px, 5vh, 72px) clamp(72px, 10vh, 112px);
  /* the paper around the gate is the gate's own spread shadow; clip it to
     the opening so it cannot paint over the masthead or the wall below */
  clip-path: inset(0 -100vmax);
}
.gate {
  --gate: min(72svh, 41vw, 600px);
  position: relative;
  grid-column: 7 / 13;
  grid-row: 1;
  justify-self: end;
  width: var(--gate);
}
.moon-gate {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: 0 0 0 100vmax var(--paper);
}
/* no rim: the paper feathers in over the ink, and over the still painting
   too, so the gate reads as a wash on the page and never as a rimmed disc */
.moon-gate::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  box-shadow: inset 0 0 calc(var(--gate) * .2) calc(var(--gate) * .09) var(--paper);
  pointer-events: none;
}
/* still painting for readers who asked the page not to move: the living ink
   does not boot under reduced motion, and an empty gate is not a view. */
.moon-gate-still { display: none; position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: 50% 40%; }
:root[data-theme="tech"] .moon-gate-still { filter: invert(1) hue-rotate(180deg) brightness(.82) contrast(1.08); }
@media (prefers-reduced-motion: reduce) {
  .moon-gate-still { display: block; }
}

.opening-copy { position: relative; z-index: 1; grid-column: 1 / 8; grid-row: 1; }
.opening h1 {
  font-family: var(--font-display);
  font-size: clamp(3.25rem, 6.8vw, 7.25rem);
  font-weight: var(--weight-display);
  line-height: 1;
  letter-spacing: -.02em;
  text-wrap: balance;
}
.opening h1 span { display: block; }
.opening h1 span + span { color: var(--ink-mute); }
.lead-deck {
  max-width: 30ch;
  margin-top: clamp(24px, 3.4vw, 44px);
  color: var(--ink-soft);
  font-size: clamp(1.0625rem, 1.3vw, 1.25rem);
  line-height: 1.55;
}
.opening-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4) var(--space-5); margin-top: clamp(28px, 3.4vw, 44px); }
.lead-contact {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 22px 0 26px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 500;
  text-decoration: none;
}
.lead-contact svg { width: 18px; height: 18px; fill: currentColor; }
.lead-contact:hover { background: var(--cinnabar-deep); }
.contact-status { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-mute); font-size: var(--type-label); }
.contact-status i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--celadon-deep); box-shadow: 0 0 0 4px color-mix(in srgb, var(--celadon-deep) 22%, transparent); }

.seal { display: block; flex: none; background-color: var(--cinnabar); -webkit-mask: url("seal-lead.svg?v=77") center / contain no-repeat; mask: url("seal-lead.svg?v=77") center / contain no-repeat; }
.seal--lead {
  position: absolute;
  z-index: 2;
  left: calc(var(--gate) * .09);
  bottom: calc(var(--gate) * .03);
  width: clamp(44px, 4.2vw, 62px);
  aspect-ratio: 1016 / 2216;
}
.scroll-cue {
  position: absolute;
  left: 0;
  bottom: clamp(20px, 3vh, 32px);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink-mute);
  font-size: var(--type-label);
  text-decoration: none;
}
.scroll-cue svg { width: 16px; height: 16px; fill: currentColor; transform: rotate(90deg); }
.scroll-cue:hover { color: var(--ink); }

/* — bands: one frame, one head — */
.band { position: relative; padding-block: var(--band-pad); background: var(--paper); }
.band, .site-footer { box-shadow: 0 -1px 0 var(--paper); }
/* paper bands that follow paper bands share one gap, not two */
#approach, #about { padding-top: 0; }
.band-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--column-gap);
  row-gap: var(--space-4);
  align-items: baseline;
  margin-bottom: clamp(48px, 6.4vw, 96px);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}
.band-index {
  color: var(--celadon-deep);
  font-size: var(--type-label);
  font-weight: 600;
}
.band-index span { margin-left: .3em; }
.band-head .band-index { grid-column: 1 / 4; }
.band-head h2 { grid-column: 4 / 13; }
.band-lede { grid-column: 4 / 10; color: var(--ink-soft); font-size: clamp(1rem, 1.2vw, 1.125rem); line-height: 1.6; }
.band h2 {
  font-family: var(--font-display);
  font-size: var(--type-section);
  font-weight: var(--weight-display);
  line-height: 1.06;
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
}

/* — 01 rooms: the night wall — */
.room-wall {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: clamp(420px, 52vw, 760px) clamp(280px, 27vw, 400px);
  gap: clamp(12px, 1.4vw, 20px);
  grid-template-areas:
    "r r r r r r a a a a a a"
    "m m m m m m m m g g g g";
}
.room--rose { grid-area: r; }
.room--ash { grid-area: a; }
.room--moonrise { grid-area: m; }
.room--gallery { grid-area: g; }
.room > a {
  position: relative;
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius-plate);
  background: #0c0f0b;
  color: #f4f1e8;
  text-decoration: none;
  isolation: isolate;
}
.room img,
.room-film {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* the film lies over its own first frame and shows only once it plays */
.room-film { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.room-film.is-playing { opacity: 1; }
.room--rose :is(img, video) { object-position: 50% 30%; }
.room--ash :is(img, video) { object-position: 50% 45%; }
.room--moonrise :is(img, video) { object-position: 50% 40%; }
.room > a::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  z-index: 0;
  background: linear-gradient(to top, rgba(8, 10, 8, .86), rgba(8, 10, 8, .5) 45%, rgba(8, 10, 8, 0));
  pointer-events: none;
}
/* the harbor is busy to its bottom edge: a taller, deeper scrim under its words */
.room--moonrise > a::after { inset: 30% 0 0; background: linear-gradient(to top, rgba(8, 10, 8, .94), rgba(8, 10, 8, .62) 50%, rgba(8, 10, 8, 0)); }
.room-caption {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  gap: 4px;
  padding: clamp(16px, 1.8vw, 26px);
}
.room-caption b { color: #f08a7f; font-family: var(--font-cjk); font-size: var(--type-label); font-weight: 700; letter-spacing: .24em; }
.room-caption strong { font-family: var(--font-display); font-size: clamp(1.5rem, 2vw, 1.875rem); font-weight: var(--weight-display); line-height: 1.1; letter-spacing: -.01em; }
.room-caption > span { max-width: 40ch; color: rgba(244, 241, 232, .8); font-size: .9375rem; line-height: 1.4; }
.room--rose .room-caption strong,
.room--ash .room-caption strong { font-size: clamp(1.75rem, 2.6vw, 2.5rem); }
.room > a:focus-visible { outline-offset: 4px; }

.room--gallery > a { background: transparent; border: 1px solid var(--line-dark); }
.room--gallery > a::after { content: none; }
.room--gallery > a:hover { border-color: var(--ink); background: rgba(236, 233, 223, .04); }
.room-gallery-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--space-2);
  height: 100%;
  padding: clamp(20px, 2.4vw, 36px);
}
.room-gallery-copy strong { font-family: var(--font-display); font-size: clamp(1.875rem, 3vw, 2.75rem); font-weight: var(--weight-display); line-height: 1.05; letter-spacing: -.015em; }
.room-gallery-copy .project-summary { max-width: 34ch; color: var(--ink-soft); }
.room-gallery-action { display: inline-flex; align-items: center; gap: 10px; margin-top: var(--space-3); font-weight: 500; white-space: nowrap; }
.room-gallery-action svg { width: 18px; height: 18px; fill: currentColor; }
.room-credit { margin-top: var(--space-4); color: var(--ink-mute); font-size: .8125rem; }
.room-credit a { text-underline-offset: 3px; }

/* — 02 work — */
.work-list { display: grid; gap: clamp(72px, 9vw, 136px); }
.feature {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--column-gap);
  row-gap: var(--space-6);
  align-items: center;
}
.feature-visual { grid-column: 1 / 8; display: block; overflow: hidden; border-radius: var(--radius-plate); background: var(--paper-deep); }
.feature-visual img { width: 100%; aspect-ratio: 5 / 3; object-fit: cover; }
.feature-copy { grid-column: 9 / 13; display: grid; justify-items: start; gap: var(--space-4); }
.feature-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--ink-mute); font-size: var(--type-label); }
.feature-meta span + span::before { content: "/"; margin-right: 14px; color: var(--line-dark); }
.feature h3 { font-family: var(--font-display); font-size: var(--type-card); font-weight: var(--weight-display); line-height: 1.08; letter-spacing: var(--tracking-display); overflow-wrap: anywhere; }
.project-summary { color: var(--ink-soft); line-height: 1.65; }
.project-evidence { justify-self: stretch; min-width: 0; }
.evidence-code {
  margin: var(--space-1) 0 0;
  padding: 18px 20px;
  overflow-x: auto;
  border-radius: var(--radius-sm);
  background: var(--night);
  color: #d9dccf;
  font-family: var(--font-mono);
  font-size: .78rem;
  line-height: 1.7;
  tab-size: 2;
}
.evidence-code code { font: inherit; }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  text-decoration-color: var(--line-dark);
}
.text-link svg { width: 16px; height: 16px; fill: currentColor; }
.text-link:hover { color: var(--cinnabar-deep); text-decoration-color: currentColor; }

.feature--skills .feature-copy { grid-column: 1 / 6; grid-row: 1; }
.skill-index {
  grid-column: 7 / 13;
  grid-row: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.skill-index dt {
  padding: 22px 0 8px;
  color: var(--ink-mute);
  font-size: var(--type-label);
}
.skill-index dd > span {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px var(--space-4);
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.skill-index b { font-family: var(--font-mono); font-size: var(--type-label); font-weight: 400; }
.skill-index i { color: var(--ink-mute); font-style: normal; font-size: .9375rem; }

/* — 03 method — */
.method {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--column-gap);
  row-gap: var(--space-6);
  align-items: start;
}
.method-painting { grid-column: 1 / 7; overflow: hidden; border-radius: var(--radius-plate); }
/* the 5:3 composition ships whole: a licensing and composition rule */
.method-painting img { width: 100%; aspect-ratio: 5 / 3; object-fit: contain; }
.services { grid-column: 8 / 13; display: grid; counter-reset: service; }
.service { display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); padding: 24px 0 28px; border-bottom: 1px solid var(--line); counter-increment: service; }
.service::before { content: counter(service, decimal-leading-zero); grid-row: 1 / 3; padding-top: .4em; color: var(--ink-mute); font-size: var(--type-label); font-variant-numeric: tabular-nums; }
.service h3 { font-family: var(--font-display); font-size: clamp(1.5rem, 2vw, 1.75rem); font-weight: var(--weight-display); line-height: 1.15; letter-spacing: -.01em; }
.service p { margin-top: 6px; color: var(--ink-soft); }

.process-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--column-gap);
  margin-top: clamp(64px, 8vw, 112px);
}
.process-step { display: grid; gap: 10px; padding-top: 22px; border-top: 1px solid var(--line-dark); }
.step-index { color: var(--ink-mute); font-size: var(--type-label); font-variant-numeric: tabular-nums; }
.process-step strong { font-family: var(--font-display); font-size: clamp(1.375rem, 1.9vw, 1.75rem); font-weight: var(--weight-display); line-height: 1.15; letter-spacing: -.01em; }
.process-step--active { border-top-color: var(--cinnabar); }
.process-step--active .step-index { color: var(--cinnabar-deep); }

/* — 04 about — */
.about {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--column-gap);
  row-gap: var(--space-6);
  align-items: center;
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}
.about-leaf { grid-column: 1 / 8; }
.about-leaf img { width: 100%; aspect-ratio: 5 / 3; object-fit: cover; border-radius: var(--radius-plate); }
.about-leaf figcaption { display: flex; gap: 12px; align-items: baseline; margin-top: 14px; color: var(--ink-mute); font-size: var(--type-label); line-height: 1.45; }
.about-leaf figcaption b { flex: none; color: var(--cinnabar-deep); font-family: var(--font-cjk); font-weight: 700; letter-spacing: .2em; }
.about-copy { grid-column: 9 / 13; display: grid; gap: var(--space-4); }
.about-copy .band-index { margin-bottom: var(--space-2); }
.about-copy p:not(.band-index) { color: var(--ink-soft); }
.about-copy .about-lede { color: var(--ink); font-family: var(--font-display); font-size: clamp(1.625rem, 2.3vw, 2rem); font-weight: var(--weight-display); line-height: 1.22; letter-spacing: -.01em; }

/* — 05 contact: the colophon, on the night band — */
.band--contact { padding-bottom: clamp(72px, 9vw, 128px); }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--column-gap);
  row-gap: var(--space-7);
  align-items: start;
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}
.contact-copy { grid-column: 1 / 7; display: grid; justify-items: start; gap: var(--space-4); }
.band--contact h2 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
.contact-stroke { width: clamp(200px, 60%, 340px); height: auto; color: var(--cinnabar); }
.cs-reveal { stroke-dasharray: 1; }
html[data-enhanced] .contact:not(.is-inked) .cs-reveal { stroke-dashoffset: 1; }
.elsewhere { display: grid; gap: 2px; margin-top: var(--space-4); }
.elsewhere li { display: flex; align-items: baseline; gap: 14px; }
.elsewhere a { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--font-display); font-size: 1.5rem; font-weight: var(--weight-display); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; text-decoration-color: var(--line-dark); }
.elsewhere a:hover { text-decoration-color: currentColor; }
.elsewhere span { color: var(--ink-mute); font-size: var(--type-label); }

.contact-form { grid-column: 8 / 13; display: grid; gap: var(--space-5); padding-top: var(--space-2); }
.form-field { display: grid; gap: var(--space-2); }
.field-label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .4em; color: var(--ink-soft); font-size: var(--type-label); }
.field-need { color: var(--ink-mute); font-style: normal; }
.field-need::before { content: "·"; margin-inline-end: .4em; }
.form-field input, .form-field textarea {
  width: 100%;
  min-height: var(--control-height);
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--ink) 40%, transparent);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--ink) 4%, transparent);
  color: inherit;
  font: inherit;
}
.form-field input:hover, .form-field textarea:hover { border-color: color-mix(in srgb, var(--ink) 65%, transparent); }
.form-field input:focus-visible, .form-field textarea:focus-visible { border-color: var(--ink); outline: 3px solid var(--cinnabar); outline-offset: 2px; }
.form-field textarea { min-height: 140px; resize: vertical; }
.form-field .field-error, .form-field .field-count { font-size: var(--type-label); }
.field-error { color: var(--cinnabar-deep); }
.form-field input[aria-invalid="true"], .form-field textarea[aria-invalid="true"] { border-color: var(--cinnabar-deep); }
.field-count { justify-self: end; color: var(--ink-mute); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.form-status { display: flex; align-items: center; gap: .45em; font-size: var(--type-label); }
.form-status svg { flex: none; width: 1.25em; height: 1.25em; fill: currentColor; }
.form-status[data-state="error"] { color: var(--cinnabar-deep); }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}
.button--primary { background: var(--cinnabar); color: #fff; }
.button--primary:hover { background: color-mix(in srgb, var(--cinnabar) 82%, #000); }
.form-submit { justify-self: start; }
.form-submit:disabled { opacity: .6; cursor: default; }

/* — footer — */
.site-footer { padding-bottom: max(var(--space-6), env(safe-area-inset-bottom, 0px)); }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
  color: var(--ink-mute);
  font-size: var(--type-label);
}
.ganzhi { font-family: var(--font-cjk); font-size: var(--type-label); font-weight: 700; letter-spacing: .16em; }
.ganzhi-gloss { margin-left: .45em; font-style: normal; }
.ganzhi-toggle { position: relative; display: inline-flex; align-items: baseline; margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.ganzhi-toggle::after { content: ""; position: absolute; inset: -12px -6px; }
.ganzhi-toggle .ganzhi-gloss { text-decoration: underline dotted; text-underline-offset: 3px; }
.ganzhi-toggle:hover, .ganzhi-toggle:focus-visible { color: var(--cinnabar-deep); }
.ganzhi-card { width: min(100% - 2 * var(--gutter), var(--frame)); margin: var(--space-5) auto 0; color: var(--ink-soft); }
.ganzhi-note { max-width: 44ch; margin-bottom: var(--space-3); font-size: var(--type-label); line-height: 1.45; }
.ganzhi-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px var(--space-4); max-width: 28rem; }
.ganzhi-facts dt { color: var(--ink-mute); font-size: .8125rem; }
.ganzhi-facts dd { font-size: var(--type-label); }
.ganzhi-facts b { font-family: var(--font-cjk); font-weight: 700; letter-spacing: .16em; }
.footer-nav { display: flex; gap: var(--space-5); }
.footer-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-soft); text-decoration: none; }
.footer-nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

/* — tablet — */
@media (max-width: 1023px) {
  .room-wall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: clamp(360px, 58vw, 560px) clamp(220px, 34vw, 340px) auto;
    grid-template-areas:
      "r a"
      "m m"
      "g g";
  }
  .feature-visual, .feature-copy, .feature--skills .feature-copy, .skill-index, .method-painting, .services, .about-leaf, .about-copy, .contact-copy, .contact-form { grid-column: 1 / -1; grid-row: auto; }
  .feature-copy { max-width: 40rem; }
}

/* — the opening and masthead below 900px: the gate rises above the words — */
@media (max-width: 899px) {
  .opening { grid-template-columns: minmax(0, 1fr); align-content: start; row-gap: clamp(32px, 6vw, 48px); min-height: auto; padding-top: var(--space-4); padding-bottom: 104px; }
  .gate { --gate: min(84vw, 52svh, 520px); grid-column: 1; justify-self: center; }
  .opening-copy { grid-column: 1; grid-row: 2; }
  .band-head .band-index, .band-head h2, .band-lede { grid-column: 1 / -1; }
}

@media (max-width: 719px) {
  .masthead {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "identity theme" "navigation navigation";
    row-gap: 18px;
    align-items: center;
  }
  .head-identity { grid-area: identity; }
  .head-right { display: contents; }
  .head-nav { grid-area: navigation; justify-content: space-between; gap: 8px; }
  .head-right .theme-col { grid-area: theme; display: flex; justify-content: flex-end; }
  .theme-button { width: 40px; height: 40px; }
  .head-nav a { padding-block: 12px; }
}

@media (max-width: 599px) {
  :root { --band-pad: 80px; }
  .room-wall { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "r" "a" "m" "g"; }
  .room > a { height: auto; aspect-ratio: 4 / 5; }
  .room--moonrise > a { aspect-ratio: 16 / 10; }
  .room--gallery > a { aspect-ratio: auto; }
  .process-list { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--space-6); }
  .head-now { display: none; }
}

/* — motion: everything that moves is opted in, never opted out — */
@media (prefers-reduced-motion: no-preference) {
  .cs-reveal { transition: stroke-dashoffset 1100ms var(--ease-out) 150ms; }
  .lead-contact, .button, .theme-button { transition: transform 140ms var(--ease-out), background-color 200ms ease; }
  .lead-contact:active, .button:active, .theme-button:active { transform: scale(.97); }
  .text-link, .elsewhere a { transition: text-decoration-color 200ms ease, color 200ms ease; }
  .form-field input, .form-field textarea { transition: border-color 200ms ease; }
  .room-film { transition: opacity 500ms ease; }
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  .room :is(img, video), .feature-visual img { transition: transform 600ms var(--ease-out); }
  .room > a:hover :is(img, video) { transform: scale(1.035); }
  .feature-visual:hover img { transform: scale(1.025); }
  .head-nav a::after { transition: transform 260ms var(--ease-out); }
  .lead-contact svg, .room-gallery-action svg { transition: transform 260ms var(--ease-out); }
  .lead-contact:hover svg, .room--gallery > a:hover .room-gallery-action svg { transform: translateX(3px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .room-film { display: none; }
}
