:root {
  --void: #070707;
  --surface: #101010;
  --ink: #efece2;
  --muted: #8c8a7e;
  --faint: #4a4940;
  --line: #242422;
  --accent: #9aa6b8;
  --accent-ink: #0c0c0c;
  --paper: #e8e6d8;
  --ok: #a8b89a;
  --max: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--void);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.045;
  background-image:
    linear-gradient(var(--ink) 1px, transparent 1px),
    linear-gradient(90deg, var(--ink) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 20%, transparent 75%);
}

img {
  max-width: 100%;
  display: block;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.site {
  position: relative;
  z-index: 1;
}

/* ─── header ─── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 16px 28px;
  background: rgba(7, 7, 7, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.topbar-right {
  justify-content: flex-end;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--paper);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav-link {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s var(--ease);
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--ink);
}

.nav-link::before {
  content: "◘ ";
}

.menu-btn {
  display: none;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.mobile-nav {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  padding: 12px 28px 20px;
  background: var(--void);
  border-bottom: 1px solid var(--line);
}

.mobile-nav.open {
  display: grid;
  gap: 14px;
}

/* ─── hero ─── */
.hero {
  min-height: calc(100vh - 69px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-stage {
  width: min(420px, 78vw);
  aspect-ratio: 1;
  margin-bottom: 36px;
  position: relative;
  border: 1px solid var(--line);
  background: #000;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02), 0 40px 120px rgba(0, 0, 0, 0.55);
}

.hero-stage canvas {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--ink);
}

.hero-title {
  margin: 0;
  font-family: "Syne", sans-serif;
  font-weight: 800;
  font-size: clamp(3.2rem, 10vw, 6.4rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  text-transform: lowercase;
}

.hero-title span {
  font-size: 0.34em;
  vertical-align: super;
  letter-spacing: 0.08em;
  margin-left: 0.15em;
  color: var(--accent);
}

.hero-tag {
  margin: 18px 0 28px;
  max-width: 34ch;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 0.25s var(--ease), filter 0.25s var(--ease);
}

.cta:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.cta:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px 28px;
  margin-top: 34px;
}

.hero-links a {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-links a::before {
  content: "◘ ";
}

.hero-links a:hover {
  color: var(--ink);
}

/* ─── sections ─── */
.section {
  padding: 88px 24px;
  border-top: 1px solid var(--line);
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
}

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

.feature {
  min-height: 340px;
  display: grid;
  align-content: end;
  gap: 10px;
  padding: 28px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, transparent 35%, rgba(7, 7, 7, 0.88) 100%),
    var(--feature-bg, var(--surface));
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.feature::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(239, 236, 226, 0.08), transparent 45%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 3px,
      rgba(239, 236, 226, 0.03) 3px,
      rgba(239, 236, 226, 0.03) 4px
    );
  pointer-events: none;
}

.feature > * {
  position: relative;
  z-index: 1;
}

.feature-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ok);
}

