/* memorial-video.design — one stylesheet, no build step. */

:root {
  --night: #0b0d11;
  --night-2: #0f1217;
  --night-3: #161a21;
  --fg-d: #ece6dc;
  --fg-d-soft: rgba(236, 230, 220, 0.72);
  --fg-d-faint: rgba(236, 230, 220, 0.72);
  --line-d: rgba(236, 230, 220, 0.14);

  --paper: #f3eee5;
  --paper-2: #ebe4d7;
  --paper-3: #fbf8f2;
  --ink: #1b1a19;
  --ink-soft: #57534d;
  --line-l: rgba(27, 26, 25, 0.14);

  --ember: #e3a46c;
  --ember-ink: #94552a;

  --err: #8f2f26;

  /* zh body text uses the system CJK sans (no download); only the serif is self-hosted, subset at build. */
  --serif: "Noto Serif TC", "Songti TC", "Noto Serif CJK TC", "PMingLiU", serif;
  --sans: "PingFang TC", "Heiti TC", "Microsoft JhengHei", "Noto Sans TC", "Noto Sans CJK TC", system-ui, sans-serif;
  --latin: "Cormorant Garamond", "Cormorant Garamond Fallback", "Noto Serif TC", serif;

  --gutter: clamp(20px, 5vw, 72px);
  --max: 1320px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --hdr: 72px;

  --fs-body: 1.125rem;
  --lh-body: 1.85;
  --fs-h1: clamp(2.45rem, 1.3rem + 3.3vw, 4.5rem);
  --lh-h1: 1.3;
  --ls-h: 0.04em;
  --fs-h2: clamp(1.85rem, 1.2rem + 2vw, 3.1rem);
  --lh-h2: 1.38;
  --fs-h3: 1.3rem;
  --w-h: 500;
}

.lang-en {
  --serif: "Cormorant Garamond", "Cormorant Garamond Fallback", "Noto Serif TC", serif;
  --sans: "Instrument Sans", "Instrument Sans Fallback", system-ui, sans-serif;
  --lh-body: 1.65;
  --fs-h1: clamp(2.9rem, 1.4rem + 4.6vw, 6.1rem);
  --lh-h1: 1.02;
  --ls-h: -0.01em;
  --fs-h2: clamp(2.3rem, 1.3rem + 3vw, 4.3rem);
  --lh-h2: 1.05;
  --fs-h3: 1.6rem;
  --w-h: 400;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
@view-transition {
  navigation: auto;
}
html {
  interpolate-size: allow-keywords;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--hdr) + 12px);
}
body {
  margin: 0;
  background: var(--night);
  color: var(--fg-d);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: lining-nums;
  overflow-x: clip;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
img {
  display: block;
  max-width: 100%;
}
h1,
h2,
h3,
p,
ul,
ol,
figure,
blockquote {
  margin: 0;
  padding: 0;
}
ul,
ol {
  list-style: none;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
textarea {
  font: inherit;
  color: inherit;
}
h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: var(--w-h);
  letter-spacing: var(--ls-h);
  text-wrap: balance;
}
p {
  text-wrap: pretty;
}
::selection {
  background: var(--ember);
  color: var(--night);
}
:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
  border-radius: 4px;
}
[data-theme="light"] :focus-visible {
  outline-color: var(--ember-ink);
}

.skip {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--paper);
  color: var(--ink);
  border-radius: 8px;
}
.skip:focus {
  top: 16px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- shared bits ---------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.875rem;
  letter-spacing: 0.24em;
  color: var(--ember);
  margin-bottom: 28px;
}
.nw {
  white-space: nowrap;
}
.lat {
  letter-spacing: 0.04em;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}
.lang-en .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
}
[data-theme="light"] .eyebrow {
  color: var(--ember-ink);
}

.btn {
  --bg: var(--paper);
  --fg: var(--night);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7em;
  height: 58px;
  padding: 0 30px;
  border: 0;
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition:
    color 0.5s var(--ease),
    transform 0.3s var(--ease);
}
/* fill wipes in left to right, like a film wipe */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ember);
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.6s var(--ease);
}
.btn:focus-visible::before {
  clip-path: inset(0);
}
.btn:active {
  transform: scale(0.98);
}
.btn__arrow {
  display: inline-block;
  transition:
    transform 0.5s var(--ease),
    opacity 0.3s;
}
.btn:focus-visible .btn__arrow {
  transform: translateX(4px);
}
@media (hover: hover) {
  .btn:hover::before {
    clip-path: inset(0);
  }
  .btn:hover .btn__arrow {
    transform: translateX(4px);
  }
}
.btn--sm {
  height: 44px;
  padding: 0 18px;
  font-size: 0.9rem;
}
.btn--block {
  width: 100%;
}
[data-theme="light"] .btn {
  --bg: var(--ink);
  --fg: var(--paper);
}
[data-theme="light"] .btn:focus-visible {
  color: var(--night);
}
@media (hover: hover) {
  [data-theme="light"] .btn:hover {
    color: var(--night);
  }
}

.link {
  position: relative;
  padding: 6px 0;
  color: var(--fg-d-soft);
  transition: color 0.4s;
}
.link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 1px;
  background: currentColor;
  transform-origin: right;
  transform: scaleX(0.35);
  transition: transform 0.6s var(--ease);
}
.link:focus-visible {
  color: var(--fg-d);
}
.link:focus-visible::after {
  transform-origin: left;
  transform: scaleX(1);
}
@media (hover: hover) {
  .link:hover {
    color: var(--fg-d);
  }
  .link:hover::after {
    transform-origin: left;
    transform: scaleX(1);
  }
}
[data-theme="light"] .link {
  color: var(--ink-soft);
}
[data-theme="light"] .link:focus-visible,
[data-theme="light"] .link:hover {
  color: var(--ink);
}

/* line-mask reveal for headings */
.ln {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}
.ln > span {
  display: inline-block;
}
html.js [data-split] .ln > span {
  transform: translateY(108%);
  transition: transform 1.3s var(--ease) calc(var(--i, 0) * 0.1s + var(--d, 0s));
}
html.js [data-split].is-in .ln > span {
  transform: none;
}
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 1.1s var(--ease) var(--d, 0s),
    transform 1.3s var(--ease) var(--d, 0s);
}
html.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}
/* Above the fold: move only, never hide (opacity 0 would delay first paint). */
html.js .hero [data-reveal] {
  opacity: 1;
}
html.js .hero [data-split] .ln {
  overflow: visible;
}
html.js .hero [data-split] .ln > span {
  transform: translateY(0.3em);
}

