/* PARALLAX — two views, one true measurement.
   Hand-written, no build step, no external requests. */

:root {
  --bg:        #0a0c10;
  --bg-raised: #11151c;
  --bg-sunken: #070910;
  --rule:      #1e2530;
  --rule-soft: #161c25;
  --ink:       #e7ecf3;
  --ink-dim:   #9aa6b6;
  --ink-faint: #66717f;
  /* the two views */
  --view-a:    #6fb0ff;
  --view-b:    #ffb267;
  --good:      #5fd39a;
  --warn:      #ff8a8a;
  --measure:   68ch;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(16px, 0.55vw + 14.6px, 18px);
  line-height: 1.65;
  overflow-x: hidden;
  font-variant-numeric: tabular-nums;
}

/* ---------- layout ---------- */

.wrap { width: min(100% - 2.5rem, 74rem); margin-inline: auto; }
.prose { max-width: var(--measure); }

main { padding-block: clamp(2rem, 5vw, 4rem) 5rem; }

section + section { margin-top: clamp(3rem, 7vw, 5.5rem); }

/* ---------- masthead ---------- */

header.site {
  border-bottom: 1px solid var(--rule);
  background: linear-gradient(180deg, var(--bg-sunken), var(--bg));
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(6px);
}

.masthead {
  display: flex; align-items: center; gap: 1.25rem;
  padding-block: 0.9rem;
  flex-wrap: wrap;
}

.wordmark {
  display: inline-flex; align-items: center; gap: 0.6rem;
  color: var(--ink); text-decoration: none;
  font-weight: 600; letter-spacing: 0.18em; font-size: 0.95rem;
  text-transform: uppercase;
}
.wordmark:hover { color: #fff; }
.wordmark svg { display: block; overflow: visible; }

nav.site { margin-left: auto; display: flex; gap: 1.4rem; flex-wrap: wrap; }
nav.site a {
  color: var(--ink-dim); text-decoration: none;
  font-size: 0.86rem; letter-spacing: 0.04em;
  padding-block: 0.2rem;
  border-bottom: 1px solid transparent;
}
nav.site a:hover, nav.site a[aria-current="page"] {
  color: var(--ink); border-bottom-color: var(--view-a);
}

/* ---------- hero ---------- */

.hero { padding-block: clamp(2.5rem, 8vw, 5rem) 0; }

.hero h1 {
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 0.6rem;
  font-weight: 600;
}

.hero h1 .line { display: block; }
@media (max-width: 32rem) { .hero h1 .line { display: inline; } }

.tagline {
  font-family: var(--mono);
  font-size: clamp(0.9rem, 2.2vw, 1.05rem);
  color: var(--ink-dim);
  letter-spacing: 0.02em;
  margin: 0 0 2rem;
}
.tagline .a { color: var(--view-a); }
.tagline .b { color: var(--view-b); }

.lede { font-size: clamp(1.05rem, 2.4vw, 1.22rem); color: var(--ink); }
.lede p:first-child { margin-top: 0; }

/* ---------- type ---------- */

h2 {
  font-size: clamp(1.4rem, 3.4vw, 1.85rem);
  letter-spacing: -0.01em; font-weight: 600;
  margin: 0 0 1rem;
  padding-top: 0.4rem;
}
h3 {
  font-size: 1.06rem; font-weight: 600; letter-spacing: 0.01em;
  margin: 2rem 0 0.5rem;
}
.eyebrow {
  font-family: var(--mono); font-size: 0.74rem;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-faint); margin: 0 0 0.7rem;
}
a { color: var(--view-a); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: #a8d0ff; }
strong { color: #fff; font-weight: 600; }
code {
  font-family: var(--mono); font-size: 0.87em;
  background: var(--bg-raised); border: 1px solid var(--rule-soft);
  padding: 0.1em 0.35em; border-radius: 4px; color: #cfe0f5;
  overflow-wrap: anywhere;   /* inline code must wrap, never be clipped by body */
}
pre {
  font-family: var(--mono); font-size: 0.82rem; line-height: 1.6;
  background: var(--bg-sunken); border: 1px solid var(--rule);
  border-left: 2px solid var(--view-a);
  padding: 1rem 1.1rem; border-radius: 6px;
  overflow-x: auto; margin: 1.1rem 0;
  color: #c8d6e8;
}
pre code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; }

/* ---------- the two-view rule ---------- */

.rule-two {
  height: 2px; border: 0; margin: 3.2rem 0;
  background: linear-gradient(90deg, var(--view-a) 0 18%, var(--rule) 18% 82%, var(--view-b) 82% 100%);
  opacity: 0.5;
}

/* ---------- number display ---------- */

.figure-hero {
  border: 1px solid var(--rule);
  border-radius: 10px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(111,176,255,0.07), transparent 55%),
    radial-gradient(120% 140% at 100% 100%, rgba(255,178,103,0.07), transparent 55%),
    var(--bg-raised);
  padding: clamp(1.4rem, 4vw, 2.2rem);
  margin: 2rem 0;
}
.figure-hero .n {
  font-family: var(--mono);
  font-size: clamp(1.9rem, 6.4vw, 3.3rem);
  line-height: 1.05; letter-spacing: -0.02em;
  color: #fff; display: block; word-break: break-word;
}
.figure-hero .n .unit { color: var(--view-b); font-size: 0.42em; letter-spacing: 0.06em; margin-left: 0.5rem; }
.figure-hero .cap { color: var(--ink-dim); margin: 0.7rem 0 0; font-size: 0.96rem; }

