/* =========================================================================
   SIDE KEY SYSTEM — design system
   Direction: "Hazard Console" — matte black, hard safety-yellow, condensed
   uppercase display type, flat offset shadows (no blur/glow, no glass).
   No external fonts / no third-party requests by design (CSP + perf + GEO).
   ========================================================================= */

:root {
  /* color */
  --bg: #0d0d0d;
  --bg-alt: #131313;
  --panel: #161616;
  --panel-2: #1c1c1c;
  --line: #2b2b2b;
  --line-bright: #3f3f3f;
  --text: #f2f2f0;
  --text-dim: #b3b3af;
  --text-faint: #74746f;
  --yellow: #f4c400;
  --yellow-dim: #8a7000;
  --yellow-ambient: rgba(244, 196, 0, 0.05);
  --danger: #ff4136;
  --danger-dim: #7a1f19;

  /* type */
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Arial Narrow", "Segoe UI Semibold", "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  /* layout */
  --container: 1240px;
  --ease: cubic-bezier(0.16, 0.8, 0.24, 1);

  /* mouse-reactive (set by js/main.js, degrade gracefully if unset) */
  --mx: 50%;
  --my: 40%;
}

/* ---- reset ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, dl, dd, figure { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea { font: inherit; }

::selection { background: var(--yellow); color: #0d0d0d; }

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

/* recurring caution-tape motif — used sparingly, once per page */
.hazard-stripe {
  height: 8px;
  background: repeating-linear-gradient(135deg, var(--yellow), var(--yellow) 12px, var(--bg) 12px, var(--bg) 24px);
}

/* ---- typography ---------------------------------------------------------
   Condensed, heavy, uppercase display face for every heading. The single
   hero heading per page (.engraved) adds a hard offset shadow — a flat
   graphic "stencil" mark, never a blurred glow.
   ------------------------------------------------------------------------ */
h1, h2, h3, .h1, .h2, .h3 {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.0;
  color: var(--text);
}
h1, .h1 { font-size: clamp(2.4rem, 3.4vw + 1.2rem, 4.6rem); line-height: 0.98; }
h2, .h2 { font-size: clamp(1.8rem, 1.8vw + 1.1rem, 2.7rem); }
h3, .h3 { font-size: clamp(1.1rem, 0.6vw + 0.95rem, 1.4rem); }

.engraved { text-shadow: 5px 5px 0 var(--yellow); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--yellow);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--yellow); }

.lede { color: var(--text-dim); font-size: 1.08rem; max-width: 56ch; }
.mono { font-family: var(--font-mono); }

/* ---- layout ------------------------------------------------------------ */
.container { max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.section { padding-block: clamp(56px, 8vw, 108px); }
.section--tight { padding-block: clamp(36px, 5vw, 64px); }
.section--alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stack { display: flex; flex-direction: column; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---- buttons — flat fill, hard offset shadow, press-in on activate ---- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 14px 26px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: box-shadow 0.15s var(--ease), transform 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.btn-primary {
  color: #0d0d0d;
  background: var(--yellow);
  box-shadow: 5px 5px 0 var(--text);
}
.btn-primary:hover, .btn-primary:focus-visible { box-shadow: 3px 3px 0 var(--text); transform: translate(2px, 2px); }
.btn-primary:active { box-shadow: 0 0 0 var(--text); transform: translate(5px, 5px); }

.btn-ghost {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line-bright);
}
.btn-ghost:hover, .btn-ghost:focus-visible { border-color: var(--yellow); color: var(--yellow); }

.btn-block { width: 100%; justify-content: center; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* ---- status LEDs — flat squares, no glow --------------------------------- */
.led { width: 8px; height: 8px; background: var(--yellow); flex: none; }
.led--soon { background: var(--text-faint); }
.status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim);
}

