/* page-experiences-workshops.css — the Tea house page (WP-15, the her-site wave stage 2;
   brief § 5.4 "the doorway"). Body: src/components/pages/TeaHouse.astro. Every class here
   starts .th-; the parts (Photo, StoryCard, SectionHead, FaqList, EnquireBand) keep their
   own look and are only placed from here. Tokens only: no colour, face or size is declared
   in this file that chishan.css does not name. */

/* Chinese headings, ledes and one-line texts break at her punctuation, never inside a
   word (栖山 was split across two lines in the doorway's lede at 1024). keep-all leaves
   the breaks after ，、。 and spaces; overflow-wrap still breaks a clause too long for the
   line. A paragraph read at length (an FAQ answer) keeps ordinary Chinese breaking. */
:is(.th-door-sec, .th-fmt-sec, .th-past-sec, .th-faq-sec) :is(h1, h2, h3, .label, .lede, .faq-q-text, .story-summary, .th-fmt-line):lang(zh) {
  word-break: keep-all; overflow-wrap: anywhere;
}

/* ============================================================
   1 · THE DOORWAY — the room stands tall at the left like an open door; the headline
   in the space beside it; the two moments low, their feet on the room's line.
   ============================================================ */
.th-door-sec { padding-top: var(--s-8); }

.th-door {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: auto auto;
  column-gap: var(--grid-gap);
}
.th-pic { margin: 0; min-width: 0; }
/* The room spans both rows. Its foot is set on the same line as the moments' feet; when
   the headline is short the rows grow to the room, and the copy stays at the top. */
.th-pic--room { grid-column: 1 / span 4; grid-row: 1 / span 2; align-self: end; }
.th-copy { grid-column: 5 / -1; grid-row: 1; align-self: start; min-width: 0; padding-bottom: var(--s-5); }
.th-pic--a { grid-column: 5 / span 4; grid-row: 2; align-self: end; }
.th-pic--b { grid-column: 9 / span 4; grid-row: 2; align-self: end; }

.th-label { margin-bottom: var(--s-4); }
.th-title { max-width: 12em; }
:lang(zh) .th-title { max-width: none; }
/* The lede and her button share one line (brief § 5.4's drawing): the button at the
   lede's foot, on the right. */
.th-intro {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--s-6);
  margin-top: var(--s-5);
}
.th-lede { flex: 1 1 auto; max-width: var(--measure); text-wrap: pretty; }
.th-cta { flex: none; }

/* Both of her captions under each photo, on both pages: the four characters at the
   left (Noto Serif SC 500 17 px, tracking .14em), the English at the right in the
   label voice. */
.th-cap {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4);
  margin-top: var(--s-3);
}
.th-cap-zh {
  font-family: var(--cjk); font-size: 17px; font-weight: 500; line-height: 1.4;
  letter-spacing: .14em; color: var(--ink);
}
.th-cap-en {
  font-family: var(--label); font-size: var(--t-label); line-height: var(--lh-label);
  font-weight: 500; letter-spacing: var(--track-label); text-transform: uppercase;
  color: var(--ink-soft); text-align: right;
}

/* ============================================================
   2 · THE THREE FORMATS — three columns; her 一 二 三 drawn by the page (a counter in
   cjk-decimal, hidden from screen readers: the list itself says how many).
   ============================================================ */
/* A quieter interlude between the doorway and the gatherings: a step less air than a
   full section, so the band reads as the menu under the room, not a chapter of its own */
.th-fmt-sec { padding-block: clamp(var(--s-8), 6vw, var(--s-9)); }
.th-fmts {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--grid-gap);
  row-gap: var(--s-7);
  counter-reset: th-fmt;
}
.th-fmts--n1 { grid-template-columns: minmax(0, 1fr); max-width: 34em; }
.th-fmts--n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.th-fmt {
  counter-increment: th-fmt;
  min-width: 0;
  padding-top: var(--s-5);
  border-top: 1px solid var(--line-strong);
}
.th-fmt::before {
  content: counter(th-fmt, cjk-decimal);
  content: counter(th-fmt, cjk-decimal) / "";
  display: block;
  font-family: var(--cjk); font-size: 40px; font-weight: 500; line-height: 1;
  color: var(--moss);
  margin-bottom: var(--s-5);
}
.th-fmt-name {
  font-size: var(--t-h3); line-height: var(--lh-h3); font-weight: var(--w-h3);
  letter-spacing: 0; color: var(--ink);
}
.th-fmt-status { margin-top: var(--s-2); }
.th-fmt-line { margin-top: var(--s-3); max-width: var(--measure); color: var(--ink); text-wrap: pretty; }

/* ============================================================
   3 · PAST GATHERINGS — the flowers tall at columns 1–4 (2/3), the rock tea wide at
   columns 6–10 (3/2). The section's head stands in the space beside the flowers and the
   rock tea sits under it, its foot on the flowers' line: the doorway's rhyme, quieter.
   ============================================================ */
