:root {
  --ink: #152238;
  --ink-soft: #344057;
  --paper: #f3eddf;
  --paper-light: #fffaf0;
  --blue: #1672e8;
  --blue-deep: #0755b7;
  --red: #e54c38;
  --yellow: #f2b63e;
  --green: #3a9b6b;
  --line: rgba(21, 34, 56, 0.22);
  --shadow: 0 24px 70px rgba(25, 36, 55, 0.16);
  --serif: "Iowan Old Style", "Baskerville", "Yu Mincho", "Hiragino Mincho ProN", "Songti SC", serif;
  --sans: "Avenir Next", "Hiragino Sans", "Yu Gothic", "Noto Sans", sans-serif;
  --mono: "SFMono-Regular", "Cascadia Mono", "Menlo", monospace;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 10%, rgba(22, 114, 232, 0.07), transparent 28rem),
    radial-gradient(circle at 85% 32%, rgba(229, 76, 56, 0.06), transparent 24rem),
    repeating-linear-gradient(0deg, rgba(21, 34, 56, 0.018) 0, rgba(21, 34, 56, 0.018) 1px, transparent 1px, transparent 5px),
    var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button, input { font: inherit; }

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 100;
  transform: translateY(-180%);
  padding: 10px 16px;
  color: white;
  background: var(--ink);
  border-radius: 4px;
}
.skip-link:focus { transform: translateY(0); }

