/* ===================================================================
   OpenChonker — "Signal" world
   Near-black ground, a soft red signal-glow (the mute LED, blown up
   into atmosphere), huge confident type, big pill buttons, soft depth.
   Archivo for everything display/UI, JetBrains Mono only for real code.
=================================================================== */

:root {
  --bg: #0A0B0D;
  --panel: #131519;
  --panel-2: #181B20;
  --panel-3: #1E2127;
  --border: #262A31;
  --border-soft: #1D2026;

  --text: #F5F6F8;
  --text-dim: #A2A9B4;
  --text-faint: #848C96;

  --red: #F93E1D;
  --red-strong: #FF5A3C;
  --red-btn: #E22706;
  --red-dim: rgba(249, 62, 29, 0.14);
  --red-glow: rgba(249, 62, 29, 0.55);

  --green: #2FE07A;
  --green-dim: rgba(47, 224, 122, 0.14);
  --green-glow: rgba(47, 224, 122, 0.55);

  --amber: #F5A623;
  --amber-dim: rgba(245, 166, 35, 0.12);

  --sans: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius: 20px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  --chrome-h: 72px;

  --shadow-card: 0 24px 48px -28px rgba(0, 0, 0, 0.6);
  --shadow-btn: 0 12px 28px -10px var(--red-glow);

  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--chrome-h) + 24px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--sans); font-weight: 800; letter-spacing: -0.015em; margin: 0; }
code { font-family: var(--mono); font-size: 0.88em; }
a { color: inherit; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--red-btn); color: #fff; padding: 12px 18px; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* ===================== REVEAL-ON-SCROLL ===================== */

/* Visible by default (no-JS / JS-failure safe). JS opts elements into the
   hidden-then-reveal animation by adding .reveal-armed before observing. */
.reveal.reveal-armed {
  opacity: 0; transform: translateY(22px);
  transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
}
.reveal.reveal-armed.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal.reveal-armed { opacity: 1; transform: none; transition: none; }
}

/* ===================== CHROME / NAV ===================== */

.chrome {
  position: sticky; top: 0; z-index: 100;
  height: var(--chrome-h);
  background: rgba(10, 11, 13, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border-soft);
}
.chrome__inner {
  max-width: 1180px; margin: 0 auto; padding: 0 24px;
  height: 100%; display: flex; align-items: center; gap: 32px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
  margin-right: auto; font-weight: 800; font-size: 16px; letter-spacing: -0.01em;
}
.brand__mark { border-radius: 8px; display: block; }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  text-decoration: none; color: var(--text-dim); font-size: 14.5px; font-weight: 500;
  transition: color .15s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links__gh { display: flex; align-items: center; gap: 7px; }

.nav-cta {
  text-decoration: none; color: #fff; background: var(--red-btn);
  padding: 9px 18px; border-radius: 999px; font-size: 14px; font-weight: 700;
  transition: background-color .15s ease, transform .15s ease;
}
.nav-cta:hover { background: var(--red-strong); transform: translateY(-1px); }

.chrome__burger {
  display: none; flex-direction: column; justify-content: center; gap: 4px;
  width: 36px; height: 36px; background: none; border: 1px solid var(--border);
  border-radius: 10px; cursor: pointer; padding: 0; margin-left: auto;
}
.chrome__burger span { display: block; width: 16px; height: 1.5px; background: var(--text); margin: 0 auto; }

.mobile-nav { display: none; flex-direction: column; border-bottom: 1px solid var(--border); background: var(--bg); }
.mobile-nav a { padding: 16px 24px; text-decoration: none; color: var(--text-dim); font-size: 15px; border-top: 1px solid var(--border-soft); }
.mobile-nav.is-open { display: flex; }

/* ===================== HERO ===================== */

.hero {
  position: relative;
  max-width: 1180px; margin: 0 auto;
  padding: 88px 24px 40px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  overflow: hidden;
}
.hero__glow {
  position: absolute; top: -10%; left: 50%; translate: -50% 0;
  width: min(1100px, 140vw); height: 780px;
  background: radial-gradient(closest-side, var(--red-dim), rgba(249,62,29,0.05) 55%, transparent 72%);
  filter: blur(10px);
  pointer-events: none; z-index: 0;
}
.hero__inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; max-width: 720px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; color: var(--text-dim); font-weight: 500;
  background: var(--panel-2); border: 1px solid var(--border);
  padding: 7px 16px; border-radius: 999px; margin: 0 0 28px;
}
.eyebrow__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green-glow); }

