/* ============================================================
   Tovi — Editorial design system
   Fraunces (display) · JetBrains Mono (labels) · Inter (body)
   Warm-paper palette with a day→night scene arc.
   ============================================================ */
:root {
  --black: #151310;
  --ink: #23201b;
  --muted: #6b6258;
  /* Day→night scene arc — widened so the journey is felt, not just coded.
     dawn (warm cream) → day (airy, faintly cool daylight) → golden (amber
     blush) → night (deep). */
  --paper: #f4ecdf;        /* dawn — warm morning cream (default) */
  --paper-bright: #edf0ec; /* day — airy, faintly cool daylight */
  --paper-warm: #f2dcc2;   /* golden hour — warm amber-blush */
  --ivory: #fbf7ef;
  --pink: #f3c8c6;
  --accent: #995557;       /* rose-terracotta — labels & small accents */
  --accent-soft: #f6d6cf;  /* accent on dark scenes */
  --line: rgba(35, 32, 27, 0.16);
  --line-soft: rgba(35, 32, 27, 0.10);

  --serif: "Hedvig Letters Serif", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  /* The label/eyebrow role: the body sans in tracked uppercase — not a
     monospace. (Monospace read as "developer tool", the wrong register for
     sleepwear.) Kept as --label so the intent is explicit at every call site. */
  --label: var(--sans);
  --mono: var(--sans); /* legacy alias — every former mono label now uses --sans */
  --serif-tc: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --sans-tc: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", var(--sans);

  --chrome-height: 96px;
  --maxw: 1480px;
  --gutter: clamp(1.5rem, 5vw, 3.5rem);
  --intro-gap: clamp(0.9rem, 1.55vw, 1.35rem);
}

* { box-sizing: border-box; }

/* Lenis overrides native smooth scroll when active so easing doesn't double-up. */
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--chrome-height);
  -webkit-text-size-adjust: 100%;
  /* Explicit root background so the scene color is painted on <body>'s own box
     rather than relying on background propagation (which `overflow-x: clip`
     can suppress) — keeps the night region solid behind FAQ + footer. */
  background: var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.62;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  transition: background-color 900ms ease;
}

/* Day-to-night scenes — JS promotes section[data-scene] to <body>. */
body[data-scene="day"]    { background-color: var(--paper-bright); }
body[data-scene="golden"] { background-color: var(--paper-warm); }
body[data-scene="night"]  { background-color: var(--black); }

/* Time-of-day greeting: the opening scene (hero/story) is tinted to the
   visitor's local daypart, so the day→night story starts the moment they
   land — not only once they scroll. Daypart is set on <html> pre-paint. */
html[data-daypart="morning"] body[data-scene="dawn"] { background-color: #f1efe7; }
html[data-daypart="evening"] body[data-scene="dawn"] { background-color: #ece0d0; }

body[data-lang="zh"] { font-family: var(--sans-tc); letter-spacing: 0; }
body[data-lang="zh"] h1,
body[data-lang="zh"] h2,
body[data-lang="zh"] h3 { font-family: var(--serif-tc); }

img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; text-decoration: none; }
figure { margin: 0; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--black);
  color: var(--ivory);
  padding: 0.75rem 1rem;
  font-family: var(--mono);
  font-size: 0.78rem;
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ============================================================
   Typography
   ============================================================ */
h1, h2, h3, p { margin: 0; }

h1, h2 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 3.6vw, 3.4rem); margin-bottom: var(--intro-gap); }
h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.4rem, 2vw, 1.9rem);
  line-height: 1.12;
}

body[data-lang="zh"] h1 { font-weight: 500; line-height: 1.2; font-size: clamp(2.7rem, 5vw, 4.8rem); }
body[data-lang="zh"] h2 { font-weight: 500; line-height: 1.22; font-size: clamp(2.05rem, 3.6vw, 3.6rem); }
body[data-lang="zh"] h3 { font-weight: 500; line-height: 1.28; }
body[data-lang="zh"] p, body[data-lang="zh"] li { line-height: 1.85; }

p { color: var(--muted); }