.section-shell {
  width: min(1220px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 34px;
  min-height: 78px;
  padding: 10px max(24px, calc((100vw - 1320px) / 2));
  background: rgba(243, 237, 223, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(140%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.brand-mark {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
}
.brand-mark i {
  position: absolute;
  border: 2px solid var(--ink);
  border-radius: 50%;
}
.brand-mark i:nth-child(1) { width: 22px; height: 22px; left: 0; top: 8px; }
.brand-mark i:nth-child(2) { width: 22px; height: 22px; right: 0; top: 0; border-color: var(--blue); }
.brand-mark i:nth-child(3) { width: 8px; height: 8px; right: 4px; bottom: 0; background: var(--red); border-color: var(--red); }

.main-nav {
  display: flex;
  justify-content: center;
  gap: clamp(18px, 3vw, 42px);
}
.main-nav a {
  position: relative;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -6px;
  height: 2px;
  background: var(--red);
  transition: right 180ms ease;
}
.main-nav a:hover::after,
.main-nav a:focus-visible::after { right: 0; }

.language-switcher {
  display: flex;
  gap: 5px;
  padding: 4px;
  background: rgba(255,255,255,0.58);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.language-switcher button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 4px 9px;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.language-switcher button b { font-size: 11px; }
.language-switcher button[aria-pressed="true"] {
  color: white;
  background: var(--ink);
  box-shadow: 0 4px 12px rgba(21, 34, 56, 0.25);
}
.language-switcher button:hover { transform: translateY(-1px); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(480px, 1.12fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
  min-height: 780px;
  padding-block: 78px 88px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.eyebrow span {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  color: white;
  background: var(--red);
  border-radius: 50%;
  font-style: normal;
}
.eyebrow em { font-style: normal; }

.hero h1,
.section-heading h2,
.anchor-copy h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.98;
}
.hero h1 { max-width: 760px; font-size: clamp(3.2rem, 5.8vw, 5.25rem); }
.hero-lead {
  max-width: 690px;
  margin: 30px 0 0;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 20px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.button:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(21,34,56,.18); }
.button-primary { color: white; background: var(--ink); }
.button-primary::after { content: "↘"; margin-left: 10px; color: var(--yellow); }
.button-ghost { background: rgba(255,255,255,.32); }
.micro-note { margin: 18px 0 0; color: var(--ink-soft); font-size: 12px; }

.hero-visual,
.editorial-image,
.wide-image,
.anchor-image { margin: 0; }
.hero-visual {
  position: relative;
  padding: 14px;
  background: var(--paper-light);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: rotate(1.2deg);
}
.hero-visual::before {
  content: "";
  position: absolute;
  inset: -13px 24px 20px -19px;
  z-index: -1;
  border: 2px solid var(--blue);
  transform: rotate(-2deg);
}
.hero-visual img { aspect-ratio: 16/9; object-fit: cover; }
.hero-visual figcaption,
.wide-image figcaption {
  padding: 12px 4px 2px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 13px;
}
.film-label {
  display: flex;
  justify-content: space-between;
  padding: 0 3px 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
}
.film-label b { color: var(--red); }

.signal-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  color: white;
  background: var(--ink);
  border-block: 1px solid rgba(255,255,255,.16);
}
.signal-strip div {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 24px clamp(20px, 4vw, 60px);
  border-right: 1px solid rgba(255,255,255,.15);
}
.signal-strip div:last-child { border-right: 0; }
.signal-strip strong { color: var(--yellow); font-family: var(--serif); font-size: 2.25rem; }
.signal-strip span { font-size: 12px; line-height: 1.25; text-transform: uppercase; letter-spacing: .08em; }

.quick,
.architecture,
.layers,
.install { padding-block: 130px; }
.section-heading { max-width: 900px; margin-bottom: 60px; }
.section-heading h2,
.anchor-copy h2 { font-size: clamp(2.5rem, 4.5vw, 4.25rem); }
.section-heading > p:last-child { max-width: 760px; margin: 26px 0 0; color: var(--ink-soft); font-size: 1.08rem; }

.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--ink); }
.quick-card {
  position: relative;
  min-height: 320px;
  padding: 34px;
  background: rgba(255,255,255,.28);
  border-right: 1px solid var(--ink);
}
.quick-card:last-child { border-right: 0; }
.quick-card-accent { background: var(--yellow); }
.quick-card-dark { color: white; background: var(--blue-deep); }
.card-index { position: absolute; right: 24px; top: 19px; font-family: var(--serif); font-size: 3rem; opacity: .18; }
.quick-card h3 { margin: 70px 0 18px; font-family: var(--serif); font-size: 2rem; }
.quick-card p { margin: 0; }
.quick-card code { display: block; margin-top: 28px; font-family: var(--mono); font-size: 11px; white-space: normal; }

.failure-section,
.choose-section,
.rules-section {
  color: white;
  background:
    linear-gradient(125deg, rgba(255,255,255,.035) 25%, transparent 25%) 0 0 / 28px 28px,
    var(--ink);
  padding-block: 130px;
}
.section-heading-light .eyebrow,
.section-heading-light > p:last-child { color: rgba(255,255,255,.7); }
.failure-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: 70px; align-items: center; }
.failure-list { border-top: 1px solid rgba(255,255,255,.22); }
.failure-card {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid rgba(255,255,255,.22);
}
.failure-card > span { color: var(--red); font-family: var(--mono); font-weight: 800; }
.failure-card h3 { margin: 0 0 5px; font-family: var(--serif); font-size: 1.55rem; }
.failure-card p { margin: 0; color: rgba(255,255,255,.68); font-size: 14px; }
.editorial-image { padding: 10px; color: var(--ink); background: var(--paper-light); transform: rotate(-1deg); box-shadow: 0 24px 70px rgba(0,0,0,.25); }
.editorial-image img { aspect-ratio: 16/9; object-fit: cover; }
.editorial-image figcaption { display: flex; gap: 18px; align-items: center; padding: 12px 5px 3px; font-size: 11px; }
.editorial-image figcaption b { color: var(--red); font-family: var(--mono); }

.control-map {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, minmax(150px, auto));
  gap: 42px 56px;
  min-height: 580px;
  padding: 55px;
  overflow: hidden;
  color: white;
  background: var(--ink);
  border: 10px solid var(--paper-light);
  outline: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.map-node,
.map-anchor { position: relative; z-index: 2; }
.map-node {
  align-self: center;
  min-height: 104px;
  padding: 18px 18px 15px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.3);
  backdrop-filter: blur(8px);
}
.map-node span { position: absolute; right: 10px; top: 7px; color: var(--yellow); font-family: var(--mono); font-size: 10px; }
.map-node b,
.map-anchor b { display: block; font-family: var(--serif); font-size: 1.4rem; }
.map-node small,
.map-anchor small { display: block; margin-top: 6px; color: rgba(255,255,255,.62); font-size: 11px; }
.map-execute { grid-column: 1; grid-row: 1; border-top: 5px solid var(--blue); }
.map-verify { grid-column: 4; grid-row: 1; border-top: 5px solid var(--green); }
.map-counter { grid-column: 1; grid-row: 2; border-top: 5px solid var(--red); }
.map-audit { grid-column: 4; grid-row: 2; border-top: 5px solid var(--yellow); }
.map-arbitrate { grid-column: 2; grid-row: 1; }
.map-govern { grid-column: 3; grid-row: 1; }
.map-human { grid-column: 2; grid-row: 2; }
.map-stop { grid-column: 3; grid-row: 2; }
.map-anchor {
  position: absolute;
  left: 50%; top: 50%;
  display: grid;
  place-items: center;
  width: 160px; height: 160px;
  padding: 18px;
  text-align: center;
  background: var(--blue-deep);
  border: 2px solid var(--yellow);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 12px rgba(242,182,62,.09);
}
.map-anchor i { color: var(--yellow); font-size: 2rem; font-style: normal; }
.map-anchor b { font-size: 1.05rem; }
.map-lines { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; }
.map-lines path { fill: none; stroke: rgba(255,255,255,.28); stroke-width: 2; stroke-dasharray: 7 8; }
.map-lines .anchor-line { stroke: var(--yellow); stroke-width: 3; }
.wide-image { margin-top: 60px; padding: 12px; background: var(--paper-light); border: 1px solid var(--line); box-shadow: var(--shadow); }
.wide-image img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }

.anchor-section { padding-block: 130px; background: var(--blue); }
.anchor-layout { display: grid; grid-template-columns: 1.15fr .85fr; gap: 80px; align-items: center; }
.anchor-image { padding: 10px; background: var(--paper-light); box-shadow: 0 28px 80px rgba(3,44,101,.28); transform: rotate(-1.2deg); }
.anchor-copy { color: white; }
.anchor-copy .eyebrow { color: rgba(255,255,255,.74); }
.anchor-copy p { color: rgba(255,255,255,.8); }
.anchor-copy blockquote {
  margin: 28px 0;
  padding: 22px 0 22px 24px;
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1.35;
  border-left: 5px solid var(--yellow);
}
.check-list { list-style: none; padding: 0; margin: 28px 0 0; }
.check-list li { position: relative; padding: 10px 0 10px 32px; border-top: 1px solid rgba(255,255,255,.25); }
.check-list li::before { content: "✓"; position: absolute; left: 4px; color: var(--yellow); font-weight: 900; }

.layer-stack { border-top: 1px solid var(--ink); }
.layer {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 40px;
  align-items: start;
  padding: 34px 0;
  border-bottom: 1px solid var(--ink);
}
.layer > span { font-family: var(--serif); font-size: 3rem; color: var(--blue); }
.layer h3 { margin: 0 0 8px; font-family: var(--serif); font-size: 2rem; }
.layer p { max-width: 760px; margin: 0; color: var(--ink-soft); }
.layer:nth-child(even) > span { color: var(--red); }

.mode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.mode-card { min-height: 315px; padding: 30px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.24); }
.mode-number { color: var(--yellow); font-family: var(--mono); font-size: 11px; }
.mode-card h3 { margin: 64px 0 15px; font-family: var(--serif); font-size: 2.6rem; }
.mode-card p { color: rgba(255,255,255,.72); }
.mode-card small { display: block; margin-top: 30px; color: rgba(255,255,255,.52); }
.mode-card-featured { color: var(--ink); background: var(--yellow); border-color: var(--yellow); transform: translateY(-16px); }
.mode-card-featured .mode-number { color: var(--red); }
.mode-card-featured p,
.mode-card-featured small { color: var(--ink-soft); }