/* ---------- header ---------- */

.hdr {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--hdr);
  color: var(--fg-d);
  transition:
    background-color 0.5s,
    color 0.5s,
    box-shadow 0.5s,
    transform 0.6s var(--ease);
  animation: hdr-in 1s var(--ease) both;
}
@keyframes hdr-in {
  from {
    transform: translateY(-100%);
  }
}
.hdr.is-scrolled {
  background: rgba(11, 13, 17, 0.72);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 1px 0 var(--line-d);
}
.hdr.is-light {
  color: var(--ink);
}
.hdr.is-light.is-scrolled {
  background: rgba(243, 238, 229, 0.8);
  box-shadow: 0 1px 0 var(--line-l);
}
.hdr.is-hidden {
  transform: translateY(-100%);
}
.hdr:focus-within {
  transform: none;
}
.hdr__in {
  height: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: 32px;
}
.hdr__nav {
  display: flex;
  gap: 30px;
  margin-left: auto;
  font-size: 0.92rem;
}
.hdr__nav a {
  opacity: 0.72;
  transition: opacity 0.3s;
}
.hdr__nav a:hover,
.hdr__nav a:focus-visible {
  opacity: 1;
}
.hdr__end {
  display: flex;
  align-items: center;
  gap: 18px;
}
.hdr__lang {
  white-space: nowrap;
  font-size: 0.9rem;
  padding: 12px 6px;
  opacity: 0.8;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, opacity 0.3s;
}
.hdr__lang:hover,
.hdr__lang:focus-visible {
  opacity: 1;
  border-color: currentColor;
}
.hdr .btn {
  --bg: var(--fg-d);
  --fg: var(--night);
}
.hdr.is-light .btn {
  --bg: var(--ink);
  --fg: var(--paper);
}

.wm {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.wm__mark {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
}
.wm__mark circle {
  fill: var(--ember);
  stroke: none;
  clip-path: inset(0 0 50% 0);
}
.wm__text {
  font-family: var(--latin);
  font-size: 1.32rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.wm__text i,
.ftr__big i {
  font-style: normal;
  opacity: 0.6;
}
.wm__text em,
.ftr__big em {
  font-style: italic;
  font-weight: 400;
  opacity: 0.72;
}
.wm__sub {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  opacity: 0.75;
  padding-left: 12px;
  border-left: 1px solid currentColor;
  line-height: 1;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--hdr) + 48px) 0 96px;
  background:
    radial-gradient(70% 60% at 78% 78%, rgba(227, 164, 108, 0.12), transparent 70%),
    radial-gradient(60% 50% at 10% 0%, rgba(110, 140, 190, 0.08), transparent 70%),
    var(--night);
}
/* fade the hero glow out so it doesn't end in a hard line where .how starts */
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 200px;
  background: linear-gradient(transparent, var(--night));
  pointer-events: none;
}
.hero__in {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 88px);
  align-items: center;
}
.hero__vert {
  position: absolute;
  left: calc(var(--gutter) * 0.42);
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-family: "Noto Serif TC", serif;
  font-size: 0.82rem;
  letter-spacing: 0.9em;
  color: var(--fg-d-faint);
}
.hero__vert::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 64px;
  margin-top: 1.2em;
  background: currentColor;
}
.hero__h1 {
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  margin-bottom: 32px;
}
.lang-en .hero__h1 .ln:nth-child(2) {
  font-style: italic;
}
.hero__sub {
  max-width: 34em;
  color: var(--fg-d-soft);
  margin-bottom: 40px;
}
.lang-en .hero__sub {
  max-width: 30em;
}
.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 32px;
}
.hero__film {
  margin-right: calc(var(--gutter) * -1);
}
.hero__scroll {
  position: absolute;
  z-index: 1;
  left: calc(var(--gutter) * 0.42 + 0.4rem - 22px);
  bottom: 24px;
  width: 44px;
  height: 60px;
  clip-path: inset(4px 21.5px);
}
.hero__scroll::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: var(--line-d);
}
.hero__scroll span {
  position: absolute;
  left: 22px;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: var(--fg-d);
  animation: drip 2.6s var(--ease-io) infinite;
}
@keyframes drip {
  0% {
    transform: translateY(-100%);
  }
  60%,
  100% {
    transform: translateY(100%);
  }
}

/* ---------- film engine visuals ---------- */

.player__screen {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 3px 0 0 3px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 40px 120px -40px rgba(0, 0, 0, 0.9),
    0 30px 80px -50px rgba(227, 164, 108, 0.35);
}
.film {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #000;
}
.frame {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.5s var(--ease-io);
}
.frame--black {
  background: #000;
}
.frame.is-active {
  opacity: 1;
  z-index: 2;
}
.frame.is-leaving {
  opacity: 1;
  z-index: 1;
  transition: none;
}
.frame picture,
.frame img {
  width: 100%;
  height: 100%;
}
.frame img {
  object-fit: cover;
  transform: scale(1.06);
  will-change: transform;
}
.frame.is-active img,
.frame.is-leaving img {
  animation: kb-a var(--t, 8s) linear forwards;
}
.frame:nth-child(even).is-active img,
.frame:nth-child(even).is-leaving img {
  animation-name: kb-b;
}
.frame:nth-child(3n).is-active img,
.frame:nth-child(3n).is-leaving img {
  animation-name: kb-c;
}
@keyframes kb-a {
  from {
    transform: scale(1.04) translate3d(1.2%, 0.6%, 0);
  }
  to {
    transform: scale(1.14) translate3d(-1.4%, -0.8%, 0);
  }
}
@keyframes kb-b {
  from {
    transform: scale(1.15) translate3d(-1.2%, 0, 0);
  }
  to {
    transform: scale(1.05) translate3d(1%, 0.6%, 0);
  }
}
@keyframes kb-c {
  from {
    transform: scale(1.06) translate3d(0, 1.4%, 0);
  }
  to {
    transform: scale(1.12) translate3d(0, -1.2%, 0);
  }
}
.film.is-paused *,
.film.is-paused *::before,
.film.is-paused *::after {
  animation-play-state: paused !important;
}
.film__grain {
  position: absolute;
  inset: -50%;
  z-index: 5;
  pointer-events: none;
  opacity: 0.09;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 0.9s steps(5) infinite;
}
@keyframes grain {
  0% {
    transform: translate(0, 0);
  }
  20% {
    transform: translate(-3%, 2%);
  }
  40% {
    transform: translate(2%, -4%);
  }
  60% {
    transform: translate(-4%, -2%);
  }
  80% {
    transform: translate(3%, 3%);
  }
  100% {
    transform: translate(0, 0);
  }
}
.film__vignette {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(0, 0, 0, 0.5)),
    linear-gradient(transparent 60%, rgba(0, 0, 0, 0.35));
}