.hero__title {
  font-size: clamp(2.8rem, 7.2vw, 5.6rem);
  line-height: 0.98; letter-spacing: -0.03em;
  margin-bottom: 24px;
}
.hero__title-accent { color: var(--red-strong); }

.hero__lede { color: var(--text-dim); font-size: clamp(1.05rem, 1.6vw, 1.3rem); line-height: 1.5; max-width: 44ch; margin: 0 0 36px; }

.hero__cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: center; margin-bottom: 18px; }
.hero__meta { color: var(--text-faint); font-size: 13.5px; margin: 0; }
.hero__meta a { color: var(--text-dim); text-decoration-color: var(--border); }

/* ---- buttons ---- */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-weight: 700; font-size: 15.5px;
  padding: 15px 26px; border-radius: 999px;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease;
  border: 1px solid transparent;
}
.btn--primary { background: var(--red-btn); color: #fff; box-shadow: var(--shadow-btn); }
.btn--primary:hover { background: var(--red-strong); transform: translateY(-2px); box-shadow: 0 16px 32px -10px var(--red-glow); }
.btn--ghost { background: var(--panel-2); color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--text-faint); transform: translateY(-2px); }
.btn--lg { padding: 18px 32px; font-size: 17px; }
.btn--block { width: 100%; justify-content: center; }

/* ---- hero device / keycap grid ---- */