/* Mono label system — the editorial signature (eyebrows, meta, terms). */
.eyebrow, .meta {
  font-family: var(--label);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.2rem;
}
body[data-lang="zh"] .eyebrow,
body[data-lang="zh"] .meta {
  font-family: var(--sans-tc);
  letter-spacing: 0.16em;
  font-size: 0.74rem;
}

/* ============================================================
   Site chrome — announcement + header
   ============================================================ */
.site-chrome { position: sticky; top: 0; z-index: 50; }

.announcement-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.4rem var(--gutter);
  /* Pinned to the original warm tan; decoupled from --paper-warm, which now
     carries the more saturated golden-hour scene color. */
  background: #efe4d2;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
}
.announcement-bar a { transition: color 180ms ease; }
.announcement-bar a:hover { color: var(--accent); }
.announcement-bar a:focus-visible { outline: 2px solid rgba(153, 85, 87, 0.45); outline-offset: 3px; }

.site-header {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  min-height: 64px;
  padding: 0 var(--gutter);
  background: rgba(244, 236, 223, 0.86);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(12px);
  transition: background-color 300ms ease, border-color 300ms ease;
}
.site-header.is-scrolled { background: rgba(244, 236, 223, 0.95); }

.logo, .footer-logo {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.8rem;
  line-height: 1;
  letter-spacing: 0.01em;
}

.nav-links {
  justify-self: center;
  display: flex;
  gap: clamp(1.1rem, 3vw, 2.4rem);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav-links a { position: relative; padding: 0.7rem 0; transition: color 180ms ease; }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.35rem;
  height: 1px;
  background: currentColor;
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 180ms ease, transform 180ms ease;
}
.nav-links a:hover, .nav-links a.is-active { color: var(--black); }
.nav-links a:hover::after, .nav-links a.is-active::after { opacity: 1; transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 0.85rem; }

/* Language menu */
.language-menu { position: relative; }
.language-trigger {
  position: relative;
  min-height: 40px;
  min-width: 66px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 0.45rem 1.7rem 0.45rem 0.7rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms ease;
}
.language-trigger::after {
  content: "";
  position: absolute;
  right: 0.7rem; top: 50%;
  width: 0.4rem; height: 0.4rem;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  color: var(--muted);
  transform: translateY(-65%) rotate(45deg);
  transition: transform 160ms ease;
}
.language-menu.is-open .language-trigger::after { transform: translateY(-35%) rotate(225deg); }
.language-trigger:hover, .language-menu.is-open .language-trigger { border-color: var(--black); }
.language-trigger:focus-visible { outline: 2px solid rgba(185, 113, 115, 0.4); outline-offset: 3px; }

.language-options {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 80;
  display: grid;
  min-width: 100%;
  padding: 0.3rem;
  background: var(--ivory);
  border: 1px solid var(--line);
  box-shadow: 0 14px 32px rgba(21, 19, 16, 0.12);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-0.35rem);
  transition: opacity 160ms ease, transform 160ms ease;
}
.language-menu.is-open .language-options { opacity: 1; pointer-events: auto; transform: translateY(0); }
.language-options button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0.6rem 0.7rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
}
.language-options button:hover,
.language-options button[aria-selected="true"] { background: var(--paper-warm); color: var(--black); }

/* ============================================================
   Buttons
   ============================================================ */
.button {
  --btn-bg: var(--black);
  --btn-color: var(--ivory);
  --btn-border: var(--black);
  --btn-hover-bg: transparent;
  --btn-hover-color: var(--black);
  --btn-hover-border: var(--black);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 54px;
  padding: 0 1.7rem;
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-color);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 240ms ease, border-color 240ms ease, color 240ms ease, gap 220ms ease;
}
.button:hover { background: var(--btn-hover-bg); color: var(--btn-hover-color); border-color: var(--btn-hover-border); gap: 1rem; }
.button:focus-visible { outline: 2px solid rgba(185, 113, 115, 0.55); outline-offset: 4px; }
body[data-lang="zh"] .button { font-family: var(--sans-tc); letter-spacing: 0.14em; }

/* ============================================================
   Section rhythm — generous editorial vertical space, centered
   ============================================================ */