.stat-row {
  display: grid; gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  background: var(--rule); border: 1px solid var(--rule);
  border-radius: 8px; overflow: hidden; margin: 1.8rem 0;
}
.stat { background: var(--bg-raised); padding: 1rem 1.1rem; }
.stat .k {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-faint); margin: 0 0 0.35rem;
}
.stat .v { font-family: var(--mono); font-size: 1.22rem; color: #fff; margin: 0; }
.stat .v.sm { font-size: 0.98rem; }

/* ---------- tables ---------- */

.table-scroll { overflow-x: auto; margin: 1.6rem 0; border: 1px solid var(--rule); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: 0.87rem; }
caption {
  text-align: left; color: var(--ink-faint); font-size: 0.8rem;
  padding: 0.8rem 1rem; border-bottom: 1px solid var(--rule-soft);
}
th, td { padding: 0.55rem 1rem; text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead th {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-faint);
  border-bottom: 1px solid var(--rule); font-weight: 500;
}
tbody td { font-family: var(--mono); color: var(--ink); border-bottom: 1px solid var(--rule-soft); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(111,176,255,0.045); }
td.hi { color: #fff; }

/* ---------- cards ---------- */

.cards { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); margin-top: 1.6rem; }
.card {
  border: 1px solid var(--rule); border-radius: 10px;
  background: var(--bg-raised); padding: 1.3rem 1.35rem;
  display: flex; flex-direction: column;
}
.card h3 { margin-top: 0; }
.card p { color: var(--ink-dim); font-size: 0.92rem; }
.card .foot { margin-top: auto; padding-top: 0.9rem; }
.pill {
  display: inline-block; font-family: var(--mono);
  font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.2rem 0.55rem; border-radius: 100px;
  border: 1px solid var(--rule); color: var(--ink-faint);
}
.pill.free { color: var(--good); border-color: rgba(95,211,154,0.35); }
.pill.soon { color: var(--view-b); border-color: rgba(255,178,103,0.35); }

/* ---------- callouts ---------- */

.note {
  border: 1px solid var(--rule); border-left: 2px solid var(--view-b);
  background: var(--bg-raised); border-radius: 6px;
  padding: 1rem 1.2rem; margin: 1.6rem 0;
}
.note p:first-child { margin-top: 0; }
.note p:last-child { margin-bottom: 0; }
.note .label {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--view-b); display: block; margin-bottom: 0.4rem;
}
.note.trap { border-left-color: var(--warn); }
.note.trap .label { color: var(--warn); }

/* ---------- footer ---------- */

footer.site {
  border-top: 1px solid var(--rule);
  color: var(--ink-faint); font-size: 0.83rem;
  padding-block: 2.2rem 3rem; margin-top: 4rem;
  background: var(--bg-sunken);
}
footer.site p { margin: 0.4rem 0; max-width: var(--measure); }
footer.site a { color: var(--ink-dim); }

/* ---------- motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero .tagline, .hero .lede { animation: rise 0.5s ease-out backwards; }
  .hero .tagline { animation-delay: 0.06s; }
  .hero .lede { animation-delay: 0.12s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(0.5rem); } to { opacity: 1; transform: none; } }
