/* ═══════════════════════════════════════════════════════════════════
   NineFloors — design system
   Dark terminal aesthetic, palette derived from the product's own layers.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --bg: #0a0e13;
  --bg-alt: #0d1219;
  --panel: #11161e;
  --panel-2: #151b25;
  --border: #232b37;
  --border-soft: #1b222d;
  --ink: #e9eef5;
  --muted: #94a0b0;
  --faint: #5c6875;
  --accent: #00acc1;          /* energy cyan — the product's signature */
  --accent-ink: #04262c;
  --green: #26a69a;
  --red: #ef5350;
  --radius: 10px;
  --radius-sm: 8px;
  --font-sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "Cascadia Code", Consolas, monospace;
  --maxw: 1140px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

body::before {
  /* faint grid texture — terminal, not glitter */
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.014) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
  z-index: 0;
}

main, header, footer { position: relative; z-index: 1; }

::selection { background: var(--accent); color: var(--accent-ink); }

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── typography ─────────────────────────────────────────────────── */

h1, h2, h3 { line-height: 1.15; font-weight: 700; letter-spacing: -.01em; }

h1 { font-size: clamp(38px, 5.2vw, 62px); }
h2 { font-size: clamp(28px, 3.4vw, 42px); }
h3 { font-size: 19px; }

h1 em, h2 em { font-style: normal; color: var(--accent); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--accent);
  margin-bottom: 14px;
}

.lede {
  font-size: 19px;
  color: #c3ccd8;
  max-width: 560px;
  margin: 22px 0 30px;
}

.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }

.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head.left { margin-bottom: 0; }
.section-sub { color: var(--muted); font-size: 18px; margin-top: 14px; }

/* ── nav ────────────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10,14,19,.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none !important; }

.brand-mark {
  display: inline-flex;
  flex-direction: column;
  gap: 1.5px;
  width: 22px;
  height: 26px;
  justify-content: flex-end;
}
.bm { display: block; height: 2.2px; border-radius: 2px; }
.bm-1 { background: #6a1b9a; width: 100%; }   /* institutional ceiling */
.bm-2 { background: #9fa8da; width: 94%; }    /* long-run trend */
.bm-3 { background: #2e7d32; width: 88%; }    /* network growth */
.bm-4 { background: #f9a825; width: 82%; }    /* fair value */
.bm-5 { background: #ef6c00; width: 76%; }    /* what everyone paid */
.bm-6 { background: #c62828; width: 70%; }    /* cycle bottom */
.bm-7 { background: #00acc1; width: 64%; }    /* mining · all-in */
.bm-8 { background: #00acc1; width: 58%; }    /* mining · cash */
.bm-9 { background: #00acc1; width: 52%; }    /* mining · power */

.brand-name { font-weight: 700; font-size: 17px; color: var(--ink); letter-spacing: -.01em; }

.nav-links {
  display: flex;
  gap: 22px;
  margin-left: auto;
  align-items: center;
}
.nav-links a {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color .15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }

.nav-burger {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  margin: 4px 0;
  border-radius: 2px;
}

/* ── buttons ────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 16px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none !important;
  transition: transform .12s, background .15s, border-color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover { background: #12bed4; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: #3a4656; }

.btn-sm { padding: 9px 18px; font-size: 14px; }
.btn-block { width: 100%; }

/* ── hero ───────────────────────────────────────────────────────── */

.hero { padding: 84px 0 72px; overflow: hidden; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  gap: 48px;
  align-items: center;
}

.hero-copy { position: relative; }

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-chips {
  list-style: none;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 34px;
}
.hero-chips li {
  font-size: 14px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-chips li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-unique {
  margin-top: 30px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--faint);
}
.hero-unique strong { color: var(--muted); font-weight: 600; }

/* hero chart card */
.hero-chart {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 14px;
  position: relative;
}

.chart-caption {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--faint);
  text-align: right;
  margin-bottom: 6px;
}

.hero-chart svg { width: 100%; height: auto; display: block; }

.price-path {
  stroke: #e9eef5;
  stroke-width: 2.5;
  stroke-linecap: round;
}

.price-dot circle { fill: #e9eef5; }

.ll-path { stroke-width: 1.6; fill: none; }
.layer-line[data-dotted] .ll-path { stroke-dasharray: 5 6; stroke-width: 1.3; }
.ll-label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .06em; }

.layer-line { opacity: .8; transition: opacity .15s; }
.layer-line.hl { opacity: 1; }
.layer-line.hl .ll-path { stroke-width: 3; }

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 12px;
  justify-content: center;
}
.lg-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
  cursor: default;
  transition: color .15s;
}
.lg-chip i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.lg-chip.hl { color: var(--ink); }

/* ── problem ────────────────────────────────────────────────────── */

.problem-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 56px;
}

.problem-body p { color: #c3ccd8; margin-bottom: 18px; }

.problem-list {
  list-style: none;
  margin: 6px 0 22px;
  display: grid;
  gap: 14px;
}
.problem-list li {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--red);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  color: var(--muted);
  font-size: 16px;
}
.problem-list li:last-child { border-left-color: var(--green); }
.problem-list strong { color: var(--ink); }

/* ── layers ladder ──────────────────────────────────────────────── */

.ladder-wrap {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 28px;
  align-items: start;
}

.ladder {
  list-style: none;
  display: grid;
  gap: 8px;
  counter-reset: none;
}

.ladder-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 13px 18px;
  cursor: pointer;
  transition: border-color .15s, transform .12s, background .15s;
}
.ladder-row:hover { border-color: #35425280; transform: translateX(3px); }
.ladder-row.active { border-color: var(--accent); background: var(--panel-2); }

.lr-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--ink);
  background: color-mix(in srgb, var(--c) 24%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 55%, transparent);
  padding: 4px 9px;
  border-radius: 5px;
  white-space: nowrap;
  min-width: 88px;
  text-align: center;
}

.lr-name { font-weight: 600; font-size: 16.5px; white-space: nowrap; }
.lr-q { color: var(--muted); font-size: 14.5px; flex: 1; }
.lr-arrow { color: var(--faint); font-family: var(--font-mono); }

.ladder-note {
  margin-top: 16px;
  font-size: 14px;
  color: var(--faint);
}
.ladder-note::before { content: "ⓘ "; color: var(--muted); }

.layer-detail {
  position: sticky;
  top: 96px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.ld-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--accent);
  margin-bottom: 10px;
}
.layer-detail h3 { margin-bottom: 12px; }
.layer-detail p { color: var(--muted); font-size: 15.5px; }
.ld-zone {
  margin-top: 18px !important;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
  color: var(--green) !important;
  font-weight: 500;
}

/* ── energy ─────────────────────────────────────────────────────── */

.energy-grid {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 56px;
  align-items: start;
}

.energy-body p { color: #c3ccd8; margin-bottom: 18px; }
.energy-body strong { color: var(--ink); }

.energy-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 28px;
}
.es-item {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 13.5px;
  color: var(--muted);
}
.es-item b { display: block; color: var(--ink); font-size: 14.5px; margin-bottom: 3px; }

/* ── honesty ────────────────────────────────────────────────────── */

.honesty-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 56px;
  align-items: start;
}