/* ---- header / nav — flat, opaque, no blur -------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 500;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.site-header__row { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 34px; height: 34px; object-fit: contain; }
.brand span { font-family: var(--font-mono); font-weight: 700; letter-spacing: 0.14em; font-size: 0.95rem; }
.brand span em { font-style: normal; color: var(--yellow); }

.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a {
  font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--text-dim); position: relative; padding-block: 6px;
}
.nav-links a:hover, .nav-links a:focus-visible, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--yellow);
}
.nav-cta { display: flex; align-items: center; gap: 18px; }

.nav-toggle { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; }
.nav-toggle span, .nav-toggle::before, .nav-toggle::after { content: ""; display: block; width: 22px; height: 2px; background: var(--text); transition: transform 0.25s var(--ease), opacity 0.2s; }
.nav-toggle { position: relative; }
.nav-toggle span { position: relative; }
.nav-toggle::before { position: absolute; top: 13px; left: 9px; }
.nav-toggle::after { position: absolute; top: 27px; left: 9px; }
.nav-toggle span { position: absolute; top: 20px; left: 9px; }

.site-header.is-open .nav-toggle::before { transform: translateY(7px) rotate(45deg); }
.site-header.is-open .nav-toggle::after { transform: translateY(-7px) rotate(-45deg); }
.site-header.is-open .nav-toggle span { opacity: 0; }

@media (max-width: 860px) {
  .nav-links { position: fixed; inset: 76px 0 0 0; flex-direction: column; justify-content: flex-start; gap: 0; padding: 20px 24px; background: var(--bg); border-top: 1px solid var(--line); transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity 0.2s var(--ease), transform 0.2s var(--ease); }
  .nav-links a { width: 100%; padding: 18px 4px; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
  .site-header.is-open .nav-links { opacity: 1; transform: none; pointer-events: auto; }
  .nav-cta .btn-ghost { display: none; }
  .nav-toggle { display: flex; }
}

/* ---- hero ---------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 78vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--bg);
}
.hero::after {
  /* extremely faint mouse-reactive ambient tint — the one soft gradient
     on the whole site, kept deliberately subtle */
  content: "";
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(480px 380px at var(--mx) var(--my), var(--yellow-ambient), transparent 65%);
}
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.6; z-index: 0; }
.hero__mark {
  position: absolute; right: -6%; top: 50%; transform: translateY(-50%);
  width: min(52vw, 720px); opacity: 0.05; filter: grayscale(1) contrast(1.2); pointer-events: none; z-index: 0;
}
.hero__content { position: relative; z-index: 2; padding-block: 64px; }
.hero h1 { margin-top: 18px; max-width: 17ch; }
.hero .lede { margin-top: 22px; font-size: 1.16rem; }
.hero .cta-row { margin-top: 34px; }

.readout {
  position: relative; z-index: 2;
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
}
.readout__row { display: flex; flex-wrap: wrap; gap: 0; }
.readout__item {
  flex: 1 1 auto; min-width: 180px;
  padding: 16px 22px;
  border-right: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.08em;
}
.readout__item:last-child { border-right: 0; }
.readout__item b { display: block; color: var(--text-dim); font-weight: 500; text-transform: uppercase; margin-bottom: 4px; letter-spacing: 0.12em; font-size: 0.68rem; }
.readout__item span { color: var(--yellow); }

/* ---- page hero (inner pages) ------------------------------------------- */
.page-hero { border-bottom: 1px solid var(--line); background: var(--bg); }
.page-hero .container { padding-top: 40px; padding-bottom: 40px; }
.breadcrumbs { font-family: var(--font-mono); font-size: 0.74rem; color: var(--text-faint); letter-spacing: 0.06em; margin-bottom: 22px; }
.breadcrumbs a { color: var(--text-dim); }
.breadcrumbs a:hover { color: var(--yellow); }

/* ---- panels — flat bordered boxes, no clipped corners ------------------- */
.panel { border: 1px solid var(--line); background: var(--panel); height: 100%; }
.panel__inner { padding: 28px; height: 100%; }

/* ---- product grid / cards ---------------------------------------------- */
.grid-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2px; background: var(--line); }

.product-card { background: var(--bg); transition: box-shadow 0.2s var(--ease); }
.product-card:hover { box-shadow: inset 0 0 0 1px var(--yellow); }
.product-card__inner {
  padding: 18px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: perspective(1000px) rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg));
  transition: transform 0.5s var(--ease);
  will-change: transform;
}
.product-card__head { display: flex; align-items: center; justify-content: space-between; }
.product-card__tag { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); }
.product-card__shot { position: relative; overflow: hidden; background: #000; border: 1px solid var(--line); aspect-ratio: 16/10; display: flex; align-items: center; justify-content: center; }
.product-card__shot img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.5s var(--ease); }
.product-card:hover .product-card__shot img { transform: scale(1.04); }
.product-card__name { margin-top: 2px; }
.product-card__desc { color: var(--text-dim); font-size: 0.94rem; }
.product-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 4px; }
.product-card__link { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.06em; color: var(--yellow); display: inline-flex; align-items: center; gap: 6px; }
.product-card__link svg { transition: transform 0.2s var(--ease); }
.product-card:hover .product-card__link svg { transform: translateX(3px); }

.product-card--soon .product-card__shot img { filter: grayscale(1) brightness(0.55); }
.product-card--soon { opacity: 0.75; }

/* filter bar (catalog page) */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.filter-btn {
  font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 9px 16px; color: var(--text-dim); background: var(--panel); border: 1px solid var(--line);
}
.filter-btn:hover { color: var(--text); border-color: var(--line-bright); }
.filter-btn.is-active { color: #0d0d0d; background: var(--yellow); border-color: var(--yellow); }

/* ---- product detail page ------------------------------------------------ */
.product-hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2px; align-items: start; background: var(--line); }
@media (max-width: 900px) { .product-hero { grid-template-columns: 1fr; } }
.product-hero__shot { position: relative; background: #000; display: flex; }
.product-hero__shot img { width: 100%; height: auto; display: block; }
.product-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 18px; }

