/* HaltOS site. Monochrome zinc tokens shared with the desktop theme. */
:root {
  --void: #09090b;
  --panel: #0e0e10;
  --rule: #27272a;
  --dim: #52525b;
  --muted: #a1a1aa;
  --soft: #d4d4d8;
  --ink: #fafafa;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --measure: 66ch;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration-color: var(--dim); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
code { font: 0.88em var(--mono); color: var(--soft); }
img { max-width: 100%; height: auto; display: block; }

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

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 12px; z-index: 10; background: var(--ink); color: var(--void); padding: 6px 12px; border-radius: 6px; }

/* Top bar */
.bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px var(--gutter);
  background: color-mix(in srgb, var(--void) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.bar-home { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: -0.01em; }
.bar nav { display: flex; gap: clamp(12px, 2.4vw, 28px); font-size: 14px; }
.bar nav a { color: var(--muted); text-decoration: none; }
.bar nav a:hover { color: var(--ink); }
.bar nav .bar-gh { color: var(--ink); border: 1px solid var(--rule); padding: 4px 12px; border-radius: 6px; margin: -5px 0; }
.bar nav .bar-gh:hover { background: var(--rule); }

/* Hero: the one loud moment on the page */
.hero {
  position: relative;
  overflow: hidden;
  min-height: min(92vh, 900px);
  padding: clamp(48px, 9vh, 110px) var(--gutter) 72px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  isolation: isolate;
}
.crt {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.35) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse 70% 55% at 50% 42%, rgba(161, 161, 170, 0.09), transparent 70%);
}
.hex {
  position: absolute; inset: 0; z-index: -2; pointer-events: none;
  font: 12px/20px var(--mono); color: var(--rule);
  white-space: pre; overflow: hidden;
  mask-image: linear-gradient(to right, #000 0, transparent 22%, transparent 78%, #000 100%);
  -webkit-mask-image: linear-gradient(to right, #000 0, transparent 22%, transparent 78%, #000 100%);
}

.boot {
  margin: 0 0 clamp(20px, 4vh, 40px);
  min-height: 9.6em;
  width: min(100%, 600px);
  font: 12.5px/1.6 var(--mono);
  color: var(--dim);
  text-align: left;
  white-space: pre-wrap;
}
.boot .ok { color: var(--muted); }
.boot .info { color: var(--soft); }

.wordmark-wrap {
  margin: 0;
  width: min(100%, 980px);
  font-size: 0;
}
.wm {
  display: block; width: 100%; height: auto;
  fill: var(--ink);
  filter: drop-shadow(0 0 10px rgba(250, 250, 250, 0.3));
}
.wm .c { shape-rendering: crispEdges; }
.wm .x { display: none; font: 13px var(--mono); fill: var(--dim); text-anchor: middle; }
.wm.decoding .c { display: none; }
.wm.decoding .c.on { display: inline; }
.wm.decoding .x { display: inline; }
.wm.decoding .x.off { display: none; }
.wm .cur { animation: blink 1.06s steps(1) infinite; }
.cursor {
  display: inline-block;
  background: var(--ink);
  animation: blink 1.06s steps(1) infinite;
}
.cursor.small { width: 0.6em; height: 1.05em; margin: 0 0 -0.18em 0.2em; vertical-align: baseline; }
@keyframes blink { 50% { opacity: 0; } }

.version {
  margin: 18px 0 0;
  font: 13px var(--mono); color: var(--muted);
  display: flex; gap: 14px;
}
.version span + span { padding-left: 14px; border-left: 1px solid var(--rule); }

.lede {
  max-width: 52ch;
  margin: clamp(24px, 4vh, 40px) auto 0;
  font-size: clamp(18px, 2.1vw, 22px); line-height: 1.5;
  color: var(--soft); letter-spacing: -0.01em;
}

.cmd {
  margin-top: 32px;
  display: flex; align-items: center; gap: 12px;
  max-width: min(100%, 860px);
  padding: 10px 10px 10px 16px;
  border: 1px solid var(--rule); border-radius: 10px;
  background: var(--panel);
  text-align: left;
}
.cmd-prompt { font: 13.5px var(--mono); color: var(--dim); white-space: nowrap; }
.cmd code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; color: var(--ink); font-size: 13.5px; scrollbar-width: none; }
.cmd code::-webkit-scrollbar { display: none; }
.copy {
  flex: none;
  font: 500 13px var(--sans);
  color: var(--void); background: var(--ink);
  border: 0; border-radius: 6px;
  padding: 7px 14px; cursor: pointer;
}
.copy:hover { background: var(--soft); }
.copy[data-state="done"] { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule); }

