/* DRAGEN — white circuit-line on black. Monochrome by design. */

:root {
  color-scheme: dark;

  --bg:        #000000;
  --surface:   #0a0a0b;
  --surface-2: #101012;
  --line:      rgba(255, 255, 255, 0.11);
  --line-soft: rgba(255, 255, 255, 0.06);
  --line-hot:  rgba(255, 255, 255, 0.28);

  --text:      #f4f5f5;
  --muted:     #9ba1a6;
  --dim:       #6b7176;

  --accent:     #8fd4c4;
  --accent-dim: rgba(143, 212, 196, 0.14);
  --warn:       #d8c08a;

  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, monospace;

  --gutter: 24px;
  --max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

h1 { font-size: clamp(2.3rem, 6vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.16rem; letter-spacing: -0.01em; line-height: 1.35; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.6;
  color: var(--muted);
  max-width: 62ch;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--dim);
  margin: 0 0 18px;
}

.muted { color: var(--muted); }
.small { font-size: 0.93rem; }

/* ---------- nav ---------- */

header.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}

.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { height: 26px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.18s, border-color 0.18s;
}

.nav-links a:hover { color: var(--text); border-bottom-color: var(--line-hot); }
.nav-links a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  padding: 8px 11px;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  cursor: pointer;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1px solid var(--line-hot);
  border-radius: 2px;
  color: var(--text);
  background: transparent;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.btn:hover { background: var(--text); color: #000; border-color: var(--text); }

.btn-primary { background: var(--text); color: #000; border-color: var(--text); }
.btn-primary:hover { background: transparent; color: var(--text); border-color: var(--line-hot); }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

/* ---------- sections ---------- */

section { padding: 88px 0; }
section + section { border-top: 1px solid var(--line-soft); }

.hero { padding: clamp(72px, 12vh, 132px) 0 clamp(68px, 10vh, 108px); }

.hero-mark { width: 260px; max-width: 62vw; margin-bottom: 40px; opacity: 0.96; }

.section-head { max-width: 64ch; margin-bottom: 48px; }
.section-head h2 { margin-bottom: 18px; }

/* ---------- grid + cards ---------- */

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 30px 28px;
  transition: border-color 0.22s, background 0.22s;
}

.card:hover { border-color: var(--line-hot); background: var(--surface-2); }

/* circuit-trace corners, echoing the mark */
.card::before,
.card::after {
  content: "";
  position: absolute;
  width: 11px;
  height: 11px;
  border-color: var(--line-hot);
  border-style: solid;
  opacity: 0;
  transition: opacity 0.22s;
}
.card::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.card::after  { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }
.card:hover::before, .card:hover::after { opacity: 1; }

.card h3 { margin-bottom: 12px; }
.card p { color: var(--muted); font-size: 0.97rem; }

.card-link { text-decoration: none; display: block; }

.card-link .more {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- status pills ---------- */

.pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 2px;
  border: 1px solid var(--line);
  color: var(--dim);
  margin-bottom: 16px;
  white-space: nowrap;
}

.pill-live    { color: var(--accent); border-color: var(--accent-dim); background: var(--accent-dim); }
.pill-build   { color: var(--warn); border-color: rgba(216, 192, 138, 0.22); }
.pill-planned { color: var(--dim); }

/* ---------- lists ---------- */

.ticks { list-style: none; margin: 18px 0 0; padding: 0; }
.ticks li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.55;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.66em;
  width: 9px;
  height: 1px;
  background: var(--accent);
}

/* ---------- spec rows ---------- */

.rows { border-top: 1px solid var(--line-soft); margin-top: 34px; }
.row {
  display: grid;
  grid-template-columns: minmax(150px, 210px) 1fr;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line-soft);
}
.row dt {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--dim);
  padding-top: 3px;
}
.row dd { margin: 0; color: var(--muted); font-size: 0.97rem; }
.row dd strong { color: var(--text); font-weight: 500; }

/* ---------- terminal block ---------- */

.term {
  background: #050506;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 22px 24px;
  font-family: var(--mono);
  font-size: 0.83rem;
  line-height: 1.85;
  color: var(--muted);
  overflow-x: auto;
  white-space: pre;
}
.term .c { color: var(--accent); }
.term .d { color: var(--dim); }

