/* ============================================================
   mkcert-OS terminal landing — design system
   Shares the unified design language with the product dashboard.
   ============================================================ */

/* ===== SHARED DESIGN LANGUAGE — keep in sync with the other stylesheet.
   Canonical source: docs/superpowers/specs/2026-06-21-unified-design-language-design.md ===== */
:root {
  --accent:          #2cf5b8;
  --accent-soft:     #8cf5d4;
  --accent-contrast: #04140f;
  --accent-glow:     rgba(44, 245, 184, 0.40);
  --glow:            0 0 8px var(--accent-glow);
  --font-mono:       ui-monospace, 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Courier New', monospace;
  --radius:          4px;
  --radius-lg:       8px;
  --border-width:    1px;
  --muted:           #7d8590;
  --success:         #4ade80;
  --warning:         #fbbf24;
  --error:           #f87171;
}
/* ===== END SHARED DESIGN LANGUAGE ===== */

:root {
  /* landing surface layer (near-black for CRT punch) */
  --bg:          #070b07;
  --bg-panel:    #0c130c;
  --border:      #2f4a40;   /* aqua-tinted dark */
  --text:        #c8f7da;   /* body — AA on --bg */
  --maxw:        1040px;
  /* aliases → shared language (keeps existing usage lines working) */
  --mono:        var(--font-mono);
  --display:     var(--font-mono);   /* web fonts retired; headings use shared mono */
  --phosphor:    var(--accent);
  --phosphor-soft: var(--accent-soft);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 17px;
  line-height: 1.6;
  text-shadow: var(--glow);
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

a { color: var(--phosphor); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--phosphor); color: var(--bg);
  padding: 8px 14px; z-index: 10000; text-shadow: none;
}
.skip-link:focus { left: 8px; top: 8px; }

h1, h2, .display { font-family: var(--display); font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; }

/* Section heading like a typed command, e.g. ">_ SYSTEM CAPABILITIES" */
.section-head {
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 44px);
  color: var(--accent);
  margin: 0 0 18px;
  font-weight: 700;
  text-transform: uppercase;
}
.section-head::before { content: ">_ "; color: var(--phosphor-soft); }

section { padding: 56px 0; border-top: 1px solid var(--border); }

/* ---------- CRT overlay (decorative, never blocks input) ---------- */
.crt {
  position: fixed; inset: 0; z-index: 9000;
  pointer-events: none;
  background:
    radial-gradient(120% 120% at 50% 50%,
      rgba(0,0,0,0) 60%, rgba(0,0,0,0.55) 100%),           /* vignette */
    repeating-linear-gradient(
      to bottom,
      rgba(0,0,0,0) 0, rgba(0,0,0,0) 2px,
      rgba(0,0,0,0.16) 3px, rgba(0,0,0,0.16) 3px);          /* scanlines */
}
@keyframes crt-flicker {
  0%, 96%, 100% { opacity: 1; }
  97% { opacity: 0.82; }
  98% { opacity: 0.95; }
  99% { opacity: 0.86; }
}
@media (prefers-reduced-motion: no-preference) {
  .crt { animation: crt-flicker 6s linear infinite; }
}

/* ---------- Boot / POST overlay ---------- */
/* If JS never runs, never let the boot overlay hide the page. */
.boot {
  display: none; /* JS sets display:flex on the real boot path */
  position: fixed; inset: 0; z-index: 9500;
  background: var(--bg);
  flex-direction: column; justify-content: center;
  padding: 6vh 8vw;
}
.boot.is-hidden { display: none; }
.boot-text { font-family: var(--mono); color: var(--phosphor); margin: 0; white-space: pre-wrap; }
.boot-hint { color: var(--muted); margin-top: 24px; }
.boot-text::after { content: "▋"; animation: caret 1s step-end infinite; }
@keyframes caret { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .boot-text::after { animation: none; } }

/* ---------- Title bar ---------- */
.titlebar {
  position: sticky; top: 0; z-index: 8000;
  background: rgba(7,11,7,0.92); border-bottom: 1px solid var(--border);
  backdrop-filter: blur(2px);
}
.titlebar-inner { display: flex; justify-content: space-between; align-items: center;
  font-family: var(--display); font-size: 22px; color: var(--phosphor); padding: 8px 20px; }
