/* Hallmark · checked: 2026-11-20 · genre: editorial (inferred) · surface: absolute
 * floor: see .hallmark/after.txt · fixed: 4, 9, 10, 26, 34, 48
 * built: the project (cinematic-ui) · redesign: polish · v2.0.0 */
/* Hallmark · waive 7b · the film's ground is pure white by the brand rule · the association's VIS allows only the logo green and white */
/*
  台灣社會農業學會 · 首頁（Kiarostami《何處是我朋友的家》的之字形小路）
  Palette: the logo green and white only. Type: Noto Serif TC Bold for titles, Noto Sans TC for everything else.
  Layout: long-shot frames on a dry-earth ground; one hand-drawn path is the lead and rides through every
  pinned scene; reading scenes are pages of a field work log.
  No colour grade: photographs keep their own colour (2026-11-20; the earlier grade washed them to white).
*/
:root {
  --green: #2b440c;       /* the logo's ink green */
  --white: #ffffff;
  --ground: var(--white);
  --sheet: var(--white);
  --ink: var(--green);
  --ink-2: color-mix(in srgb, var(--green) 78%, var(--white));
  --rule: color-mix(in srgb, var(--green) 22%, var(--white));
  --trail: color-mix(in srgb, var(--green) 30%, var(--white));   /* the path not yet walked */
  --accent: var(--green);
  --on-accent: var(--white);
  --display: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --text: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --pad: max(22px, 5vmin);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { background: var(--ground); scroll-padding-top: 96px; overflow-x: clip; }
a, button { scroll-margin-top: 110px; scroll-margin-bottom: 60px; }
body { overflow-x: clip; caret-color: var(--ink); background: var(--ground); color: var(--ink); font: 400 1.0625rem/1.85 var(--text); -webkit-font-smoothing: antialiased; }
::selection { background: var(--accent); color: var(--on-accent); }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; line-height: 1.25; letter-spacing: 0;
  word-break: keep-all; line-break: strict; text-wrap: balance; font-feature-settings: "halt" 1; }
p { margin: 0.5em 0; max-width: 34em; text-wrap: pretty; }
.ph { display: inline-block; }
.eyebrow { display: block; font-size: 0.9rem; font-weight: 500; color: var(--ink-2); margin-bottom: 1em; }
[hidden] { display: none !important; }

/* The switch device: a word that sits on the path. A short hand-drawn stroke runs under it. */
.route { background: linear-gradient(transparent 82%, color-mix(in srgb, var(--accent) 70%, transparent) 82% 92%, transparent 92%) no-repeat;
  background-size: 100% 100%; padding: 0 0.08em; }

.skip { position: fixed; left: 12px; top: -80px; z-index: 30; background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: 4px; }
.skip:focus { top: 12px; }

/* ---------- chrome ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: var(--ground); z-index: 25; }
.chrome { position: fixed; top: env(safe-area-inset-top, 0px); left: 0; right: 0; z-index: 20; display: flex; align-items: center; gap: 2vw;
  padding: 14px max(var(--pad), env(safe-area-inset-right, 0px)) 14px max(var(--pad), env(safe-area-inset-left, 0px));
  background: color-mix(in srgb, var(--ground) 92%, transparent); border-bottom: 1px solid var(--rule); }
.chrome .mark img { height: 28px; width: auto; }
.menu { display: flex; gap: 1.8em; margin-left: auto; font-size: 0.92rem; font-weight: 500; letter-spacing: 0; }
.menu .lang { font-weight: 700; border-bottom: 1px solid var(--ink); padding: 10px 0 2px; }
.menu a { color: var(--ink); text-decoration: none; padding: 10px 0; }
.menu a:hover { text-decoration: underline; }

/* The door: tall, narrow, olive. On hover it is pushed open a few degrees, as by a draft. */
.door { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 26px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--on-accent); text-decoration: none; font-weight: 700; letter-spacing: 0;
  transform-origin: 0 50%; transform: perspective(500px) rotateY(0deg); transition: transform 0.35s cubic-bezier(.2,.7,.2,1), background-color 0.15s, color 0.15s; }
