/* ==========================================================================
   BREEZEWINGS — CORE DESIGN SYSTEM
   "Inside the Frame" — cinematic editorial art direction
   ========================================================================== */

@import url("../fonts/fonts.css");

/* ---------- tokens ---------- */
:root {
  /* surfaces */
  --ink: #070709;
  --ink-deep: #040405;
  --ink-soft: #0b0b0e;
  --ink-card: #101014;
  --paper: #eae0cd;
  --paper-deep: #ded1bb;
  --paper-card: #f6f0e4;

  /* ink on dark */
  --text: #f3efe8;
  --text-2: rgba(243, 239, 232, 0.64);
  --text-3: rgba(243, 239, 232, 0.40);
  --text-4: rgba(243, 239, 232, 0.22);
  --line: rgba(243, 239, 232, 0.13);
  --line-soft: rgba(243, 239, 232, 0.065);

  /* ink on paper */
  --ink-text: #17150f;
  --ink-text-2: rgba(23, 21, 15, 0.66);
  --ink-text-3: rgba(23, 21, 15, 0.42);
  --ink-line: rgba(23, 21, 15, 0.14);
  --ink-line-soft: rgba(23, 21, 15, 0.07);

  /* accents */
  --gold: #d7a35f;
  --gold-bright: #f0c78e;
  --gold-soft: rgba(215, 163, 95, 0.16);
  --jade: #8fd6c4;
  --jade-soft: rgba(143, 214, 196, 0.14);

  /* type */
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", "Menlo", monospace;
  --display: "Cormorant Garamond", "Times New Roman", serif;

  /* motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --ease-io: cubic-bezier(0.65, 0.05, 0.36, 1);
  --dur: 0.9s;

  /* layout */
  --gutter: clamp(20px, 4.4vw, 72px);
  --max: 1720px;
  --nav-h: 84px;
  --radius: 2px;
}

@media (max-width: 900px) {
  :root {
    --nav-h: 68px;
  }
}

/* ---------- reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
  scroll-behavior: auto;
}

html.is-locked,
html.menu-open {
  overflow: hidden;
}

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.75;
  letter-spacing: 0.012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  text-rendering: optimizeLegibility;
}

img,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

::selection {
  background: var(--gold);
  color: #0b0b0e;
}

:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 4px;
}

/* scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--ink);
}
::-webkit-scrollbar-thumb {
  background: rgba(243, 239, 232, 0.16);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(215, 163, 95, 0.55);
}

/* ---------- type ---------- */
h1,
h2,
h3,
h4 {
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.display-xl,
.display-l,
.display-m,
.display-s {
  font-family: var(--serif);
  font-weight: 300;
  letter-spacing: 0.03em;
  line-height: 1.14;
  color: var(--text);
}

.display-xl {
  font-size: clamp(2.75rem, 7.6vw, 7.5rem);
  line-height: 1.04;
  letter-spacing: 0.05em;
}

.display-l {
  font-size: clamp(2.1rem, 4.6vw, 4.3rem);
  line-height: 1.12;
}

.display-m {
  font-size: clamp(1.65rem, 3vw, 2.75rem);
  line-height: 1.22;
}

.display-s {
  font-size: clamp(1.28rem, 2vw, 1.7rem);
  line-height: 1.4;
}

.serif {
  font-family: var(--serif);
  font-weight: 300;
}

.sans {
  font-family: var(--sans);
}

.mono {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
}

.latin-display {
  font-family: var(--display);
  font-weight: 300;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.em {
  color: var(--gold-bright);
  font-style: normal;
}

.lead {
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  line-height: 1.9;
  color: var(--text-2);
  font-weight: 300;
  max-width: 46ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.9em;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-3);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.eyebrow.no-rule::before {
  display: none;
}

/* ---------- layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.wrap-narrow {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: clamp(84px, 12vw, 180px);
}

.section-tight {
  padding-block: clamp(56px, 7vw, 104px);
}

.full-bleed {
  width: 100vw;
  margin-inline: calc(50% - 50vw);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 32px);
}

.rule {
  height: 1px;
  width: 100%;
  background: var(--line);
}

.rule-gold {
  height: 1px;
  width: 56px;
  background: var(--gold);
  opacity: 0.8;
}

/* section head */
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 96px);
  align-items: end;
  padding-bottom: clamp(36px, 5vw, 72px);
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: clamp(36px, 5vw, 72px);
}

