@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=Instrument+Serif:ital@0;1&display=swap");

:root {
  --bg: #f5f1e8;
  --paper: #fffdf8;
  --ink: #111111;
  --muted: #4d4a44;
  --line: #171717;
  --accent: #0a8f51;
  --accent-2: #ff6a00;
  --content: 1280px;
  --wide: 1560px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(17, 17, 17, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(17, 17, 17, 0.05) 1px, transparent 1px),
    var(--bg);
  background-size: 28px 28px, 28px 28px, auto;
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.5;
}

.download-toast {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 120;
  min-width: 180px;
  max-width: min(calc(100vw - 36px), 320px);
  padding: 12px 14px;
  border: 3px solid var(--line);
  background: var(--accent);
  color: #f7fff9;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition:
    opacity 160ms ease,
    transform 180ms ease;
}

.download-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

code {
  padding: 0.08rem 0.3rem;
  border: 2px solid var(--line);
  background: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.9em;
}

.page-shell {
  width: min(calc(100% - 24px), var(--content));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(245, 241, 232, 0.94);
  backdrop-filter: blur(8px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 3px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  aspect-ratio: 1 / 1;
  border: 3px solid var(--line);
  background: var(--paper);
  padding: 2px;
}

.brand-mark img,
.footer-mark img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.brand-copy {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-copy small,
.kicker,
.mini {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nav-link {
  padding: 7px 10px;
  border: 2px solid transparent;
  font-size: 0.9rem;
  font-weight: 700;
}

.nav-link.active,
.nav-link:focus-visible {
  border-color: var(--line);
  background: var(--accent);
  color: #f7fff9;
}

.mobile-header-action {
  display: none;
  min-height: 38px;
  padding: 0 12px;
  border: 2px solid var(--line);
  background: var(--accent);
  color: #f7fff9;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  align-items: center;
  justify-content: center;
}

.billboard,
.rail-grid,
.panel-grid,
.download-grid,
.privacy-grid,
.policy-grid {
  display: grid;
  gap: 18px;
}

.billboard {
  padding: 20px 0 14px;
}

.poster {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 18px;
  align-items: stretch;
}

.block,
.slab,
.ticket,
.download-card,
.policy-card,
.aside-note,
.footer-box {
  border: 3px solid var(--line);
  background: var(--paper);
}

.hero-copy,
.ticket,
.slab,
.download-card,
.policy-card,
.aside-note {
  padding: 26px;
}

.policy-card {
  position: relative;
  overflow: visible;
  padding-top: 34px;
}

h1,
h2,
h3,
.button,
.stat strong {
  font-family: "Space Grotesk", sans-serif;
}

h1 {
  margin: 8px 0 18px;
  max-width: 9ch;
  font-size: clamp(2.7rem, 5.5vw, 5.8rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.08em;
  text-transform: uppercase;
}

h2 {
  margin: 8px 0 12px;
  max-width: 13ch;
  font-size: clamp(2rem, 4vw, 4.2rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.06em;
  text-transform: uppercase;
}

h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.1;
}

p,
li,
span {
  color: var(--muted);
}

.lede {
  max-width: 42ch;
  font-size: 1.05rem;
}

.button-row,
.download-actions,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button-row {
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 16px;
  border: 3px solid var(--line);
  background: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
}

.button:hover,
.button:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #111;
}

.button:active {
  transform: translate(0, 0);
  box-shadow: none;
}

.button-primary {
  background: var(--accent);
  color: #f7fff9;
}

.button-secondary {
  background: var(--paper);
}

.poster-right {
  display: grid;
  gap: 18px;
}

.signal-box {
  min-height: 180px;
  padding: 18px;
  border: 3px solid var(--line);
  background: var(--accent);
  color: #f4fff8;
}

.signal-box span,
.signal-box p,
.signal-box .mini {
  color: inherit;
}

.signal-box strong {
  display: block;
  margin-top: 14px;
  font-size: 2rem;
  line-height: 0.95;
  text-transform: uppercase;
}

.manifesto {
  padding: 20px;
  border: 3px solid var(--line);
  background: #fff;
}

.manifesto p {
  margin: 0;
  color: var(--ink);
  font-family: "Instrument Serif", serif;
  font-size: 1.5rem;
  line-height: 1.12;
}

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

.stat {
  padding: 18px;
  border: 3px solid var(--line);
  background: #fff;
}

.stat strong {
  display: block;
  color: var(--ink);
  font-size: 1rem;
  margin-top: 18px;
  text-transform: uppercase;
}

.stat span {
  display: block;
  margin-top: 14px;
}

.section {
  padding: 14px 0 8px;
}

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

.panel-grid {
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
}

.slab.featured {
  background: #111;
}

.slab.featured h2,
.slab.featured h3,
.slab.featured p,
.slab.featured .kicker {
  color: #f5f1e8;
}

.split-band {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.split-band > * {
  flex: 1 1 320px;
}

.split-band-stack {
  flex-direction: column;
}

.split-band-stack > * {
  flex: 0 0 auto;
}

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

.list,
.summary,
.policy-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.list li,
.summary li,
.policy-list li {
  padding: 12px 0;
  border-bottom: 2px solid rgba(17, 17, 17, 0.1);
}

.list li:last-child,
.summary li:last-child,
.policy-list li:last-child {
  border-bottom: 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.number-tag {
  position: absolute;
  top: 0;
  right: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  transform: translateY(-50%);
  border: 3px solid var(--line);
  border-radius: 999px;
  background: var(--accent);
  color: #f7fff9;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.84rem;
  font-weight: 700;
  box-shadow: 4px 4px 0 rgba(17, 17, 17, 0.16);
}

.mono-block {
  padding: 18px;
  border: 3px solid var(--line);
  background: #131313;
  color: #ece7dd;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.92rem;
  line-height: 1.8;
  white-space: pre-wrap;
}

.terminal-surface {
  margin-top: 18px;
  overflow: hidden;
  border: 3px solid var(--line);
  background: #121212;
}

.terminal-surface-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
  background: #1b1b1b;
}

.terminal-surface-top span {
  width: 11px;
  height: 11px;
  border-radius: 999px;
}

.terminal-surface-top span:nth-child(1) { background: #ff6b6b; }
.terminal-surface-top span:nth-child(2) { background: #ffd166; }
.terminal-surface-top span:nth-child(3) { background: #4ecb71; }

.terminal-surface-body {
  padding: 18px;
  color: #ece7dd;
  background: #121212;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.92rem;
  line-height: 1.8;
  white-space: pre-wrap;
}

.term-user {
  color: #63f2b3;
}

.term-path {
  color: #7ab8ff;
}

.term-command {
  color: #f3efe6;
}

.term-output {
  color: #c8d3df;
}

.download-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.download-card.highlight {
  background: #fff6e8;
}

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

.meta-box {
  padding: 14px;
  border: 2px solid var(--line);
  background: #fff;
}

.meta-box strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
}

.download-actions {
  margin-top: auto;
}

.privacy-grid {
  grid-template-columns: minmax(0, 0.72fr) minmax(300px, 0.28fr);
}

.sticky {
  position: sticky;
  top: 96px;
  align-self: start;
}

.notice-card strong {
  display: block;
  margin-bottom: 10px;
  color: var(--ink);
}

.site-footer {
  padding: 34px 0 42px;
}

.footer-box {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 20px;
  padding: 22px;
}

.footer-box p {
  margin: 0;
}

.footer-copy {
  display: grid;
  gap: 10px;
}

.footer-copy strong {
  color: var(--ink);
}

.footer-brandline {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  aspect-ratio: 1 / 1;
  border: 3px solid var(--line);
  background: #fff;
  padding: 2px;
}

.footer-meta {
  display: grid;
  gap: 8px;
  max-width: 58ch;
}

.footer-links {
  display: grid;
  gap: 10px;
  align-content: start;
}

.footer-link-block {
  padding: 12px 14px;
  border: 2px solid var(--line);
  background: #fff;
}

.footer-link-block strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 0.84rem;
  text-transform: uppercase;
}

.footer-link-block a {
  color: var(--muted);
  font-weight: 700;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-nav a {
  padding: 8px 10px;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.fade-up {
  opacity: 1;
  transform: translateY(16px);
  animation: fade-up 650ms ease forwards;
}

.delay-1 { animation-delay: 120ms; }
.delay-2 { animation-delay: 240ms; }
.delay-3 { animation-delay: 360ms; }

@keyframes fade-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 1440px) {
  .page-shell {
    width: min(calc(100% - 72px), var(--wide));
  }
}

@media (min-width: 1920px) {
  .page-shell {
    width: min(calc(100% - 120px), 1720px);
  }
}

@media (max-width: 1040px) {
  .poster,
  .rail-grid,
  .panel-grid,
  .download-grid,
  .privacy-grid,
  .policy-grid,
  .meta-grid {
    grid-template-columns: 1fr;
  }

  .split-band {
    flex-direction: column;
  }

  .section-head,
  .footer-box {
    flex-direction: column;
    align-items: flex-start;
  }

  .sticky {
    position: static;
  }

  .footer-box {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .download-toast {
    top: 12px;
    right: 12px;
    max-width: min(calc(100vw - 24px), 280px);
    padding: 11px 12px;
    font-size: 0.78rem;
  }

  .page-shell {
    width: min(calc(100% - 18px), var(--content));
  }

  .nav {
    justify-content: space-between;
  }

  .nav-links {
    display: none;
  }

  .brand-copy small {
    font-size: 0.64rem;
    letter-spacing: 0.12em;
  }

  .mobile-header-action {
    display: inline-flex;
    flex: 0 0 auto;
  }

  .button-row,
  .download-actions {
    width: 100%;
  }

  .button {
    width: 100%;
  }

  .hero-copy,
  .ticket,
  .slab,
  .download-card,
  .policy-card,
  .aside-note,
  .footer-box,
  .command-shell,
  .terminal-ticket,
  .ledger-card,
  .essay-card,
  .notice-card {
    padding: 22px;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(2.5rem, 11vw, 4.1rem);
  }

  h2 {
    font-size: clamp(2rem, 9vw, 3rem);
  }

  body {
    padding-bottom: 94px;
  }
}

.mobile-dock {
  display: none;
}

.mobile-dock-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 78px;
  height: 52px;
  padding: 6px 8px;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mobile-dock-link.active {
  color: var(--ink);
  border-color: var(--line);
  background: var(--accent);
}

.mobile-dock-link.active span {
  color: #f7fff9;
}

.mobile-dock-icon {
  width: 20px;
  height: 20px;
}

.mobile-dock-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 720px) {
  .mobile-dock {
    position: fixed;
    left: 50%;
    bottom: 14px;
    z-index: 50;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
    width: min(calc(100% - 20px), 360px);
    height: 56px;
    padding: 0 8px;
    transform: translateX(-50%);
    border: 3px solid var(--line);
    background: rgba(255, 253, 248, 0.96);
    box-shadow: 0 12px 30px rgba(17, 17, 17, 0.16);
    overflow: visible;
  }

  .mobile-dock-link {
    transform: translateY(-6px);
  }

  .mobile-dock-link.active {
    transform: translateY(-8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
