:root {
  color-scheme: dark;
  --ink: #f0ebdc;
  --muted: #a6a397;
  --paper: #11120f;
  --panel: #191a16;
  --panel-dark: #090a08;
  --line: #3b3c33;
  --gold: #f2c14e;
  --wine: #d85e65;
  --cyan: #73ddd0;
  --shadow: #050604;
  --mono: "SFMono-Regular", "Cascadia Mono", "Liberation Mono", Menlo, monospace;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-family: var(--mono);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}

body::before {
  position: fixed;
  z-index: 50;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.1;
  background: repeating-linear-gradient(0deg, transparent 0 3px, #000 4px);
}

a {
  color: inherit;
  text-decoration-color: var(--gold);
  text-underline-offset: 0.22em;
}

button { font: inherit; }

.skip-link {
  position: fixed;
  z-index: 99;
  top: -5rem;
  left: 1rem;
  padding: 0.7rem 1rem;
  color: #111;
  background: var(--gold);
}

.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  height: 72px;
  border-bottom: 1px solid var(--line);
  background: rgba(17, 18, 15, 0.94);
  backdrop-filter: blur(12px);
}

.nav-wrap,
.footer-wrap {
  display: flex;
  width: min(100%, 1480px);
  height: 100%;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 4.5rem);
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-decoration: none;
  text-transform: uppercase;
}

.brand-mark {
  display: block;
  width: 42px;
  height: 42px;
  box-shadow: 4px 4px 0 var(--shadow);
}

nav,
.footer-links {
  display: flex;
  align-items: center;
  gap: clamp(0.8rem, 2.2vw, 2rem);
}

nav a,
.footer-links a {
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  text-decoration: none;
  text-transform: uppercase;
}

nav a:hover,
.footer-links a:hover { color: var(--gold); }

nav .github-link {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--gold);
  color: var(--gold);
}

main { overflow: hidden; }

.hero,
.quick-install,
.features,
.playground,
.language,
.toolchain,
.install {
  width: min(100%, 1480px);
  margin: 0 auto;
  padding-inline: clamp(1rem, 5vw, 5.5rem);
}

.playground {
  padding-block: clamp(5rem, 10vw, 9rem);
  border-top: 1px solid var(--line);
}

.playground-heading { margin-bottom: clamp(2.5rem, 5vw, 4rem); }

.playground-shell {
  border: 1px solid var(--line);
  background: var(--panel-dark);
  box-shadow: 14px 14px 0 var(--shadow), 14px 14px 0 1px var(--line);
}

