/* ============================================================
   Free Mac Monitor · GitHub Pages
   Retro CRT / Pip-Boy aesthetic
   ============================================================ */

:root {
  --bg: #040804;
  --bg-raised: #0a130a;
  --bg-panel: #081008;
  --fg: #39ff14;
  --fg-dim: #1a7a00;
  --fg-faint: #0d3d00;
  --amber: #ffcc00;
  --red: #ff3a00;
  --ink: #8dffaa;

  --glow-sm: 0 0 4px rgba(57,255,20,.55);
  --glow-md: 0 0 8px rgba(57,255,20,.55), 0 0 16px rgba(57,255,20,.25);
  --glow-lg: 0 0 10px #39ff14, 0 0 22px rgba(57,255,20,.5);

  --font-mono: 'Share Tech Mono', 'VT323', 'Andale Mono', 'Courier New', Courier, monospace;
  --font-display: 'VT323', 'Share Tech Mono', 'Courier New', Courier, monospace;
}

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

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse at 20% -10%, rgba(57,255,20,.06), transparent 60%),
    radial-gradient(ellipse at 120% 10%, rgba(57,255,20,.05), transparent 55%),
    linear-gradient(180deg, #040804 0%, #030703 100%);
}

a { color: var(--fg); text-decoration: none; }
a:hover { text-shadow: var(--glow-md); }

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ── CRT overlays ────────────────────────────────────────── */
.crt-scanlines {
  position: fixed; inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0, transparent 2px,
    rgba(0,0,0,.22) 2px, rgba(0,0,0,.22) 3px
  );
  pointer-events: none;
  z-index: 9998;
  mix-blend-mode: multiply;
}
.crt-vignette {
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(0,0,0,.75) 100%);
  pointer-events: none;
  z-index: 9999;
}
.crt-flicker {
  position: fixed; inset: 0;
  background: rgba(57,255,20,.015);
  pointer-events: none;
  z-index: 9997;
  animation: flicker 4s infinite;
}
@keyframes flicker {
  0%, 100% { opacity: 1; }
  3% { opacity: .85; }
  6% { opacity: 1; }
  48% { opacity: .92; }
  50% { opacity: 1; }
}

.glow { text-shadow: var(--glow-lg); }
.blink { animation: blink 1.1s step-end infinite; }
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:0; } }

/* ── Top bar ─────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0;
  z-index: 100;
  background: rgba(4, 8, 4, .86);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--fg-faint);
}
.topbar .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px;
}
.brand {
  display: flex; align-items: baseline; gap: 8px;
  letter-spacing: 2px;
  font-family: var(--font-display);
  font-size: 22px;
}
.brand-diamond { color: var(--fg); text-shadow: var(--glow-md); }
.brand-name { color: var(--fg); text-shadow: var(--glow-sm); }
.brand-sub { color: var(--fg-dim); font-size: 14px; letter-spacing: 2px; }

.nav { display: flex; align-items: center; gap: 22px; font-size: 14px; letter-spacing: 2px; }
.nav a { color: var(--fg-dim); transition: color .15s; }
.nav a:hover { color: var(--fg); text-shadow: var(--glow-sm); }

.lang-toggle {
  background: transparent;
  border: 1px solid var(--fg-faint);
  color: var(--fg-dim);
  padding: 4px 10px;
  letter-spacing: 2px;
  font-family: var(--font-mono);
  font-size: 13px;
  cursor: pointer;
  transition: border-color .15s, color .15s, text-shadow .15s;
}
.lang-toggle:hover { border-color: var(--fg-dim); }
.lang-opt { padding: 0 3px; }
.lang-opt.is-active { color: var(--fg); text-shadow: var(--glow-sm); }
.lang-sep { color: var(--fg-faint); }

/* ── Hero ────────────────────────────────────────────────── */
.hero { padding: 72px 0 48px; position: relative; }
.hero::before {
  content: '';
  position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--fg-dim), transparent);
  opacity: .35;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}