.spec-sheet { display: grid; grid-template-columns: max-content 1fr; gap: 10px 28px; }
.spec-sheet dt { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); padding-top: 3px; }
.spec-sheet dd { color: var(--text); }

.feature-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2px; background: var(--line); }
.feature-item { display: flex; gap: 14px; padding: 20px; background: var(--panel); }
.feature-item .led { margin-top: 6px; }
.feature-item h3 { margin-bottom: 6px; }
.feature-item p { color: var(--text-dim); font-size: 0.92rem; }

/* compare slider (pro vs free) */
.compare {
  position: relative; overflow: hidden; border: 1px solid var(--line); background: #000;
  aspect-ratio: 16/10; touch-action: none; user-select: none; cursor: ew-resize;
}
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.compare .compare__after { clip-path: inset(0 0 0 var(--pos, 50%)); }
.compare__handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); transform: translateX(-50%);
  width: 2px; background: var(--yellow);
}
.compare__grip {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  background: var(--bg); border: 1px solid var(--yellow); color: var(--yellow);
  font-family: var(--font-mono); font-size: 0.8rem;
}
.compare__label { position: absolute; top: 12px; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; padding: 5px 10px; background: var(--bg); border: 1px solid var(--line); pointer-events: none; }
.compare__label--left { left: 12px; }
.compare__label--right { right: 12px; }

/* ---- FAQ (native details/summary — zero JS, fully accessible) ---------- */
.faq { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 20px 4px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  font-weight: 600; font-size: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; flex: none; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); color: var(--yellow); border: 1px solid var(--line-bright); font-size: 1.1rem;
}
.faq-item[open] summary::after { content: "\2212"; background: var(--yellow); color: #0d0d0d; border-color: var(--yellow); }
.faq-item p { padding: 0 4px 22px; color: var(--text-dim); max-width: 68ch; }

/* ---- comparison table (free vs pro) ------------------------------------ */
.tier-table { width: 100%; border-collapse: collapse; }
.tier-table th, .tier-table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.tier-table thead th { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); }
.tier-table td:not(:first-child), .tier-table th:not(:first-child) { text-align: center; }
.tier-table .yes { color: var(--yellow); font-weight: 700; }
.tier-table .no { color: var(--text-faint); }

/* ---- CTA band ---------------------------------------------------------- */
.cta-band { text-align: center; }
.cta-band h2 { margin-bottom: 14px; }
.cta-band .lede { margin-inline: auto; }
.cta-band .cta-row { justify-content: center; margin-top: 30px; }

/* ---- footer -------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-alt); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; padding-block: 56px; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-brand p { color: var(--text-dim); font-size: 0.9rem; max-width: 34ch; margin-top: 14px; }
.footer-col h3 { font-family: var(--font-mono); font-weight: 500; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 16px; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--text-dim); font-size: 0.92rem; }
.footer-col a:hover { color: var(--yellow); }
.footer-bottom { border-top: 1px solid var(--line); padding-block: 22px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-faint); }

/* ---- simple content pages (about/contact/legal) ------------------------ */
.prose { max-width: 74ch; }
.prose h2 { margin-top: 44px; margin-bottom: 14px; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--text-dim); margin-top: 12px; }
.prose ul { margin-top: 12px; }
.prose li { color: var(--text-dim); padding-left: 20px; position: relative; margin-top: 8px; }
.prose li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 6px; height: 2px; background: var(--yellow); }

.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2px; background: var(--line); }
.contact-card { padding: 26px; background: var(--panel); }
.contact-card h3 { margin-bottom: 8px; }
.contact-card p { color: var(--text-dim); font-size: 0.92rem; margin-bottom: 16px; }

/* ---- brand badges (distribution channels, toolchain) --------------------- */
.badge-row { display: flex; flex-wrap: wrap; gap: 12px; }
.badge {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 20px 12px 12px; background: var(--panel); border: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.03em; color: var(--text-dim);
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.badge:hover { border-color: var(--line-bright); color: var(--text); }
.badge__mark {
  flex: none; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  background: #f2f2f0; border-radius: 4px; padding: 5px;
}
.badge__mark img { width: 100%; height: 100%; object-fit: contain; }
.badge__text { display: flex; flex-direction: column; gap: 2px; }
.badge b { color: var(--text); font-weight: 700; letter-spacing: 0.04em; line-height: 1.1; }
.badge span { color: var(--text-faint); font-size: 0.78rem; }

/* ---- scroll reveal ------------------------------------------------------- */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ---- 404 ------------------------------------------------------------------ */
.error-page { min-height: 70vh; display: flex; align-items: center; text-align: center; }
.error-page .container { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.error-code { font-family: var(--font-mono); font-size: clamp(4rem, 10vw, 8rem); color: var(--text); text-shadow: 6px 6px 0 var(--yellow); }
