:root {
  --ink: #111316;
  --paper: #f7f6f1;
  --panel: #ffffff;
  --line: #d9d6ca;
  --red: #d43d2f;
  --blue: #2367a5;
  --green: #1f7a55;
  --amber: #b77416;
  --muted: #69727d;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(17, 19, 22, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(17, 19, 22, 0.05) 1px, transparent 1px),
    var(--paper);
  background-size: 34px 34px;
  font-family: Georgia, "Times New Roman", serif;
}

a {
  color: inherit;
}

.hero {
  min-height: 92vh;
  padding: 24px clamp(18px, 4vw, 56px) 42px;
  border-bottom: 2px solid var(--ink);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: clamp(52px, 9vw, 110px);
}

.brand-mark,
.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  font-family: "Courier New", monospace;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}

.brand-mark img {
  width: 34px;
  height: 34px;
}

.nav-links a {
  border-bottom: 1px solid transparent;
  font-family: "Courier New", monospace;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}

.nav-links a:hover {
  border-color: var(--red);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 0.86fr);
  gap: clamp(24px, 6vw, 82px);
  align-items: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--red);
  font-family: "Courier New", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 1030px;
  margin-bottom: 22px;
  font-size: clamp(46px, 8vw, 118px);
  line-height: 0.9;
  letter-spacing: 0;
}

h2 {
  max-width: 860px;
  margin-bottom: 14px;
  font-size: clamp(30px, 4.8vw, 68px);
  line-height: 0.96;
}

h3 {
  font-size: 22px;
}

.lede,
.split p {
  max-width: 720px;
  color: #30373f;
  font-size: 19px;
  line-height: 1.5;
}

.hero-actions,
.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 2px solid var(--ink);
  padding: 0 18px;
  font-family: "Courier New", monospace;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}

.button.primary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 5px 5px 0 var(--red);
}

.button.secondary {
  background: var(--panel);
  box-shadow: 5px 5px 0 var(--blue);
}

.hero-board {
  position: relative;
  min-height: 570px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  padding: 24px;
  box-shadow: 12px 12px 0 var(--red);
}

.hero-board::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(247, 246, 241, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(247, 246, 241, 0.08) 1px, transparent 1px);
  background-size: 30px 30px;
}

.case-card,
.trace-stack,
.hero-logo {
  position: relative;
  z-index: 1;
}

.case-card {
  max-width: 310px;
  border: 1px solid rgba(247, 246, 241, 0.36);
  padding: 18px;
  background: rgba(247, 246, 241, 0.08);
}

.case-card span,
.trace-stack b,
.scoreboard span,
.palette span,
.type-specimen span,
.voice-grid span {
  display: block;
  font-family: "Courier New", monospace;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.case-card strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  line-height: 1;
}

.case-card p {
  margin: 10px 0 0;
  color: #d8e0e4;
  font-family: "Courier New", monospace;
  font-size: 12px;
}

.hero-logo {
  display: block;
  width: min(88%, 520px);
  margin: 84px auto 56px;
}

.trace-stack {
  display: grid;
  gap: 10px;
}

.trace-stack div {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(247, 246, 241, 0.32);
  background: rgba(247, 246, 241, 0.08);
  padding: 12px;
}

.trace-stack b {
  color: #ff786d;
}

.scoreboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 22px clamp(18px, 4vw, 56px);
}

.scoreboard article {
  border: 2px solid var(--ink);
  background: var(--panel);
  padding: 16px;
  box-shadow: 5px 5px 0 rgba(17, 19, 22, 0.18);
}

.scoreboard span {
  color: var(--muted);
}

.scoreboard strong {
  display: block;
  margin-top: 8px;
  font-family: "Courier New", monospace;
  font-size: clamp(18px, 2.2vw, 28px);
}