.section-head .head-main {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.section-head .head-side {
  justify-self: end;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-end;
}

.section-head .head-side .lead {
  text-align: left;
  max-width: 38ch;
}

@media (max-width: 900px) {
  .section-head {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .section-head .head-side {
    justify-self: start;
    text-align: left;
    align-items: flex-start;
  }
}

.sec-no {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 0.8em;
}

.sec-no::after {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--gold);
  opacity: 0.45;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ---------- paper theme ---------- */
.theme-paper {
  background: var(--paper);
  color: var(--ink-text);
}

.theme-paper .display-xl,
.theme-paper .display-l,
.theme-paper .display-m,
.theme-paper .display-s {
  color: var(--ink-text);
}

.theme-paper .lead,
.theme-paper .text-2 {
  color: var(--ink-text-2);
}

.theme-paper .eyebrow,
.theme-paper .mono,
.theme-paper .meta-row {
  color: var(--ink-text-3);
}

.theme-paper .rule {
  background: var(--ink-line);
}
.theme-paper .rule-gold {
  background: var(--ink-text);
  opacity: 0.55;
}
.theme-paper .section-head {
  border-bottom-color: var(--ink-line-soft);
}
.theme-paper .sec-no {
  color: var(--ink-text);
}
.theme-paper .sec-no::after {
  background: var(--ink-text);
  opacity: 0.35;
}
.theme-paper .em {
  color: #8a5f2a;
}

/* ---------- grain + vignette ---------- */
.grain {
  position: fixed;
  inset: -60px;
  z-index: 90;
  pointer-events: none;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
  animation: grain-shift 1.4s steps(4) infinite;
  will-change: transform;
}

@keyframes grain-shift {
  0% { transform: translate3d(0, 0, 0); }
  25% { transform: translate3d(-2%, 1%, 0); }
  50% { transform: translate3d(1%, -2%, 0); }
  75% { transform: translate3d(-1%, -1%, 0); }
  100% { transform: translate3d(2%, 1%, 0); }
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 89;
  pointer-events: none;
  background: radial-gradient(
    120% 90% at 50% 45%,
    transparent 55%,
    rgba(4, 4, 5, 0.42) 100%
  );
}

/* ---------- nav ---------- */
.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 120;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: transform 0.7s var(--ease), background-color 0.6s var(--ease),
    border-color 0.6s var(--ease), backdrop-filter 0.6s var(--ease);
  border-bottom: 1px solid transparent;
}

.site-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(7, 7, 9, 0.55) 0%,
    rgba(7, 7, 9, 0) 100%
  );
  pointer-events: none;
  transition: opacity 0.6s var(--ease);
}

.site-nav.is-scrolled {
  background: rgba(7, 7, 9, 0.72);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
  border-bottom-color: var(--line-soft);
}

.site-nav.is-scrolled::before {
  opacity: 0;
}

.site-nav.is-hidden {
  transform: translateY(-101%);
}

.nav-inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 56px);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.nav-logo {
  height: 24px;
  width: auto;
  filter: drop-shadow(0 0 18px rgba(243, 239, 232, 0.12));
}

.brand-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 1px solid var(--line);
  padding-left: 16px;
}

.brand-meta .bm-latin {
  font-family: var(--display);
  font-size: 0.82rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-2);
  line-height: 1;
}

.brand-meta .bm-cn {
  font-size: 0.56rem;
  letter-spacing: 0.28em;
  color: var(--text-4);
  line-height: 1.4;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.6vw, 28px);
  margin-left: auto;
}