.door:hover { background: var(--white); color: var(--accent); transform: perspective(500px) rotateY(-14deg); }
.door.big { min-height: 68px; padding: 0 44px; font-size: 1.15rem; }
.quiet { color: var(--ink); margin-left: 1.6em; font-weight: 700; letter-spacing: 0; }
.billing { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6em 0; margin-top: 1.6em; }

/* instruments */
.log-page { position: fixed; left: max(var(--pad), env(safe-area-inset-left, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 15;
  font-size: 0.78rem; letter-spacing: 0; color: var(--ink-2); }
.log-page .tab { font-variant-numeric: tabular-nums; }
.minimap { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); top: 50%; width: 22px; height: 66px; transform: translateY(-50%); z-index: 15; overflow: visible; }
.minimap path { fill: none; stroke: var(--trail); stroke-width: 2; }
.minimap circle { fill: var(--accent); }

/* ---------- scenes ---------- */
.arrival { --length: 190; }   /* a held long take (data-hold): only the path moves */
.apart   { --length: 270; }   /* hold 70vh after the door cut is paid for */
.turn    { --length: 280; --cut: 100; }
.climb   { --length: 540; }
.ending  { --length: 200; }

[data-scene] > .frame { padding: calc(84px + env(safe-area-inset-top, 0px)) var(--pad) calc(6vmin + var(--safe-bottom)); }
.frame { isolation: isolate; }

/* The path: every pinned frame carries its own stretch of it (so the accessible stills keep the lead). */
svg.path { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 2; }
svg.path path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
svg.path .trail { stroke: var(--trail); stroke-width: 2; stroke-dasharray: 2 7; }
svg.path .walked { stroke: var(--accent); stroke-width: 3; }
svg.path .walker { fill: var(--accent); }

/* 1 · arrival */
.arrival .frame { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr); grid-template-rows: 1fr auto; column-gap: 5vw; align-items: start; }
.title-block { grid-column: 1; grid-row: 1; align-self: start; padding-top: 3vh; position: relative; z-index: 3; }
.arrival h1 { font-size: clamp(2.4rem, 5.2vw, 5.4rem); line-height: 1.2; letter-spacing: -0.01em; color: var(--accent); }
.lede { color: var(--ink); font-size: 1.12rem; font-weight: 300; }
.long-shot { grid-column: 2; grid-row: 1 / span 2; align-self: end; margin: 0; position: relative; z-index: 1; }
.long-shot img { width: 100%; aspect-ratio: 864 / 330; object-fit: cover; object-position: 50% 0%; }
figcaption { font-size: 0.72rem; letter-spacing: 0; color: var(--ink-2); margin-top: 8px; }

/* 2 · apart */
.apart .frame { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto 1fr auto; column-gap: 14vw; }
.bank { position: relative; z-index: 3; max-width: 26em; }
.bank.left { grid-column: 1; grid-row: 1; padding-top: 8vh; }
.bank.right { grid-column: 2; grid-row: 1; padding-top: 22vh; justify-self: end; text-align: right; }
.bank.right p { margin-left: auto; }
.bank h2 { font-size: clamp(1.8rem, 3.6vw, 3.6rem); }
.bank p:not(.eyebrow) { color: var(--ink-2); }
.verdict { grid-column: 1 / -1; grid-row: 3; justify-self: center; text-align: center; max-width: 22em; font-family: var(--display); font-weight: 700;
  font-size: clamp(1.4rem, 2.8vw, 2.6rem); line-height: 1.4; margin-bottom: 6vh; position: relative; z-index: 3; }

/* 3 · turn */
.turn .frame { background: var(--ground); display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); column-gap: 5vw; align-items: center; }
.turn-copy { position: relative; z-index: 3; }
.turn-copy h2 { font-size: clamp(1.9rem, 4vw, 4rem); }
.turn-copy p:not(.eyebrow) { color: var(--ink-2); }
.quiet-note { font-size: 0.9rem; }
.doorway { margin: 0; position: relative; z-index: 1; }
.doorway img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: 60% 10%; }
/* the door leaf that the wind pushes open: it carries the previous scene's ground */
.turn .leaf { --shade: 1; position: absolute; inset: 0; z-index: 6; pointer-events: none;
  background: linear-gradient(90deg, color-mix(in srgb, var(--green) calc(var(--shade) * 14%), var(--white)), var(--white));
  border-right: 2px solid var(--green);
  transform-origin: 0 50%; transform: perspective(1400px) rotateY(96deg); }