.titlebar-name { font-weight: 700; text-transform: uppercase; }
.titlebar-status { color: var(--muted); font-size: 18px; }
.caret { animation: caret 1s step-end infinite; }
@media (prefers-reduced-motion: reduce) { .caret { animation: none; } }
@media (max-width: 620px) { .titlebar-status { display: none; } }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 64px; border-top: none; }
.hero-title { font-size: clamp(48px, 10vw, 104px); line-height: 0.95; margin: 0; color: var(--phosphor); font-weight: 700; text-transform: uppercase; }
.hero-tagline { font-family: var(--display); font-size: clamp(24px, 4vw, 38px); color: var(--phosphor-soft); min-height: 1.4em; margin: 10px 0 0; }
.hero-tagline::after { content: "▋"; animation: caret 1s step-end infinite; }
@media (prefers-reduced-motion: reduce) { .hero-tagline::after { animation: none; } }
.hero-sub { max-width: 60ch; color: var(--text); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

/* ---------- Terminal buttons ---------- */
.btn {
  display: inline-block; font-family: var(--display); font-size: 22px;
  color: var(--phosphor); text-decoration: none; text-shadow: var(--glow);
  border: 1px solid var(--phosphor); padding: 8px 16px; background: transparent;
  border-radius: var(--radius);
  transition: background .12s linear, color .12s linear;
}
.btn:hover, .btn:focus-visible { background: var(--phosphor); color: var(--bg); text-shadow: none; outline: none; }
.btn-primary { box-shadow: var(--glow); }

/* ---------- Feature grid ---------- */
.feature-grid { list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.feature { border: 1px solid var(--border); background: var(--bg-panel); padding: 18px 18px 20px; border-radius: var(--radius); }
.feature h3 { font-family: var(--display); font-size: 26px; color: var(--phosphor); margin: 0 0 6px; font-weight: 700; text-transform: uppercase; }
.feature h3::before { content: "› "; color: var(--phosphor-soft); }
.feature p { margin: 0; color: var(--text); font-size: 15.5px; }
.feature:hover { border-color: var(--phosphor); box-shadow: var(--glow); }

/* ---------- Monitor / display panel ---------- */
.monitor { margin: 0; }
.monitor-screen {
  position: relative; border: 2px solid var(--border);
  border-radius: var(--radius-lg); padding: 10px; background: #050805;
  box-shadow: inset 0 0 60px rgba(44, 245, 184, 0.10), var(--glow);
}
.monitor-screen img { display: block; width: 100%; height: auto; border-radius: var(--radius); }
.monitor-scan {
  position: absolute; inset: 10px; pointer-events: none; border-radius: var(--radius);
  background: repeating-linear-gradient(to bottom,
    rgba(0,0,0,0) 0, rgba(0,0,0,0) 2px, rgba(0,0,0,0.10) 3px, rgba(0,0,0,0.10) 3px);
}
.monitor figcaption { color: var(--muted); margin-top: 12px; font-size: 15px; }

/* ---------- Code blocks ---------- */
.muted { color: var(--muted); }
.codeblock { position: relative; margin: 14px 0 22px; }
.codeblock pre {
  margin: 0; background: var(--bg-panel); border: 1px solid var(--border);
  border-left: 3px solid var(--phosphor); padding: 16px 18px; overflow-x: auto;
  color: var(--text); text-shadow: none; border-radius: var(--radius);
}
.codeblock code { font-family: var(--mono); font-size: 15px; white-space: pre; }
.copy-btn {
  position: absolute; top: 8px; right: 8px; font-family: var(--display); font-size: 16px;
  color: var(--phosphor); background: var(--bg); border: 1px solid var(--phosphor);
  padding: 2px 10px; cursor: pointer; text-shadow: var(--glow);
  border-radius: var(--radius);
}
.copy-btn:hover, .copy-btn:focus-visible { background: var(--phosphor); color: var(--bg); text-shadow: none; outline: none; }
.copy-btn.copied { background: var(--phosphor); color: var(--bg); }

/* ---------- Manifest ---------- */
.manifest { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 0; }
.manifest dt { font-family: var(--display); font-size: 22px; color: var(--phosphor); font-weight: 700; text-transform: uppercase; }
.manifest dd { margin: 0; color: var(--text); }
@media (max-width: 520px) { .manifest { grid-template-columns: 1fr; gap: 2px 0; } .manifest dd { margin-bottom: 10px; } }

/* ---------- Console ---------- */
.console { border: 1px solid var(--border); background: var(--bg-panel); padding: 14px; }
.console-out { min-height: 1.6em; white-space: pre-wrap; color: var(--text); text-shadow: none; margin-bottom: 8px; }
.console-out .echo { color: var(--phosphor-soft); }
.console-out .err { color: var(--muted); }
.console-form { display: flex; align-items: center; gap: 8px; }
.console-prompt { font-family: var(--display); font-size: 22px; color: var(--phosphor); font-weight: 700; text-transform: uppercase; }
.console-input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--phosphor); font-family: var(--mono); font-size: 16px; text-shadow: var(--glow);
}
.console-input:focus { box-shadow: none; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0 64px; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 14px; }
.footer-note { color: var(--muted); font-size: 14px; margin: 0 0 10px; }
.footer-sign { font-family: var(--display); color: var(--phosphor); margin: 0; font-weight: 700; text-transform: uppercase; }