/* captions: each char/word fades up when its frame is active */
.cap {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  color: #f6f1e8;
  text-shadow: 0 1px 24px rgba(0, 0, 0, 0.35);
  font-family: var(--serif);
}
.cap .ch {
  display: inline-block;
  opacity: 0;
  filter: blur(8px);
  transform: translateY(0.25em);
  transition:
    opacity 1.2s var(--ease),
    filter 1.4s var(--ease),
    transform 1.4s var(--ease);
  transition-delay: 0s;
}
.frame.is-active .cap .ch {
  opacity: 1;
  filter: none;
  transform: none;
  transition-delay: calc(0.55s + var(--c, 0) * 0.07s);
}
.frame.is-leaving .cap .ch {
  transition-duration: 0.7s;
}

/* title card: vertical CJK, two columns */
.cap--title {
  display: flex;
  flex-direction: row-reverse;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(14px, 2vw, 28px);
  padding-bottom: 7%;
}
.cap--title::before,
.cap--ch::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}
.cap--title::before {
  inset: 14% 25% 0;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.5), transparent);
}
.cap--title p {
  writing-mode: vertical-rl;
}
/* Title card: the portrait stands as a whole print on the left, never cropped; the title sits in the black on the right. */
.frame--title img {
  object-fit: contain;
  object-position: 18% 50%;
}
.frame--title .cap--title {
  justify-content: center;
  align-items: center;
  padding: 0 2% 0 56%;
}
.frame--title .cap--title::before {
  display: none;
}
.lang-en .frame--title .cap--title {
  align-items: center;
  justify-content: center;
  padding: 0 4% 0 58%;
  text-align: center;
  line-height: 1.15;
}
.cap--title .cap__v {
  font-size: clamp(0.95rem, 1.9vw, 1.7rem);
  font-weight: 500;
  letter-spacing: 0.3em;
}
.cap--title .cap__y {
  white-space: nowrap;
  font-size: clamp(0.7rem, 1.1vw, 0.95rem);
  letter-spacing: 0.32em;
  opacity: 0.8;
}
.lang-en .cap--title {
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.7em;
  padding: 0 6% 12%;
}
.lang-en .cap--title::before {
  inset: 25% 8% 4%;
}
.lang-en .cap--title p {
  writing-mode: horizontal-tb;
}
.lang-en .cap--title .cap__v {
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.01em;
  font-size: clamp(1.25rem, 3vw, 2.7rem);
}
.lang-en .cap--title .cap__y {
  margin: 0;
  letter-spacing: 0.4em;
  font-family: var(--latin);
  font-size: clamp(0.7rem, 1.2vw, 1rem);
}
.cap--ch {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 0 7.5% 7.5%;
}
.cap--ch::before {
  inset: auto 0 0 0;
  height: 62%;
  background: radial-gradient(90% 100% at 0% 100%, rgba(0, 0, 0, 0.55), transparent 75%);
}
.cap--ch .cap__y {
  font-size: clamp(0.7rem, 1.05vw, 0.95rem);
  letter-spacing: 0.32em;
  opacity: 0.85;
  display: flex;
  align-items: center;
  gap: 0.9em;
}
.cap--ch .cap__y::after {
  content: "";
  height: 1px;
  width: 0;
  background: currentColor;
  opacity: 0.7;
  transition: width 1.6s var(--ease);
}
.frame.is-active .cap--ch .cap__y::after {
  width: 3.2em;
  transition-delay: 0.7s;
}
.cap--ch .cap__t {
  font-size: clamp(1.15rem, 2.4vw, 2.2rem);
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1.5;
}
.lang-en .cap--ch .cap__t {
  letter-spacing: 0;
  font-style: italic;
  font-size: clamp(1.3rem, 2.8vw, 2.6rem);
}
.cap--end {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.4em;
  text-align: center;
  color: #f6f1e8;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75), 0 0 24px rgba(0, 0, 0, 0.6);
  font-size: clamp(1rem, 2.1vw, 1.9rem);
  letter-spacing: 0.2em;
  padding-bottom: 12%;
}
/* End card: dim the photo so light text reads on any picture. */
.frame:has(.cap--end) img {
  filter: brightness(0.42);
}
.lang-en .cap--end {
  letter-spacing: 0.01em;
  font-style: italic;
  font-size: clamp(1.15rem, 2.5vw, 2.4rem);
}

.player__bar {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 10px 16px;
  padding: 16px var(--gutter) 0 0;
  font-size: 0.75rem;
  color: var(--fg-d-faint);
}
.player__btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-d);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s;
}
.player__btn:hover,
.player__btn:focus-visible {
  border-color: var(--fg-d-soft);
  background: rgba(255, 255, 255, 0.04);
}
[data-film-toggle] svg {
  width: 12px;
  height: 12px;
  fill: var(--fg-d);
}
[data-film-toggle] .i-play,
.is-stopped [data-film-toggle] .i-pause {
  display: none;
}
.is-stopped [data-film-toggle] .i-play {
  display: block;
}
/* small pause control on the direction films */
.film__btn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 7;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(11, 13, 17, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s;
}
.film__btn:hover,
.film__btn:focus-visible,
.is-stopped .film__btn {
  opacity: 1;
}
.player__tc {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: 0.08em;
  color: var(--fg-d-soft);
}
.player__segs {
  display: flex;
  gap: 4px;
}
.player__segs li {
  flex: var(--w, 1);
  position: relative;
  height: 2px;
  background: var(--line-d);
  border-radius: 2px;
}
.player__segs li::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--fg-d);
  transform-origin: left;
  transform: scaleX(0);
  border-radius: 2px;
}
.player__segs li.is-done::after {
  transform: scaleX(1);
}
.player__segs li.is-active::after {
  animation: fill var(--dur) linear forwards;
}
.player.is-paused .player__segs li.is-active::after {
  animation-play-state: paused;
}
@keyframes fill {
  to {
    transform: scaleX(1);
  }
}
.player__segs span {
  position: absolute;
  top: 9px;
  left: 0;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  white-space: nowrap;
  transition: color 0.4s;
}
.player__segs li.is-active span {
  color: var(--fg-d);
}
.player__note {
  grid-column: 1 / -1;
  margin-top: 18px;
  letter-spacing: 0.08em;
}

