@font-face {
  font-family: "Noto Serif SC";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/noto-serif-sc-700.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/instrument-serif-400.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/instrument-serif-400i.woff2") format("woff2");
}
@font-face {
  font-family: "JX Sans SC";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/noto-sans-sc-400.woff2") format("woff2");
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/outfit-400.woff2") format("woff2");
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/outfit-500.woff2") format("woff2");
}

:root {
  --ink: #071311;
  --ink-2: #10211c;
  --pine: #143f35;
  --moss: #1f6a56;
  --gold: #e0b07a;
  --gold-deep: #c4894a;
  --paper: #f3eee6;
  --paper-2: #e7e0d4;
  --quiet: #c5d0cb;
  --quiet-2: #8fa099;
  --ink-soft: #3c463f;
  --line: rgba(243, 238, 230, 0.16);
  --line-dark: rgba(7, 19, 17, 0.12);
  --serif: "Noto Serif SC", "Songti SC", "STSong", "PMingLiU", serif;
  --sans: "Outfit", "JX Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --latin: "Instrument Serif", "Iowan Old Style", Palatino, "Palatino Linotype", serif;
  --nav: 76px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  opacity: 0.09;
  background-image: url("../assets/noise.png");
  background-size: 180px 180px;
  mix-blend-mode: overlay;
}
img { max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--gold); color: var(--ink); }
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -40px;
  background: var(--gold);
  color: var(--ink);
  padding: 8px 12px;
  z-index: 100;
}
.skip:focus { top: 12px; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.frame {
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
}
.kicker {
  margin: 0 0 16px;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: 0.01em;
}
h1 em, h2 em, .name em {
  font-family: var(--latin);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
}
.lede {
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.65;
  color: var(--quiet);
  max-width: 38em;
}
.lede.dark { color: var(--ink); }
.lede em { font-style: normal; font-weight: 500; letter-spacing: 0.04em; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid rgba(243, 238, 230, 0.28);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.06em;
  transition: transform 0.35s cubic-bezier(.2,.7,.2,1), background 0.25s ease, color 0.25s ease;
}
.btn-gold {
  background: var(--gold);
  color: var(--ink);
  border-color: transparent;
}
.btn:hover { border-color: var(--gold); }
.btn-gold:hover { background: #f0c896; border-color: transparent; }
.btn-ink {
  background: var(--ink);
  color: var(--paper);
  border-color: transparent;
}
.btn-ink:hover { background: #123028; }
[data-theme="light"] .kicker { color: #8a5a28; }

.batt {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  width: min(100%, 440px);
  padding: 8px 16px 8px 8px;
  position: relative;
  border: 1px solid rgba(243, 238, 230, 0.24);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.2);
}
.batt::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  width: 6px;
  height: 28%;
  border-radius: 0 3px 3px 0;
  background: rgba(243, 238, 230, 0.32);
  translate: 0 -50%;
}
.batt span {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
  min-height: 72px;
  margin: 0;
  padding: 10px 8px 12px;
  border-radius: 8px;
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(243, 238, 230, 0.18);
  color: rgba(243, 238, 230, 0.46);
  transition: background 0.45s ease, color 0.45s ease, box-shadow 0.45s ease;
}
.batt i, .batt b { font-style: normal; display: block; }
.batt i { font-family: var(--latin); font-size: 13px; font-weight: 400; }
.batt b { font-family: var(--serif); font-size: 15px; font-weight: 700; }
.batt[data-cells="1"] span:nth-child(-n+1),
.batt[data-cells="2"] span:nth-child(-n+2),
.batt[data-cells="3"] span:nth-child(-n+3),
.batt[data-cells="4"] span:nth-child(-n+4) {
  background: var(--moss);
  color: var(--paper);
  box-shadow: none;
}
.batt[data-cells="4"] span:nth-child(4) {
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  color: var(--ink);
}
.batt-lg { width: min(100%, 520px); }
.batt-lg span { min-height: 156px; padding: 16px 12px 18px; }
.batt-lg b { font-size: 20px; }
.monument { position: relative; margin: 0; }

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--nav);
  padding: max(10px, env(safe-area-inset-top)) 24px 10px;
  color: var(--paper);
  background: #071311;
  border-bottom: 1px solid rgba(243, 238, 230, 0.12);
  transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}
html[data-nav="light"] .nav {
  color: var(--ink);
  background: #f3eee6;
  border-bottom-color: rgba(7, 19, 17, 0.1);
}
section[id] { scroll-margin-top: 84px; }
.wordmark {
  font-family: var(--serif);
  font-size: 22px;
  text-decoration: none;
  letter-spacing: 0.12em;
}
.nav-links { display: flex; gap: 8px; }
.nav-links a {
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.08em;
  padding: 12px 10px;
  opacity: 0.78;
}
.nav-links a:hover,
.nav-links a[aria-current="true"] { opacity: 1; }
.nav-links a[aria-current="true"] { box-shadow: inset 0 -1px 0 currentColor; }