.nav-link {
  position: relative;
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--text-3);
  padding: 10px 0;
  transition: color 0.45s var(--ease);
  white-space: nowrap;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 4px;
  width: 100%;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.6s var(--ease);
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-link.is-active {
  color: var(--gold-bright);
}

.nav-cta {
  margin-left: clamp(16px, 2.4vw, 40px);
  flex-shrink: 0;
}

.nav-timecode {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--text-4);
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .brand-meta,
  .nav-timecode {
    display: none;
  }
}

@media (max-width: 900px) {
  .nav-links,
  .nav-timecode,
  .nav-cta {
    display: none;
  }
  .nav-toggle {
    display: flex;
  }
}

.nav-toggle {
  display: none;
  margin-left: auto;
  align-items: center;
  gap: 12px;
  padding: 8px 2px;
  color: var(--text-2);
}

.nav-toggle .nt-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.nav-toggle .nt-bars {
  position: relative;
  width: 22px;
  height: 10px;
}

.nav-toggle .nt-bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transition: transform 0.5s var(--ease), opacity 0.3s;
}

.nav-toggle .nt-bars span:first-child {
  top: 0;
}
.nav-toggle .nt-bars span:last-child {
  bottom: 0;
}

.menu-open .nav-toggle .nt-bars span:first-child {
  transform: translateY(4.5px) rotate(45deg);
}
.menu-open .nav-toggle .nt-bars span:last-child {
  transform: translateY(-4.5px) rotate(-45deg);
}

/* ---------- mobile menu ---------- */
.site-menu {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--nav-h) + 4vh) var(--gutter) 5vh;
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path 0.9s var(--ease), visibility 0.9s;
}

.menu-open .site-menu {
  clip-path: inset(0 0 0% 0);
  visibility: visible;
}

.site-menu::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    80% 60% at 80% 10%,
    rgba(215, 163, 95, 0.1),
    transparent 60%
  );
  pointer-events: none;
}

.menu-list {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.4vh, 14px);
  position: relative;
  z-index: 1;
}

.menu-item {
  overflow: hidden;
}

.menu-link {
  display: flex;
  align-items: baseline;
  gap: 20px;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 7.2vw, 3.1rem);
  font-weight: 300;
  letter-spacing: 0.05em;
  line-height: 1.28;
  color: var(--text-2);
  transform: translateY(110%);
  transition: transform 0.9s var(--ease), color 0.4s;
}

.menu-open .menu-link {
  transform: translateY(0);
}

.menu-item:nth-child(1) .menu-link { transition-delay: 0.08s; }
.menu-item:nth-child(2) .menu-link { transition-delay: 0.13s; }
.menu-item:nth-child(3) .menu-link { transition-delay: 0.18s; }
.menu-item:nth-child(4) .menu-link { transition-delay: 0.23s; }
.menu-item:nth-child(5) .menu-link { transition-delay: 0.28s; }
.menu-item:nth-child(6) .menu-link { transition-delay: 0.33s; }

.menu-link .ml-no {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  transform: translateY(-0.9em);
}

.menu-link:hover {
  color: var(--text);
}

.menu-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  position: relative;
  z-index: 1;
}

