@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/SpaceGrotesk.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/JetBrainsMono.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --graphite: #0a0c10;
  --panel: #11151c;
  --panel-2: #171c25;
  --line: #222936;
  --text: #eef1f6;
  --muted: #9aa4b4;
  --soft: #c9d0db;
  --ember: #ff6b1a;
  --ember-soft: #ffb547;
  --circuit: #36e2cf;
  --pcb: #11606b;
  --display: "Space Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--graphite);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--display);
  overflow-x: hidden;
}
a { color: var(--ember-soft); text-underline-offset: 3px; }
a:hover { color: var(--ember); }
:focus-visible { outline: 2px solid var(--ember-soft); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; height: auto; display: block; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

/* Header */
.site-header { position: relative; z-index: 2; padding: 22px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.375rem; letter-spacing: -0.02em; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.site-nav { display: flex; gap: 26px; font-size: 0.9375rem; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--text); }

/* Hero */
.hero { position: relative; isolation: isolate; padding: 28px 0 24px; }
.hero::before {
  content: "";
  position: absolute; inset: -90px 0 0 0; z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' fill='none' stroke='%2336e2cf' stroke-opacity='.08' stroke-width='1.5'%3E%3Cpath d='M0 40h50l20 20h40l20-20h30M20 160v-40l20-20h40M160 120h-30l-20 20v20M90 0v30l-10 10'/%3E%3Ccircle cx='50' cy='40' r='3'/%3E%3Ccircle cx='130' cy='40' r='3'/%3E%3Ccircle cx='80' cy='100' r='3'/%3E%3Ccircle cx='80' cy='40' r='3'/%3E%3C/svg%3E");
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 70% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 80% at 70% 40%, #000 20%, transparent 75%);
}
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: center; }
.hero h1 {
  font-size: clamp(3rem, 6vw, 5.25rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
  font-weight: 700;
  margin: 0 0 28px;
}
.lede { font-size: clamp(1.1875rem, 1.6vw, 1.375rem); line-height: 1.5; color: var(--soft); max-width: 30ch; margin: 0 0 36px; }
.status { display: flex; align-items: center; gap: 12px; margin: 0; font-weight: 600; font-size: 1.0625rem; color: var(--text); }
.led { width: 12px; height: 8px; border-radius: 2px; background: #3b2410; animation: led 2s steps(1, end) 1.9s infinite both; }
@keyframes led { 0% { background: #3b2410; box-shadow: none; } 50% { background: var(--ember-soft); box-shadow: 0 0 12px 2px rgba(255, 181, 71, 0.6); } }

.rig { width: 100%; height: auto; overflow: visible; }
.rig .phone-shadow { filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.55)); }
.rig .board-shadow { filter: drop-shadow(0 24px 30px rgba(0, 0, 0, 0.5)); }
.rig .pulse { filter: drop-shadow(0 0 6px var(--ember-soft)); }
.rig .led-l { animation: blink 2s steps(1, end) 1.9s infinite both; }
.rig .led-on { filter: drop-shadow(0 0 6px #36e2cf); }
.rig .led-tx { animation: flicker 0.18s steps(2, end) 0.6s 7 both; }
@keyframes blink { 0% { fill: #3b2410; filter: none; } 50% { fill: #ffb547; filter: drop-shadow(0 0 8px #ffb547); } }
@keyframes flicker { 0% { fill: #3b2410; } 50% { fill: #ffd479; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rig .pulse { display: none; }
  .rig .led-l, .led { animation: none; }
  .rig .led-l { fill: #ffb547; }
  .led { background: var(--ember-soft); }
  .rig .led-tx { animation: none; }
  .guide-link { transition: none; }
}

/* Section separator */
.statement { padding: 96px 0 24px; text-align: center; }
.statement h2 { font-size: clamp(2.25rem, 5.4vw, 4.25rem); letter-spacing: -0.045em; line-height: 1.02; margin: 0 auto 16px; max-width: 18ch; }
.statement p { margin: 0; color: var(--muted); font-size: clamp(1.0625rem, 1.6vw, 1.25rem); }

/* Sections */
section { padding: 104px 0 0; }
section:last-of-type { padding-bottom: 120px; }
.section-head { margin-bottom: 44px; }
h2 { font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.04; letter-spacing: -0.04em; margin: 0 0 12px; font-weight: 700; }
.section-head p { color: var(--muted); margin: 0; font-size: 1.1875rem; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.steps li { display: flex; flex-direction: column; }
.screen {
  border-radius: 36px;
  padding: 9px;
  background: linear-gradient(160deg, #2e3546, #10141b 55%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 40px 70px -30px rgba(0, 0, 0, 0.8);
  margin-bottom: 28px;
  max-width: 290px;
}
.screen img { border-radius: 28px; width: 100%; aspect-ratio: 1 / 2; object-fit: cover; object-position: top; }
.steps li:nth-child(2) { margin-top: 48px; }
.steps h3 { margin: 0 0 6px; font-size: 1.5rem; letter-spacing: -0.02em; }
.steps p { margin: 0; color: var(--muted); max-width: 30ch; }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tile { background: var(--panel); border-radius: 22px; padding: 32px; display: flex; flex-direction: column; gap: 10px; box-shadow: inset 0 0 0 1px var(--line); }
.tile h3 { margin: 0; font-size: 1.625rem; line-height: 1.1; letter-spacing: -0.03em; }
.tile p { margin: 0; color: var(--muted); max-width: 38ch; }
.tile-wide { grid-column: span 2; flex-direction: row; align-items: center; justify-content: space-between; gap: 32px; }
.tile-copy { display: flex; flex-direction: column; gap: 10px; }

.chips { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, auto); gap: 18px 14px; flex-shrink: 0; }
.chips li {
  position: relative;
  padding: 9px 14px;
  background: #0b0d11;
  color: #c3cad6;
  font: 600 0.875rem/1 var(--display);
  border-radius: 4px;
  text-align: center;
}
.chips li::before, .chips li::after {
  content: "";
  position: absolute; left: 8px; right: 8px; height: 5px;
  background: repeating-linear-gradient(90deg, #8d97a6 0 3px, transparent 3px 8px);
}
.chips li::before { top: -5px; }
.chips li::after { bottom: -5px; }
.chips li:first-child { color: var(--ember-soft); }

.version { margin-top: auto; padding-top: 18px; display: flex; align-items: baseline; gap: 10px; font: 0.9375rem var(--mono); color: var(--muted); }
.version strong { font: 700 2.5rem/1 var(--display); letter-spacing: -0.04em; color: var(--text); }

.hint-card { margin-top: auto; padding: 16px 18px; border-radius: 14px; background: var(--panel-2); display: flex; flex-direction: column; gap: 6px; }
.hint-title { font-weight: 600; color: var(--text); }
.hint-fix { color: var(--ember-soft); font-weight: 600; }

.verify { flex: 0 0 46%; display: flex; flex-direction: column; gap: 12px; }
.verify-bar { height: 12px; border-radius: 999px; background: #0b0d11; overflow: hidden; }
.verify-bar span { display: block; height: 100%; width: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--ember), var(--ember-soft)); }
.verify-label { display: flex; justify-content: space-between; color: var(--soft); font-weight: 500; }
.verify-label .ok { color: var(--circuit); font-weight: 700; }

/* Boards */
.boards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.board-card { background: var(--panel); border-radius: 22px; padding: 12px 12px 30px; box-shadow: inset 0 0 0 1px var(--line); }
.board-card h3, .board-card p { padding: 0 20px; }
.plate { background: #0b0e13; border-radius: 16px; display: grid; place-items: center; padding: 20px; margin: 0 0 24px; }
.board-art { width: 100%; max-width: 300px; height: auto; filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.55)); }
.board-card h3 { margin: 0 0 6px; font-size: 1.5rem; letter-spacing: -0.02em; }
.board-card p { margin: 0; color: var(--muted); }
.board-card .cable { margin-top: 14px; color: var(--soft); font-weight: 500; }
.needs { margin: 24px 0 0; color: var(--muted); }

/* Guides */
.guides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.guide-link { display: flex; flex-direction: column; gap: 8px; padding: 30px 32px; border-radius: 22px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); text-decoration: none; transition: background-color 0.2s; }
.guide-link:hover { color: var(--text); background: var(--panel-2); }
.guide-link strong { font-size: 1.375rem; line-height: 1.2; letter-spacing: -0.02em; }
.guide-link span { color: var(--muted); }

/* FAQ */
.faq > * { max-width: 820px; }
.faq h2 { margin-bottom: 20px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 22px 0; font-size: 1.1875rem; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 1.625rem; line-height: 1; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 22px; color: var(--muted); max-width: 66ch; }

/* Footer */
.site-footer { padding: 40px 0 48px; color: var(--muted); font-size: 0.9375rem; overflow: hidden; }
.footer-mark { margin: 0 0 12px; font-weight: 700; letter-spacing: -0.06em; line-height: 1.05; font-size: clamp(5rem, 19vw, 15rem); color: var(--panel-2); user-select: none; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding-top: 24px; border-top: 1px solid var(--line); }
.footer-row nav { display: flex; gap: 24px; }
.footer-row nav a, .footer-row a { color: var(--text); text-decoration: none; }
.footer-row p { margin: 0; }
.fineprint { margin: 18px 0 0; font-size: 0.8125rem; max-width: 70ch; }

/* Article pages (legal, guides) */
.legal { padding: 40px 0 96px; }
.legal article { max-width: 68ch; }
.back { display: inline-block; font-size: 0.9375rem; color: var(--muted); text-decoration: none; margin: 0 0 20px; }
.back:hover { color: var(--text); }
.legal h1 { font-size: clamp(2.25rem, 4.6vw, 3.5rem); letter-spacing: -0.04em; line-height: 1.02; margin: 0 0 12px; }
.legal .updated { color: var(--muted); margin: 0 0 36px; }
.legal .answer { font-size: 1.25rem; line-height: 1.55; color: var(--text); margin: 0 0 40px; }
.legal h2 { font-size: 1.5rem; margin: 48px 0 12px; letter-spacing: -0.02em; }
.legal p, .legal li { color: var(--soft); }
.legal li + li { margin-top: 8px; }
.legal code { font: 0.875em var(--mono); background: var(--panel-2); padding: 3px 7px; border-radius: 6px; color: #ffd8b8; }
.legal table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; }
.legal th, .legal td { text-align: left; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--soft); }
.legal th { color: var(--muted); font-weight: 500; }
.legal .guides { margin-top: 8px; }

@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 8px; }
  .rig { max-width: 560px; margin: 0 auto; }
  .bento { grid-template-columns: 1fr 1fr; }
  .tile-wide { grid-column: span 2; }
}
@media (max-width: 720px) {
  section { padding-top: 80px; }
  .statement { padding-top: 64px; }
  .steps { grid-template-columns: 1fr; gap: 48px; }
  .steps li:nth-child(2) { margin-top: 0; }
  .screen { max-width: 240px; }
  .bento, .boards, .guides { grid-template-columns: 1fr; }
  .tile-wide { grid-column: auto; flex-direction: column; align-items: flex-start; }
  .verify { flex: none; width: 100%; }
  .site-nav a.hide-sm { display: none; }
  .tile, .board-card, .guide-link { padding: 26px; }
}
