:root {
  --bg: #0b1426;
  --card: #0f1a2e;
  --hero: #0f1c34;
  --border: #1e3a5f;
  --text: #e6edf7;
  --text-2: #b6c4da;
  --muted: #8fa3c0;
  --accent: #22d3ee;
  --accent-text: #04202a;
  --ok: #a5f3fc;
  --warn: #fcd34d;
  --radius: 14px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; background: var(--bg); color: var(--text); }

body {
  font: 16px/1.6 "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

header.top {
  border-bottom: 1px solid #13223b;
  background: rgba(11, 20, 38, 0.92);
  position: sticky; top: 0; z-index: 5;
  backdrop-filter: blur(6px);
}
header.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; font-size: 19px; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand svg { width: 28px; height: 28px; }
.brand b { color: var(--accent); font-weight: 650; }
nav a { color: var(--text-2); margin-left: 22px; font-size: 15px; white-space: nowrap; }
@media (max-width: 480px) { nav a[href$="#how"] { display: none; } }
nav a:hover { color: var(--text); text-decoration: none; }

.hero { padding-top: 84px; padding-bottom: 56px; }

/* Hero illustration (hero.svg): your devices hop home. Sits on the right, fading into the page on the left. */
.hero-band { position: relative; overflow: hidden; }
.hero-art { position: relative; z-index: 1; }
.hero-photo {
  /* Anchored to the centred content column (1040px), not the window edge, so on wide screens the house stays next
     to the text instead of drifting to the far right. */
  position: absolute; top: 0; bottom: 0;
  right: max(0px, calc(50% - 640px));
  width: min(56vw, 760px);
  background: url("/hero.svg") no-repeat right center / contain;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 30%), linear-gradient(to bottom, #000 72%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0%, #000 30%), linear-gradient(to bottom, #000 72%, transparent 100%);
  mask-composite: intersect;
}
@media (max-width: 900px) {
  /* Narrow screens: a faint backdrop behind the text, so the buttons stay clear. */
  .hero-photo { width: 100%; opacity: 0.12; background-position: right top; }
}
.hero h1 { font-size: clamp(34px, 5.4vw, 56px); line-height: 1.08; letter-spacing: -0.025em; margin: 0 0 18px; font-weight: 700; max-width: 760px; }
.hero h1 span { color: var(--accent); }
.hero p.lead { font-size: 19px; color: var(--text-2); max-width: 640px; margin: 0 0 30px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 10px; font-weight: 600; font-size: 16px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.small { font-size: 13.5px; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.card { background: var(--card); border: 1px solid #16253f; border-radius: var(--radius); padding: 24px; }
.card h3 { margin: 4px 0 8px; font-size: 18px; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--text-2); font-size: 15px; }
.step { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #0b2a33; color: var(--ok); font-weight: 700; font-size: 14px; }

section { padding: 36px 0; }
section h2 { font-size: 28px; letter-spacing: -0.02em; margin: 0 0 18px; }

.panel { background: var(--hero); border: 1px solid var(--border); border-radius: 18px; padding: 32px; }

.code {
  font-family: "Cascadia Mono", Consolas, ui-monospace, monospace; font-size: 13px; color: var(--ok);
  background: #0a1322; border: 1px solid #18294a; border-radius: 10px; padding: 12px 14px; word-break: break-all;
}

.note { border-left: 3px solid var(--accent); padding: 4px 0 4px 14px; color: var(--text-2); }
.warn { color: var(--warn); }

ol.steps { padding-left: 20px; }
ol.steps li { margin: 10px 0; color: var(--text-2); }
ol.steps li strong { color: var(--text); }

footer { border-top: 1px solid #13223b; margin-top: 48px; padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

.doc h1 { font-size: 36px; letter-spacing: -0.02em; margin: 48px 0 8px; }
.doc h2 { font-size: 22px; margin: 34px 0 8px; }
.doc p, .doc li { color: var(--text-2); }
.doc li strong, .doc p strong { color: var(--text); }

[hidden] { display: none !important; }

@media (max-width: 640px) {
  nav a { margin-left: 14px; font-size: 14px; }
  .hero { padding-top: 52px; padding-bottom: 36px; }
  .panel { padding: 22px; }
}