.kicker {
  color: var(--fg-dim);
  letter-spacing: 3px;
  font-size: 13px;
  margin-bottom: 20px;
}

.title {
  font-family: var(--font-display);
  font-size: clamp(44px, 6.2vw, 82px);
  line-height: .95;
  letter-spacing: 2px;
  color: var(--fg);
  margin-bottom: 22px;
}

.lede {
  font-size: 17px;
  color: var(--ink);
  max-width: 560px;
  margin-bottom: 34px;
}

.cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }

.btn {
  display: inline-flex; align-items: center;
  padding: 12px 22px;
  border: 1px solid var(--fg);
  color: var(--fg);
  font-family: var(--font-mono);
  letter-spacing: 2px;
  font-size: 14px;
  position: relative;
  transition: background .15s, color .15s, box-shadow .15s, text-shadow .15s;
  background: transparent;
  cursor: pointer;
}
.btn:hover { box-shadow: var(--glow-md); text-shadow: var(--glow-sm); }
.btn-primary {
  background: rgba(57,255,20,.08);
}
.btn-primary:hover {
  background: rgba(57,255,20,.2);
}
.btn-ghost {
  border-color: var(--fg-dim);
  color: var(--fg-dim);
}
.btn-ghost:hover { border-color: var(--fg); color: var(--fg); }

.stat-row {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  border-top: 1px dashed var(--fg-faint);
  border-bottom: 1px dashed var(--fg-faint);
  padding: 16px 0;
  max-width: 580px;
}
.stat-row li { display: flex; flex-direction: column; gap: 2px; }
.stat-n {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--fg);
  text-shadow: var(--glow-sm);
  letter-spacing: 1px;
}
.stat-l { font-size: 11px; color: var(--fg-dim); letter-spacing: 2px; }

/* ── Pip-Boy unit ────────────────────────────────────────── */
.pipboy { display: flex; flex-direction: column; align-items: center; gap: 18px; }

.pipboy-bezel {
  width: 100%;
  max-width: 420px;
  background:
    linear-gradient(145deg, #2a2013 0%, #1a1308 45%, #2a2013 100%);
  border-radius: 18px;
  padding: 18px 18px 12px;
  box-shadow:
    inset 0 2px 0 rgba(255,220,140,.14),
    inset 0 -2px 0 rgba(0,0,0,.5),
    0 24px 60px rgba(0,0,0,.55),
    0 0 0 1px rgba(255,220,140,.08);
  position: relative;
}
.pipboy-bezel::before {
  content: '';
  position: absolute; inset: 6px;
  border-radius: 12px;
  border: 1px solid rgba(255,220,140,.12);
  pointer-events: none;
}

.pipboy-screen {
  background: #060d06;
  border-radius: 10px;
  padding: 18px 20px 14px;
  color: var(--fg);
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.35;
  position: relative;
  overflow: hidden;
  min-height: 360px;
  box-shadow:
    inset 0 0 40px rgba(57,255,20,.12),
    inset 0 0 4px rgba(0,0,0,.7);
}
.pipboy-screen::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0, transparent 3px,
    rgba(0,0,0,.25) 3px, rgba(0,0,0,.25) 4px
  );
  pointer-events: none;
}
.pipboy-screen::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(0,0,0,.7) 100%);
  pointer-events: none;
}

.pp-header { text-align: center; }
.pp-logo { color: var(--fg); text-shadow: var(--glow-md); font-size: 17px; letter-spacing: 1px; }
.pp-model { color: var(--fg-dim); font-size: 12px; letter-spacing: 3px; margin-top: 2px; }
.pp-rule { color: var(--fg-dim); font-size: 12px; letter-spacing: -1px; line-height: 1; margin: 6px 0; }

.pp-metrics { display: flex; flex-direction: column; gap: 10px; margin: 8px 0; }
.pp-metric { display: flex; flex-direction: column; gap: 3px; }
.pp-row { display: flex; justify-content: space-between; align-items: baseline; }
.pp-name { letter-spacing: 3px; font-size: 13px; color: var(--fg); }
.pp-pct {
  font-size: 14px;
  color: var(--fg);
  text-shadow: var(--glow-sm);
  min-width: 52px;
  text-align: right;
}