.hero-links { margin: 18px 0 0; display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; font-size: 15px; }
.hero-links a { color: var(--muted); }
.hero-links a:hover { color: var(--ink); }

/* The desktop screenshot, framed as the monitor it came from */
.monitor-section { padding: 0 var(--gutter); margin-top: -24px; }
.monitor {
  margin: 0 auto; max-width: 1180px;
  padding: 10px;
  border: 1px solid var(--rule); border-radius: 14px;
  background: linear-gradient(var(--panel), var(--void));
  box-shadow: 0 40px 120px -40px rgba(250, 250, 250, 0.12);
}
.monitor img { border-radius: 6px; width: 100%; }
.monitor figcaption, .panels figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); text-align: center; }

/* Launch video */
.video { max-width: 1080px; margin: 0 auto; padding: clamp(80px, 12vh, 140px) var(--gutter) 0; }
.player { margin: 0 auto; max-width: 720px; padding: 10px; border: 1px solid var(--rule); border-radius: 14px; background: var(--panel); }
.player video { display: block; width: 100%; height: auto; border-radius: 6px; background: var(--void); }

/* Sections share one rhythm */
.units, .screens, .install, .faq {
  max-width: 1080px; margin: 0 auto;
  padding: clamp(80px, 12vh, 140px) var(--gutter) 0;
}
.section-head { max-width: var(--measure); margin-bottom: 32px; }
.section-head h2 { margin: 0; font-size: clamp(28px, 3.6vw, 40px); line-height: 1.15; font-weight: 600; letter-spacing: -0.025em; }
.section-head p { margin: 12px 0 0; color: var(--muted); }

/* systemctl-style unit listing */
.term {
  border: 1px solid var(--rule); border-radius: 12px;
  background: var(--panel);
  padding: 20px clamp(16px, 3vw, 28px);
  font: 14px/1.55 var(--mono);
  overflow-x: auto;
}
.term p { margin: 0; }
.term-cmd { color: var(--ink); margin-bottom: 16px !important; }
.term-cmd span, .term .c { color: var(--dim); }
.term-foot { margin-top: 16px !important; color: var(--dim); }
.term table { width: 100%; border-collapse: collapse; }
.term th {
  text-align: left; font-weight: 700; color: var(--muted);
  padding: 0 24px 8px 0; border-bottom: 1px solid var(--rule);
}
.term td { padding: 12px 24px 12px 0; vertical-align: top; border-bottom: 1px solid #18181b; }
.term td:first-child { color: var(--ink); white-space: nowrap; }
.term td:nth-child(2) { color: var(--soft); white-space: nowrap; }
.term td:last-child { font-family: var(--sans); font-size: 15.5px; color: var(--muted); padding-right: 0; max-width: 60ch; }
.term td:last-child code { color: var(--soft); }
.term tr:last-child td { border-bottom: 0; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); margin: 0 8px 1px 0; box-shadow: 0 0 8px rgba(250, 250, 250, 0.6); }
.term.small { margin-top: 32px; font-size: 13.5px; line-height: 1.8; }

