/* Zeruel landing — "device at night / instrument panel" ---------------------- */

:root {
  --bg: #0c1016;
  --surface: #151b24;
  --raised: #1b232e;
  --text: #e7ebf2;
  --muted: #8793a6;
  --hairline: #26303c;
  --accent: #f0b25a;          /* warm status-LED amber */
  --accent-dim: rgba(240, 178, 90, 0.14);
  --verified: #5fd0a8;        /* functional: ledger ticks only */

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --maxw: 1120px;
  --pad: clamp(20px, 5vw, 64px);
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* subtle instrument-panel grid behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--hairline) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.08; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--accent);
  color: #1a1206;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  z-index: 100;
}
.skip-link:focus { left: 8px; }

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

/* --- header ---------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px var(--pad);
  background: rgba(12, 16, 22, 0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.03em;
}
.wordmark__mark {
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-dim);
}
.site-nav { margin-left: auto; display: flex; gap: 28px; font-family: var(--font-mono); font-size: 13px; }
.site-nav a { color: var(--muted); transition: color 0.18s; }
.site-nav a:hover { color: var(--text); }
.pill {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 5px 12px;
  position: relative;
}
.pill::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--verified);
  margin-right: 7px;
  vertical-align: middle;
  animation: blink 2.4s ease-in-out infinite;
}

/* --- layout primitives ----------------------------------------------------- */
.section { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: clamp(72px, 11vw, 132px) var(--pad); }
.section--alt { max-width: none; background: var(--surface); border-block: 1px solid var(--hairline); }
.section--alt > * { max-width: var(--maxw); margin-inline: auto; }
.section__head { max-width: 660px; margin: 0 auto clamp(40px, 6vw, 64px); text-align: center; }
.section__head--left { margin: 0; text-align: left; }
.kicker { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.section h2 { font-size: clamp(30px, 4.4vw, 46px); }
.section__lead { color: var(--muted); margin-top: 18px; font-size: clamp(16px, 1.6vw, 19px); }

/* --- hero ------------------------------------------------------------------ */
.hero {
  position: relative; z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(56px, 9vw, 104px) var(--pad) clamp(64px, 9vw, 110px);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}
.eyebrow {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.12em;
  color: var(--accent); text-transform: uppercase; margin-bottom: 22px;
}
.hero__title { font-size: clamp(40px, 7vw, 76px); font-weight: 700; }
.hero__sub { color: var(--muted); margin-top: 24px; max-width: 30em; font-size: clamp(16px, 1.7vw, 19px); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.btn {
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  padding: 13px 22px; border-radius: 10px; border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.18s, border-color 0.18s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--accent); color: #1a1206; }
.btn--ghost { border-color: var(--hairline); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

.hero__stats { display: flex; gap: clamp(24px, 4vw, 44px); margin: 44px 0 0; padding-top: 28px; border-top: 1px solid var(--hairline); }
.hero__stats dt { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.hero__stats dd { font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 3.4vw, 36px); margin: 6px 0 0; }
.hero__stats dd { color: var(--accent); }

/* device frame */
.hero__device { display: flex; justify-content: center; }
.device {
  width: min(300px, 78vw);
  background: linear-gradient(180deg, #10161e, #0a0e14);
  border: 1px solid var(--hairline);
  border-radius: 34px;
  padding: 16px 14px;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(240, 178, 90, 0.05);
  position: relative;
}
.device__notch { width: 86px; height: 6px; background: #2a3340; border-radius: 999px; margin: 4px auto 16px; }
.device__screen { background: var(--bg); border: 1px solid var(--hairline); border-radius: 22px; padding: 18px 16px; min-height: 360px; display: flex; flex-direction: column; gap: 14px; }
.line { font-size: 14px; margin: 0; }
.line--wake { font-family: var(--font-mono); color: var(--accent); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.line--wake .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.line--user { align-self: flex-end; background: var(--accent-dim); border: 1px solid rgba(240, 178, 90, 0.3); color: var(--text); padding: 10px 13px; border-radius: 14px 14px 4px 14px; max-width: 85%; }
.line--steps { display: flex; flex-wrap: wrap; gap: 6px; }
.line--steps span { font-family: var(--font-mono); font-size: 11px; color: var(--muted); border: 1px solid var(--hairline); border-radius: 6px; padding: 3px 7px; }
.line--zeruel { align-self: flex-start; background: var(--raised); padding: 10px 13px; border-radius: 14px 14px 14px 4px; max-width: 85%; }
.line--meta { font-family: var(--font-mono); font-size: 11px; color: var(--muted); margin-top: auto; }

/* --- pipeline -------------------------------------------------------------- */
.pipeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden; }
.pipeline__step { background: var(--bg); padding: 30px 26px; }
.section--alt .pipeline__step { background: var(--surface); }
.pipeline__no { font-family: var(--font-mono); font-size: 13px; color: var(--accent); }
.pipeline__step h3 { font-size: 22px; margin: 12px 0 10px; }
.pipeline__step p { color: var(--muted); font-size: 15px; }

/* --- action ladder --------------------------------------------------------- */
.ladder { display: grid; gap: 16px; }
.rung {
  display: grid; grid-template-columns: 110px 1fr auto; align-items: center; gap: 24px;
  background: var(--bg); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 26px 28px;
}
.section--alt .rung { background: var(--raised); }
.rung--live { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.rung__tier { font-family: var(--font-mono); font-size: 13px; color: var(--muted); letter-spacing: 0.06em; }
.rung--live .rung__tier { color: var(--accent); }
.rung h3 { font-size: 22px; }
.rung p { grid-column: 2; color: var(--muted); font-size: 15px; margin-top: 6px; }
.rung__state { font-family: var(--font-mono); font-size: 12px; padding: 5px 11px; border-radius: 999px; white-space: nowrap; }
.rung__state--live { color: #1a1206; background: var(--accent); }
.rung__state--dormant { color: var(--muted); border: 1px solid var(--hairline); }
@media (max-width: 640px) {
  .rung { grid-template-columns: 1fr auto; }
  .rung p { grid-column: 1 / -1; }
}

/* --- trust ledger (signature) ---------------------------------------------- */
.ledger-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 80px); align-items: center; }
.ledger-facts { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; }
.ledger-facts li { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 15px; }
.tick { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 1.5px solid var(--verified); position: relative; }
.tick::after { content: ""; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px; border: solid var(--verified); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }

.chain { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 14px; }
.chain::before { content: ""; position: absolute; left: 26px; top: 24px; bottom: 24px; width: 2px; background: linear-gradient(var(--accent), var(--hairline)); opacity: 0.4; }
.block { background: var(--surface); border: 1px solid var(--hairline); border-radius: 12px; padding: 16px 18px 16px 52px; position: relative; }
.section--alt .block { background: var(--raised); }
.block::before { content: ""; position: absolute; left: 19px; top: 22px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.block__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.block__intent { font-weight: 500; font-size: 15px; }
.block__hash { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-top: 9px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.block__entry { color: var(--accent); }
.block__hash .arrow { color: var(--hairline); }
.block__hash .tick { width: 14px; height: 14px; margin-left: auto; }
.block__hash .tick::after { left: 3.5px; top: 1px; height: 6px; }
.badge { font-family: var(--font-mono); font-size: 11px; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.badge--ok { color: var(--verified); background: rgba(95, 208, 168, 0.12); }
.badge--manual { color: var(--accent); background: var(--accent-dim); }

/* --- capabilities ---------------------------------------------------------- */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card { background: var(--bg); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 28px; }
.section--alt .card { background: var(--raised); }
.card h3 { font-size: 21px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15px; }

/* --- stack ----------------------------------------------------------------- */
.stack-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden; }
.stack-list li { background: var(--bg); padding: 24px 26px; font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.stack-list span { display: block; font-family: var(--font-mono); font-weight: 400; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }

/* --- install & demo -------------------------------------------------------- */
.install-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(36px, 6vw, 80px); align-items: start; }
.setup { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden; }
.setup__step { background: var(--raised); display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: baseline; padding: 22px 24px; }
.setup__no { font-family: var(--font-mono); font-size: 13px; color: #1a1206; background: var(--accent); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 500; }
.setup__step h3 { font-size: 18px; }
.setup__step p { color: var(--muted); font-size: 14px; margin-top: 5px; }

.demo { margin: clamp(36px, 6vw, 64px) auto 0; max-width: var(--maxw); }
.demo__frame { position: relative; aspect-ratio: 16 / 9; border: 1px solid var(--hairline); border-radius: var(--radius); background: radial-gradient(120% 120% at 50% 0%, #131a23, var(--bg)); display: grid; place-items: center; overflow: hidden; }
.demo__frame::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--hairline) 1px, transparent 1px), linear-gradient(90deg, var(--hairline) 1px, transparent 1px); background-size: 40px 40px; opacity: 0.18; }
.demo__play { width: 62px; height: 62px; border-radius: 50%; border: 1px solid var(--accent); background: var(--accent-dim); display: grid; place-items: center; position: relative; }
.demo__play::after { content: ""; border-style: solid; border-width: 10px 0 10px 16px; border-color: transparent transparent transparent var(--accent); margin-left: 4px; }
.demo__text { position: absolute; bottom: 18px; left: 20px; }
.demo__label { font-family: var(--font-display); font-weight: 600; font-size: 16px; }
.demo__sub { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-top: 4px; }
.demo figcaption { color: var(--muted); font-size: 14px; margin-top: 16px; text-align: center; }
@media (max-width: 880px) { .install-grid { grid-template-columns: 1fr; } }

/* --- footer ---------------------------------------------------------------- */
.site-footer { position: relative; z-index: 1; border-top: 1px solid var(--hairline); padding: clamp(48px, 7vw, 80px) var(--pad); max-width: var(--maxw); margin: 0 auto; text-align: center; }
.site-footer__brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 700; font-size: 19px; margin-bottom: 16px; }
.site-footer p { color: var(--muted); font-size: 15px; max-width: 56ch; margin: 0 auto; }
.site-footer__fine { font-size: 13px; margin-top: 14px; opacity: 0.8; }

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

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* --- responsive ------------------------------------------------------------ */
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; }
  .hero__device { order: -1; }
  .ledger-grid { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: 1fr; }
  .stack-list { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .site-nav { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover { transform: none; }
  .pill::before { animation: none; }
  .line--wake .dot { box-shadow: none; }
}