.pp-bar { font-size: 14px; letter-spacing: 1px; line-height: 1; color: var(--fg-faint); word-break: break-all; }
.pp-bar .lit { color: var(--fg); text-shadow: var(--glow-sm); }
.pp-bar .warn { color: var(--amber); text-shadow: 0 0 5px var(--amber); }
.pp-bar .crit { color: var(--red); text-shadow: 0 0 5px var(--red); }

.pp-detail { font-size: 11px; color: var(--fg-dim); letter-spacing: 1px; }

.pp-footer { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.pp-status-l { color: var(--fg-dim); letter-spacing: 2px; }
.pp-status-v { color: var(--fg); text-shadow: var(--glow-sm); letter-spacing: 1px; }
.pp-status-v.warn { color: var(--amber); text-shadow: 0 0 6px var(--amber); }
.pp-status-v.crit { color: var(--red); text-shadow: 0 0 6px var(--red); }
.pp-time { color: var(--fg-dim); font-size: 11px; letter-spacing: 1px; }

.pipboy-chrome {
  display: flex; align-items: center; gap: 10px;
  margin-top: 10px;
  padding: 0 4px;
}
.led {
  width: 8px; height: 8px; border-radius: 50%;
  background: #2a2013; box-shadow: inset 0 0 3px rgba(0,0,0,.7);
}
.led.led-on { background: var(--fg); box-shadow: 0 0 6px var(--fg), inset 0 0 2px #fff; }
.chrome-label {
  margin-left: auto;
  font-family: var(--font-mono);
  letter-spacing: 3px; font-size: 10px;
  color: rgba(255,220,140,.55);
}

/* ── Menu bar mock ───────────────────────────────────────── */
.menubar-mock { width: 100%; max-width: 420px; }
.menubar-bg {
  background: rgba(10, 14, 10, .85);
  backdrop-filter: blur(4px);
  border: 1px solid var(--fg-faint);
  border-radius: 6px;
  padding: 6px 12px;
  display: flex; justify-content: space-between;
  font-size: 12px;
  color: #cfd4cf;
  letter-spacing: .5px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.mb-left { color: #cfd4cf; }
.mb-right { display: inline-flex; gap: 12px; align-items: center; }
.mb-item {
  color: var(--fg);
  font-family: var(--font-mono);
  text-shadow: var(--glow-sm);
  letter-spacing: 1px;
}
.mb-item.crit { color: var(--red); text-shadow: 0 0 4px var(--red); }
.mb-wifi, .mb-batt, .mb-clock { color: #cfd4cf; }
.menubar-caption {
  margin-top: 8px;
  text-align: center;
  color: var(--fg-dim);
  font-size: 11px;
  letter-spacing: 2px;
}

/* ── Sections ────────────────────────────────────────────── */
.section { padding: 72px 0; position: relative; }
.section.alt { background: linear-gradient(180deg, rgba(57,255,20,.02), transparent); border-top: 1px dashed var(--fg-faint); border-bottom: 1px dashed var(--fg-faint); }

.section-head {
  display: flex; align-items: center; gap: 18px;
  margin-bottom: 40px;
}
.section-num {
  font-family: var(--font-display);
  font-size: 38px;
  color: var(--fg-dim);
  letter-spacing: 3px;
  line-height: 1;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 44px);
  letter-spacing: 3px;
  color: var(--fg);
  text-shadow: var(--glow-sm);
}
.section-rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--fg-dim), transparent);
}

/* ── Feature grid ────────────────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.feature {
  background: var(--bg-panel);
  border: 1px solid var(--fg-faint);
  padding: 22px 22px 20px;
  position: relative;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.feature::before {
  content: '';
  position: absolute; top: -1px; left: -1px;
  width: 12px; height: 12px;
  border-top: 1px solid var(--fg);
  border-left: 1px solid var(--fg);
}
.feature::after {
  content: '';
  position: absolute; bottom: -1px; right: -1px;
  width: 12px; height: 12px;
  border-bottom: 1px solid var(--fg);
  border-right: 1px solid var(--fg);
}
.feature:hover {
  border-color: var(--fg-dim);
  transform: translateY(-2px);
  box-shadow: var(--glow-md);
}
.feature-icon {
  color: var(--fg);
  text-shadow: var(--glow-sm);
  font-size: 20px;
  margin-bottom: 10px;
}
.feature h3 {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 2px;
  color: var(--fg);
  margin-bottom: 8px;
}
.feature p { color: var(--ink); font-size: 14.5px; }

/* ── Install methods (A/B/C cards) ───────────────────────── */
.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.method {
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--fg-faint);
  padding: 22px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.method-tag {
  position: absolute;
  top: 0; right: 0;
  background: var(--fg);
  color: #040804;
  font-family: var(--font-display);
  font-size: 15px;
  padding: 2px 10px;
  letter-spacing: 2px;
  text-shadow: none;
}
.method h3 {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 2px;
  color: var(--fg);
  text-shadow: var(--glow-sm);
}
.method p { color: var(--ink); font-size: 14px; min-height: 3.2em; }

.cmd-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: auto;
}
.cmd-row code {
  flex: 1;
  background: #020502;
  border: 1px solid var(--fg-faint);
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--fg);
  text-shadow: var(--glow-sm);
  overflow-x: auto;
  white-space: nowrap;
}
.copy-btn {
  background: transparent;
  border: 1px solid var(--fg-dim);
  color: var(--fg-dim);
  font-family: var(--font-mono);
  letter-spacing: 2px;
  font-size: 12px;
  padding: 0 12px;
  cursor: pointer;
  transition: border-color .15s, color .15s, text-shadow .15s;
}
.copy-btn:hover { border-color: var(--fg); color: var(--fg); text-shadow: var(--glow-sm); }
.copy-btn.copied {
  border-color: var(--fg);
  color: var(--fg);
  text-shadow: var(--glow-sm);
}
.dl-btn { width: 100%; justify-content: center; }