/* ---------- section headings ---------- */

section {
  position: relative;
}
.sec-h {
  margin-bottom: clamp(56px, 8vw, 104px);
}
.sec-h h2 {
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
}
.lang-en .sec-h h2 .ln:nth-child(2) {
  font-style: italic;
}
.sec-h--split {
  display: grid;
  grid-template-columns: 1fr minmax(0, 26em);
  gap: 32px 64px;
  align-items: end;
}
.sec-h__p {
  color: var(--fg-d-soft);
}

/* ---------- how ---------- */

.how {
  padding: clamp(48px, 7vw, 112px) 0 clamp(64px, 8vw, 120px);
  background: linear-gradient(var(--night), var(--night-2) 30%);
}
.how__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(40px, 6vw, 112px);
}
.how__stage {
  position: relative;
}
.stage {
  position: sticky;
  top: calc(50vh - min(32vh, 290px) + var(--hdr) / 2);
  height: min(64vh, 580px);
  border-radius: 18px;
  background:
    radial-gradient(80% 70% at 50% 100%, rgba(227, 164, 108, 0.08), transparent 70%),
    var(--night-3);
  box-shadow: inset 0 0 0 1px var(--line-d);
  overflow: hidden;
}
.how__steps {
  padding: 18vh 0 22vh;
}
/* Dim the text, never the step box: on mobile the steps are opaque sticky cards. */
.step {
  min-height: 52vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.step > * {
  opacity: 0.5;
  transition: opacity 0.8s var(--ease);
}
.step:not(.is-current) p {
  opacity: 0.72;
}
.step.is-current > * {
  opacity: 1;
}
/* Large step numerals, like scene slates: 壹貳參肆 (zh) / 01–04 (en). */
.step__n {
  font-family: var(--serif);
  font-size: clamp(3.4rem, 2rem + 4vw, 6rem);
  font-weight: 500;
  line-height: 1;
  color: var(--ember);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.lang-en .step__n {
  font-family: var(--latin);
  font-weight: 400;
  font-style: italic;
}
.step__n::after {
  content: "";
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 1s var(--ease);
}
.step.is-current .step__n::after {
  width: 56px;
}
.step h3 {
  font-size: clamp(1.45rem, 1.1rem + 1vw, 2rem);
  line-height: 1.4;
  margin-bottom: 16px;
}
.lang-en .step h3 {
  font-size: clamp(1.8rem, 1.3rem + 1.3vw, 2.5rem);
  line-height: 1.1;
}
.step p {
  color: var(--fg-d-soft);
  max-width: 26em;
}

/* stage scenes */
.scene {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(20px, 4vw, 48px);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.7s var(--ease),
    visibility 0s 0.7s;
}
[data-step="1"] .scene--1,
[data-step="2"] .scene--2,
[data-step="3"] .scene--3,
[data-step="4"] .scene--4 {
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.9s var(--ease) 0.15s,
    visibility 0s;
}

/* scene 1 — photos arriving */
.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(8px, 1.4vw, 18px);
  width: min(100%, 520px);
}
.tiles li {
  --r: -2deg;
  aspect-ratio: 4 / 3;
  padding: 5px;
  background: #f4efe6;
  border-radius: 2px;
  box-shadow: 0 18px 30px -18px rgba(0, 0, 0, 0.8);
  transform: translateY(-40px) rotate(calc(var(--r) * 3)) scale(0.96);
  opacity: 0;
  transition:
    transform 1.1s var(--ease),
    opacity 0.8s var(--ease);
}
.tiles li:nth-child(2n) {
  --r: 1.5deg;
}
.tiles li:nth-child(3n) {
  --r: -1deg;
}
.tiles li:nth-child(3) img {
  filter: saturate(0.55) brightness(0.9) sepia(0.15);
}
.tiles li picture,
.tiles li img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
[data-step="1"] .tiles li {
  transform: rotate(var(--r));
  opacity: 1;
  transition-delay: calc(0.2s + var(--i) * 0.16s);
}
.ups {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: clamp(20px, 3vw, 36px);
  font-size: 0.82rem;
}
.ups li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px 5px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px var(--line-d);
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
}
[data-step="1"] .ups li {
  opacity: 1;
  transform: none;
  transition-delay: calc(0.5s + var(--i) * 0.3s);
}
.av {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ember);
  color: var(--night);
  font-size: 0.72rem;
  font-weight: 500;
}
.count {
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--fg-d-soft);
}
.count b {
  font-family: var(--latin);
  font-weight: 500;
  font-size: 1.6rem;
  color: var(--fg-d);
  font-variant-numeric: lining-nums tabular-nums;
  vertical-align: -0.1em;
}

/* scene 2 — question card */
.qcard {
  width: min(100%, 500px);
  padding: clamp(22px, 3vw, 36px);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 0 0 1px var(--line-d), 0 30px 60px -30px rgba(0, 0, 0, 0.7);
  transform: translateY(16px);
  transition: transform 1s var(--ease);
}
[data-step="2"] .qcard {
  transform: none;
}
.qcard__q {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);
  line-height: 1.55;
  margin-bottom: 22px;
}
.lang-en .qcard__q {
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  line-height: 1.2;
}
.qcard__q small {
  display: block;
  margin-top: 6px;
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--fg-d-faint);
  letter-spacing: 0.08em;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chips li {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  box-shadow: inset 0 0 0 1px var(--line-d);
  color: var(--fg-d-soft);
  transition:
    background 0.6s var(--ease),
    color 0.6s,
    box-shadow 0.6s;
}
[data-step="2"] .chips li.on {
  background: var(--ember);
  color: var(--night);
  box-shadow: inset 0 0 0 1px var(--ember);
  transition-delay: calc(0.9s + var(--i) * 0.18s);
}
.qcard__mic {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  font-size: 0.8rem;
  color: var(--fg-d-faint);
}
.qcard__mic svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  flex: none;
}