.hero__stage { position: relative; z-index: 1; margin-top: 64px; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.device {
  display: flex; flex-direction: column; gap: 12px;
  padding: 30px; border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(255,255,255,0.02) inset;
  width: min(92vw, 460px);
}
.pad__row { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 12px; }
.pad__row--bottom { grid-template-columns: 1.5fr 1.5fr 1fr; }

.key {
  position: relative;
  background: var(--panel-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 7px; height: 84px; cursor: default; font: inherit;
  transition: color .4s ease, border-color .4s ease, background-color .4s ease, box-shadow .4s ease;
}
.key__glyph { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.03em; color: var(--text-faint); text-transform: uppercase; }
.key__glyph--sm { font-size: 9px; }
.key__led { position: absolute; bottom: 9px; width: 18px; height: 3px; border-radius: 2px; background: var(--border); transition: background-color .4s ease, box-shadow .4s ease; }

.key--wide { grid-column: span 3; flex-direction: row; gap: 10px; justify-content: center; }
.key--brand { background: var(--red-btn); border-color: var(--red-btn); color: #fff; box-shadow: 0 8px 24px -12px var(--red-glow); }
.key__wordmark { font-family: var(--sans); font-weight: 800; font-size: 16px; letter-spacing: -0.01em; }
.key--brand .key__glyph { color: #fff; }

.key[data-state="red"] {
  color: var(--red-strong); border-color: var(--red);
  background: linear-gradient(180deg, var(--red-dim), var(--panel-3) 70%);
  box-shadow: 0 0 0 1px var(--red-dim), 0 0 28px -6px var(--red-glow);
}
.key[data-state="red"] .key__led { background: var(--red); box-shadow: 0 0 10px 1px var(--red-glow); }
.key[data-state="green"] {
  color: var(--green); border-color: var(--green);
  background: linear-gradient(180deg, var(--green-dim), var(--panel-3) 70%);
  box-shadow: 0 0 0 1px var(--green-dim), 0 0 28px -6px var(--green-glow);
}
.key[data-state="green"] .key__led { background: var(--green); box-shadow: 0 0 10px 1px var(--green-glow); }
.key--brand[data-state="flash"] { background: #fff; border-color: #fff; color: var(--red); }

.hero__caption { font-family: var(--mono); font-size: 13px; color: var(--text-faint); margin: 0; }

/* ===================== COPY CHIP ===================== */

.copy-chip {
  display: flex; align-items: flex-start; gap: 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--panel-2); padding: 14px 12px 14px 18px;
  font-family: var(--mono); font-size: 13.5px;
}
.copy-chip code { color: var(--text); white-space: pre; line-height: 1.7; }
.copy-chip__btn {
  background: none; border: none; color: var(--text-faint); cursor: pointer;
  padding: 6px; border-radius: 8px; display: flex; margin-left: auto; flex-shrink: 0;
  transition: color .12s ease, background-color .12s ease;
}
.copy-chip__btn:hover { color: var(--text); background: var(--panel-3); }
.copy-chip__btn.is-copied { color: var(--green); }

/* ===================== SECTION SHARED ===================== */

.section { max-width: 1180px; margin: 0 auto; padding: 100px 24px; }
.section__head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.section__head h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.section__lede { color: var(--text-dim); font-size: 1.1rem; margin: 16px 0 0; }

.provenance { font-family: var(--mono); font-size: 12px; color: var(--text-faint); text-align: center; margin: 28px auto 0; max-width: 70ch; }
.provenance code { color: var(--text-dim); }

/* ===================== WHY / REASON GRID ===================== */

.reason-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.reason-card {
  min-width: 0;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 26px; display: flex; flex-direction: column; gap: 16px;
  transition: border-color .2s ease, transform .2s ease;
}
.reason-card:hover { border-color: var(--text-faint); transform: translateY(-3px); }
.reason-card__icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel-3); color: var(--text-dim);
}
.reason-card__icon--red { background: var(--red-dim); color: var(--red-strong); }
.reason-card__icon--green { background: var(--green-dim); color: var(--green); }
.reason-card h3 { font-size: 17px; }
.reason-card p { color: var(--text-dim); font-size: 14.5px; line-height: 1.6; margin: 0; }
.reason-card code { color: var(--text); }

/* ===================== VS / COMPARE GRID ===================== */

.vs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; }
.vs-card {
  min-width: 0;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 32px; display: flex; flex-direction: column; opacity: 0.82;
}
.vs-card--featured {
  opacity: 1; border-color: var(--red); background: linear-gradient(180deg, var(--red-dim), var(--panel) 40%);
  box-shadow: var(--shadow-card), 0 0 0 1px var(--red-dim);
}
.vs-card__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border-soft); }
.vs-card__badge { font-weight: 800; font-size: 17px; }
.vs-card__badge--accent { color: var(--red-strong); }
.vs-card__sub { font-family: var(--mono); font-size: 11.5px; color: var(--text-faint); }

.vs-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.vs-row { display: flex; align-items: center; gap: 12px; font-size: 14.5px; color: var(--text-dim); }
.vs-icon {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 700;
}
.vs-row.is-yes .vs-icon { background: var(--green-dim); color: var(--green); }
.vs-row.is-yes { color: var(--text); }
.vs-row.is-no .vs-icon { background: var(--red-dim); color: var(--red-strong); }
.vs-row.is-un .vs-icon { background: var(--panel-3); color: var(--text-faint); border: 1px solid var(--border); }
.vs-row code { color: inherit; }

/* ===================== COMPATIBILITY / CHANNEL GRID ===================== */

.channel-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.channel-card {
  min-width: 0;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel);
  padding: 28px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
  transition: border-color .3s ease, box-shadow .3s ease, background-color .3s ease, transform .2s ease;
}
.channel-card:hover { transform: translateY(-3px); }
.channel-card__badge {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 13px;
  background: var(--panel-3); border: 1px solid var(--border);
  overflow: hidden;
}
.channel-card__badge svg { width: 22px; height: 22px; display: block; }
.channel-card__badge--fill { background: none; border: none; }
.channel-card__badge--fill svg { width: 100%; height: 100%; }
.channel-card h3 { font-size: 17px; margin: 0; }
.channel-card__layer { font-size: 12px; color: var(--text-dim); border: 1px solid var(--border); border-radius: 6px; padding: 4px 9px; background: var(--panel-3); }
.channel-card__via { margin: 0; font-size: 12.5px; color: var(--text-faint); }
.channel-card__via code { color: var(--text-faint); }
.channel-card__status {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-faint); opacity: 0; transition: opacity .3s ease;
}
.channel-card__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green-glow); }

