/* Zebra Snapshots: infrastructure-terminal aesthetic
   near-black canvas · Zcash gold accent · zebra-stripe motif · mono data */

:root {
  --bg: #0a0a0c;
  --bg-2: #0e0e12;
  --panel: #131318;
  --panel-2: #17171d;
  --line: #26262f;
  --line-soft: #1d1d24;
  --ink: #ececed;
  --ink-dim: #9a9aa6;
  --ink-faint: #6a6a76;
  --gold: #f5b724;
  --gold-soft: #f7c651;
  --gold-deep: #c4901a;
  --green: #57d99a;
  --red: #ff6b5e;
  --radius: 14px;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --sans: "Archivo", system-ui, sans-serif;
  --maxw: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(245, 183, 36, 0.09), transparent 60%),
    radial-gradient(900px 500px at -5% 5%, rgba(245, 183, 36, 0.04), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
  overflow-x: hidden;
}

/* faint film-grain / texture overlay */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.55;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
code { font-family: var(--mono); }

/* ---------- layout shell ---------- */
main { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; padding: 0 28px 120px; }
section { margin-top: 96px; }

.section-head { margin-bottom: 28px; }
.section-head h2 {
  font-size: clamp(22px, 3.2vw, 30px);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.section-head p { margin: 0; color: var(--ink-dim); max-width: 60ch; }
.section-head code, .lede code, .compat code { font-size: 0.9em; color: var(--gold-soft); }

/* ---------- topbar ---------- */
.topbar {
  position: relative;
  z-index: 3;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand img { display: block; }
.brand-word {
  font-weight: 800;
  letter-spacing: 0.14em;
  font-size: 15px;
}
.brand-dim { color: var(--ink-faint); font-weight: 500; letter-spacing: 0.04em; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.byvalar { color: var(--ink-faint); font-size: 13px; letter-spacing: 0.02em; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: 11.5px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.1em;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--ink-dim);
  background: rgba(255, 255, 255, 0.015);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-faint); }
.pill.fresh .dot { background: var(--green); box-shadow: 0 0 0 0 rgba(87, 217, 154, 0.6); animation: pulse 2.4s infinite; }
.pill.stale { border-color: rgba(245, 183, 36, 0.4); }
.pill.stale .dot { background: var(--gold); }
.pill.behind { color: var(--red); border-color: rgba(255, 107, 94, 0.4); }
.pill.behind .dot { background: var(--red); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(87, 217, 154, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(87, 217, 154, 0); }
  100% { box-shadow: 0 0 0 0 rgba(87, 217, 154, 0); }
}

/* ---------- hero ---------- */
.hero {
  position: relative; z-index: 2;
  max-width: var(--maxw); margin: 28px auto 0; padding: 0 28px;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 18px;
}
.eyebrow::before { content: "▍ "; color: var(--gold); }
.hero h1 {
  font-size: clamp(38px, 6.4vw, 74px);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 0 0 22px;
}
.accent { color: var(--gold); position: relative; }
.accent::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.08em; height: 0.1em;
  background: repeating-linear-gradient(-45deg, var(--gold) 0 4px, transparent 4px 8px);
  opacity: 0.5;
}
.lede { color: var(--ink-dim); font-size: 17px; max-width: 46ch; margin: 0; }

/* snapshot card */
.snapshot-card {
  position: relative;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 26px 22px;
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  overflow: hidden;
}
.snapshot-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--gold), transparent 70%);
}
.snapshot-card-head { display: flex; align-items: center; justify-content: space-between; }
.snapshot-card-head .label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint);
}
.net {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold-soft); border: 1px solid rgba(245, 183, 36, 0.3); border-radius: 6px; padding: 3px 8px;
}
.height { display: flex; align-items: baseline; gap: 4px; margin: 14px 0 20px; }
.height-hash { font-family: var(--mono); font-size: 26px; color: var(--gold-deep); font-weight: 500; }
.height-num {
  font-family: var(--mono); font-weight: 800;
  font-size: clamp(40px, 6vw, 60px);
  letter-spacing: -0.03em; line-height: 1;
  color: var(--gold);
  text-shadow: 0 0 36px rgba(245, 183, 36, 0.28);
  font-variant-numeric: tabular-nums;
}
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0 0 18px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: 10px; overflow: hidden; }
.facts > div { background: var(--panel); padding: 12px 14px; }
.facts dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 4px; }
.facts dd { margin: 0; font-family: var(--mono); font-size: 14px; color: var(--ink); font-weight: 500; }
.tag { color: var(--gold-soft); border: 1px solid rgba(245, 183, 36, 0.28); border-radius: 5px; padding: 1px 7px; font-size: 12.5px; }