/* Three rows: the head, the photographs, the words. Each tile takes the rows it spans
   as a subgrid, so the two PHOTOGRAPHS' feet sit on one line (stage-2 check finding
   15: with the whole cards aligned, the flowers' two-line text lifted its photo about
   28 px above the rock tea's) and the two texts start on one line under them. Where
   subgrid is not supported a tile is a plain stack: photo, then words. */
.th-past {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: auto auto auto;
  column-gap: var(--grid-gap);
  row-gap: 0;
}
/* The head takes the rock tea's five columns (the shine pass, 2026-11-20): at 6–12 its
   lede ran two columns past the photograph under it, so the photo read as stopping
   short. The photo cannot widen instead: her file is 800 px, drawn no wider than 600. */
.th-past-head { grid-column: 6 / span 5; grid-row: 1; align-self: start; max-width: none; margin-bottom: var(--s-6); }
.th-tile--tall, .th-tile--wide { display: grid; grid-template-rows: subgrid; row-gap: 0; }
.th-tile--tall { grid-column: 1 / span 4; grid-row: 1 / span 3; }
.th-tile--tall > .story-media { grid-row: 1 / span 2; align-self: end; }
.th-tile--tall > .story-body { grid-row: 3; }
.th-tile--wide { grid-column: 6 / span 5; grid-row: 2 / span 2; }
.th-tile--wide > .story-media { grid-row: 1; align-self: end; }
.th-tile--wide > .story-body { grid-row: 2; }
.th-tile--more { grid-column: span 5; margin-top: var(--s-8); }
/* Without the tall tile the head takes the row and the tiles follow under it. */
.th-past:not(:has(.th-tile--tall)) .th-past-head { grid-column: 1 / span 7; }
.th-past:not(:has(.th-tile--tall)) .th-tile--wide { grid-column: 1 / span 5; }

/* ============================================================
   4 · QUESTIONS — the heading block at columns 1–4, the list at 6–12 (brief § 4.8).
   ============================================================ */
.th-faq {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--grid-gap);
  align-items: start;
}
.th-faq-head { grid-column: 1 / span 4; max-width: none; margin-bottom: 0; }
.th-faq-list { grid-column: 6 / -1; }

/* ============================================================
   Between the phone and the full grid (761–1079): the room and the headline side by
   side at six columns each, the two moments under them.
   ============================================================ */
@media (max-width: 1079px) {
  .th-pic--room { grid-column: 1 / span 6; grid-row: 1; align-self: start; }
  .th-copy { grid-column: 7 / -1; grid-row: 1; align-self: center; padding-bottom: 0; }
  .th-pic--a { grid-column: 1 / span 6; grid-row: 2; margin-top: var(--s-7); }
  .th-pic--b { grid-column: 7 / span 6; grid-row: 2; margin-top: var(--s-7); }
  .th-intro { flex-direction: column; align-items: flex-start; gap: var(--s-5); }
  .th-fmts { column-gap: var(--s-5); }
  /* The head across the top; under it the flowers (five columns) and the rock tea (seven),
     their photographs' feet on one line, their words starting on one line. */
  .th-past-head { grid-column: 1 / -1; }
  .th-tile--tall { grid-column: 1 / span 5; grid-row: 2 / span 2; }
  .th-tile--tall > .story-media { grid-row: 1; }
  .th-tile--tall > .story-body { grid-row: 2; }
  .th-tile--wide { grid-column: 6 / -1; grid-row: 2 / span 2; }
  .th-tile--more { grid-column: span 6; }
  /* The questions take eight columns, so at 768 each stays on one line (at six they broke
     to two: "How are dietary / needs handled?") */
  .th-faq-head { grid-column: 1 / span 4; }
  .th-faq-list { grid-column: 5 / -1; }
}

/* ============================================================
   The phone (≤ 760): the room first, edge to edge at 4/3; then the label, h1, lede and
   button; then the two moments stacked, each with its two-language caption.
   ============================================================ */
@media (max-width: 760px) {
  .th-door-sec { padding-top: 0; }
  .th-door { display: block; }
  .th-pic--room .th-photo { margin-inline: calc(-1 * var(--gutter)); }
  /* Edge to edge, the ring 3 px outside the well falls off the screen: Photo's own
     ring inside the well shows instead (parts-offer.css .photo-zoom::after). */
  .th-copy { padding-top: var(--s-6); }
  .th-title { max-width: none; }
  .th-cta { width: 100%; }
  .th-pic--a, .th-pic--b { margin-top: var(--s-7); }
  .th-pic--a { margin-top: var(--s-8); }

  .th-fmts, .th-fmts--n2 { grid-template-columns: minmax(0, 1fr); row-gap: var(--s-6); }
  .th-fmt { display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: var(--s-4); }
  .th-fmt::before { grid-row: 1 / span 3; font-size: 32px; margin-bottom: 0; }
  .th-fmt-name, .th-fmt-status, .th-fmt-line { grid-column: 2; }

  .th-past, .th-tile--tall, .th-tile--wide { display: block; }
  .th-past-head { margin-bottom: var(--s-7); }
  .th-tile + .th-tile { margin-top: var(--s-8); }

  .th-faq { display: block; }
  .th-faq-head { margin-bottom: var(--s-6); }
}