.rail {
  position: fixed;
  left: 18px;
  top: 50%;
  width: 2px;
  height: 110px;
  margin-top: -55px;
  background: rgba(243, 238, 230, 0.16);
  z-index: 40;
  pointer-events: none;
}
.rail i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--gold);
  transform: scaleY(0);
  transform-origin: top;
}
html[data-nav="light"] .rail { background: rgba(7, 19, 17, 0.14); }

.hero {
  position: relative;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;
  padding: calc(var(--nav) + 12px) 0 0;
  overflow: hidden;
}
#field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.8;
  -webkit-mask-image: radial-gradient(120% 90% at 78% 46%, #000 0 34%, transparent 72%);
  mask-image: radial-gradient(120% 90% at 78% 46%, #000 0 34%, transparent 72%);
}
.spine {
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  letter-spacing: 0.42em;
  font-size: 11px;
  color: var(--quiet-2);
  margin: 0;
  z-index: 1;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 48px;
  align-items: center;
  padding-bottom: 28px;
}
.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(76px, 11vw, 148px);
  line-height: 0.9;
}
.hero h1 .latin {
  display: block;
  font-family: var(--latin);
  font-weight: 400;
  font-size: 0.28em;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin-bottom: 8px;
  line-height: 1;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.monument { margin: 0; }
.monument figcaption { margin-top: 16px; }
.monument b {
  display: block;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
}
.monument small { color: var(--quiet-2); letter-spacing: 0.08em; }
.hero-foot {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  align-items: center;
  padding-block: 18px;
  border-top: 1px solid var(--line);
  color: var(--quiet-2);
  font-size: 13px;
  letter-spacing: 0.16em;
}
.hero-scroll { margin-left: auto; }

.manifesto {
  background: var(--paper);
  color: var(--ink);
  padding: clamp(88px, 14vh, 150px) 0;
}
.man-text {
  margin: 0;
  max-width: 16em;
  font-family: var(--serif);
  font-size: clamp(34px, 4.6vw, 64px);
  line-height: 1.35;
  font-weight: 700;
}
.man-text span {
  display: block;
  color: rgba(7, 19, 17, 0.22);
  transition: color 0.45s ease;
}
.man-text span.is-lit { color: var(--ink); }

.index { padding: clamp(88px, 12vh, 140px) 0; }
.index h2 {
  margin: 0 0 28px;
  font-size: clamp(36px, 5vw, 64px);
}
.idx a {
  display: grid;
  grid-template-columns: 72px minmax(0, 1.5fr) minmax(88px, 0.6fr) 32px;
  gap: 16px;
  align-items: baseline;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
  transition: background 0.3s ease;
}
.idx a:last-child { border-bottom: 1px solid var(--line); }
.idx .no, .step .no, .ip-list .no {
  font-family: var(--latin);
  font-style: italic;
  color: var(--gold);
  font-size: 22px;
}
.idx .name {
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1.05;
}
.idx .tag { color: var(--quiet); letter-spacing: 0.12em; font-size: 14px; }
.idx .go { transition: transform 0.35s ease; }
.idx a:hover .go { transform: translateX(8px); }
.idx a:hover .name { color: var(--gold); }

.dl {
  background-color: var(--ink);
  background-image: radial-gradient(900px 480px at 12% 0%, rgba(31, 106, 86, 0.22), transparent 62%);
  padding: 0 0 36px;
}
.dl-grid { display: block; }
.dl-sticky {
  position: relative;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 112px 0 8px;
}
.dl .batt { width: min(100%, 520px); margin: 10px 0 4px; }
.dl h2 {
  margin: 0 0 12px;
  font-size: clamp(42px, 5vw, 72px);
  line-height: 1.12;
}
.dl-lead { color: var(--quiet); margin: 0 0 8px; max-width: 40em; }
.dl-note { color: var(--quiet-2); font-size: 14px; margin: 14px 0 22px; }
.dl-legal {
  color: var(--quiet-2);
  font-size: 13px;
  padding-bottom: 28px;
}
.steps {
  list-style: none;
  margin: 28px 0 8px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.step {
  min-height: 0;
  display: block;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 24px 26px;
  background: rgba(255, 255, 255, 0.02);
}
.step h3 {
  margin: 8px 0 10px;
  font-size: clamp(26px, 2.4vw, 34px);
  color: var(--paper);
}
.step p { margin: 0; max-width: 36em; color: rgba(197, 208, 203, 0.82); }
.step.is-on { border-color: rgba(224, 176, 122, 0.7); }

.wd {
  background: var(--paper);
  color: var(--ink);
  padding: clamp(96px, 14vh, 160px) 0;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}
.tags li {
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 14px;
  letter-spacing: 0.06em;
}
.wd-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
  align-items: start;
}
.wd-copy {
  border-left: 1px solid var(--line-dark);
  padding-left: 40px;
}
.wd h2 {
  margin: 0;
  font-size: clamp(72px, 10vw, 140px);
  line-height: 0.9;
  color: var(--ink);
}
.latin-line, .ting-en {
  font-family: var(--latin);
  font-style: italic;
  font-size: 28px;
  margin: 8px 0 0;
  color: var(--gold-deep);
}
.wd-copy p { max-width: 38em; }
.wd .kicker { color: var(--gold-deep); }

.ting {
  position: relative;
  display: flex;
  align-items: center;
  background-color: var(--ink);
  background-image: radial-gradient(900px 520px at 22% 50%, rgba(0, 0, 0, 0.45), transparent 70%);
  overflow: hidden;
  padding: 108px 0;
  border-top: 1px solid var(--line);
}
.ting-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 24px;
  align-items: center;
}
.orbs {
  width: min(100%, 540px);
  filter: drop-shadow(0 0 18px rgba(224, 176, 122, 0.18));
}
.orbs svg { width: 100%; height: auto; overflow: visible; }
.orbs circle {
  fill: none;
  stroke: rgba(224, 176, 122, 0.35);
  stroke-width: 1;
}
.orbs .hand {
  stroke: var(--gold);
  stroke-width: 1.4;
  transform-origin: 210px 210px;
  animation: spin 72s linear infinite;
}
.orbs .hand circle { fill: var(--gold); stroke: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.ting h2 {
  margin: 0;
  font-size: clamp(64px, 8vw, 120px);
  line-height: 0.95;
}
.ting .lede, .ting p { max-width: 34em; }
.ting-stop {
  color: var(--gold);
  font-size: 15px;
}
.ting-mark { color: var(--quiet-2); font-size: 14px; }

.ip { padding: 8px 0 88px; background: var(--ink); }
.ip h2 {
  margin: 0 0 36px;
  font-size: clamp(32px, 4vw, 48px);
}
.ip-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.ip-list li {
  border-top: 1px solid var(--line);
  padding: 20px 0 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}
.ip-list li + li { padding-left: 22px; border-left: 1px solid var(--line); }
.ip-list strong {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 700;
}
.ip-list li span:last-child { color: var(--quiet); font-size: 15px; }

.contact {
  padding: clamp(88px, 12vh, 140px) 0;
  background: var(--ink);
  border-top: 1px solid var(--line);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 280px);
  gap: 48px;
  align-items: center;
}
.contact h2 {
  margin: 0 0 12px;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.15;
  text-wrap: balance;
}
.qr-card {
  margin: 0;
  background: #fff;
  color: var(--ink);
  padding: 14px 14px 12px;
  border-radius: 12px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45), 0 18px 40px rgba(0, 0, 0, 0.28);
}
.qr-hint { display: none; margin: 8px 0 0; font-size: 13px; text-align: center; color: #3e4741; }
@media (pointer: coarse) { .qr-hint { display: block; } }
.qr-card img {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
  image-rendering: auto;
}
.qr-card figcaption {
  margin-top: 10px;
  text-align: center;
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 0.08em;
}

.site-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 72px;
  padding-top: 22px;
  padding-bottom: max(28px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--quiet-2);
}
.site-foot a { color: var(--quiet); font-weight: 500; }