/* 4 · climb */
.climb .frame { display: grid; grid-template-rows: auto 1fr auto; }
.climb-head { position: relative; z-index: 3; max-width: 30em; }
.climb-head h2 { font-size: clamp(1.8rem, 3.6vw, 3.6rem); }
.hint { color: var(--ink-2); font-size: 0.92rem; }
.turns { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.turns li { position: absolute; transform: translate(-50%, -100%); pointer-events: auto; }
.turns button { font: inherit; text-align: left; cursor: pointer; display: grid; gap: 2px; width: min(15rem, 40vw); padding: 10px 12px 12px;
  background: var(--sheet); color: var(--ink); border: 0; border-top: 1px solid var(--ink); border-radius: 0; }
.turns button .n { font-size: 0.72rem; letter-spacing: 0; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.turns button b { font-family: var(--display); font-weight: 700; font-size: 1.25rem; }
.turns button .d { font-size: 0.86rem; color: var(--ink-2); line-height: 1.6; }
.turns button:hover { outline: 1px solid var(--accent); }
.turns button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.turns button[aria-pressed="true"] .n, .turns button[aria-pressed="true"] .d { color: color-mix(in srgb, var(--on-accent) 80%, transparent); }
.choice { grid-row: 3; position: relative; z-index: 3; min-height: 1.8em; color: var(--accent); font-weight: 500; }

/* 5–7 · the work log */
.doc .frame { padding: 10vh var(--pad); }
.sheet { max-width: 64rem; margin: 0 auto; background: var(--sheet); padding: clamp(24px, 5vw, 56px) 0; border-top: 1px solid var(--ink); }
.sheet h2 { font-size: clamp(1.9rem, 3.6vw, 3.4rem); margin-bottom: 0.5em; }
.log { width: 100%; border-collapse: collapse; margin: 1.4em 0; background: var(--sheet); }
.log th { white-space: nowrap; text-align: left; font-weight: 700; font-size: 0.78rem; letter-spacing: 0; color: var(--ink); border-bottom: 1px solid var(--ink); padding: 8px 10px 8px 0; }
.log td { border-bottom: 1px solid var(--rule); padding: 18px 10px 18px 0; vertical-align: top; }
.log td b { display: block; font-family: var(--display); font-weight: 700; font-size: 1.3rem; }
.log td span { color: var(--ink-2); font-size: 0.94rem; }
.log td.num { font-variant-numeric: tabular-nums; font-weight: 100; font-size: 1.6rem; white-space: nowrap; width: 1%; padding-right: 28px; }
.log.dated td.num { font-weight: 700; font-size: 0.95rem; }
.log a, .log.dated td:last-child { white-space: nowrap; }
.insert { margin: 2em 0 0; max-width: 34rem; }
.insert img { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; object-position: 50% 38%; }
.sdg-row { list-style: none; padding: 0; margin: 1.6em 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 14px; }
.sdg-row li { display: grid; gap: 6px; font-size: 0.86rem; color: var(--ink-2); }
.sdg-row img { background: var(--white); padding: 6px; border: 1px solid var(--rule); }
.fine { font-size: 0.8rem; color: var(--ink-2); max-width: 60em; }

/* 8 · ending */
.ending .frame { display: grid; align-content: center; justify-items: start; }
.end-copy { position: relative; z-index: 3; margin-left: 8vw; }
.end-copy h2 { font-size: clamp(2.2rem, 5vw, 5.2rem); line-height: 1.12; letter-spacing: -0.01em; color: var(--accent); }
.carry { color: var(--ink-2); }

/* end credits */
.credits { max-width: 40rem; margin: 0 auto; padding: 12vh var(--pad) calc(10vh + env(safe-area-inset-bottom, 0px)); text-align: center; font-size: 0.86rem; color: var(--ink-2); }
.credits p { margin: 0.3em auto; }
.credit-lead { font-family: var(--display); font-weight: 700; font-size: 1.7rem; line-height: 1.3; color: var(--ink); }
.credit-sub { letter-spacing: 0; font-size: 0.85rem; }
.credits nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin: 1.4em 0; }
.credits .smallest { font-size: 0.72rem; opacity: 0.85; margin-top: 2em; }
.route-small { width: 120px; height: 60px; margin: 0 auto 1.6em; display: block; overflow: visible; }
.route-small path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.route-small .trail { stroke: var(--trail); stroke-width: 2; stroke-dasharray: 2 5; }
.route-small .walked { stroke: var(--accent); stroke-width: 2.5; }
.credits .social { margin-top: 1.4em; }
.credits a { font-weight: 500; }

/* reading scene: cards, facts */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 36px 32px; margin: 1.6em 0; }
.cards .item { border-top: 1px solid var(--ink); padding-top: 16px; }
.cards .item h3 { font-size: 1.3rem; font-weight: 700; line-height: 1.35; margin: 4px 0 8px; letter-spacing: 0; }
.cards .item h3 a { color: inherit; text-decoration: none; }
.cards .item h3 a:hover { text-decoration: underline; }
.cards .item p { color: var(--ink-2); font-size: 0.95rem; margin: 0; }
.cards .meta { font-size: 0.75rem; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.more { font-weight: 700; letter-spacing: 0; max-width: none; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 28px; margin: 3.4em 0 1.6em; }
.facts .fact { margin: 0; border-top: 1px solid var(--ink); padding-top: 12px; }
.facts .fact b { display: block; font-size: clamp(3.4rem, 7vw, 6rem); line-height: 1; font-weight: 100; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.facts .fact span { display: block; margin-top: 8px; color: var(--ink-2); font-size: 0.9rem; }
.m-menu { display: none; margin-left: 12px; }
.m-menu summary { list-style: none; cursor: pointer; font-weight: 700; letter-spacing: 0; font-size: 0.85rem; border: 1px solid var(--ink); padding: 9px 14px; }
.m-menu summary::-webkit-details-marker { display: none; }
.m-menu nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--ink); padding: 8px var(--pad) 18px; display: grid; }
.m-menu nav a { padding: 13px 0; color: var(--ink); text-decoration: none; font-size: 1.05rem; font-weight: 500; border-bottom: 1px solid var(--rule); }