/* ── Notice box ──────────────────────────────────────────── */
.notice {
  border: 1px dashed var(--amber);
  background: rgba(255,204,0,.05);
  padding: 14px 18px;
  margin-bottom: 26px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.notice-tag {
  color: var(--amber);
  text-shadow: 0 0 6px rgba(255,204,0,.55);
  letter-spacing: 2px;
  font-size: 13px;
  white-space: nowrap;
  padding-top: 2px;
}
.notice p { color: var(--ink); font-size: 14px; }
.notice code {
  background: rgba(0,0,0,.35);
  border: 1px solid var(--fg-faint);
  padding: 1px 6px;
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 13px;
}

/* ── Install (requirements + terminal) ──────────────────── */
.install-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 28px;
  align-items: start;
}

.req-panel {
  background: var(--bg-panel);
  border: 1px solid var(--fg-faint);
  padding: 22px;
}
.panel-title {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 3px;
  color: var(--fg);
  margin-bottom: 12px;
  text-shadow: var(--glow-sm);
}
.req-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.req-list li {
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 1px dashed var(--fg-faint);
  padding-bottom: 4px;
  font-size: 14px;
}
.req-key { color: var(--fg-dim); letter-spacing: 2px; font-size: 12px; }
.req-val { color: var(--fg); text-shadow: var(--glow-sm); }