.sha { display: flex; align-items: center; gap: 10px; padding: 11px 13px; background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: 9px; margin-bottom: 18px; }
.snapshot-card .sha:last-child { margin-bottom: 2px; }
.sha .label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); }
.sha code { font-size: 12px; color: var(--ink-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.copy-mini { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-dim); background: none; border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; cursor: pointer; transition: 0.18s; }
.copy-mini:hover { color: var(--gold); border-color: var(--gold-deep); }

.btn {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; padding: 15px 20px; border-radius: 11px; cursor: pointer;
  font-weight: 700; font-size: 15px; letter-spacing: -0.01em; transition: 0.2s;
}
.btn-primary { background: var(--gold); color: #1a1206; border: 1px solid var(--gold); }
.btn-primary:hover { background: var(--gold-soft); transform: translateY(-1px); box-shadow: 0 14px 34px -16px rgba(245, 183, 36, 0.6); }
.btn-sub { font-family: var(--mono); font-size: 11px; font-weight: 500; opacity: 0.66; max-width: 52%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- command / terminal ---------- */
.terminal { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-2); box-shadow: 0 24px 60px -44px rgba(0, 0, 0, 0.9); }
.terminal-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; background: var(--panel); border-bottom: 1px solid var(--line); }
.tdot { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.tdot:nth-child(1) { background: #3a3a44; }
.terminal-title { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); margin-left: 8px; }
.copy-btn { margin-left: auto; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: #1a1206; background: var(--gold); border: none; border-radius: 7px; padding: 6px 13px; cursor: pointer; font-weight: 700; transition: 0.18s; }
.copy-btn:hover { background: var(--gold-soft); }
.copy-btn.copied { background: var(--green); }
.terminal pre { margin: 0; padding: 20px 22px; overflow-x: auto; }
.terminal code { font-size: 13.5px; line-height: 1.7; color: #d8d8de; white-space: pre; }


/* ---------- restore ---------- */
.restore-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-2); }
.restore-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 9px 11px; background: var(--panel); border-bottom: 1px solid var(--line); }
.tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.tab { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.02em; color: var(--ink-dim); background: none; border: none; padding: 8px 16px; border-radius: 7px; cursor: pointer; transition: 0.16s; }
.tab.is-active { background: var(--panel-2); color: var(--gold); box-shadow: inset 0 0 0 1px var(--line); }
.restore-target { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.02em; color: var(--gold-soft); white-space: nowrap; padding-left: 4px; }
.restore-target::before { content: "▸ "; color: var(--ink-faint); }
.tab-panel pre { margin: 0; padding: 22px; overflow-x: hidden; }
.tab-panel code { font-size: 13px; line-height: 1.9; color: #cfcfd6; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.tab-panel .cmt { color: var(--ink-faint); }
.tab-panel .gold { color: var(--gold-soft); }

/* ---------- retention ---------- */
.retain-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.retain-col h3 { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--ink-dim); margin: 0 0 14px; letter-spacing: 0.01em; }
.rk { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; color: #1a1206; background: var(--gold); padding: 3px 8px; border-radius: 5px; }
.rk-month { background: none; color: var(--gold-soft); border: 1px solid rgba(245, 183, 36, 0.34); }
.rows { display: flex; flex-direction: column; gap: 8px; }
.row {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  padding: 14px 16px; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 11px;
  transition: 0.16s; cursor: pointer;
}
.row:hover { border-color: var(--line); background: var(--panel-2); }
.row.active { border-color: var(--gold-deep); background: rgba(245, 183, 36, 0.06); }
.row.active .row-h .h { color: var(--gold); }
.row-h { font-family: var(--mono); font-weight: 700; font-size: 15px; color: var(--gold); font-variant-numeric: tabular-nums; }
.row-h .h { color: var(--gold-deep); font-weight: 500; }
.row-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.row-date { font-size: 13px; color: var(--ink); }
.row-size, .row-tags { font-family: var(--mono); font-size: 11.5px; color: var(--ink-faint); }
.row-tags { letter-spacing: 0.01em; }
.row-dl { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-dim); border: 1px solid var(--line); border-radius: 7px; padding: 7px 11px; transition: 0.16s; white-space: nowrap; }
.row:hover .row-dl, .row.active .row-dl { color: var(--gold); border-color: var(--gold-deep); }
.rows .empty { color: var(--ink-faint); font-family: var(--mono); font-size: 12.5px; padding: 18px; border: 1px dashed var(--line); border-radius: 11px; text-align: center; }

/* ---------- footer ---------- */
.foot { position: relative; z-index: 2; margin-top: 40px; }
.foot-stripe { height: 8px; background: repeating-linear-gradient(-45deg, var(--ink) 0 9px, transparent 9px 22px); opacity: 0.06; }
.foot-inner { max-width: var(--maxw); margin: 0 auto; padding: 30px 28px 60px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; color: var(--ink-faint); font-size: 13px; }
.foot-inner b { color: var(--ink-dim); font-weight: 700; }
.foot-meta { font-family: var(--mono); font-size: 12px; }
.foot-meta a { color: var(--ink-dim); border-bottom: 1px solid var(--line); }
.foot-meta a:hover { color: var(--gold); }

/* ---------- entrance animation ---------- */
@media (prefers-reduced-motion: no-preference) {
  .eyebrow, .hero h1, .lede, .snapshot-card { opacity: 0; transform: translateY(14px); animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
  .hero h1 { animation-delay: 0.06s; }
  .lede { animation-delay: 0.12s; }
  .snapshot-card { animation-delay: 0.16s; transform: translateY(20px); }
}
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; gap: 36px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .retain-grid { grid-template-columns: 1fr; }
  section { margin-top: 72px; }
}
@media (max-width: 520px) {
  main { padding: 0 18px 90px; }
  .topbar { padding: 18px; }
  .hero { padding: 0 18px; }
  .byvalar { display: none; }
}