.install-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 38px; align-items: stretch; }
.terminal { overflow: hidden; color: #eff6ff; background: #0b1423; border-radius: 8px; box-shadow: var(--shadow); }
.terminal-bar { display: flex; align-items: center; gap: 7px; padding: 13px 16px; background: #172235; border-bottom: 1px solid rgba(255,255,255,.1); }
.terminal-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.terminal-bar i:nth-child(2) { background: var(--yellow); }
.terminal-bar i:nth-child(3) { background: var(--green); }
.terminal-bar span { margin-left: 8px; color: rgba(255,255,255,.48); font-family: var(--mono); font-size: 10px; }
.terminal pre { margin: 0; padding: 30px; overflow: auto; }
.terminal code { font-family: var(--mono); font-size: 12px; line-height: 1.8; white-space: pre-wrap; }
.terminal .prompt { color: var(--yellow); }
.terminal .comment { color: #7992b6; }
.tool-list { display: flex; flex-direction: column; border-top: 1px solid var(--ink); }
.tool-list a { display: grid; grid-template-columns: 44px 1fr 24px; gap: 14px; align-items: center; flex: 1; min-height: 88px; padding: 16px 0; text-decoration: none; border-bottom: 1px solid var(--ink); }
.tool-list a > span { color: var(--red); font-family: var(--mono); font-size: 11px; }
.tool-list b { display: block; font-family: var(--serif); font-size: 1.25rem; }
.tool-list small { color: var(--ink-soft); }
.tool-list a > i { font-style: normal; font-size: 1.25rem; transition: transform 160ms ease; }
.tool-list a:hover > i { transform: translate(4px, -4px); }

.rules-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(255,255,255,.25); }
.rules-list li { display: grid; grid-template-columns: 80px 1fr; gap: 30px; align-items: center; padding: 22px 0; border-bottom: 1px solid rgba(255,255,255,.25); }
.rules-list span { color: var(--yellow); font-family: var(--mono); }
.rules-list p { margin: 0; font-family: var(--serif); font-size: clamp(1.25rem, 2.2vw, 2rem); }

.site-footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 40px;
  align-items: center;
  padding: 48px max(24px, calc((100vw - 1220px) / 2));
  color: var(--ink);
  background: var(--yellow);
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand b { max-width: 150px; font-size: 12px; line-height: 1.15; text-transform: uppercase; }
.site-footer > p { font-family: var(--serif); font-size: 1.15rem; text-align: center; }
.footer-links { display: flex; gap: 16px; font-size: 12px; font-weight: 800; }
.footer-links a { text-decoration-thickness: 1px; text-underline-offset: 4px; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 650ms ease, transform 650ms cubic-bezier(.2,.7,.2,1); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.quick-card:nth-child(2), .mode-card:nth-child(2) { transition-delay: 90ms; }
.quick-card:nth-child(3), .mode-card:nth-child(3) { transition-delay: 180ms; }

:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; }

@media (max-width: 1100px) {
  .site-header { grid-template-columns: auto 1fr; }
  .main-nav { display: none; }
  .language-switcher { justify-self: end; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-copy { max-width: 800px; }
  .hero-visual { max-width: 900px; }
  .failure-layout,
  .anchor-layout,
  .install-grid { grid-template-columns: 1fr; }
  .control-map { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(4, minmax(115px, auto)); min-height: 820px; }
  .map-execute { grid-column: 1; grid-row: 1; }
  .map-verify { grid-column: 2; grid-row: 1; }
  .map-arbitrate { grid-column: 1; grid-row: 2; }
  .map-govern { grid-column: 2; grid-row: 2; }
  .map-human { grid-column: 1; grid-row: 3; }
  .map-stop { grid-column: 2; grid-row: 3; }
  .map-counter { grid-column: 1; grid-row: 4; }
  .map-audit { grid-column: 2; grid-row: 4; }
  .map-anchor { width: 145px; height: 145px; }
  .map-lines { display: none; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .section-shell { width: min(100% - 28px, 1220px); }
  .site-header { min-height: 68px; padding-inline: 14px; }
  .brand span:last-child { display: none; }
  .language-switcher button { padding-inline: 8px; }
  .language-switcher button b { display: none; }
  .hero { padding-block: 52px 68px; }
  .hero h1 { font-size: clamp(2.75rem, 14vw, 4rem); }
  .hero-visual { transform: none; }
  .signal-strip { grid-template-columns: repeat(2, 1fr); }
  .signal-strip div { border-bottom: 1px solid rgba(255,255,255,.15); }
  .quick,
  .architecture,
  .layers,
  .install,
  .failure-section,
  .choose-section,
  .rules-section,
  .anchor-section { padding-block: 88px; }
  .section-heading { margin-bottom: 42px; }
  .section-heading h2,
  .anchor-copy h2 { font-size: clamp(2.2rem, 11vw, 3.3rem); }
  .quick-grid,
  .mode-grid { grid-template-columns: 1fr; }
  .quick-card { min-height: 260px; border-right: 0; border-bottom: 1px solid var(--ink); }
  .quick-card:last-child { border-bottom: 0; }
  .mode-card-featured { transform: none; }
  .failure-layout { gap: 44px; }
  .control-map { grid-template-columns: 1fr; grid-template-rows: none; gap: 14px; min-height: auto; padding: 22px; }
  .map-node { grid-column: 1 !important; grid-row: auto !important; }
  .map-anchor { position: relative; left: auto; top: auto; width: 100%; height: auto; grid-column: 1; border-radius: 2px; transform: none; }
  .layer { grid-template-columns: 60px 1fr; gap: 18px; }
  .layer > span { font-size: 2rem; }
  .site-footer { grid-template-columns: 1fr; text-align: center; }
  .footer-brand, .footer-links { justify-content: center; }
  .site-footer > p { margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