.playground-bar,
.output-title,
.playground-actions {
  display: flex;
  min-height: 48px;
  padding: 0.65rem 1rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  background: #20221d;
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.playground-status { color: var(--cyan); }

.editor {
  display: grid;
  height: 440px;
  grid-template-columns: 4rem minmax(0, 1fr);
  overflow: hidden;
}

.editor-lines,
.editor-highlight,
.editor-input {
  margin: 0;
  padding: 1.4rem 1rem;
  border: 0;
  font: 0.82rem/1.75 var(--mono);
  tab-size: 4;
  white-space: pre;
}

.editor-lines {
  overflow: hidden;
  border-right: 1px solid var(--line);
  color: #5f6157;
  background: #0c0d0b;
  text-align: right;
  user-select: none;
}

.editor-code { position: relative; min-width: 0; }
.editor-highlight,
.editor-input { position: absolute; inset: 0; overflow: auto; }
.editor-highlight { pointer-events: none; color: var(--ink); }
.editor-input {
  width: 100%;
  height: 100%;
  resize: none;
  outline: none;
  color: transparent;
  background: transparent;
  caret-color: var(--gold);
  -webkit-text-fill-color: transparent;
}
.editor-input::selection { background: rgba(115, 221, 208, 0.28); }
.syntax-comment { color: #6f7266; }
.syntax-number { color: #b9a1e8; }

.playground-actions {
  min-height: 72px;
  justify-content: flex-start;
  background: var(--panel);
}

.compile-control { display: flex; align-items: stretch; margin-left: auto; gap: 0.7rem; }
.compile-control select {
  min-width: 190px;
  padding: 0 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  background: var(--panel-dark);
  font: 0.72rem var(--mono);
}
.playground-actions button:disabled { cursor: wait; opacity: 0.55; }

.playground-output { border-top: 1px solid var(--line); }
.output-title { min-height: 38px; border-bottom: 0; background: #0c0d0b; }
.output-title button { border: 0; color: var(--muted); background: none; cursor: pointer; font: inherit; text-transform: uppercase; }
.output-title button:hover { color: var(--gold); }
.playground-output > pre {
  min-height: 110px;
  max-height: 320px;
  padding: 1rem;
  overflow: auto;
  color: var(--cyan);
  font: 0.75rem/1.65 var(--mono);
  white-space: pre-wrap;
}
.playground-output > pre.is-error { color: var(--wine); }
.output-muted { color: #66685d; }
.playground-limit { margin: 0; padding: 0.7rem 1rem; border-top: 1px solid var(--line); color: #66685d; font-size: 0.62rem; }

.hero {
  display: grid;
  min-height: min(790px, calc(100vh - 72px));
  padding-block: clamp(5rem, 11vh, 8rem);
  grid-template-columns: minmax(0, 1.05fr) minmax(430px, 0.95fr);
  align-items: center;
  gap: clamp(3rem, 6vw, 6.5rem);
  background-image: linear-gradient(90deg, transparent 49.86%, rgba(242, 193, 78, 0.055) 50%, transparent 50.14%);
}

.hero-copy {
  min-width: 0;
  container-type: inline-size;
}

.release-pill,
.eyebrow,
.quick-label {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.release-pill {
  display: flex;
  margin: 0 0 1.3rem;
  align-items: center;
  gap: 0.55rem;
}

.release-pill span {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 15px var(--gold);
}

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

h1,
h2 {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 0.86;
  text-transform: uppercase;
}

h1 {
  max-width: 900px;
  margin-bottom: 1.8rem;
  font-size: clamp(3.5rem, 14cqi, 7.5rem);
}

h1 span {
  color: var(--gold);
  text-shadow: 6px 6px 0 #392c0d;
}

.hero-lead {
  max-width: 670px;
  margin-bottom: 0.85rem;
  color: var(--muted);
  font: clamp(1rem, 1.6vw, 1.25rem)/1.6 var(--sans);
}

.hero-lead code,
.feature-grid code { color: var(--cyan); }

.hero-note {
  color: #727467;
  font-size: 0.7rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  margin-top: 2.2rem;
  gap: 0.8rem;
}

.button {
  display: inline-flex;
  min-height: 48px;
  padding: 0.75rem 1.15rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--panel);
  box-shadow: 4px 4px 0 var(--shadow);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
}

.button:hover {
  border-color: var(--ink);
  box-shadow: 6px 6px 0 var(--shadow);
  transform: translate(-1px, -1px);
}

.button-primary {
  border-color: var(--gold);
  color: #17150e;
  background: var(--gold);
}

.target-list {
  display: flex;
  flex-wrap: wrap;
  margin-top: 3rem;
  gap: 0.9rem 1.4rem;
}

.target-list span {
  color: #77796d;
  font-size: 0.64rem;
  text-transform: uppercase;
}

.target-list span::before {
  color: var(--wine);
  content: "■";
  margin-right: 0.55rem;
}

.hero-code,
.code-card,
.install-steps {
  border: 1px solid var(--line);
  background: var(--panel-dark);
  box-shadow: 14px 14px 0 var(--shadow), 14px 14px 0 1px var(--line);
}

.hero-code { transform: rotate(0.8deg); }

.window-bar,
.code-card-title {
  display: flex;
  min-height: 42px;
  padding: 0.65rem 0.8rem;
  align-items: center;
  gap: 0.45rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: #20221d;
  font-size: 0.68rem;
  letter-spacing: 0.07em;
}

.window-bar > span { margin: 0 auto; }

.window-dots {
  display: flex;
  gap: 0.4rem;
}

.window-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--wine);
}

.window-dots i:nth-child(2) { background: var(--gold); }
.window-dots i:nth-child(3) { background: var(--cyan); }

.window-bar button,
.quick-install button,
.terminal-line button {
  border: 0;
  color: var(--muted);
  background: none;
  cursor: pointer;
  font-size: 0.63rem;
  text-transform: uppercase;
}

.window-bar button:hover,
.quick-install button:hover,
.terminal-line button:hover { color: var(--gold); }

pre { margin: 0; }
pre code { color: var(--ink); font-family: var(--mono); }

.hero-code pre {
  min-height: 300px;
  padding: 2rem 1.6rem;
  overflow-x: auto;
  font-size: clamp(0.7rem, 1.05vw, 0.88rem);
  line-height: 1.9;
}

.syntax-keyword { color: var(--wine); }
.syntax-function { color: var(--gold); }
.syntax-string { color: var(--cyan); }

.window-output {
  display: grid;
  min-height: 44px;
  padding: 0.7rem 1rem;
  grid-template-columns: 1rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.66rem;
}

.window-output code { overflow-x: auto; color: var(--ink); white-space: nowrap; }
.prompt { color: var(--gold); }
.result { color: var(--cyan); line-height: 1.55; text-align: right; }

.quick-install {
  display: flex;
  min-height: 78px;
  padding-block: 1rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.quick-install > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 1.5rem;
}

.quick-install code {
  overflow-x: auto;
  color: var(--cyan);
  font-size: 0.78rem;
  white-space: nowrap;
}

.features,
.language,
.toolchain {
  padding-block: clamp(5rem, 10vw, 9rem);
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  margin-bottom: clamp(2.5rem, 6vw, 5rem);
  grid-template-columns: minmax(0, 1.2fr) minmax(250px, 0.45fr);
  align-items: end;
  gap: 3rem;
}

.eyebrow {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(3rem, 6.6vw, 7rem);
}

.section-heading > p:last-child,
.language-copy > p,
.install-copy > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-family: var(--sans);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.feature-grid article {
  min-height: 245px;
  padding: clamp(1.5rem, 3vw, 2.8rem);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.feature-grid article:hover { background: var(--panel); }

.feature-icon {
  color: var(--wine);
  font-size: 0.7rem;
}

.feature-grid h3 {
  margin: 3.6rem 0 0.8rem;
  font-size: 1.15rem;
  text-transform: uppercase;
}

.feature-grid p {
  margin-bottom: 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.9rem;
}

.language {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(440px, 1fr);
  align-items: center;
  gap: clamp(3rem, 8vw, 7rem);
}

.language h2 { margin: 0.7rem 0 1.4rem; }

.check-list {
  display: grid;
  margin: 2.2rem 0 0;
  padding: 0;
  gap: 0.75rem;
  list-style: none;
}

.check-list li {
  color: #c0bdaf;
  font-size: 0.78rem;
}

.check-list li::before {
  margin-right: 0.7rem;
  color: var(--gold);
  content: "✓";
}

.code-card-title { justify-content: space-between; }
.tiny-comment { color: #696b60; }

.code-card pre {
  min-height: 335px;
  padding: 2rem 1.6rem;
  overflow-x: auto;
  font-size: clamp(0.68rem, 1vw, 0.82rem);
  line-height: 1.9;
}

.code-card-result {
  display: flex;
  min-height: 70px;
  padding: 1rem 1.3rem;
  align-items: center;
  gap: 1rem;
  border-top: 1px solid var(--line);
}

.code-card-result span { color: var(--gold); }
.code-card-result code { color: var(--cyan); font-size: 0.68rem; }

.compact-heading { display: block; }
.compact-heading h2 { margin-top: 0.7rem; }

.toolchain-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.toolchain-row a {
  display: grid;
  min-height: 175px;
  padding: 1.4rem;
  grid-template-columns: 1fr auto;
  grid-template-rows: 1fr auto;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.toolchain-row a:hover { background: var(--panel); }
.tool-name { font-size: 0.9rem; font-weight: 800; text-transform: uppercase; }
.tool-role { align-self: end; color: var(--muted); font-size: 0.7rem; }
.tool-arrow { color: var(--gold); }

.install {
  display: grid;
  margin-top: clamp(4rem, 8vw, 8rem);
  margin-bottom: clamp(4rem, 8vw, 8rem);
  padding-block: clamp(4rem, 7vw, 7rem);
  grid-template-columns: 0.75fr 1.25fr;
  align-items: center;
  gap: clamp(3rem, 7vw, 6rem);
  border: 1px solid var(--line);
  box-shadow: 16px 16px 0 var(--shadow);
  background: var(--panel);
}

.install h2 {
  margin: 0.7rem 0 1.4rem;
  font-size: clamp(3rem, 5.7vw, 6rem);
}

.install-steps { box-shadow: 10px 10px 0 var(--shadow); }

.terminal-line {
  display: grid;
  min-height: 78px;
  padding: 0 1.1rem;
  grid-template-columns: 1.8rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  border-bottom: 1px solid var(--line);
}

.terminal-line:last-child { border-bottom: 0; }
.terminal-line > span { color: var(--wine); font-size: 0.66rem; }
.terminal-line small { display: block; color: #737568; font-size: 0.6rem; text-transform: uppercase; }
.terminal-line code { display: block; overflow-x: auto; color: var(--cyan); font-size: 0.68rem; white-space: nowrap; }

footer {
  min-height: 110px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.7rem;
}

.footer-wrap p { margin: 0; }

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 1050px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-code { max-width: 680px; transform: none; }
  .language { grid-template-columns: 1fr; }
  .code-card { max-width: 680px; }
  .install { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .site-header { height: 62px; }
  .nav-wrap { height: 62px; }
  nav a:not(.github-link) { display: none; }

  .hero { padding-block: 5rem; }
  h1 { font-size: clamp(3.5rem, 18vw, 5.2rem); }
  .result { display: none; }

  .quick-install > div { display: block; overflow: hidden; }
  .quick-label { display: block; margin-bottom: 0.35rem; }

  .section-heading { grid-template-columns: 1fr; align-items: start; }
  .feature-grid,
  .toolchain-row { grid-template-columns: 1fr; }
  .feature-grid article { min-height: 215px; }

  .language { grid-template-columns: minmax(0, 1fr); }
  .code-card pre { min-height: 300px; }
  .tiny-comment { display: none; }

  .install { padding-inline: 1rem; }
  .editor { height: 390px; grid-template-columns: 3rem minmax(0, 1fr); }
  .editor-lines, .editor-highlight, .editor-input { padding: 1rem 0.7rem; font-size: 0.72rem; }
  .playground-actions { align-items: stretch; flex-direction: column; }
  .compile-control { margin-left: 0; }
  .compile-control select { min-width: 0; flex: 1; }
  .terminal-line button { display: none; }

  .footer-wrap {
    height: auto;
    min-height: 150px;
    padding-block: 2rem;
    flex-wrap: wrap;
  }

  .footer-wrap > p { order: 3; width: 100%; }
  .footer-links { gap: 1rem; }
}

@media (max-width: 480px) {
  .hero,
  .quick-install,
  .features,
  .playground,
  .language,
  .toolchain,
  .install { padding-inline: 1rem; }

  .brand { font-size: 0.85rem; }
  .github-link { font-size: 0.65rem; }
  .hero-code pre { padding-inline: 1rem; font-size: 0.67rem; }
  .window-output { font-size: 0.6rem; }
}

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