.terminal {
  background: #020502;
  border: 1px solid var(--fg-faint);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
.terminal-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  background: linear-gradient(180deg, #0c130c, #070e07);
  border-bottom: 1px solid var(--fg-faint);
  font-size: 12px;
  color: var(--fg-dim);
  letter-spacing: 1px;
}
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-r { background: #ff5f56; }
.dot-y { background: #ffbd2e; }
.dot-g { background: #27c93f; }
.terminal-title { margin-left: 10px; }

.terminal-body {
  padding: 18px 22px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink);
  overflow-x: auto;
}
.t-prompt { color: var(--amber); }
.t-cmd { color: var(--fg); text-shadow: var(--glow-sm); }
.t-comment { color: var(--fg-dim); }
.t-out { color: var(--fg-dim); display: block; margin: 2px 0 2px 0; }
.cursor {
  display: inline-block;
  color: var(--fg);
  animation: blink 1.1s step-end infinite;
  margin-left: 2px;
}

/* ── How it works ────────────────────────────────────────── */
.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-bottom: 32px;
}
.how-item {
  background: var(--bg-panel);
  border-left: 2px solid var(--fg);
  padding: 18px 20px;
  transition: background .15s, border-color .15s;
}
.how-item:hover { background: rgba(57,255,20,.05); }
.how-num {
  color: var(--fg-dim);
  letter-spacing: 3px;
  font-size: 12px;
  margin-bottom: 8px;
}
.how-item h3 {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 2px;
  color: var(--fg);
  text-shadow: var(--glow-sm);
  margin-bottom: 6px;
}
.how-item p { color: var(--ink); font-size: 14.5px; }

.layout-panel {
  background: var(--bg-panel);
  border: 1px solid var(--fg-faint);
  padding: 20px 22px;
}
.layout-tree {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.65;
  overflow-x: auto;
}

/* ── Footer ──────────────────────────────────────────────── */
.footer-bar {
  border-top: 1px solid var(--fg-faint);
  padding: 32px 0 40px;
  background: rgba(0,0,0,.4);
}
.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 2px;
  color: var(--fg);
  text-shadow: var(--glow-sm);
}
.footer-sub { color: var(--fg-dim); font-size: 12px; letter-spacing: 2px; margin-top: 2px; }
.footer-links { display: flex; gap: 18px; letter-spacing: 2px; font-size: 13px; }
.footer-links a { color: var(--fg-dim); }
.footer-links a:hover { color: var(--fg); text-shadow: var(--glow-sm); }
.footer-copy { color: var(--fg-dim); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.footer-copy .blink { color: var(--fg); }

/* ── Showcase (real screenshots) ─────────────────────────── */
.showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;      /* two panels side-by-side */
  gap: 32px;
  align-items: start;
}
.shot-wide {
  grid-column: 1 / -1;                 /* menu gets its own full-width row */
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.shot {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.shot-frame {
  position: relative;
  background: #0b100c;
  border: 1px solid var(--fg-faint);
  padding: 10px;
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.shot-frame::before {
  content: '';
  position: absolute; top: -1px; left: -1px;
  width: 14px; height: 14px;
  border-top: 1px solid var(--fg);
  border-left: 1px solid var(--fg);
}
.shot-frame::after {
  content: '';
  position: absolute; bottom: -1px; right: -1px;
  width: 14px; height: 14px;
  border-bottom: 1px solid var(--fg);
  border-right: 1px solid var(--fg);
}
.shot:hover .shot-frame {
  border-color: var(--fg-dim);
  box-shadow: var(--glow-md);
}
.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}
.shot-tall img { max-height: 520px; object-fit: contain; object-position: top center; background: transparent; }
.shot-wide img { max-height: 320px; object-fit: contain; object-position: top center; background: transparent; }
.shot figcaption {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}
.shot-label {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 2px;
  color: var(--fg);
  text-shadow: var(--glow-sm);
}
.shot-sub {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .install-grid { grid-template-columns: 1fr; }
  .nav { gap: 14px; }
  .nav a:not(.lang-toggle) { display: none; }
  .nav a[href*="github"] { display: inline; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .showcase-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .wrap { padding: 0 18px; }
  .title { font-size: 42px; }
  .hero { padding: 48px 0 32px; }
  .section { padding: 56px 0; }
  .section-head { gap: 12px; margin-bottom: 28px; }
  .section-num { font-size: 28px; }
  .cta-row .btn { flex: 1; justify-content: center; }
  .terminal-body { font-size: 12.5px; padding: 14px 16px; }
}