/* ============================================================
   PAPER & SEAL, FINISHED — the direction study (2026-11-20)
   The three ways to sit, set as her second printed card sets her offerings: centred, the
   names in spaced serif capitals, her 一 二 三 above them, and her brush 山 — cut from her own
   file — standing pale behind them. The page's one motif.
   ============================================================ */
.th-fmt-sec { position: relative; overflow: hidden; isolation: isolate; padding-block: clamp(var(--s-8), 8vw, 136px); }
.th-fmt-sec > .wrap { position: relative; z-index: 1; }
.th-ghost {
  position: absolute; z-index: 0; pointer-events: none;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  height: 128%; aspect-ratio: 306 / 384;
  background: url(/brand/brush-shan.webp) center / contain no-repeat;
  opacity: .05;
}
.th-fmts { text-align: center; column-gap: var(--s-7); }
.th-fmt { border-top: 0; padding-top: 0; display: flex; flex-direction: column; align-items: center; }
.th-fmt + .th-fmt { border-left: 1px solid var(--line); }
.th-fmt::before { font-weight: 400; font-size: 34px; margin-bottom: var(--s-4); }
.th-fmt-name {
  font-family: var(--display); font-weight: 500; font-size: clamp(20px, 1.75vw, 25px); line-height: 1.25;
  letter-spacing: .14em; text-transform: uppercase;
}
.th-fmt-name:lang(zh) { font-family: var(--cjk); letter-spacing: .2em; font-size: clamp(20px, 1.7vw, 24px); }
.th-fmt-name .name-link { text-decoration: underline; text-decoration-color: var(--line-strong); text-decoration-thickness: 1px; text-underline-offset: 8px; }
.th-fmt-name .name-link:hover { text-decoration-color: var(--ink); }
.th-fmt-line { margin-top: var(--s-4); max-width: 22em; font-style: italic; color: var(--ink-soft); }
.th-fmt-line:lang(zh) { font-style: normal; }
.th-title { font-weight: 400; }
.th-label { display: flex; align-items: center; gap: 14px; }
.th-label::before { content: ""; flex: none; width: 38px; height: 1px; background: var(--line-strong); }
.th-cap-zh { color: var(--moss); }
.th-cap-en { color: var(--pine); }
@media (max-width: 760px) {
  .th-ghost { height: 90%; }
  .th-fmts, .th-fmts--n2 { row-gap: var(--s-7); }
  .th-fmt { display: flex; }
  .th-fmt + .th-fmt { border-left: 0; border-top: 1px solid var(--line); padding-top: var(--s-7); }
  .th-fmt::before { font-size: 30px; margin-bottom: var(--s-3); }
}

/* ============================================================
   THE MELD (dir/meld, 2026-11-21): her characters in practice squares
   ============================================================ */
/* Her four characters under each photograph, each in its square; the English at the right */
/* …from 761 px up. On a phone the captions keep their plain setting (Wilson 2026-11-21:
   "keep the before for teahouse-th-door-sec-phone as well for now"). */
.th-cap-plain { display: none; }
.th-cap-zh.zg { --zg-room: 200px; letter-spacing: 0; font-weight: 400; }
@media (min-width: 761px) { .th-cap { align-items: center; margin-top: var(--s-4); } }
@media (max-width: 760px) {
  .th-cap .th-cap-zh.zg { display: none; }
  .th-cap-plain { display: inline; }
}
/* Each format's Chinese name in squares under its name; on the Chinese page the squares are
   the name and the English is its gloss */
.th-fmt-zg { display: block; margin-top: var(--s-3); --zg-room: 26vw; }
.th-fmt-name:lang(zh) .zg { --zg-max: 44px; --zg-room: 26vw; }
.th-fmt-gloss { display: block; margin-top: var(--s-3); }
/* The formats are centred in this look, so their squares are too */
.th-fmt-name .zg-cells { margin-inline: auto; }
/* On a phone the formats keep their plain setting, no squares (Wilson 2026-11-21: "as well as
   teahousethfmtsecphone"). */
.th-fmt-plain { display: none; }
@media (max-width: 760px) {
  .th-fmt-name .zg, .th-fmt-name .th-fmt-gloss { display: none; }
  .th-fmt-plain { display: inline; }
}