.feature h3 {
  margin: 0;
  font-family: "Syne", sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.feature p {
  margin: 0;
  max-width: 36ch;
  color: var(--muted);
  font-size: 13px;
}

.feature-dither {
  position: absolute;
  inset: 0;
  opacity: 0.55;
  pointer-events: none;
}

.feature[data-tone="a"] { --feature-bg: #141412; }
.feature[data-tone="b"] { --feature-bg: #17181c; }
.feature[data-tone="c"] { --feature-bg: #121610; }
.feature[data-tone="d"] { --feature-bg: #1a1512; }

.feature-cta-row {
  margin-top: 8px;
}

.link-cta {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--faint);
  padding-bottom: 2px;
  transition: border-color 0.2s var(--ease);
}

.link-cta:hover {
  border-color: var(--ink);
}

/* closing band */
.closer {
  text-align: center;
  padding: 120px 24px;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(ellipse 60% 80% at 50% 100%, rgba(154, 166, 184, 0.12), transparent 70%),
    var(--void);
}

.closer h2 {
  margin: 0 0 14px;
  font-family: "Syne", sans-serif;
  font-size: clamp(2.4rem, 7vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.closer p {
  margin: 0 auto 28px;
  max-width: 42ch;
  color: var(--muted);
}

/* FAQ */
.faq-head,
.compat-head,
.legal-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.faq-head h2,
.compat-head h2,
.legal-head h2,
.page-title {
  margin: 0;
  font-family: "Syne", sans-serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.faq-list {
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 4px;
  text-align: left;
  font-size: 14px;
  color: var(--ink);
}

.faq-q::after {
  content: "+";
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.faq-item.open .faq-q::after {
  content: "−";
}

.faq-a {
  display: none;
  padding: 0 4px 22px;
  max-width: 70ch;
  color: var(--muted);
}

.faq-item.open .faq-a {
  display: block;
}

/* compatibility */
.compat-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.compat-main,
.compat-side {
  padding: 28px;
}

.compat-main {
  border-right: 1px solid var(--line);
}

.compat-kicker {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.compat-title {
  margin: 0 0 18px;
  font-family: "Syne", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.compat-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.compat-list li::before {
  content: "— ";
  color: var(--faint);
}

.pill {
  display: inline-flex;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

.feature-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.feature-list li::before {
  content: "◘ ";
  color: var(--ok);
}

/* install */
.steps {
  display: grid;
  gap: 12px;
  counter-reset: step;
}

.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--accent);
}

.step p {
  margin: 0;
  color: var(--muted);
}

.step strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-weight: 600;
}

code {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.92em;
  color: var(--ok);
}

/* legal / help pages */
.page {
  padding: 72px 24px 100px;
}

.page-inner {
  max-width: 760px;
  margin: 0 auto;
}

.page-inner.wide {
  max-width: var(--max);
}

.page-title {
  margin-bottom: 10px;
}

.page-lead {
  margin: 0 0 36px;
  color: var(--muted);
  max-width: 56ch;
}

.prose h2 {
  margin: 36px 0 12px;
  font-family: "Syne", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

.prose ul {
  padding-left: 1.2em;
}

.prose a {
  color: var(--ink);
  border-bottom: 1px solid var(--faint);
}

.prose a:hover {
  border-color: var(--ink);
}

.help-card {
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(154, 166, 184, 0.08), transparent 55%),
    var(--surface);
}

.help-card h2 {
  margin: 0;
  font-family: "Syne", sans-serif;
  font-size: 1.8rem;
  letter-spacing: -0.03em;
}

.help-card p {
  margin: 0;
  color: var(--muted);
  max-width: 48ch;
}

.mail {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-family: "Syne", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  border-bottom: 1px solid var(--accent);
  width: fit-content;
}

.mail:hover {
  color: var(--accent);
}

/* footer */
.footer {
  border-top: 1px solid var(--line);
  padding: 48px 24px 28px;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  gap: 28px;
}

.footer-brand {
  font-family: "Syne", sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.footer-brand span {
  display: block;
  margin-top: 6px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
}

.footer-links a {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-links a::before {
  content: "◘ ";
}

.footer-links a:hover {
  color: var(--ink);
}

.footer-copy {
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* motion */
@media (prefers-reduced-motion: no-preference) {
  .hero-stage,
  .hero-badge,
  .hero-title,
  .hero-tag,
  .cta,
  .hero-links {
    opacity: 0;
    transform: translateY(14px);
    animation: rise 0.8s var(--ease) forwards;
  }

  .hero-stage { animation-delay: 0.05s; }
  .hero-badge { animation-delay: 0.18s; }
  .hero-title { animation-delay: 0.28s; }
  .hero-tag { animation-delay: 0.38s; }
  .cta { animation-delay: 0.48s; }
  .hero-links { animation-delay: 0.58s; }

  .feature {
    transition: border-color 0.25s var(--ease), transform 0.35s var(--ease);
  }

  .feature:hover {
    border-color: #3a3a36;
    transform: translateY(-2px);
  }
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

/* responsive */
@media (max-width: 860px) {
  .feature-grid,
  .compat-panel {
    grid-template-columns: 1fr;
  }

  .compat-main {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .topbar-left .nav-link,
  .topbar-right .nav-link:not(.keep) {
    display: none;
  }

  .menu-btn {
    display: inline-flex;
  }
}

@media (max-width: 560px) {
  .topbar {
    padding: 14px 16px;
  }

  .hero {
    padding-top: 36px;
  }

  .section {
    padding: 64px 16px;
  }

  .feature {
    min-height: 280px;
    padding: 22px;
  }
}