/* scene 3 — three directions fan */
.minis {
  position: relative;
  width: min(100%, 560px);
  height: 74%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.minis li {
  position: absolute;
  width: 34%;
  padding: 8px 8px 14px;
  border-radius: 10px;
  background: var(--night);
  box-shadow: inset 0 0 0 1px var(--line-d), 0 30px 50px -30px rgba(0, 0, 0, 0.9);
  font-size: 0.78rem;
  color: var(--fg-d-soft);
  transform: translateX(0) rotate(0) scale(0.92);
  opacity: 0;
  transition:
    transform 1.1s var(--ease),
    opacity 0.7s var(--ease),
    box-shadow 0.6s;
}
.mini__img {
  aspect-ratio: 4 / 5;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 10px;
}
.mini__img picture,
.mini__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.minis li:nth-child(1) .mini__img img {
  filter: sepia(0.35) saturate(1.1);
}
.minis li:nth-child(2) .mini__img img {
  filter: grayscale(1) brightness(1.2);
}
.minis b {
  font-family: var(--latin);
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--fg-d);
  margin-right: 8px;
}
.minis em {
  position: absolute;
  left: 50%;
  top: -14px;
  transform: translateX(-50%);
  font-style: normal;
  font-size: 0.72rem;
  white-space: nowrap;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--ember);
  color: var(--night);
  opacity: 0;
  transition: opacity 0.6s 1.5s;
}
[data-step="3"] .minis li {
  opacity: 1;
  transition-delay: calc(0.15s + var(--i) * 0.1s);
}
[data-step="3"] .minis li:nth-child(1) {
  transform: translateX(-104%) rotate(-5deg) translateY(10px);
}
[data-step="3"] .minis li:nth-child(2) {
  transform: translateY(-18px);
  z-index: 2;
  box-shadow: inset 0 0 0 1px var(--ember), 0 40px 60px -30px rgba(0, 0, 0, 0.95);
}
[data-step="3"] .minis li:nth-child(3) {
  transform: translateX(104%) rotate(5deg) translateY(10px);
}
[data-step="3"] .minis em {
  opacity: 1;
}

/* scene 4 — text check card (paper) */
.ccard {
  width: min(100%, 500px);
  padding: clamp(22px, 3vw, 34px);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9);
  transform: translateY(16px) rotate(-0.6deg);
  transition: transform 1s var(--ease);
}
[data-step="4"] .ccard {
  transform: rotate(-0.6deg);
}
.ccard__t {
  font-family: var(--serif);
  font-size: 1.15rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-l);
  margin-bottom: 8px;
}
.lang-en .ccard__t {
  font-size: 1.4rem;
}
.ccard__t small {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--ink-soft);
}
.checks li {
  display: grid;
  grid-template-columns: 22px 3.4em 1fr;
  gap: 12px;
  align-items: start;
  padding: 10px 0;
  font-size: 0.88rem;
  line-height: 1.55;
  border-bottom: 1px dashed var(--line-l);
}
.lang-en .checks li {
  grid-template-columns: 22px 4.6em 1fr;
}
.checks .k {
  color: var(--ink-soft);
  font-size: 0.78rem;
  padding-top: 2px;
}
.checks .v {
  font-family: var(--serif);
}
.lang-en .checks .v {
  font-size: 1.05rem;
}
.box {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  box-shadow: inset 0 0 0 1.5px var(--ink-soft);
  display: grid;
  place-items: center;
  transition: background 0.4s, box-shadow 0.4s;
}
.box svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--paper);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 16;
  stroke-dashoffset: 16;
  transition: stroke-dashoffset 0.5s var(--ease);
}
[data-step="4"] .box {
  background: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--ink);
  transition-delay: calc(0.6s + var(--i) * 0.45s);
}
[data-step="4"] .box svg {
  stroke-dashoffset: 0;
  transition-delay: calc(0.7s + var(--i) * 0.45s);
}
.ccard__btn {
  margin-top: 18px;
}
.ccard__btn span {
  display: block;
  text-align: center;
  padding: 11px;
  border-radius: 999px;
  font-size: 0.9rem;
  background: var(--paper-2);
  color: var(--ink-soft);
  transition: background 0.6s, color 0.6s;
}
[data-step="4"] .ccard__btn span {
  background: var(--ink);
  color: var(--paper);
  transition-delay: 2.6s;
}
.ccard__done {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--ember-ink);
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
}
.ccard__done svg {
  width: 11px;
  height: 11px;
  fill: currentColor;
}
[data-step="4"] .ccard__done {
  opacity: 1;
  transform: none;
  transition-delay: 3.2s;
}

/* ---------- directions ---------- */

.dirs {
  padding: clamp(64px, 10vw, 140px) 0 clamp(96px, 14vw, 180px);
  background: var(--night-2);
}
.dirs__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 2.4vw, 36px);
}
.dir__screen {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05);
  margin-bottom: 26px;
}
.dir__screen .film {
  transition: transform 1.4s var(--ease);
}
@media (hover: hover) {
  .dir:hover .dir__screen .film {
    transform: scale(1.025);
  }
}
.dir .film__grain {
  animation: none;
}
.dir__body h3 {
  font-size: clamp(1.4rem, 1.1rem + 0.8vw, 1.8rem);
  line-height: 1.35;
  margin-bottom: 10px;
}
.lang-en .dir__body h3 {
  font-size: clamp(1.8rem, 1.3rem + 1vw, 2.3rem);
  line-height: 1.1;
}
.dir__body p {
  color: var(--fg-d-soft);
  font-size: 1rem;
}
.dir__k {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 0.8rem !important;
  letter-spacing: 0.14em;
  color: var(--fg-d-soft) !important;
}
.dir__k span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--line-d);
  font-family: var(--latin);
  font-size: 1rem;
  letter-spacing: 0;
  color: var(--fg-d);
}
/* A/B/C preview looks live in public/assets/dir-{a,b,c}.css (markup: src/dir-{a,b,c}.mjs). */

/* ---------- interlude ---------- */