.judge-fit {
  background:
    linear-gradient(90deg, rgba(212, 61, 47, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(212, 61, 47, 0.08) 1px, transparent 1px),
    #fffdf7;
  background-size: 28px 28px;
}

.judge-fit .section-head p {
  max-width: 460px;
  color: #30373f;
  font-size: 18px;
  line-height: 1.45;
}

.judge-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.judge-grid article {
  min-height: 300px;
  border: 2px solid var(--ink);
  background: var(--panel);
  padding: 18px;
  box-shadow: 5px 5px 0 rgba(17, 19, 22, 0.16);
}

.judge-grid span {
  display: block;
  color: var(--red);
  font-family: "Courier New", monospace;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.judge-grid h3 {
  margin: 18px 0 12px;
  font-size: 24px;
  line-height: 1.05;
}

.judge-grid p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.walkthrough {
  background:
    linear-gradient(90deg, rgba(35, 103, 165, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(35, 103, 165, 0.08) 1px, transparent 1px),
    #f9fbfb;
}

.walkthrough .section-head p {
  max-width: 500px;
  color: #30373f;
  font-size: 18px;
  line-height: 1.45;
}

.video-frame {
  max-width: calc(100% - 12px);
  border: 2px solid var(--ink);
  background: var(--ink);
  padding: 12px;
  box-shadow: 10px 10px 0 var(--blue);
}

.video-frame video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: var(--ink);
}

.download-actions.inline {
  margin-top: 22px;
}

.section {
  padding: clamp(54px, 9vw, 118px) clamp(18px, 4vw, 56px);
  border-top: 2px solid var(--ink);
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: end;
  margin-bottom: 28px;
}

.asset-grid,
.application-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.asset-card {
  min-height: 360px;
  border: 2px solid var(--ink);
  background: var(--panel);
  padding: 18px;
  box-shadow: 6px 6px 0 rgba(17, 19, 22, 0.16);
}

.asset-card.dark {
  background: #fffdf8;
}

.asset-card.ink {
  background: var(--ink);
  color: var(--paper);
}

.asset-card img {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: contain;
  margin-bottom: 28px;
}

.asset-card p {
  color: var(--muted);
  line-height: 1.45;
}

.asset-card.ink p {
  color: #cdd5da;
}

.asset-card a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  border: 1px solid currentColor;
  margin-top: 8px;
  padding: 0 11px;
  font-family: "Courier New", monospace;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}

.split {
  display: grid;
  grid-template-columns: minmax(280px, 0.88fr) minmax(360px, 1.12fr);
  gap: clamp(28px, 6vw, 86px);
  align-items: start;
}

.system-panel {
  display: grid;
  gap: 16px;
}

.palette {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.palette button {
  min-height: 140px;
  border: 2px solid var(--ink);
  background: linear-gradient(var(--swatch) 0 58%, #fff 58%);
  cursor: pointer;
  padding: 10px;
  text-align: left;
}

.palette b {
  display: block;
  margin-top: 5px;
  font-family: "Courier New", monospace;
  font-size: 12px;
}

.type-specimen {
  border: 2px solid var(--ink);
  background: var(--panel);
  padding: 20px;
}

.type-specimen strong {
  display: block;
  margin-top: 12px;
  font-size: clamp(28px, 4vw, 52px);
  line-height: 0.98;
}

.type-specimen p {
  max-width: 620px;
  margin: 14px 0 0;
  color: var(--muted);
  font-family: "Courier New", monospace;
}

.application-grid {
  grid-template-columns: 1fr 1.1fr 1fr;
  align-items: stretch;
}

.report-preview,
.social-preview,
.terminal-preview {
  border: 2px solid var(--ink);
  background: var(--panel);
  padding: 18px;
}

.report-preview header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-family: "Courier New", monospace;
  font-weight: 700;
  text-transform: uppercase;
}

.report-preview img {
  width: 34px;
}

.report-preview dl {
  display: grid;
  gap: 8px;
}

.report-preview dl div {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 7px;
}

.report-preview dt {
  color: var(--muted);
  font-family: "Courier New", monospace;
}

.report-preview dd {
  margin: 0;
  font-weight: 700;
}

.social-preview {
  padding: 0;
  overflow: hidden;
}

.social-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.terminal-preview {
  background: var(--ink);
  color: var(--paper);
}

.terminal-preview span {
  display: block;
  margin-bottom: 18px;
  color: #9fd5bd;
  font-family: "Courier New", monospace;
  font-size: 13px;
}

.terminal-preview pre {
  white-space: pre-wrap;
  font-family: "Courier New", monospace;
  line-height: 1.5;
}

.voice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.voice-grid article {
  min-height: 160px;
  border: 2px solid var(--ink);
  background: var(--panel);
  padding: 18px;
}

.voice-grid span {
  color: var(--red);
}

.voice-grid p {
  margin: 18px 0 0;
  font-size: 22px;
  line-height: 1.2;
}

.download-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--ink);
  color: var(--paper);
}

.download-band h2 {
  max-width: 850px;
}

.brandkity {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 0.75fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: center;
}

.brandkity p {
  max-width: 760px;
  color: #30373f;
  font-size: 19px;
  line-height: 1.5;
}

.transfer-list {
  display: grid;
  gap: 12px;
}

.transfer-list a {
  display: flex;
  align-items: center;
  min-height: 64px;
  border: 2px solid var(--ink);
  background: var(--panel);
  padding: 0 16px;
  font-family: "Courier New", monospace;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: 5px 5px 0 rgba(17, 19, 22, 0.16);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  transform: translateY(20px);
  opacity: 0;
  border: 2px solid var(--ink);
  background: var(--panel);
  padding: 12px 14px;
  font-family: "Courier New", monospace;
  font-weight: 700;
  transition: 180ms ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 1040px) {
  .hero-grid,
  .split,
  .application-grid,
  .judge-grid {
    grid-template-columns: 1fr;
  }

  .asset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .palette {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .nav {
    align-items: start;
    flex-direction: column;
  }

  .nav-links {
    flex-wrap: wrap;
  }

  .hero-board {
    min-height: 470px;
  }

  .scoreboard,
  .asset-grid,
  .palette,
  .voice-grid {
    grid-template-columns: 1fr;
  }

  .download-band {
    align-items: stretch;
    flex-direction: column;
  }

  .brandkity {
    grid-template-columns: 1fr;
  }
}