.section {
  padding: clamp(4.5rem, 10vh, 9rem) var(--gutter);
}
.section > *,
.return-section,
.details-section { max-width: var(--maxw); margin-inline: auto; }

.section-heading { max-width: var(--maxw); margin-inline: auto; }
.section-heading h2 { max-width: 16ch; }

/* ============================================================
   Hero — editorial two-column, balanced gutters, fixed image frame
   ============================================================ */
.hero {
  padding: clamp(2rem, 4vh, 3.5rem) var(--gutter) clamp(3rem, 6vh, 5rem);
  scroll-margin-top: 8px;
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.78fr);
  gap: clamp(2.4rem, 6vw, 6rem);
  align-items: center;
  max-width: var(--maxw);
  margin-inline: auto;
  min-height: calc(100svh - var(--chrome-height) - clamp(5rem, 10vh, 8.5rem));
}
/* Center the hero copy within its grid column to match the story/details
   sections, whose copy is centered via the .section > * margin-inline: auto
   rule. width:100% + same max-width (640px) keeps a uniform block width so all
   three text columns align (without width:100%, auto margins in grid shrink the
   block to its content width, which varies per section and breaks alignment). */
.hero-content { width: 100%; max-width: 640px; margin-inline: auto; }
.hero-title { margin-bottom: 1.5rem; }
.hero-title-mask { display: block; overflow: hidden; padding: 0.08em 0 0.16em; margin: -0.08em 0 -0.16em; }
.hero-title-inner { display: block; font-size: clamp(2.6rem, 5vw, 4.75rem); }
.hero-copy {
  max-width: 460px;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.2vw, 1.18rem);
  line-height: 1.6;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.4rem;
  margin-top: 2rem;
}
.hero-reassurance {
  max-width: 24rem;
  margin: 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.88rem;
  line-height: 1.55;
  letter-spacing: 0;
  text-transform: none;
}
body[data-lang="zh"] .hero-reassurance { font-family: var(--sans-tc); font-size: 0.9rem; }

.hero-origin {
  margin: 1rem 0 0;
  font-family: var(--label);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
body[data-lang="zh"] .hero-origin {
  font-family: var(--sans-tc);
  letter-spacing: 0.14em;
  font-size: 0.78rem;
}

.hero-set {
  margin-top: 2rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line-soft);
  max-width: 24rem;
}
.hero-set-title {
  margin: 0 0 0.9rem;
  font-family: var(--label);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
}
body[data-lang="zh"] .hero-set-title {
  font-family: var(--sans-tc);
  letter-spacing: 0.12em;
}
.hero-set-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}
.hero-set-list li {
  position: relative;
  padding-left: 1.1rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.9rem;
  line-height: 1.5;
}
body[data-lang="zh"] .hero-set-list li { font-family: var(--sans-tc); }
.hero-set-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-figure { justify-self: end; width: 100%; }
.hero-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 78vh;
  overflow: hidden;
}
.hero-frame picture { display: block; width: 100%; height: 100%; }
.hero-frame img { object-position: center 22%; }

/* ============================================================
   Story (return) + Craft (details) — text/image editorial blocks
   ============================================================ */
.return-section,
.details-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.78fr);
  gap: clamp(2.4rem, 6vw, 6rem);
  align-items: center;
}
.details-section { grid-template-columns: minmax(300px, 0.78fr) minmax(0, 1fr); }

.return-copy, .details-copy { width: 100%; max-width: 640px; }
.return-copy p, .details-copy p { max-width: 56ch; font-size: 1.02rem; }
.return-copy p + p { margin-top: 1.2rem; }
.return-copy h2, .details-copy h2 { max-width: 18ch; }

.quiet-image { width: 100%; aspect-ratio: 4 / 5; overflow: hidden; }
.quiet-image img { object-position: center 28%; }
.details-image { width: 100%; aspect-ratio: 4 / 5; overflow: hidden; }
.details-image img { object-position: center 45%; }

.details-copy > .seam { margin: clamp(1.4rem, 2.8vw, 2rem) 0; }