.interlude {
  height: 92vh;
  height: 92svh;
  min-height: 520px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
}
.interlude__img {
  position: absolute;
  inset: -12% 0;
  will-change: transform;
}
.interlude__img picture,
.interlude__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.interlude::before,
.interlude::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1;
  pointer-events: none;
}
.interlude::before {
  top: 0;
  height: 56%;
  background: linear-gradient(var(--night-2), rgba(20, 26, 36, 0.86) 9%, rgba(26, 34, 48, 0.6) 19%, rgba(38, 52, 74, 0.32) 30%, rgba(60, 76, 100, 0.12) 41%, transparent 54%);
}
.interlude::after {
  bottom: 0;
  height: 30%;
  background: linear-gradient(transparent, var(--paper));
}
.interlude__grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.08;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
/* The emotional peak: a vertical CJK title card, set like a funeral scroll. */
.interlude__q {
  position: relative;
  z-index: 2;
  display: block;
  writing-mode: vertical-rl;
  padding: 0 var(--gutter);
  font-family: var(--serif);
  font-weight: 500;
  font-size: min(clamp(2.2rem, 1rem + 4vw, 5rem), 6.2svh);
  line-height: 1.5;
  letter-spacing: 0.22em;
  color: #23201c;
  text-shadow: 0 0 12px rgba(244, 238, 228, 0.9), 0 0 3px rgba(244, 238, 228, 0.8);
  margin-top: 8vh;
}
/* A paper veil behind the quote, so dark text reads over the dark parts of the photo. */
.interlude__q::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -18% -30%;
  background: radial-gradient(closest-side, rgba(244, 238, 228, 0.78), rgba(244, 238, 228, 0.5) 60%, transparent);
  pointer-events: none;
}
.interlude__q .ln {
  display: block;
  white-space: nowrap;
}
.interlude__q .ln:nth-child(2) {
  padding-block-start: 2em;
  margin-block-start: 0.5em;
}
.lang-en .interlude__q {
  display: block;
  writing-mode: horizontal-tb;
  text-align: center;
  font-family: var(--latin);
  font-weight: 400;
  font-size: clamp(2rem, 1rem + 5vw, 6.4rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.lang-en .interlude__q .ln {
  white-space: normal;
  text-wrap: balance;
}
.lang-en .interlude__q .ln:nth-child(2) {
  padding: 0;
  margin: 0;
}
.lang-en .interlude__q .ln:nth-child(2) {
  font-style: italic;
}

/* ---------- light sections ---------- */

[data-theme="light"] {
  background: var(--paper);
  color: var(--ink);
}
[data-theme="light"] .sec-h__p,
[data-theme="light"] p {
  color: inherit;
}

.promise {
  padding: clamp(64px, 9vw, 120px) 0 clamp(96px, 12vw, 160px);
}
.pr {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 clamp(20px, 3vw, 48px);
}
.pr li {
  padding-top: 28px;
  border-top: 1px solid var(--line-l);
}
.pr__n {
  display: block;
  font-family: var(--latin);
  font-size: 1rem;
  color: var(--ember-ink);
  margin-bottom: 36px;
}
.pr h3 {
  font-size: clamp(1.5rem, 1.15rem + 0.9vw, 2rem);
  line-height: 1.4;
  margin-bottom: 14px;
}
.lang-en .pr h3 {
  font-size: clamp(1.9rem, 1.4rem + 1.1vw, 2.5rem);
  line-height: 1.08;
}
.pr p {
  color: var(--ink-soft) !important;
  font-size: 1rem;
}

.speed {
  margin-top: clamp(80px, 10vw, 140px);
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) minmax(0, 3fr);
  gap: clamp(32px, 4vw, 64px);
  align-items: end;
  padding-top: 48px;
  border-top: 1px solid var(--ink);
}
.speed__big span {
  display: block;
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-bottom: 4px;
}
.speed__big b {
  display: block;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3.6rem, 2rem + 5vw, 7rem);
  line-height: 1;
  letter-spacing: 0.02em;
}
.lang-en .speed__big b {
  font-weight: 400;
  font-style: italic;
  font-size: clamp(4.4rem, 2.4rem + 6vw, 8.6rem);
  line-height: 0.9;
}
.speed__row {
  display: grid;
  grid-template-columns: 6em 1fr;
  grid-template-areas: "lbl bar" ". val";
  gap: 4px 16px;
  align-items: center;
  margin-bottom: 18px;
  font-size: 0.9rem;
}
.lang-en .speed__row {
  grid-template-columns: 5.5em 1fr;
}
.speed__row .lbl {
  grid-area: lbl;
  color: var(--ink-soft);
}
.speed__row .bar {
  grid-area: bar;
  height: 10px;
  border-radius: 10px;
  background: var(--paper-2);
  overflow: hidden;
}
.speed__row .val {
  grid-area: val;
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.speed__row .bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ink-soft);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 2.4s var(--ease-io) 0.4s;
}
.speed__row--b .bar i {
  background: var(--ember-ink);
  width: 7%;
  transition-duration: 0.6s;
}
.speed__row--b .val {
  color: var(--ember-ink);
  font-weight: 500;
}
.speed.is-in .bar i {
  transform: scaleX(1);
}
.speed__p {
  font-size: 0.95rem;
  color: var(--ink-soft) !important;
  margin-top: 8px;
}
.speed__priv {
  padding-left: 24px;
  border-left: 1px solid var(--line-l);
}
.speed__priv h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.lang-en .speed__priv h3 {
  font-size: 1.4rem;
}
.speed__priv p {
  font-size: 0.92rem;
  color: var(--ink-soft) !important;
}

/* ---------- join ---------- */

.join {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  min-height: 100vh;
  background: var(--paper-2);
}
.join__img {
  position: relative;
  overflow: hidden;
}
.join__img picture,
.join__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.join__img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 60%, rgba(235, 228, 215, 0.35));
}
.join__in {
  padding: clamp(80px, 10vw, 140px) var(--gutter);
  max-width: 680px;
  width: 100%;
  align-self: center;
}
.join h2 {
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  margin-bottom: 20px;
}
.join__p {
  color: var(--ink-soft) !important;
  margin-bottom: 40px;
}
.form {
  display: grid;
  gap: 32px;
}
.field {
  position: relative;
  scroll-margin-top: calc(var(--hdr) + 40px);
}
.field label {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 8px;
}
.field label small {
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-left: 6px;
}
.field input,
.field textarea {
  scroll-margin-top: calc(var(--hdr) + 40px);
  width: 100%;
  min-height: 58px;
  padding: 14px 18px;
  font-size: 1.1rem;
  line-height: 1.5;
  border: 1px solid rgba(27, 26, 25, 0.22);
  border-radius: 12px;
  background: var(--paper-3);
  color: var(--ink);
  transition:
    border-color 0.3s,
    box-shadow 0.3s,
    background 0.3s;
  -webkit-appearance: none;
  appearance: none;
}
.field textarea {
  min-height: 120px;
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder {
  color: rgba(27, 26, 25, 0.38);
}
.field input:hover,
.field textarea:hover {
  border-color: rgba(27, 26, 25, 0.4);
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ember-ink);
  box-shadow: 0 0 0 3px rgba(148, 85, 42, 0.38);
  background: #fff;
}
.field input[aria-invalid="true"] {
  border-color: var(--err);
}
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
/* Error sits right under the email field; its line is always reserved so nothing jumps. */
.form__msg {
  position: absolute;
  left: 2px;
  top: 100%;
  margin: 2px 0 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--err) !important;
}
.form .btn {
  height: 62px;
}
.form.is-sending .btn {
  pointer-events: none;
}
.form.is-sending .btn__arrow {
  opacity: 0;
}
/* sending: a thin progress line runs along the bottom of the button */
.form.is-sending .btn::after {
  content: "";
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 12px;
  height: 1px;
  background: currentColor;
  transform-origin: left;
  animation: sending 1.4s var(--ease-io) infinite;
}
@keyframes sending {
  0% {
    transform: scaleX(0);
  }
  60% {
    transform: scaleX(1);
    opacity: 1;
  }
  100% {
    transform: scaleX(1);
    opacity: 0;
  }
}
.form__consent {
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--ink-soft) !important;
}
.form__consent a,
.done__copy {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.join__box {
  transition: height 0.6s var(--ease);
}
.form {
  transition: opacity 0.45s var(--ease);
}
.join__box.is-sent .form {
  opacity: 0;
}
/* thank-you panel: shown by JS (.is-done) or, without JS, by the #joined redirect */
.done {
  display: none;
  padding: 24px 0 8px;
  outline: none;
}
.join__box.is-done .done,
.done:target {
  display: block;
  animation: fade-up 0.8s var(--ease) both;
}
.join__box:has(.done:target) .form {
  display: none;
}
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
.done__share {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line-l);
  font-size: 0.95rem;
  color: var(--ink-soft) !important;
}
.done__copy::after {
  content: none;
}
.done__copy {
  border: 0;
  background: none;
  padding: 10px 0;
  min-height: 44px;
  cursor: pointer;
  font-size: 0.95rem;
}
.done__mark {
  width: 72px;
  height: 72px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.2;
  margin-bottom: 20px;
}
.done__mark circle {
  fill: var(--ember-ink);
  stroke: none;
  clip-path: inset(0 0 50% 0);
  animation: rise 1.8s var(--ease) both;
}
@keyframes rise {
  from {
    transform: translateY(14px);
  }
}
.done__h {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2.1rem);
  margin-bottom: 8px;
}
.lang-en .done__h {
  font-size: clamp(2rem, 1.5rem + 1.4vw, 2.8rem);
  line-height: 1.1;
}
.done__p {
  color: var(--ink-soft) !important;
}

