:root {
  --ink: #f3ece0;
  --mute: #b7aa96;
  --paper: #14110e;
  --paper-2: #1c1814;
  --deep: #0b0908;
  --brass: #c4a36a;
  --brass-2: #e0c48a;
  --moss: #6f8f72;
  --hot: #d45a3a;
  --line: rgba(243, 236, 224, 0.14);
  --glass: rgba(20, 17, 14, 0.55);
  --foil: linear-gradient(135deg, #c4a36a, #8fbfc4, #d9b48a, #6f8f72);
  --serif: "Noto Serif SC", "Songti SC", serif;
  --sans: "Noto Sans SC", "PingFang SC", sans-serif;
  --shadow: 0 28px 60px rgba(0, 0, 0, 0.45);
}

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

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  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,
.live {
  color: var(--brass-2);
  border-bottom: 1px solid rgba(196, 163, 106, 0.45);
  font-style: italic;
}

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

code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.92em;
  background: rgba(196, 163, 106, 0.14);
  padding: 0.05em 0.35em;
}

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

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

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

.nav {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  width: min(1180px, calc(100% - 24px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px 8px 14px;
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(22px) saturate(1.5);
  border: 1px solid rgba(243, 236, 224, 0.16);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.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(--sans);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--mute);
}

.seal {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--deep);
  background: var(--brass);
}

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

.nav-links {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 13px;
}

.nav-links a {
  color: var(--mute);
  padding: 4px 2px;
}

.nav-links a.is-active,
.nav-links a:hover {
  color: var(--brass-2);
}

.nav-links .live {
  padding: 6px 12px;
  border: 1px solid var(--brass);
  border-radius: 99px;
  color: var(--brass-2);
}

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-items: end;
  overflow: hidden;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: drift 28s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(80% 60% at 20% 80%, rgba(196, 163, 106, 0.18), transparent 50%),
    linear-gradient(180deg, rgba(11, 9, 8, 0.18) 0%, rgba(11, 9, 8, 0.55) 48%, rgba(11, 9, 8, 0.94) 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: 12vh 8vw 10vh;
  max-width: 980px;
}

.kicker,
.vlabel {
  letter-spacing: 0.22em;
  font-size: 12px;
  color: var(--brass-2);
  margin: 0 0 12px;
  text-transform: uppercase;
}

.vlabel {
  font-style: italic;
}

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

h1 {
  font-size: clamp(46px, 8.4vw, 104px);
  letter-spacing: -0.04em;
}

h2 {
  font-size: clamp(28px, 4vw, 44px);
}

h3 {
  font-size: 22px;
}

.lead {
  font-size: 18px;
  max-width: 42em;
  color: rgba(243, 236, 224, 0.86);
}

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

.chip {
  border: 1px solid rgba(243, 236, 224, 0.28);
  padding: 4px 10px;
  font-size: 12px;
  letter-spacing: 0.08em;
  border-radius: 99px;
  backdrop-filter: blur(8px);
}

.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;
  border-radius: 99px;
}

.btn-fill {
  background: var(--brass);
  color: var(--deep);
  border-color: var(--brass);
}

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

.wrap {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 96px 0;
}

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

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

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card,
.bench {
  background:
    linear-gradient(var(--paper-2), var(--paper-2)) padding-box,
    var(--foil) border-box;
  border: 1px solid transparent;
  padding: 22px 22px 18px;
  border-radius: 28px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.card {
  min-height: 220px;
}

.stamp {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--brass);
  border: 1px solid var(--brass);
  padding: 2px 8px;
  margin-bottom: 10px;
  font-style: italic;
  border-radius: 99px;
}

.card ul,
.io-grid ul,
.rule-list {
  margin: 0;
  padding-left: 1.1em;
}

.card li,
.io-grid li,
.rule-list li {
  margin: 0.35em 0;
}

.alt {
  background: linear-gradient(180deg, #1a1612 0%, var(--paper) 100%);
}

.step {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
  margin-bottom: 72px;
}

.step.reverse {
  direction: rtl;
}

.step.reverse > * {
  direction: ltr;
}

.num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 28px;
  color: var(--brass);
  display: block;
  margin-bottom: 8px;
}

figure {
  margin: 0;
}

figure img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--mute);
  font-style: italic;
}

.demo {
  margin-top: 22px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px dashed rgba(196, 163, 106, 0.45);
  background: rgba(196, 163, 106, 0.08);
}

.demo p {
  margin: 0 0 8px;
}

.demo-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.ok {
  color: var(--moss);
}

.warn {
  color: var(--hot);
}

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

.bench h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.bench p {
  margin: 0;
  color: var(--mute);
  font-size: 14px;
}

.rule-list {
  font-size: 17px;
  max-width: 46em;
}

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

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

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

@media (max-width: 860px) {
  .nav {
    border-radius: 24px;
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding: 8px 10px 14px;
  }

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

  .section-head,
  .grid-3,
  .step,
  .step.reverse,
  .io-grid,
  .bench-grid {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .footer-inner {
    flex-direction: column;
  }

  h1 {
    font-size: 42px;
  }

  figure img {
    height: 220px;
  }

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