/* ---------- buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 15px 26px;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  line-height: 1;
  border-radius: 999px;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.5s var(--ease), border-color 0.5s var(--ease),
    background-color 0.5s var(--ease);
  white-space: nowrap;
}

.btn .btn-label {
  position: relative;
  z-index: 2;
}

.btn .btn-arrow {
  position: relative;
  z-index: 2;
  display: inline-flex;
  transition: transform 0.6s var(--ease);
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--gold);
  transform: translateY(101%);
  transition: transform 0.65s var(--ease);
}

.btn:hover::before {
  transform: translateY(0);
}

.btn:hover .btn-arrow {
  transform: translate(3px, -3px);
}

.btn-primary {
  background: var(--paper);
  color: #111009;
}

.btn-primary:hover {
  color: #111009;
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text-2);
}

.btn-ghost::before {
  background: rgba(243, 239, 232, 0.06);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: rgba(243, 239, 232, 0.3);
}

.btn-sm {
  padding: 12px 20px;
  font-size: 0.68rem;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-3);
  transition: color 0.4s;
}

.link-arrow::after {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  transition: width 0.5s var(--ease);
}

.link-arrow:hover {
  color: var(--gold-bright);
}

.link-arrow:hover::after {
  width: 44px;
}

/* ---------- reveal ---------- */
.reveal {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: var(--d, 0s);
  will-change: opacity, transform;
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

.reveal-soft {
  opacity: 0;
  transition: opacity 1.4s var(--ease);
  transition-delay: var(--d, 0s);
}

.reveal-soft.is-in {
  opacity: 1;
}

.line-mask {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}

.line-inner {
  display: block;
  transform: translate3d(0, 112%, 0);
  transition: transform 1.15s var(--ease);
  transition-delay: var(--d, 0s);
  will-change: transform;
}

.is-in .line-inner,
.line-inner.is-in {
  transform: none;
}

.split-char {
  display: inline-block;
  opacity: 0;
  transform: translate3d(0, 0.45em, 0);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: calc(var(--i, 0) * 0.018s);
  will-change: opacity, transform;
}

.is-in .split-char {
  opacity: 1;
  transform: none;
}

.split-char.is-space {
  width: 0.28em;
}

/* image reveal */
.img-reveal {
  position: relative;
  overflow: hidden;
}

.img-reveal > img,
.img-reveal > video,
.img-reveal > canvas {
  will-change: transform;
}

.img-reveal::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: scaleY(1);
  transform-origin: bottom;
  transition: transform 1.3s var(--ease);
  z-index: 2;
  pointer-events: none;
}

.theme-paper .img-reveal::after {
  background: var(--paper);
}

.img-reveal.is-in::after {
  transform: scaleY(0);
}

/* ---------- cursor ---------- */
.cursor,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  pointer-events: none;
  mix-blend-mode: difference;
  will-change: transform;
}

.cursor {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  transform: translate3d(-50%, -50%, 0);
}

.cursor-ring {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.45s var(--ease), height 0.45s var(--ease),
    border-color 0.45s var(--ease), background-color 0.45s var(--ease);
}

.cursor-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.3s, transform 0.3s;
  white-space: nowrap;
}

.cursor-ring.is-hover {
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.8);
}

.cursor-ring.is-view {
  width: 86px;
  height: 86px;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.9);
}

.cursor-ring.is-view .cursor-label {
  opacity: 1;
  transform: scale(1);
}

body.is-hovering .cursor {
  opacity: 0;
}

@media (hover: none), (pointer: coarse) {
  .cursor,
  .cursor-ring {
    display: none !important;
  }
}

/* ---------- chapter rail ---------- */
.chapter-rail {
  position: fixed;
  right: clamp(14px, 2vw, 34px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-end;
  pointer-events: auto;
}

.chapter-item {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 7px 0;
  color: var(--text-4);
  transition: color 0.4s;
}

.chapter-item .ch-no {
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.16em;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.4s, transform 0.4s;
}

.chapter-item .ch-label {
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.4s, transform 0.4s;
}

.chapter-item .ch-tick {
  width: 18px;
  height: 1px;
  background: currentColor;
  transition: width 0.5s var(--ease), background 0.4s;
}

.chapter-item:hover {
  color: var(--text-2);
}

.chapter-item:hover .ch-label,
.chapter-item.is-active .ch-label {
  opacity: 1;
  transform: none;
}

.chapter-item.is-active {
  color: var(--gold);
}

.chapter-item.is-active .ch-tick {
  width: 34px;
}

.chapter-item.is-active .ch-no {
  opacity: 1;
  transform: none;
}

.chapter-rail.is-paper .chapter-item {
  color: rgba(23, 21, 15, 0.28);
}

.chapter-rail.is-paper .chapter-item.is-active {
  color: #8a5f2a;
}

.chapter-rail.is-paper .chapter-item:hover {
  color: rgba(23, 21, 15, 0.6);
}

@media (max-width: 1200px) {
  .chapter-rail {
    display: none;
  }
}

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 56px);
  background: rgba(4, 4, 5, 0.94);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s var(--ease), visibility 0.45s;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-figure {
  position: relative;
  max-width: min(1400px, 92vw);
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transform: scale(0.97);
  transition: transform 0.6s var(--ease);
}