/* ---------- faq ---------- */

.faq {
  padding: clamp(96px, 12vw, 160px) 0;
}
.faq__grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 48px;
  align-items: start;
}
.faq .sec-h {
  position: sticky;
  top: calc(var(--hdr) + 32px);
}
.faq details {
  border-top: 1px solid var(--line-l);
}
.faq details:last-child {
  border-bottom: 1px solid var(--line-l);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 26px 0;
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.5;
}
.lang-en .faq summary {
  font-size: 1.5rem;
  line-height: 1.2;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary i {
  position: relative;
  flex: none;
  width: 14px;
  height: 14px;
}
.faq summary i::before,
.faq summary i::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: currentColor;
  transition: transform 0.5s var(--ease);
}
.faq summary i::after {
  transform: rotate(90deg);
}
.faq details[open] summary i::after {
  transform: rotate(0);
}
.faq summary:focus-visible span {
  color: var(--ember-ink);
}
@media (hover: hover) {
  .faq summary:hover span {
    color: var(--ember-ink);
  }
}
/* height animation where supported (::details-content + interpolate-size) */
.faq details::details-content {
  block-size: 0;
  overflow: hidden;
  transition:
    block-size 0.5s var(--ease),
    content-visibility 0.5s allow-discrete;
}
.faq details[open]::details-content {
  block-size: auto;
}
.faq__a {
  padding: 0 48px 28px 0;
  color: var(--ink-soft);
}
.faq details[open] .faq__a {
  animation: open 0.7s var(--ease);
}
@keyframes open {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

/* ---------- footer ---------- */

.ftr {
  padding: clamp(80px, 10vw, 140px) 0 40px;
  background: var(--night);
  color: var(--fg-d-soft);
  font-size: 0.85rem;
}
.ftr__brand {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 56px;
}
.ftr__big {
  font-family: var(--latin);
  font-weight: 400;
  font-size: clamp(2rem, 8.6vw, 9.4rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--fg-d);
  white-space: nowrap;
}
.ftr__vert {
  writing-mode: vertical-rl;
  font-family: "Noto Serif TC", var(--serif);
  font-weight: 500;
  font-size: clamp(1.4rem, 1rem + 1.6vw, 2.6rem);
  letter-spacing: 0.4em;
  line-height: 1;
  color: var(--ember);
  padding-left: 0.2em;
  border-left: 1px solid var(--line-d);
}
.ftr__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 4px 32px;
  padding-top: 16px;
  border-top: 1px solid var(--line-d);
}
.ftr__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 22px;
}
.ftr__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.ftr a:hover,
.ftr a:focus-visible {
  color: var(--fg-d);
}

/* ---------- privacy policy / 404 ---------- */

.doc {
  min-height: 100vh;
  padding: calc(var(--hdr) + clamp(48px, 8vw, 112px)) var(--gutter) clamp(80px, 10vw, 140px);
}
.doc__in {
  max-width: 40em;
  margin: 0 auto;
}
.doc h1 {
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  margin-bottom: 12px;
}
.doc__meta {
  font-size: 0.9rem;
  color: var(--ink-soft) !important;
  margin-bottom: 36px;
}
.doc__intro {
  font-size: 1.15rem;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line-l);
}
.doc h2 {
  font-size: 1.35rem;
  line-height: 1.4;
  margin: 44px 0 12px;
}
.lang-en .doc h2 {
  font-size: 1.75rem;
  line-height: 1.15;
}
.doc p + p {
  margin-top: 12px;
}
.doc a:not(.btn) {
  color: var(--ember-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.doc__back {
  margin-top: 56px;
}
.nf {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
}
.nf__n {
  font-family: var(--latin);
  font-size: clamp(5rem, 18vw, 12rem);
  line-height: 1;
  color: var(--fg-d-faint);
  font-style: italic;
}
.nf h1 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin: 12px 0 4px;
  letter-spacing: 0.1em;
}
.nf__en {
  color: var(--fg-d-soft);
  font-family: var(--latin);
  font-size: 1.4rem;
  font-style: italic;
  margin-bottom: 36px;
}
.nf__ctas {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
}

/* ---------- responsive ---------- */

@media (max-width: 1240px) {
  .wm__sub {
    display: none;
  }
  .hdr__in {
    gap: 24px;
  }
  .hdr__nav {
    gap: 22px;
  }
}

@media (max-width: 1100px) {
  /* single-column hero up to landscape tablets: headline + CTA first, film below */
  .hero {
    align-items: flex-start;
    padding-top: calc(var(--hdr) + 40px);
  }
  .hero__in {
    grid-template-columns: 1fr;
  }
  .hero__copy {
    max-width: 44rem;
  }
  .hero__vert {
    display: none;
  }
  .hero__film {
    margin: 8px calc(var(--gutter) * -1) 0;
  }
  .player__screen {
    border-radius: 0;
  }
  .player__bar {
    padding: 14px var(--gutter) 0;
  }
  .hero__scroll {
    display: none;
  }
  .pr {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px clamp(20px, 4vw, 48px);
  }
  .speed {
    grid-template-columns: 1fr 1fr;
  }
  .speed__priv {
    grid-column: 1 / -1;
    padding: 24px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line-l);
  }
}