.honesty-body p { color: #c3ccd8; margin-bottom: 18px; }
.honesty-body strong { color: var(--ink); }

.tag-demo {
  margin-top: 26px;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  display: grid;
  gap: 8px;
}
.td-line {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}
.td-line em { color: var(--accent); font-style: normal; font-size: 12px; }
.td-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.td-note {
  font-family: var(--font-sans);
  font-size: 12.5px;
  color: var(--faint);
  border-top: 1px dashed var(--border);
  padding-top: 8px;
  margin-top: 2px;
}

/* ── demand ─────────────────────────────────────────────────────── */

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

.demand-copy p { color: #c3ccd8; margin-top: 16px; }

.demand-rows { display: grid; gap: 14px; }
.dr {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
}
.dr h3 { font-size: 17px; margin-bottom: 6px; }
.dr p { color: var(--muted); font-size: 15px; }

/* ── metrics ────────────────────────────────────────────────────── */

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.metric {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 26px 28px;
}
.m-name {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 15px;
  color: var(--accent);
  letter-spacing: .04em;
  margin-bottom: 12px;
}
.m-name em { font-style: normal; color: var(--faint); font-size: 12.5px; }
.m-body { color: var(--muted); font-size: 15.5px; }
.m-body b { color: var(--ink); }

/* ── products ───────────────────────────────────────────────────── */

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  max-width: 1040px;
  margin: 0 auto;
}

.product-card {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-top: 3px solid var(--pc, var(--accent));
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
}

.product-card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 34px;
  align-items: center;
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(0,172,193,.06), transparent 45%), var(--panel);
}

.pc-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--pc, var(--accent));
  margin-bottom: 8px;
}
.product-card h3 { font-size: 20px; margin-bottom: 8px; }
.pc-line { color: var(--muted); font-size: 15px; margin-bottom: 14px; }

.product-card ul {
  list-style: none;
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}
.product-card li {
  font-size: 14.5px;
  color: #c3ccd8;
  padding-left: 22px;
  position: relative;
}
.product-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

.pc-buy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
}
.product-card.featured .pc-buy { min-width: 230px; }
.pc-price { font-size: 36px; font-weight: 700; letter-spacing: -.02em; }
.pc-price .cur { font-size: 21px; color: var(--muted); vertical-align: 11px; }
.pc-price .per { font-size: 14px; color: var(--muted); font-weight: 500; margin-left: 3px; }
.pc-trial {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
}