.lightbox.is-open .lightbox-figure {
  transform: scale(1);
}

.lightbox-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 76vh;
  background: #0a0a0c;
  border: 1px solid var(--line);
  overflow: hidden;
}

.lightbox-stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}

.lightbox-title {
  color: var(--text-2);
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

.lightbox-close {
  position: absolute;
  top: -48px;
  right: 0;
  z-index: 2;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text-2);
  transition: border-color 0.4s, color 0.4s, transform 0.4s;
}

.lightbox-close:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: rotate(90deg);
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  background: rgba(7, 7, 9, 0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: border-color 0.4s, color 0.4s, background 0.4s;
}

.lightbox-arrow:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.lightbox-prev {
  left: clamp(8px, 2vw, 28px);
}
.lightbox-next {
  right: clamp(8px, 2vw, 28px);
}

@media (max-width: 700px) {
  .lightbox-prev {
    left: 8px;
  }
  .lightbox-next {
    right: 8px;
  }
  .lightbox-close {
    top: -44px;
  }
}

/* ---------- page transition ---------- */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: var(--ink);
  transform: translateY(100%);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-transition .pt-line {
  width: min(220px, 40vw);
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
}

.page-transition.is-out {
  animation: pt-out 0.75s var(--ease-io) forwards;
  pointer-events: all;
}

.page-transition.is-out .pt-line {
  animation: pt-line 0.75s var(--ease-io) forwards;
}

.page-transition.is-in {
  transform: translateY(0);
  animation: pt-in 0.8s var(--ease) 0.05s forwards;
}

@keyframes pt-out {
  0% { transform: translateY(100%); }
  100% { transform: translateY(0); }
}
@keyframes pt-in {
  0% { transform: translateY(0); }
  100% { transform: translateY(-100%); }
}
@keyframes pt-line {
  0% { transform: scaleX(0); }
  45% { transform: scaleX(1); }
  100% { transform: scaleX(1); }
}

/* ---------- marquee ---------- */
.marquee {
  overflow: hidden;
  display: flex;
  width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  display: flex;
  flex-shrink: 0;
  gap: 0;
  min-width: 100%;
  animation: marquee var(--marquee-dur, 40s) linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- footer ---------- */
.site-footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--line-soft);
  padding-top: clamp(56px, 7vw, 100px);
  overflow: hidden;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(28px, 5vw, 90px);
  padding-bottom: clamp(42px, 5vw, 72px);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.footer-logo {
  height: 30px;
  width: auto;
  align-self: flex-start;
  opacity: 0.92;
}

.footer-tagline {
  font-family: var(--serif);
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  color: var(--text-2);
  letter-spacing: 0.08em;
}

.footer-col .fc-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-4);
  margin-bottom: 18px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 0.82rem;
  color: var(--text-2);
  transition: color 0.4s, transform 0.4s;
  width: fit-content;
}

.footer-links a:hover {
  color: var(--gold-bright);
  transform: translateX(4px);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-2);
}

.footer-qr {
  width: 108px;
  height: 108px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #ece5d8;
  padding: 6px;
  object-fit: contain;
}

