/* Network Goblin Labs: shared look for every site in this repo.
   Edit shared/, then run tools/sync-shared.sh to copy it into each site folder. */

@font-face {
  font-family: "Orbitron";
  src: url("fonts/Orbitron-Variable.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "Rajdhani";
  src: url("fonts/Rajdhani-SemiBold.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}
@font-face {
  font-family: "Rajdhani";
  src: url("fonts/Rajdhani-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #060c13;
  --bg-2: #0a1520;
  --panel: #0e1c29;
  --panel-hi: #132638;
  --edge: #1d3448;
  --text: #e4f0f4;
  --dim: #8ea7b6;
  --faint: #5a7383;
  --cyan: #3be8da;
  --green: #8ee34f;
  --magenta: #ff4fd8;
  --amber: #ffb627;
  --violet: #9b6bff;
  --blue: #4fa3ff;
  --radius: 14px;
  --max: 1080px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(59, 232, 218, 0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(142, 227, 79, 0.07), transparent 60%),
    radial-gradient(circle at 1px 1px, rgba(29, 52, 72, 0.9) 1px, transparent 1.6px);
  background-size: auto, auto, 18px 18px;
  color: var(--text);
  font-family: "Rajdhani", system-ui, sans-serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.55;
}

a { color: var(--cyan); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #7ff3ea; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 {
  font-family: "Orbitron", "Rajdhani", sans-serif;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2rem, 6vw, 3.4rem); }
h2 { font-size: clamp(1.4rem, 3.6vw, 2rem); }
h3 { font-size: 1.05rem; letter-spacing: 0.04em; }
p { margin: 0 0 1em; }
code, kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85em;
  background: var(--panel-hi);
  border: 1px solid var(--edge);
  border-radius: 6px;
  padding: 0.05em 0.4em;
}

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.dim { color: var(--dim); }
.small { font-size: 0.9rem; }
.eyebrow {
  font-family: "Orbitron", sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.6em;
}
.accent-green { color: var(--green); }
.accent-cyan { color: var(--cyan); }

/* ---- header ---- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(6, 12, 19, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--edge);
}
.site-head .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand img { width: 38px; height: 38px; filter: drop-shadow(0 0 6px rgba(142, 227, 79, 0.35)); }
.brand span { font-family: "Orbitron", sans-serif; font-weight: 800; font-size: 0.95rem; letter-spacing: 0.04em; }
.brand b { color: var(--green); font-weight: 800; }
.nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  color: var(--dim);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 700;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--panel); }
@media (max-width: 560px) {
  .brand span { display: none; }
  .nav a { padding: 6px 8px; font-size: 0.95rem; }
}

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:hover { color: var(--text); background: var(--panel-hi); transform: translateY(-1px); }
.btn-primary {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #04171a;
  box-shadow: 0 0 24px rgba(59, 232, 218, 0.35);
}
.btn-primary:hover { background: #6ff0e5; color: #04171a; box-shadow: 0 0 32px rgba(59, 232, 218, 0.5); }
.btn-green { background: var(--green); border-color: var(--green); color: #0d1a05; box-shadow: 0 0 24px rgba(142, 227, 79, 0.3); }
.btn-green:hover { background: #a8ef74; color: #0d1a05; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---- sections & cards ---- */
section { padding: 56px 0; }
.section-head { max-width: 680px; margin-bottom: 28px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: linear-gradient(180deg, var(--panel-hi), var(--panel));
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  padding: 20px;
}
.card h3 { margin-bottom: 0.4em; }
.card p:last-child { margin-bottom: 0; }
.card .icon { font-size: 1.5rem; line-height: 1; margin-bottom: 10px; display: block; }

.tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  color: var(--dim);
  margin: 0 6px 6px 0;
}
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 700; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.status-live { color: var(--green); }
.status-soon { color: var(--amber); }

/* ---- device screenshots (320x240 renders of the real firmware UI) ---- */
.screen {
  display: block;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 4 / 3;
  height: auto;
  image-rendering: pixelated;
  border-radius: 10px;
  border: 6px solid #0b0f14;
  outline: 1px solid var(--edge);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55), 0 0 40px rgba(59, 232, 218, 0.12);
  background: #000;
}
figure { margin: 0; }
figcaption { color: var(--dim); font-size: 0.92rem; margin-top: 8px; }

.callout {
  border: 1px solid var(--edge);
  border-left: 3px solid var(--amber);
  background: rgba(255, 182, 39, 0.06);
  border-radius: 10px;
  padding: 14px 16px;
}
.callout-cyan { border-left-color: var(--cyan); background: rgba(59, 232, 218, 0.06); }

/* ---- footer ---- */
.site-foot { border-top: 1px solid var(--edge); padding: 28px 0 40px; color: var(--dim); font-size: 0.95rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
.site-foot .spacer { flex: 1; }

/* ---- shared page parts (product pages) ---- */
.hero { padding: 64px 0 32px; overflow-x: clip; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 36px; align-items: center; }
.lead { font-size: 1.2rem; color: var(--dim); max-width: 38em; }
.photo {
  display: block; width: 100%; height: auto; border-radius: 12px;
  border: 1px solid var(--edge); box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5); background: var(--bg-2);
}
.gallery { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
ul.checks { list-style: none; padding: 0; margin: 0; }
ul.checks li { padding-left: 1.6em; position: relative; margin-bottom: 0.5em; }
ul.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }
ul.warns { list-style: none; padding: 0; margin: 0; }
ul.warns li { padding-left: 1.6em; position: relative; margin-bottom: 0.5em; color: var(--dim); }
ul.warns li::before { content: "!"; position: absolute; left: 0.3em; color: var(--amber); font-weight: 700; }
ul.soon { list-style: none; padding: 0; margin: 0; }
ul.soon li { padding-left: 1.6em; position: relative; margin-bottom: 0.5em; color: var(--dim); }
ul.soon li::before { content: "→"; position: absolute; left: 0; color: var(--cyan); }
table.spec { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
table.spec th, table.spec td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--edge); vertical-align: top; }
table.spec th { color: var(--dim); font-weight: 700; white-space: nowrap; }
.table-scroll { overflow-x: auto; }
pre.code {
  background: var(--bg-2); border: 1px solid var(--edge); border-radius: 10px; padding: 14px 16px;
  overflow-x: auto; font-size: 0.85rem; line-height: 1.5; margin: 0;
}
pre.code code { background: none; border: 0; padding: 0; }
ol.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
ol.steps li { counter-increment: step; position: relative; padding: 14px 16px 14px 58px; }
ol.steps li::before {
  content: counter(step); position: absolute; left: 14px; top: 12px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-family: "Orbitron", sans-serif; font-weight: 800; font-size: 0.9rem;
  background: var(--cyan); color: #04171a;
}
.installers { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.installer { display: flex; flex-direction: column; gap: 10px; }
.msg { display: block; color: var(--amber); font-weight: 700; }
esp-web-install-button { display: block; margin-top: auto; }
@media (max-width: 820px) {
  .hero { padding-top: 40px; }
  .hero-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .btn:hover { transform: none; }
}