.reveal { opacity: 1; }

@media (max-width: 1100px) {
  .spine { display: none; }
}
@media (max-width: 900px) {
  .spine, .rail, .only-fine { display: none; }
  .hero-grid, .wd-grid, .ting-grid, .contact-grid, .ip-list, .steps {
    grid-template-columns: 1fr;
  }
  .hero { min-height: 100svh; }
  .wd-copy { border-left: 0; padding-left: 0; }
  .ip-list li + li { padding-left: 0; border-left: 0; }
  .hero-grid { padding-top: 24px; }
  .hero h1 { font-size: clamp(64px, 18vw, 96px); }
  .batt b { font-size: 13px; }
  .batt-lg span, .dl .batt span { min-height: 92px; padding: 10px 6px 12px; }
  .dl-sticky { padding-top: 96px; }
  .hero-scroll { display: none; }
  .idx a {
    grid-template-columns: 48px 1fr;
    grid-template-areas:
      "no go"
      "name name"
      "tag tag";
  }
  .idx .no { grid-area: no; }
  .idx .go { grid-area: go; justify-self: end; }
  .idx .name { grid-area: name; }
  .idx .tag { grid-area: tag; }
  .orbs { max-width: 280px; margin-inline: auto; }
  .contact-grid { gap: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .orbs .hand { animation: none; }
  .man-text span { color: var(--ink); transition: none; }
  .btn, .idx .go, .batt span { transition: none; }
}

@media (max-width: 640px) {
  .frame { width: min(1240px, calc(100% - 32px)); }
  .nav { padding-inline: 16px; }
  .nav-links a { padding-inline: 6px; letter-spacing: 0.04em; font-size: 13px; }
  .hero-foot { letter-spacing: 0.08em; gap: 12px; }
}