.detail-list { display: grid; margin: 0; padding: 0; }
.detail-list div {
  display: grid;
  grid-template-columns: minmax(140px, 0.4fr) 1fr;
  gap: 1.2rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.detail-list div:first-child { border-top: 1px solid var(--line); }
.detail-list dt {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
body[data-lang="zh"] .detail-list dt { font-family: var(--sans-tc); letter-spacing: 0.12em; }
.detail-list dd { margin: 0; color: var(--ink); }

/* Seam motif — self-drawing hairline */
.seam { display: block; width: 100%; height: 2px; overflow: visible; }
.seam line { stroke: rgba(153, 85, 87, 0.5); stroke-width: 1; vector-effect: non-scaling-stroke; }
body[data-scene="night"] .seam line { stroke: var(--accent-soft); }

/* ============================================================
   Collection — intro + horizontal editorial rail
   ============================================================ */
.collection-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.6fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
  max-width: var(--maxw);
  margin: 0 auto clamp(1.6rem, 3vh, 2.6rem);
}
.collection-intro h2 { max-width: 16ch; }
.collection-intro p { max-width: 42ch; font-size: 1.02rem; }

.gallery { position: relative; max-width: var(--maxw); margin-inline: auto; }
.gallery > .seam { margin-bottom: clamp(1.2rem, 2.6vw, 1.9rem); }

.gallery-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem 1.6rem;
  margin-bottom: clamp(1.1rem, 2.2vw, 1.7rem);
}
.gallery-hint {
  max-width: 46ch;
  margin: 0;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
body[data-lang="zh"] .gallery-hint { font-family: var(--sans-tc); text-transform: none; letter-spacing: 0.06em; font-size: 0.78rem; }

.gallery-nav { display: flex; gap: 0.6rem; }
.gallery-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 200ms ease, color 200ms ease;
}
.gallery-arrow:hover { border-color: var(--black); color: var(--black); }
.gallery-arrow:disabled { opacity: 0.3; cursor: default; }
.gallery-arrow:focus-visible { outline: 2px solid rgba(185, 113, 115, 0.55); outline-offset: 3px; }
html:not(.js) .gallery-nav { display: none; }

.gallery-stage {
  position: relative;
  margin-right: calc(-1 * var(--gutter));
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(35, 32, 27, 0.28) transparent;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.gallery-stage::-webkit-scrollbar { height: 6px; }
.gallery-stage::-webkit-scrollbar-thumb { background: rgba(35, 32, 27, 0.22); border-radius: 999px; }
.gallery-stage:focus-visible { outline: 2px solid rgba(185, 113, 115, 0.5); outline-offset: 4px; }

@media (hover: hover) and (pointer: fine) {
  .gallery-stage { cursor: grab; }
  .gallery-stage.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
    scroll-behavior: auto;
    user-select: none;
  }
  .gallery-stage.is-dragging img { pointer-events: none; }
}

.gallery-track {
  display: flex;
  align-items: flex-start;
  gap: clamp(1.4rem, 2.4vw, 2.6rem);
  width: max-content;
  padding: 0 var(--gutter) 1.25rem 0;
}
.gallery-item {
  --card-width: clamp(240px, 19vw, 320px);
  flex: 0 0 var(--card-width);
  width: var(--card-width);
  scroll-snap-align: start;
}
.gallery-item:nth-child(even) { margin-top: clamp(1.5rem, 4vh, 2.6rem); }
.gallery-frame { width: 100%; aspect-ratio: 4 / 5; overflow: hidden; }
.gallery-frame img { transition: transform 700ms cubic-bezier(0.22, 0.61, 0.36, 1); }
.gallery-item figcaption { margin-top: 0.85rem; }
.gallery-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
}
body[data-lang="zh"] .gallery-label { font-family: var(--sans-tc); letter-spacing: 0.1em; }
.gallery-title {
  display: block;
  margin-top: 0.35rem;
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.16;
  color: var(--ink);
}
body[data-lang="zh"] .gallery-title { font-family: var(--serif-tc); }

/* ============================================================
   Waitlist — dark editorial panel
   ============================================================ */
