/* EthOS NAS site — dark first, no framework, no web fonts. */

:root {
  --bg: #0b0f16;
  --bg-soft: #0f141d;
  --panel: #141b25;
  --panel-2: #1a2230;
  --line: #24303f;
  --line-soft: #1c2532;
  --text: #e8eef7;
  --muted: #93a1b3;
  --accent: #4c9aff;
  --accent-2: #1f6feb;
  --accent-soft: rgba(76, 154, 255, .14);
  --ok: #3fb950;
  --warn: #d29922;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 24px 60px rgba(0, 0, 0, .45);
  --wrap: 1160px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

html[data-theme="light"] {
  --bg: #f7f9fc;
  --bg-soft: #ffffff;
  --panel: #ffffff;
  --panel-2: #f1f5fa;
  --line: #dbe3ee;
  --line-soft: #e7edf5;
  --text: #101823;
  --muted: #5a6a7d;
  --accent: #1f6feb;
  --accent-2: #1559c9;
  --accent-soft: rgba(31, 111, 235, .1);
  --shadow: 0 18px 44px rgba(16, 24, 35, .12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  /* clip, not hidden: `overflow-x: hidden` makes <body> the scroll container,
     which breaks window scrolling, anchor links and lazy-loading thresholds. */
  overflow-x: clip;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 820px; }

/* ── top bar ───────────────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
}
.topbar-inner { display: flex; align-items: center; gap: 22px; height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-weight: 650; letter-spacing: -.2px; }
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--accent); font-size: 19px; }
.brand-name { font-size: 16px; }

.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--muted); font-size: 14px; }
.nav a:hover { color: var(--text); text-decoration: none; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle, .nav-toggle {
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  width: 36px; height: 36px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}
.theme-toggle:hover, .nav-toggle:hover { border-color: var(--accent); }
.nav-toggle { display: none; }

/* ── buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: linear-gradient(180deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 10px 24px rgba(31, 111, 235, .32); }
.btn-ghost { background: var(--panel-2); border-color: var(--line); color: var(--text); }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 9px; }

/* ── hero ──────────────────────────────────────────────────────────────── */
.hero { position: relative; padding: 84px 0 72px; overflow: hidden; }
.hero-glow {
  position: absolute;
  inset: -30% -10% auto -10%;
  height: 620px;
  background:
    radial-gradient(42% 52% at 28% 38%, rgba(76, 154, 255, .22), transparent 70%),
    radial-gradient(38% 48% at 74% 24%, rgba(126, 87, 255, .18), transparent 72%);
  filter: blur(12px);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.02fr 1.2fr;
  gap: 48px;
  align-items: center;
}
.eyebrow {
  margin: 0 0 16px;
  font-size: 12.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.1rem, 4.2vw, 3.3rem);
  line-height: 1.08;
  letter-spacing: -.03em;
  font-weight: 720;
}
.lede { color: var(--muted); font-size: 17.5px; margin: 0 0 22px; max-width: 46ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.hero-copy p:not(.eyebrow):not(.lede) { color: var(--muted); font-size: 14.5px; max-width: 48ch; }
.hero-media { margin: 0; }
.hero-shot, .shot {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--panel);
}
.hero-shot { transform: perspective(1400px) rotateY(-4deg) rotateX(1.5deg); transition: transform .4s ease; }
.hero-shot:hover { transform: perspective(1400px) rotateY(0deg); }

/* ── sections ──────────────────────────────────────────────────────────── */
/* a linked section must clear the sticky topbar (62px) plus a little air */
.section, .hero { scroll-margin-top: 78px; }
.section { padding: 82px 0; border-top: 1px solid var(--line-soft); }
.section-alt { background: var(--bg-soft); }
.section-head { max-width: 720px; margin-bottom: 38px; }
.section h2 {
  margin: 0 0 12px;
  font-size: clamp(1.55rem, 2.6vw, 2.15rem);
  letter-spacing: -.025em;
  line-height: 1.15;
}
.section-head p { color: var(--muted); margin: 0; font-size: 16.5px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: start; }
.split .lede { font-size: 16px; }

/* ── cards ─────────────────────────────────────────────────────────────── */
.grid { display: grid; gap: 16px; }
.grid.features { grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.feature { transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.feature:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--panel-2); }
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--accent-soft);
  font-size: 21px;
  margin-bottom: 14px;
}
.feature h3 { margin: 0 0 8px; font-size: 17px; letter-spacing: -.01em; }
.feature p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ── gallery ───────────────────────────────────────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 13.5px;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.chip:hover { color: var(--text); border-color: var(--accent); }
.chip.is-active { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }

.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(430px, 1fr)); gap: 22px; }
.shot-card { margin: 0; }
.shot-card[hidden] { display: none; }
.shot-card .shot { transition: transform .2s ease, border-color .2s ease; }
.shot-card:hover .shot { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.shot-card figcaption { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 11px; font-size: 14px; }
.shot-card figcaption strong { font-weight: 620; }
.shot-card figcaption span { color: var(--muted); }
.gallery-empty { color: var(--muted); margin: 12px 0 0; }

/* ── security / lists ──────────────────────────────────────────────────── */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checklist li {
  position: relative;
  padding: 14px 16px 14px 46px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  color: var(--muted);
}
.checklist li::before {
  content: "✓";
  position: absolute;
  left: 16px; top: 13px;
  color: var(--ok);
  font-weight: 700;
}
.checklist strong { color: var(--text); }

/* ── downloads ─────────────────────────────────────────────────────────── */
.download-list { display: grid; gap: 12px; }
.download {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 12px;
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: border-color .15s ease, transform .15s ease;
}
.download:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-2px); }
.download-soon { border-style: dashed; cursor: default; }
.download-soon:hover { border-color: var(--line); transform: none; }
.download-soon .download-kind { color: var(--muted); background: var(--panel-2); }
.download-kind {
  grid-row: span 2;
  align-self: center;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 7px;
  padding: 4px 8px;
  white-space: nowrap;
}
.download strong { font-weight: 620; font-size: 15px; }
.download-meta { color: var(--muted); font-size: 13px; }
.download-notes { color: var(--muted); font-size: 13px; grid-column: 2; }
.download-meta:empty, .download-notes:empty { display: none; }

/* ── terminal ──────────────────────────────────────────────────────────── */
.terminal {
  position: relative;
  background: #0a0e14;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
html[data-theme="light"] .terminal { background: #0f1620; }
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.terminal-bar span { width: 10px; height: 10px; border-radius: 50%; background: #3a4553; }
.terminal-bar span:nth-child(1) { background: #ff5f57; }
.terminal-bar span:nth-child(2) { background: #febc2e; }
.terminal-bar span:nth-child(3) { background: #28c840; }
.terminal-bar em { margin-left: 8px; color: #7d8b9c; font-style: normal; font-size: 12px; font-family: var(--mono); }
.terminal pre {
  margin: 0;
  padding: 18px 20px 22px;
  overflow-x: auto;
  color: #d7e3f2;
  font: 13.5px/1.7 var(--mono);
}
.copy { position: absolute; right: 12px; top: 46px; }
#install + p, .section#install p { color: var(--muted); font-size: 14.5px; margin-top: 18px; }

/* ── timeline ──────────────────────────────────────────────────────────── */
.timeline { display: grid; gap: 14px; border-left: 2px solid var(--line); padding-left: 22px; }
.timeline-item header { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.pill {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 3px 11px;
  font-size: 12.5px;
  font-weight: 650;
}
.timeline-date { color: var(--muted); font-size: 13px; }
.timeline-item ul { margin: 0; padding-left: 20px; color: var(--muted); font-size: 14.5px; }
.timeline-item li { margin: 2px 0; }

/* ── faq ───────────────────────────────────────────────────────────────── */
.faq { display: grid; gap: 10px; }
.faq-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 4px 18px;
}
.faq-item summary {
  cursor: pointer;
  padding: 14px 0;
  font-weight: 600;
  font-size: 15.5px;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; float: right; color: var(--muted); }
.faq-item[open] summary::after { content: "–"; }
.faq-body { color: var(--muted); font-size: 14.5px; padding-bottom: 14px; }
.faq-body p { margin: 0 0 10px; }
.faq-body code { font-family: var(--mono); font-size: 13px; background: var(--panel-2); padding: 1px 5px; border-radius: 5px; }

/* ── footer ────────────────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--line-soft); padding: 44px 0 56px; color: var(--muted); }
.footer-inner { display: grid; gap: 14px; }
.footer-brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); }
.footer-note { margin: 0; font-size: 14.5px; max-width: 60ch; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; font-size: 14px; }
.footer-legal { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }

/* ── reveal animation ──────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .feature, .download, .shot-card .shot, .hero-shot { transition: none; transform: none; }
}

/* ── responsive ────────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .hero { padding: 56px 0 54px; }
  .hero-inner, .split { grid-template-columns: 1fr; gap: 34px; }
  .hero-shot { transform: none; }
  .gallery { grid-template-columns: 1fr; }
  .nav {
    position: absolute;
    top: 62px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
}

@media (max-width: 560px) {
  .section { padding: 58px 0; }
  .topbar-actions .btn-ghost { display: none; }
  .hero h1 { font-size: 2rem; }
  .terminal pre { font-size: 12.5px; }
}