@media (max-width: 960px) {
  .hdr__nav {
    display: none;
  }
  .hdr__end {
    margin-left: auto;
  }
  .how__grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .how__stage {
    position: sticky;
    top: calc(var(--hdr) + 8px);
    z-index: 2;
    margin: 0 calc(var(--gutter) * -1);
    padding: 0 var(--gutter) 28px;
    background: linear-gradient(var(--night-2) 85%, transparent);
  }
  /* Steps stick right under the sticky stage; each one slides up over the last. */
  .how {
    --stage-h: min(52vh, 440px);
    --step-top: calc(var(--hdr) + 8px + var(--stage-h) + 16px);
  }
  .stage {
    position: relative;
    top: 0;
    height: var(--stage-h);
  }
  .how__steps {
    padding: 4vh 0 0;
  }
  .how__steps::after {
    content: "";
    display: block;
    height: 30vh;
  }
  .step {
    position: sticky;
    top: var(--step-top);
    z-index: 1;
    min-height: calc(100vh - var(--step-top));
    min-height: calc(100svh - var(--step-top));
    justify-content: flex-start;
    padding-top: 16px;
    background: var(--night-2);
  }
  .step__n {
    font-size: clamp(2.4rem, 1.6rem + 3vw, 3.6rem);
    margin-bottom: 12px;
  }
  .sec-h--split {
    grid-template-columns: 1fr;
  }
  /* directions: one swipeable row instead of three stacked screens */
  .dirs__list {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: min(78vw, 380px);
    gap: 20px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 var(--gutter);
    margin: 0 calc(var(--gutter) * -1);
    padding: 0 var(--gutter) 8px;
    scrollbar-width: none;
  }
  .dirs__list::-webkit-scrollbar {
    display: none;
  }
  .dir {
    scroll-snap-align: start;
  }
  .faq .sec-h {
    position: static;
  }
  .join {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .join__img {
    height: 42vh;
  }
  .join__img::after {
    background: linear-gradient(transparent 50%, var(--paper-2));
  }
  .join__in {
    padding-top: 40px;
  }
  .faq__grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@media (max-width: 600px) {
  :root {
    --hdr: 64px;
    --fs-body: 1.0625rem;
  }
  .hdr__in {
    gap: 12px;
  }
  /* the header CTA stays; once past the hero the lang pill and ".design" compact away */
  .hdr .btn {
    padding: 0 14px;
    font-size: 0.85rem;
    flex: none;
  }
  .hdr.is-past .hdr__lang,
  .wm__text em {
    display: none;
  }
  /* hero order on phones: headline, then the film, then the rest (film above the fold) */
  .hero {
    padding-top: calc(var(--hdr) + 28px);
    padding-bottom: 72px;
  }
  .hero__in {
    gap: 0;
  }
  .hero__copy {
    display: contents;
  }
  .hero__eb {
    order: 1;
    margin-bottom: 18px;
  }
  .hero__h1 {
    order: 2;
    margin-bottom: 20px;
  }
  .hero__film {
    order: 3;
    margin: 0 calc(var(--gutter) * -1) 32px;
  }
  .hero__sub {
    order: 4;
    margin-bottom: 32px;
  }
  .hero__ctas {
    order: 5;
  }
  .cap--title .cap__y {
    letter-spacing: 0.12em;
  }
  .ftr__brand {
    flex-direction: column;
    align-items: flex-start;
  }
  .eyebrow {
    letter-spacing: 0.12em;
    gap: 10px;
  }
  .eyebrow::before {
    width: 20px;
  }
  .hdr__end {
    gap: 8px;
  }
  .hdr__lang {
    padding: 10px 12px;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 0.85rem;
    opacity: 0.85;
  }
  .wm__text {
    font-size: 1.18rem;
  }
  .hero__ctas .btn {
    width: 100%;
  }
  .hero__ctas {
    justify-content: center;
  }
  .player__segs span {
    display: none;
  }
  .player__note {
    margin-top: 10px;
  }
  .pr {
    grid-template-columns: 1fr;
  }
  .pr__n {
    margin-bottom: 16px;
  }
  .speed {
    grid-template-columns: 1fr;
  }
  .how {
    --stage-h: min(46vh, 380px);
  }
  .stage {
    border-radius: 14px;
  }
  .chips {
    gap: 8px;
  }
  .chips li {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
  .lang-en .qcard__q {
    font-size: 1.2rem;
  }
  .tiles {
    width: 86%;
  }
  .minis li {
    width: 31%;
    padding: 6px 6px 10px;
    font-size: 0.62rem;
    white-space: nowrap;
  }
  .minis b {
    font-size: 0.85rem;
    margin-right: 4px;
  }
  .ccard {
    padding: 16px 18px;
  }
  .ccard__t {
    padding-bottom: 10px;
  }
  .checks li {
    font-size: 0.76rem;
    padding: 5px 0;
    line-height: 1.4;
  }
  .ccard__btn {
    margin-top: 12px;
  }
  .ccard__btn span {
    padding: 9px;
  }
  .faq__a {
    padding-right: 0;
  }
  .ftr__big {
    font-size: 10.6vw;
  }
  .ftr__vert {
    writing-mode: horizontal-tb;
    border: 0;
    padding: 0;
    letter-spacing: 0.5em;
  }
}

@media (max-width: 360px) {
  .hdr__lang {
    display: none;
  }
  .wm__text {
    font-size: 1.05rem;
  }
  .wm__mark {
    width: 22px;
    height: 22px;
  }
  .wm {
    gap: 6px;
  }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.2s !important;
    transition-delay: 0s !important;
  }
  html.js [data-split] .ln > span,
  html.js [data-reveal] {
    transform: none;
    opacity: 1;
  }
  .frame img {
    transform: scale(1.04) !important;
  }
  .film__grain,
  .hero__scroll {
    display: none;
  }
}