/* ---------- the phone's own cut ---------- */
@media (max-width: 760px) {
  .menu { display: none; }
  .m-menu { display: block; margin-left: auto; }
  .chrome .door { margin-left: 10px; }
  .chrome .mark img { height: 22px; }
  .door { min-height: 40px; padding: 0 14px; font-size: 0.9rem; }
  .arrival { --length: 170; }
  .apart { --length: 260; }
  .climb { --length: 620; }
  .arrival .frame { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .long-shot { grid-column: 1; grid-row: 2; align-self: end; margin-bottom: 4vh; }
  .long-shot img { aspect-ratio: 4 / 3; object-position: 52% 0%; }
  .apart .frame { grid-template-columns: minmax(0, 1fr); column-gap: 0; }
  .bank.left { grid-column: 1; padding-top: 2vh; }
  .bank.right { grid-column: 1; grid-row: 2; padding-top: 6vh; }
  .verdict { margin-bottom: 4vh; }
  .turn .frame { grid-template-columns: minmax(0, 1fr); align-content: center; row-gap: 3vh; }
  .doorway img { aspect-ratio: 16 / 9; }
  .turns button { width: min(12.5rem, 46vw); padding: 8px 10px; }
  .turns button .d { display: none; }
  .end-copy { margin-left: 0; }
  .minimap, .log-page { display: none; }
  .log td span { display: block; }
}

/* the accessible cut keeps the look; it only drops motion */
.reduced-motion .turn .leaf { display: none; }
@media (prefers-reduced-motion: reduce) { .door { transition: none; } }


/* Hallmark polish 2026-11-20: labels untracked (gate 67); folded eyebrows read as a plain line under their heading (gate 54) */
.eyebrow, .menu, .door, .log th, .credit-sub, .log-page, .turns button .n, .cards .meta, .quiet, .more, .m-menu summary { letter-spacing: 0; text-transform: none; }
.label { margin: 10px 0 0; font-size: 0.92rem; font-weight: 500; color: var(--ink-2); }
.cards .meta { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 10px; }
.credits .social { display: flex; justify-content: center; gap: 18px; }
.door:active, .turns button:active, .m-menu summary:active { transform: translateY(1px); }
button:disabled { cursor: not-allowed; color: var(--ink-2); }