.footer-wordmark {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(3.6rem, 13.5vw, 17rem);
  line-height: 0.82;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1px rgba(243, 239, 232, 0.14);
  padding-top: 0.06em;
  margin-bottom: -0.06em;
  white-space: nowrap;
  user-select: none;
  transition: color 0.8s var(--ease), -webkit-text-stroke-color 0.8s;
}

.footer-wordmark:hover {
  color: rgba(243, 239, 232, 0.04);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line-soft);
  padding-block: 22px;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-4);
}


.footer-bottom a.footer-icp {
  color: var(--text-3);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: color .2s ease, border-color .2s ease;
}

.footer-bottom a.footer-icp:hover {
  color: var(--gold);
  border-color: var(--gold);
}

.footer-bottom .fb-mid {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

@media (max-width: 980px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .footer-top {
    grid-template-columns: 1fr;
  }
  .footer-wordmark {
    font-size: 21vw;
  }
}

/* ---------- helpers ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-2 { color: var(--text-2); }
.text-3 { color: var(--text-3); }

.spacer-lg { height: clamp(48px, 8vw, 120px); }

.v-line {
  width: 1px;
  height: 72px;
  background: linear-gradient(180deg, var(--gold), transparent);
}

.bracket-label {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--text-3);
}

/* ---------- scroll progress ---------- */
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  pointer-events: none;
  background: rgba(243, 239, 232, 0.04);
}

.scroll-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  opacity: 0.85;
}

/* ---------- skip link ---------- */
.skip-link {
  position: fixed;
  left: 16px;
  top: -70px;
  z-index: 999;
  background: var(--paper);
  color: #111009;
  padding: 10px 16px;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  border-radius: 2px;
  transition: top 0.3s var(--ease);
}

.skip-link:focus {
  top: 16px;
}

/* ---------- footer extras ---------- */
.footer-note {
  font-size: 0.8rem;
  line-height: 1.9;
  color: var(--text-3);
}

.footer-hint {
  font-size: 0.68rem;
  color: var(--text-4);
  letter-spacing: 0.04em;
}

.footer-addr {
  margin-top: 8px;
  font-size: 0.72rem;
  line-height: 1.8;
  color: var(--text-3);
}

/* ---------- mobile nav (specificity overrides) ---------- */
@media (max-width: 900px) {
  .site-nav .nav-links,
  .site-nav .nav-timecode,
  .site-nav .nav-cta {
    display: none;
  }
  .site-nav .nav-toggle {
    display: flex;
  }
  .site-nav .nav-inner {
    gap: 12px;
  }
}

/* ---------- no-js fallback ---------- */
.no-js .intro {
  display: none !important;
}

.no-js .line-inner,
.no-js .split-char,
.no-js .reveal,
.no-js .reveal-soft,
.no-js .hero-kicker,
.no-js .hero-fade {
  opacity: 1 !important;
  transform: none !important;
}

.no-js .img-reveal::after {
  display: none !important;
}

.no-js .hero-title .line-inner {
  transform: none !important;
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal,
  .reveal-soft,
  .split-char,
  .line-inner {
    opacity: 1 !important;
    transform: none !important;
  }
  .grain {
    animation: none;
  }
  .cursor,
  .cursor-ring {
    display: none !important;
  }
}

/* live business nav */
.nav-link-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid rgba(215, 163, 95, .34);
  color: var(--gold-bright);
  border-radius: 2px;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}

.nav-link-live:hover,
.nav-link-live.is-active {
  color: var(--paper);
  border-color: var(--gold);
  background: var(--gold-soft);
}

.nav-link-live i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 9px rgba(215, 163, 95, .8);
  flex: 0 0 auto;
}

.nav-mobile-live {
  display: none;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .12em;
  color: var(--text-2);
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-mobile-live:before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 9px rgba(215, 163, 95, .8);
}

@media (max-width: 900px) {
  .site-nav .nav-mobile-live {
    display: inline-flex;
    margin-left: auto;
    margin-right: 14px;
  }

  .site-nav .nav-toggle {
    margin-left: 0;
  }
}