.price-footnote {
  text-align: center;
  color: var(--faint);
  font-size: 14px;
  margin-top: 28px;
}

/* ── price list (one indicator, one price) ─────────────────────── */

.plist {
  max-width: 920px;
  margin: 28px auto 0;
  display: grid;
  gap: 24px;
}

.plist-head {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 7px;
  margin-bottom: 2px;
}

.plist-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 20px;
  align-items: center;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border-soft);
}
.plist-row:last-child { border-bottom: 0; }

.plr-name { display: flex; flex-direction: column; gap: 2px; }
.plr-name b { font-size: 15.5px; font-weight: 600; }
.plr-name span { font-size: 13px; color: var(--muted); }

.plr-price { font-size: 19px; font-weight: 700; white-space: nowrap; }
.plr-price span { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 2px; }

/* ── FAQ ────────────────────────────────────────────────────────── */

.faq-wrap {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 56px;
  align-items: start;
}

.faq-list { display: grid; gap: 10px; }

.faq-item {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
}
.faq-item summary {
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 600;
  font-size: 16.5px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 20px;
  transition: transform .18s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p {
  padding: 0 22px 20px;
  color: var(--muted);
  font-size: 15.5px;
  max-width: 640px;
}

/* ── footer ─────────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--border-soft);
  padding: 48px 0 40px;
  background: var(--bg-alt);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.footer-note { color: var(--muted); font-size: 14.5px; margin-top: 6px; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-start; }
.footer-links a { color: var(--muted); font-size: 14.5px; text-decoration: none; }
.footer-links a:hover { color: var(--ink); }

.disclaimer {
  color: var(--faint);
  font-size: 13px;
  border-top: 1px solid var(--border-soft);
  padding-top: 22px;
}

/* ── reveal animation ───────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal.on { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .ladder-row { transition: none; }
}

/* ── responsive ─────────────────────────────────────────────────── */

@media (max-width: 960px) {
  .hero-grid, .problem-grid, .energy-grid, .honesty-grid,
  .demand-grid, .faq-wrap, .ladder-wrap { grid-template-columns: 1fr; gap: 36px; }
  .layer-detail { position: static; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 14px 28px 20px;
    gap: 14px;
    margin: 0;
  }
  .nav-links.open { display: flex; }
  .nav-burger { display: block; }
  .nav-cta { margin-left: auto; }
  .energy-strip { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: 1fr; }
  .product-card.featured { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: 1fr; }
  .lr-q { display: none; }
  .lr-name { white-space: normal; }
  .section { padding: 64px 0; }
}

@media (max-width: 560px) {
  .container { padding: 0 20px; }
  .hero-chips { gap: 14px; }
  .lr-tag { min-width: 0; }
  .plist-row { grid-template-columns: 1fr auto; }
  .plist-row .btn { grid-column: 1 / -1; margin-top: 4px; }
}

/* ── product "what it does" toggles ─────────────────────────── */
.plr-toggle {
  align-self: flex-start;
  margin-top: 6px;
  background: none;
  border: 0;
  padding: 0;
  color: var(--accent);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.plr-toggle i { font-style: normal; display: inline-block; transition: transform .2s ease; }
.plist-row.open .plr-toggle i { transform: rotate(180deg); }
.plr-detail {
  display: none;
  grid-column: 1 / -1;
  border-top: 1px dashed var(--border);
  margin-top: 10px;
  padding-top: 12px;
}
.plist-row.open .plr-detail,
.product-card.open .plr-detail,
.pack-item.open .plr-detail { display: block; }

/* pack member rows */
.pack-items { display: grid; gap: 14px; margin-bottom: 20px; }
.pack-item { border-top: 1px solid var(--border-soft); padding-top: 12px; }
.pack-item:first-child { border-top: 0; padding-top: 0; }
.pi-name { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.pi-line { font-size: 13.5px; color: var(--muted); margin-bottom: 7px; line-height: 1.45; }
.pack-item .plr-toggle { margin-bottom: 0; }
.pack-item.open .plr-toggle i { transform: rotate(180deg); }
.pack-item .plr-detail { margin-top: 8px; }
.pack-item .plr-detail li { padding-left: 0; }
.pack-item .plr-detail li::before { content: none; }
.plr-detail ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.plr-detail li { font-size: 13px; color: var(--muted); line-height: 1.55; }
.plr-detail b { color: var(--accent); font-weight: 600; margin-right: 6px; }

/* ── stack cards (non-flagship) ─────────────────────────────── */
.product-card:not(.featured) .pc-buy { margin-top: auto; padding-top: 18px; }
.product-card:not(.featured) .pc-price { font-size: 28px; }
.product-card:not(.featured) .pc-price .cur { vertical-align: 8px; }
.plist { margin-top: 34px; }
.tools-head {
  text-align: center;
  margin: 42px 0 10px;
  font-size: 15px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
