:root {
  --snow: #e8eef0;
  --paper: #f6f1e6;
  --pine: #14241c;
  --pine-2: #1e3328;
  --amber: #c4621a;
  --amber-2: #e08a3c;
  --ice: #9ec4d0;
  --acid: #8a2424;
  --ok: #2a6b4a;
  --mute: #5d6a63;
  --line: rgba(20, 36, 28, 0.12);
  --glass: rgba(246, 241, 230, 0.72);
  --serif: "Fraunces", "Songti SC", serif;
  --sans: "Noto Sans SC", "PingFang SC", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --shadow: 0 24px 48px rgba(20, 36, 28, 0.14);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

section[id] {
  scroll-margin-top: 88px;
}

body {
  margin: 0;
  color: var(--pine);
  background:
    linear-gradient(180deg, var(--snow) 0%, var(--paper) 38%, var(--snow) 100%);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
}

img {
  max-width: 100%;
  display: block;
}

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

.app-link {
  color: var(--amber);
  text-decoration: underline;
  text-underline-offset: 3px;
}

button {
  font-family: inherit;
  cursor: pointer;
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: rgba(196, 98, 26, 0.12);
  padding: 0.05em 0.4em;
}

.frost {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 5;
  opacity: 0.18;
  background-image: url("images/texture.webp");
  background-size: 420px auto;
  mix-blend-mode: multiply;
}

.vein {
  position: fixed;
  left: 18px;
  top: 120px;
  bottom: 80px;
  width: 3px;
  z-index: 25;
  background: linear-gradient(180deg, var(--ice), var(--amber), var(--pine));
  border-radius: 99px;
}

.vein .tap {
  position: absolute;
  left: -6px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--amber);
}

.vein .tap:nth-child(1) { top: 8%; }
.vein .tap:nth-child(2) { top: 28%; }
.vein .tap:nth-child(3) { top: 48%; }
.vein .tap:nth-child(4) { top: 68%; }
.vein .tap:nth-child(5) { top: 88%; }

.vein .tap.leak {
  border-color: var(--acid);
  box-shadow: 0 0 0 6px rgba(138, 36, 36, 0.18);
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 60;
  background: var(--paper);
  padding: 8px 12px;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 36px 14px 48px;
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand small {
  display: block;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--mute);
}

.seal {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--paper);
  background: var(--amber);
  clip-path: polygon(50% 0%, 82% 22%, 100% 55%, 70% 100%, 30% 100%, 0 55%, 18% 22%);
  font-family: var(--serif);
  font-size: 16px;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--pine);
  color: var(--pine);
  padding: 6px 12px;
}

.nav-links {
  display: flex;
  gap: 18px;
  font-size: 13px;
}

.nav-links a {
  color: var(--mute);
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}

.nav-links a.is-active,
.nav-links a:hover {
  color: var(--pine);
  border-bottom-color: var(--amber);
}

.nav-links a.live {
  color: var(--paper);
  background: var(--pine);
  border: 0;
  padding: 6px 12px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  min-height: calc(100vh - 72px);
  align-items: stretch;
}

.hero-copy {
  padding: 8vh 6vw 8vh 8vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-frame {
  margin: 0;
  position: relative;
  overflow: hidden;
}

.hero-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 560px;
}

.hero-frame figcaption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  background: rgba(20, 36, 28, 0.72);
  color: var(--paper);
  padding: 10px 14px;
  font-size: 13px;
}

.kicker,
.vlabel {
  font-family: var(--mono);
  letter-spacing: 0.22em;
  font-size: 11px;
  color: var(--amber);
  margin: 0 0 12px;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.06;
  margin: 0 0 16px;
}

h1 {
  font-size: clamp(40px, 6.4vw, 78px);
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(26px, 3.6vw, 42px);
}

h3 {
  font-size: 22px;
}

.lead {
  font-size: 17px;
  max-width: 42em;
  color: var(--pine-2);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0;
}

.chip {
  border: 1px dashed var(--amber);
  padding: 4px 10px;
  font-size: 12px;
  letter-spacing: 0.08em;
  font-family: var(--mono);
  background: rgba(196, 98, 26, 0.08);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid currentColor;
  font-size: 14px;
}

.btn-fill {
  background: var(--amber);
  color: var(--paper);
  border-color: var(--amber);
}

.btn-ghost {
  background: transparent;
  color: inherit;
}

.hero-meters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 32px 0 0;
}

.hero-meters div {
  border-top: 3px solid var(--ice);
  padding-top: 8px;
}

.hero-meters dt {
  font-size: 12px;
  color: var(--mute);
}

.hero-meters dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 20px;
}

.wrap {
  width: min(1140px, calc(100% - 72px));
  margin: 0 auto;
  padding: 88px 0;
}

.section-head {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 24px;
  margin-bottom: 40px;
}

.section-head p:last-child {
  color: var(--mute);
  margin: 0;
}

.ticket-row,
.bench-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.ticket,
.bench,
.io-grid > div {
  background: rgba(255, 252, 246, 0.86);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 22px 22px 18px;
  position: relative;
}

.ticket::before {
  content: "";
  position: absolute;
  top: 18px;
  right: 18px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--snow);
  box-shadow: inset 0 0 0 2px var(--amber);
}

.stamp {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--amber);
  border: 1px solid var(--amber);
  padding: 2px 8px;
  margin-bottom: 10px;
  font-family: var(--mono);
}

.alt {
  background: rgba(158, 196, 208, 0.16);
}

.station {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
  margin-bottom: 48px;
}

.station.flip {
  direction: rtl;
}

.station.flip > * {
  direction: ltr;
}

.station figure {
  margin: 0;
  border: 1px solid var(--line);
  background: var(--paper);
}

.station img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.station figcaption {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--mute);
}

.num {
  font-family: var(--mono);
  color: var(--amber);
  letter-spacing: 0.16em;
  font-size: 12px;
}

.hydro {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 252, 246, 0.9);
}

.hydro-stem {
  height: 160px;
  border: 2px solid var(--pine);
  border-radius: 999px;
  position: relative;
  overflow: hidden;
  background: #dfe8ea;
}

.hydro-stem i {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 58%;
  background: linear-gradient(180deg, var(--amber-2), var(--amber));
}

.hydro-read p {
  margin: 0 0 6px;
}

.hydro-kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--mute);
}

.lock-ok {
  color: var(--ok);
  font-weight: 600;
}

.lock-warn {
  color: var(--acid);
  font-weight: 600;
}

.rule-list {
  margin: 0;
  padding-left: 22px;
}

.rule-list li {
  margin-bottom: 10px;
}

.io-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

footer {
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 32px 0 48px;
  color: var(--mute);
  font-size: 14px;
}

@media (max-width: 900px) {
  .vein {
    display: none;
  }

  .nav {
    padding: 12px 16px;
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
    background: var(--paper);
    position: relative;
    z-index: 60;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 8px 0 12px;
  }

  .nav-links.open {
    display: flex;
  }

  .hero,
  .station,
  .station.flip,
  .section-head,
  .ticket-row,
  .bench-grid,
  .io-grid,
  .hero-meters,
  .footer-inner {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .wrap {
    width: min(1140px, calc(100% - 32px));
    padding: 56px 0;
  }

  .hero-copy {
    padding: 40px 20px 24px;
  }
}