.waitlist-section {
  background:
    radial-gradient(120% 120% at 88% 12%, rgba(243, 200, 198, 0.14), transparent 42%),
    var(--black);
  color: var(--ivory);
}
.waitlist-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 4vw, 3rem);
}
.waitlist-inner .eyebrow { color: var(--accent-soft); }
.waitlist-inner h2 { color: var(--ivory); max-width: 16ch; }
.waitlist-inner p { color: rgba(251, 247, 239, 0.78); max-width: 48ch; font-size: 1.02rem; }

.waitlist-benefits { display: grid; gap: 0.75rem; margin: 1.8rem 0 0; padding: 0; list-style: none; }
.waitlist-benefits li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: rgba(251, 247, 239, 0.85);
}
.waitlist-benefits li::before { content: ""; width: 0.42rem; height: 0.42rem; border-radius: 999px; background: var(--pink); flex: none; }

.waitlist-cta {
  display: grid;
  gap: 1.25rem;
  align-content: start;
}
.waitlist-cta .button {
  --btn-bg: var(--ivory);
  --btn-color: var(--black);
  --btn-border: var(--ivory);
  --btn-hover-bg: transparent;
  --btn-hover-color: var(--ivory);
  --btn-hover-border: var(--ivory);
  justify-self: start;
}
.privacy-note {
  margin: 0;
  color: rgba(251, 247, 239, 0.56);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.03em;
}
body[data-lang="zh"] .privacy-note { font-family: var(--sans-tc); font-size: 0.74rem; letter-spacing: 0.02em; }

/* ============================================================
   FAQ
   ============================================================ */
/* Centered max-width container so FAQ aligns with the footer (and the rest of
   the site); heading + list stay left-aligned within it. */
.faq-inner { max-width: var(--maxw); margin-inline: auto; }
.faq-section .section-heading { margin-inline: 0; max-width: none; }
.faq-section .section-heading h2 { max-width: none; font-size: clamp(2rem, 3.2vw, 3.5rem); }
.faq-list { max-width: 920px; margin: 0; border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary {
  cursor: pointer;
  padding: 1.4rem 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: baseline;
}
body[data-lang="zh"] summary { font-family: var(--serif-tc); font-size: clamp(1.12rem, 1.55vw, 1.42rem); line-height: 1.6; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--mono); font-weight: 400; color: var(--accent); flex: none; }
details[open] summary::after { content: "–"; }
details p { max-width: 70ch; margin: 0 0 1.5rem; color: var(--muted); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  padding: clamp(3rem, 6vw, 4.5rem) var(--gutter) clamp(1.75rem, 3vw, 2.5rem);
  color: var(--muted);
}
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) auto;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-top: clamp(2.25rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
}
.footer-brand { max-width: 360px; }
.footer-logo { font-size: clamp(2rem, 3vw, 2.6rem); }
.footer-tagline { margin-top: 0.85rem; color: var(--ink); font-family: var(--serif); font-style: italic; font-size: 1.25rem; line-height: 1.3; }
body[data-lang="zh"] .footer-tagline { font-family: var(--serif-tc); font-style: normal; font-size: 1.1rem; }

.footer-columns { display: grid; grid-template-columns: repeat(2, minmax(118px, max-content)); gap: clamp(2rem, 5vw, 4.5rem); }
.footer-col { display: grid; gap: 0.72rem; align-content: start; }
.footer-heading {
  margin: 0 0 0.45rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
}
body[data-lang="zh"] .footer-heading { font-family: var(--sans-tc); letter-spacing: 0.12em; }
.footer-col a { position: relative; width: max-content; max-width: 100%; color: var(--muted); font-size: 0.92rem; transition: color 180ms ease; }
.footer-col a:hover { color: var(--black); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.85rem 1.5rem;
  max-width: var(--maxw);
  margin: clamp(2.5rem, 5vw, 4rem) auto 0;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}