/* ---------- callout ---------- */

.callout {
  border-left: 1px solid var(--accent);
  padding: 4px 0 4px 26px;
  margin: 34px 0;
  color: var(--muted);
  max-width: 68ch;
}
.callout strong { color: var(--text); font-weight: 500; }

.note {
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 20px 24px;
  color: var(--dim);
  font-size: 0.89rem;
  line-height: 1.6;
}

/* ---------- cta band ---------- */

.cta { text-align: center; }
.cta h2 { margin-bottom: 18px; }
.cta .lede { margin: 0 auto; }
.cta .btn-row { justify-content: center; }

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

footer {
  border-top: 1px solid var(--line-soft);
  padding: 56px 0 44px;
  color: var(--dim);
  font-size: 0.86rem;
}

.foot-top {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 40px;
}

.foot-links { display: flex; flex-wrap: wrap; gap: 26px; list-style: none; margin: 0; padding: 0; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--text); }

.foot-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  border-top: 1px solid var(--line-soft);
  padding-top: 26px;
  font-size: 0.8rem;
}

footer .brand img { height: 22px; opacity: 0.8; }

/* ---------- mobile ---------- */

@media (max-width: 1420px) {
  .nav-toggle { display: block; }

  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: #000;
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; width: 100%; padding: 13px 0; font-size: 0.95rem; }
}

@media (max-width: 860px) {
  body { font-size: 16px; }
  section { padding: 66px 0; }

  .row { grid-template-columns: 1fr; gap: 8px; }
  .row dt { padding-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

.card.where { text-decoration: none; display: block; color: inherit; }
.card.where, .card.where * { text-decoration: none !important; }

.card .price { font-size: 2.1rem; color: var(--text); margin: 8px 0 2px; line-height: 1.1; }
.card .price small { font-size: 0.95rem; color: var(--muted); margin-left: 4px; }
.price-table { width: 100%; border-collapse: collapse; }
.price-table td { padding: 12px 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.price-table td:last-child { text-align: right; color: var(--text); white-space: nowrap; padding-left: 16px; }

.picker { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.picker .btn { font-size: 1.05rem; padding: 16px 28px; cursor: pointer; }
.picker .btn[aria-pressed="true"] { background: var(--text); color: #000; border-color: var(--text); }
.js .price-group { display: none; }
.js .price-group.show { display: block; }
.price-group > h2 { margin-bottom: 22px; }

/* ---------- nav, 12 tabs ---------- */
/* Twelve tabs on one line are wider than the 1120px text column, so the menu row
   gets a wider column of its own. Below 1420px the tabs fold into the MENU button
   (the breakpoint is set in the mobile block above). */

@media (min-width: 1421px) {
  header.nav .nav-inner { max-width: 1500px; }
  .nav-links { gap: 22px; }
}
.nav-links a { white-space: nowrap; }

/* ---------- DRAGENBooks ---------- */

:root { --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; }

.book {
  display: grid;
  grid-template-columns: minmax(200px, 270px) minmax(0, 1fr);
  gap: 60px;
  align-items: start;
}

/* a plain title plate, not a cover: there are no covers yet */
.plate {
  position: relative;
  aspect-ratio: 3 / 4;
  background: #050506;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}
.plate::before,
.plate::after {
  content: "";
  position: absolute;
  width: 11px;
  height: 11px;
  border-color: var(--line-hot);
  border-style: solid;
}
.plate::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.plate::after  { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }

.plate-kicker {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  line-height: 1.7;
  text-transform: uppercase;
  color: var(--dim);
}
.plate-title {
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  line-height: 1.14;
  color: var(--text);
}
.plate-title em { color: var(--accent); }
.plate-by { font-size: 0.78rem; letter-spacing: 0.02em; color: var(--muted); }

.lines { margin-top: 40px; max-width: 58ch; }
.lines blockquote {
  margin: 0 0 22px;
  padding: 2px 0 2px 26px;
  border-left: 1px solid var(--accent);
  font-family: var(--serif);
  font-size: clamp(1.12rem, 2vw, 1.38rem);
  line-height: 1.45;
  color: var(--text);
}
.lines blockquote:last-child { margin-bottom: 0; }

@media (max-width: 860px) {
  .book { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .plate { width: 100%; max-width: 230px; }
}