.channel-card.is-live {
  border-color: var(--green);
  background: linear-gradient(180deg, var(--green-dim), var(--panel) 60%);
  box-shadow: var(--shadow-card), 0 0 0 1px var(--green-dim);
}
.channel-card.is-live .channel-card__status { opacity: 1; }
.channel-card.is-live .channel-card__layer { border-color: var(--green); color: var(--text); }
.channel-card.is-live .channel-card__badge:not(.channel-card__badge--fill) { border-color: var(--green); }

/* ===================== INSTALL ===================== */

.install-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.install-card {
  min-width: 0;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel);
  padding: 32px; display: flex; flex-direction: column; gap: 14px;
}
.install-card--featured { border-color: var(--red); background: linear-gradient(180deg, var(--red-dim), var(--panel) 45%); box-shadow: var(--shadow-card); }
.install-card--warn { border-color: var(--amber); background: linear-gradient(180deg, var(--amber-dim), var(--panel) 45%); }
.install-card__step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 10px; background: var(--panel-3);
  border: 1px solid var(--border); font-family: var(--mono); font-size: 13px; color: var(--text-dim);
}
.install-card--warn .install-card__step { background: var(--amber-dim); border-color: var(--amber); color: var(--amber); }
.install-card h3 { font-size: 18px; }
.install-card--warn h3 { color: var(--amber); }
.install-card p { color: var(--text-dim); font-size: 14.5px; line-height: 1.6; margin: 0; }
.install-card p code { color: var(--text); }
.install-card__note { color: var(--text-faint); font-size: 12.5px; line-height: 1.6; margin: 0; }
.install-card__note code { color: var(--text-dim); }

/* ===================== CLOSING CTA ===================== */

.closing {
  position: relative; overflow: hidden;
  padding: 120px 24px; text-align: center;
  border-top: 1px solid var(--border-soft);
}
.closing__glow {
  position: absolute; top: 50%; left: 50%; translate: -50% -50%;
  width: min(900px, 130vw); height: 500px;
  background: radial-gradient(closest-side, var(--red-dim), transparent 70%);
  pointer-events: none;
}
.closing__inner { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.closing h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
.closing p { color: var(--text-dim); font-size: 1.1rem; margin: 0; }

/* ===================== FOOTER ===================== */

.site-footer { border-top: 1px solid var(--border-soft); }
.site-footer__inner { max-width: 1180px; margin: 0 auto; padding: 48px 24px 64px; }
.site-footer__brand { display: flex; align-items: center; gap: 10px; font-weight: 700; margin-bottom: 18px; }
.site-footer__brand img { border-radius: 7px; }
.site-footer__disclaimer { color: var(--text-faint); font-size: 12.5px; line-height: 1.7; max-width: 74ch; margin: 0 0 22px; }
.site-footer__disclaimer a { color: var(--text-dim); }
.site-footer__links { display: flex; gap: 22px; flex-wrap: wrap; }
.site-footer__links a { text-decoration: none; color: var(--text-dim); font-size: 13px; border-bottom: 1px solid var(--border); }
.site-footer__links a:hover { color: var(--text); border-color: var(--text-faint); }

/* ===================== RESPONSIVE ===================== */

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .chrome__burger { display: flex; }

  .section { padding: 72px 24px; }
  .reason-grid { grid-template-columns: 1fr 1fr; }
  .vs-grid { grid-template-columns: 1fr; }
  .channel-grid { grid-template-columns: 1fr 1fr; }
  .install-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .hero { padding: 64px 20px 24px; }
  .section { padding: 56px 18px; }
  .section__head { margin-bottom: 40px; }
  .chrome__inner { padding: 0 16px; }
  .reason-grid { grid-template-columns: 1fr; }
  .channel-grid { grid-template-columns: 1fr; }
  .hero__cta { flex-direction: column; align-items: stretch; width: 100%; }
  .btn { justify-content: center; }
  .device { width: 100%; padding: 22px; }
  .key { height: 72px; }
  .key__wordmark { font-size: 13px; }
  .closing { padding: 80px 20px; }
}