.footer-rights, .footer-legal a { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.03em; color: var(--muted); }
body[data-lang="zh"] .footer-rights, body[data-lang="zh"] .footer-legal a { font-family: var(--sans-tc); font-size: 0.74rem; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.footer-legal a { transition: color 180ms ease; }
.footer-legal a:hover { color: var(--black); }

/* ============================================================
   Mobile menu
   ============================================================ */
.nav-toggle { display: none; position: relative; width: 44px; height: 44px; margin-right: 0.4rem; border: 0; background: transparent; cursor: pointer; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  position: absolute; left: 50%;
  width: 20px; height: 1.5px;
  background: var(--black);
  transition: transform 260ms ease, top 260ms ease;
}
.nav-toggle-bars { top: calc(50% - 4px); transform: translateX(-50%); }
.nav-toggle-bars::before { content: ""; left: 0; top: 8px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { top: 50%; transform: translateX(-50%) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { top: 0; transform: rotate(-90deg); }
.nav-toggle:focus-visible { outline: 2px solid rgba(185, 113, 115, 0.55); outline-offset: 2px; }

.mobile-menu {
  position: fixed; inset: 0; z-index: 40;
  display: grid; align-content: center; justify-items: start;
  gap: clamp(1.2rem, 4svh, 2rem);
  padding: 7rem 9vw 4rem;
  background: var(--paper);
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(10px);
  transition: opacity 320ms ease, transform 320ms ease, visibility 0s linear 320ms;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); transition: opacity 320ms ease, transform 320ms ease, visibility 0s; }
.mobile-menu a:not(.button) { color: var(--ink); font-family: var(--serif); font-size: clamp(2rem, 8vw, 2.6rem); line-height: 1.15; }
body[data-lang="zh"] .mobile-menu a:not(.button) { font-family: var(--serif-tc); font-weight: 500; }
.mobile-menu-cta { margin-top: 1.4rem; min-width: 60%; }
body.menu-open { overflow: hidden; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .hero-inner,
  .return-section,
  .details-section,
  .collection-intro,
  .footer-top { grid-template-columns: 1fr; }

  .hero-figure { justify-self: stretch; }
  .hero-frame { aspect-ratio: 16 / 11; max-height: 52vh; }
  .hero-inner { min-height: 0; gap: clamp(1.8rem, 5vw, 3rem); }
  .collection-intro { align-items: start; }
}

@media (max-width: 760px) {
  :root { --intro-gap: 0.8rem; }
  .site-header { display: flex; justify-content: space-between; min-height: 56px; backdrop-filter: none; background: rgba(244, 236, 223, 0.96); }
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .logo { font-size: 1.55rem; }
  .header-actions { gap: 0; }

  .hero { padding: max(2.5rem, env(safe-area-inset-top)) var(--gutter) 3rem; }
  .hero-frame { aspect-ratio: 4 / 5; max-height: 62vh; }
  .hero-title-inner { font-size: clamp(2.8rem, 12vw, 4rem); }
  .hero-actions .button { width: 100%; }
  .hero-reassurance { max-width: none; }

  .section { padding: clamp(3rem, 8vh, 4.5rem) var(--gutter); }
  .detail-list div { grid-template-columns: 1fr; gap: 0.35rem; }
  .gallery-item, .gallery-item:nth-child(even) { --card-width: min(80vw, 360px); margin-top: 0; }
  .gallery-nav { display: none; }
}

@media (hover: none), (pointer: coarse) {
  .gallery-nav { display: none; }
}

/* ============================================================
   Motion — progressive enhancement, gated by .js
   ============================================================ */
.hero-title-inner { display: block; }
.js .hero .eyebrow,
.js .hero .hero-copy,
.js .hero .hero-origin,
.js .hero .hero-actions,
.js .hero .hero-set { opacity: 0; transform: translateY(14px); transition: opacity 700ms ease, transform 700ms ease; }
.js .hero .hero-title-inner { transform: translateY(115%); transition: transform 850ms cubic-bezier(0.22, 0.61, 0.36, 1); }
.js .hero-frame img { clip-path: inset(0 0 100% 0); transform: scale(1.05); }

.js .hero .eyebrow { transition-delay: 60ms; }
.js .hero .hero-title-inner { transition-delay: 120ms; }
.js .hero .hero-copy { transition-delay: 240ms; }
.js .hero .hero-origin { transition-delay: 300ms; }
.js .hero .hero-actions { transition-delay: 340ms; }
.js .hero .hero-set { transition-delay: 420ms; }

.js .hero.is-loaded .eyebrow,
.js .hero.is-loaded .hero-copy,
.js .hero.is-loaded .hero-origin,
.js .hero.is-loaded .hero-actions,
.js .hero.is-loaded .hero-set { opacity: 1; transform: translateY(0); }
.js .hero.is-loaded .hero-title-inner { transform: translateY(0); }
.js .hero.is-loaded .hero-frame img {
  clip-path: inset(0 0 0% 0);
  transform: scale(1);
  transition: clip-path 1100ms cubic-bezier(0.7, 0, 0.2, 1) 250ms, transform 7000ms ease-out;
}

/* Scroll reveal */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms cubic-bezier(0.22, 0.61, 0.36, 1), transform 700ms cubic-bezier(0.22, 0.61, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
.js [data-reveal].is-revealed { opacity: 1; transform: translateY(0); }

/* Quiet hover zoom — desktop pointers only */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .quiet-image img, .details-image img, .gallery-frame img,
  .hero-frame picture { transition: transform 700ms cubic-bezier(0.22, 0.61, 0.36, 1); }
  .quiet-image:hover img, .details-image:hover img, .gallery-item:hover .gallery-frame img,
  .hero-frame:hover picture { transform: scale(1.04); }
}

/* Seam draw-in */
@media (prefers-reduced-motion: no-preference) {
  .js .seam line, .js .seam path { stroke-dasharray: 1; stroke-dashoffset: 1; }
  .js .seam.is-drawn line, .js .seam.is-drawn path { stroke-dashoffset: 0; transition: stroke-dashoffset 1100ms cubic-bezier(0.22, 0.61, 0.36, 1); }
}

/* Language crossfade */
.js #main { transition: opacity 200ms ease, transform 200ms ease; }
.js body.is-switching-lang #main { opacity: 0; transform: translateY(6px); }

/* ============================================================
   Night scene — FAQ + footer flip to ivory-on-night after the
   dark waitlist panel.
   ============================================================ */
.faq-section h2, .faq-section summary, .faq-section details p, .faq-section .eyebrow,
.faq-list, details, .site-footer, .footer-logo, .footer-tagline, .footer-heading,
.footer-col a, .footer-rights, .footer-legal a, .footer-bottom {
  transition: color 600ms ease, border-color 600ms ease;
}
body[data-scene="night"] .faq-section h2,
body[data-scene="night"] .faq-section summary,
body[data-scene="night"] .footer-logo,
body[data-scene="night"] .footer-tagline { color: var(--ivory); }
body[data-scene="night"] .faq-section details p,
body[data-scene="night"] .site-footer,
body[data-scene="night"] .footer-col a,
body[data-scene="night"] .footer-rights,
body[data-scene="night"] .footer-legal a { color: rgba(251, 247, 239, 0.72); }
body[data-scene="night"] .faq-section .eyebrow,
body[data-scene="night"] .footer-heading { color: var(--accent-soft); }
body[data-scene="night"] .faq-list,
body[data-scene="night"] details,
body[data-scene="night"] .footer-top,
body[data-scene="night"] .footer-bottom { border-color: rgba(251, 247, 239, 0.2); }
body[data-scene="night"] summary::after { color: var(--accent-soft); }
body[data-scene="night"] .footer-col a:hover,
body[data-scene="night"] .footer-legal a:hover { color: var(--ivory); }

/* ============================================================
   Reduced motion — force final visible states, no transitions
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .hero .eyebrow, .js .hero .hero-copy, .js .hero .hero-origin,
  .js .hero .hero-actions, .js .hero .hero-set,
  .js .hero .hero-title-inner, .js [data-reveal], .js #main,
  .js body.is-switching-lang #main { opacity: 1 !important; transform: none !important; }
  .js .hero-frame img, .js .hero.is-loaded .hero-frame img { clip-path: none !important; transform: none !important; }
}