/* Screens viewer, tabs styled like the HaltOS Kvantum tabs */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs [role="tab"] {
  font: 500 14px var(--sans); color: var(--muted);
  background: transparent; border: 1px solid transparent; border-radius: 6px;
  padding: 7px 14px; cursor: pointer;
}
.tabs [role="tab"]:hover { color: var(--ink); background: #18181b; }
.tabs [role="tab"][aria-selected="true"] { color: var(--ink); background: var(--rule); border-color: #3f3f46; }
.panels figure { margin: 0; padding: 10px; border: 1px solid var(--rule); border-radius: 12px; background: var(--panel); }
.panels img { border-radius: 6px; margin: 0 auto; }
.panels img.narrow { max-height: 560px; width: auto; }

/* Install steps are a real sequence, so they carry numbers */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0; border-top: 1px solid var(--rule); }
.steps li { counter-increment: step; padding: 24px 24px 24px 0; }
.steps li + li { padding-left: 24px; border-left: 1px solid var(--rule); }
.steps li::before { content: "[" counter(step) "/4]"; font: 13px var(--mono); color: var(--dim); }
.steps h3 { margin: 10px 0 6px; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.steps p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* Name story, set as a man page */
.name { max-width: 1080px; margin: 0 auto; padding: clamp(80px, 12vh, 140px) var(--gutter) 0; }
.man { max-width: 820px; line-height: 1.7; }
.man-top { display: flex; justify-content: space-between; gap: 16px; color: var(--dim); margin-bottom: 20px !important; }
.man h3 { margin: 20px 0 4px; font: 700 14px var(--mono); color: var(--ink); }
.man-body { margin: 0 0 8px 4ch !important; font: 16px/1.65 var(--sans); color: var(--muted); max-width: var(--measure); }
.man-body code { color: var(--ink); }

/* FAQ */
.faq { padding-bottom: 40px; }
.faq details { border-top: 1px solid var(--rule); max-width: 820px; }
.faq details:last-of-type { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 20px 0; font-size: 18px; font-weight: 500;
  display: flex; justify-content: space-between; gap: 24px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 20px var(--mono); color: var(--muted); }
.faq details[open] summary::after { content: "-"; }
.faq details p { margin: 0 0 22px; color: var(--muted); max-width: var(--measure); }

/* Article pages */
.post { max-width: 720px; margin: 0 auto; padding: clamp(48px, 8vh, 96px) var(--gutter) 0; }
.post h1 { margin: 8px 0 0; font-size: clamp(32px, 4.6vw, 48px); line-height: 1.1; font-weight: 600; letter-spacing: -0.03em; }
.post h2 { margin: 48px 0 0; font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.post p, .post li { color: var(--soft); }
.post p { margin: 16px 0 0; }
.post ul { margin: 16px 0 0; padding-left: 20px; }
.post li + li { margin-top: 10px; }
.post strong { color: var(--ink); font-weight: 500; }
.post-meta { font: 13px var(--mono); color: var(--dim) !important; }
.post-lede { font-size: 20px; line-height: 1.55; color: var(--ink) !important; }
.post-code { margin: 16px 0 0; padding: 14px 16px; border: 1px solid var(--rule); border-radius: 10px; background: var(--panel); overflow-x: auto; }
.post-code code { color: var(--ink); white-space: pre; }
.post-figure { margin: 24px 0 0; padding: 10px; border: 1px solid var(--rule); border-radius: 12px; background: var(--panel); }
.post-figure img { border-radius: 6px; width: 100%; }
.post-figure figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); text-align: center; }
.post-links { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 32px !important; }

/* Blog */
.post-cover { margin: 28px 0 0; }
.post-cover img { width: 100%; border: 1px solid var(--rule); border-radius: 12px; }
.blog-list { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 14px; }
.blog-list a { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: center; padding: 12px; border: 1px solid var(--rule); border-radius: 12px; background: var(--panel); text-decoration: none; }
.blog-list a:hover { border-color: #3f3f46; }
.blog-list img { width: 100%; border-radius: 6px; }
.blog-text { display: grid; gap: 6px; }
.blog-title { color: var(--ink); font-weight: 600; font-size: 18px; letter-spacing: -0.01em; }
.blog-desc { color: var(--muted); font-size: 15px; line-height: 1.5; }
@media (max-width: 640px) { .blog-list a { grid-template-columns: 1fr; } }

/* Footer */
.foot { margin-top: 100px; padding: 48px var(--gutter) 56px; border-top: 1px solid var(--rule); text-align: center; }
.foot pre { margin: 0 0 16px; font: 14px var(--mono); color: var(--muted); }
.foot p { margin: 0 auto; max-width: 64ch; font-size: 14px; color: var(--dim); }
.foot a { color: var(--muted); }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .boot { font-size: 10.5px; min-height: 8.6em; }
  .bar nav a:not(.bar-gh) { display: none; }
  .cmd { flex-wrap: wrap; }
  .cmd code { flex-basis: 100%; order: 3; }
  .cmd-prompt { order: 1; }
  .copy { order: 2; margin-left: auto; }
  .term table, .term tbody, .term tr, .term td { display: block; }
  .term thead { display: none; }
  .term tr { padding: 14px 0; border-bottom: 1px solid #18181b; }
  .term tr:last-child { border-bottom: 0; }
  .term td { padding: 0; border: 0; }
  .term td:nth-child(2) { display: inline-block; margin: 4px 0 6px; font-size: 12.5px; }
  .term td:first-child { display: block; }
  .man-top span:nth-child(2) { display: none; }
  .man-body { margin-left: 0 !important; }
  .steps li, .steps li + li { padding: 20px 0; border-left: 0; border-bottom: 1px solid var(--rule); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cursor, .wm .cur { animation: none; }
}
