/* Coexa Layouts — Direction 4: "Ledger"
   An editorial, numbered-dossier read down the page: a persistent numbered
   spine (01 to 04), bracket-cornered callouts on key stat numbers, hairline
   rules dividing every section, big asymmetric display type. Built on
   Coexa's real dark canvas + the real violet to pink brand gradient, never
   a soft glow dashboard scene and never a grey/charcoal palette.
   Self-contained: every variable used below is defined in this file. */

:root {
  /* Brand (from coexa-ruby-showcase/css/tokens.css, used exactly) */
  --canvas-bg: #131218;
  --ink: rgba(255, 255, 255, 0.94);
  --ink-dim: rgba(255, 255, 255, 0.6);
  --ink-faint: rgba(255, 255, 255, 0.42);
  --border: rgba(255, 255, 255, 0.14);
  --grad-a: #8B5CF6;
  --grad-b: #FF6FA8;
  --grad: linear-gradient(120deg, var(--grad-a), var(--grad-b));
  --good: #1BA672;
  --hot: #FF6FA8;

  /* Type */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Onest', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Layout */
  --container: 1180px;
  --gutter: 28px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--canvas-bg);
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--canvas-bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  max-width: 100%;
  overflow-x: hidden;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center top;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--grad-a); color: #fff; }

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--grad-b);
  outline-offset: 3px;
}

/* ---------- Rail: persistent spine index, wide viewports only ---------- */
.rail {
  position: fixed;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-left: 12px;
  border-left: 1px solid var(--border);
}
.rail a {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.15s ease;
}
.rail a:hover, .rail a:focus-visible { color: var(--ink); }

/* ---------- Header ---------- */
.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0 24px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand svg { width: 24px; height: 24px; flex: none; }
.brand span {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
}
.head-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-align: right;
  white-space: nowrap;
}

/* ---------- Hero ---------- */
.hero { padding: 36px 0 56px; }
.hero .eyebrow { margin-bottom: 22px; }
.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(38px, 6.6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0;
  max-width: 16ch;
}
.hero h1 .line2 {
  font-style: italic;
  font-weight: 500;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: block;
  margin-left: clamp(0px, 8vw, 110px);
}
.hero p {
  margin: 28px 0 0;
  max-width: 540px;
  color: var(--ink-dim);
  font-size: 17px;
  line-height: 1.6;
}

.lifecycle-strip {
  margin-top: 48px;
  padding: 16px 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ---------- Ledger sections (the numbered spine) ---------- */
.ledger-section {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 44px;
  padding: 72px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.ledger-spine {
  position: sticky;
  top: 48px;
  align-self: start;
}
.spine-num {
  display: block;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 56px;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.spine-label {
  display: block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.ledger-content { position: relative; overflow: hidden; }
.ghost-num {
  position: absolute;
  z-index: 0;
  top: -0.28em;
  right: -0.06em;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: min(360px, 30vw);
  line-height: 1;
  color: rgba(255, 255, 255, 0.045);
  pointer-events: none;
  user-select: none;
}
.lc-body { position: relative; z-index: 1; }

.lc-body h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1.25;
  margin: 0 0 16px;
  max-width: 22ch;
  color: var(--ink);
}
.lc-body .lede {
  color: var(--ink-dim);
  font-size: 15px;
  max-width: 52ch;
  margin: 0 0 32px;
}
.section-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 44px 0 14px;
}
.section-tag:first-child { margin-top: 0; }

/* ---------- Transcript ledger (01 Sets) ---------- */
.transcript {
  border-top: 1px solid var(--border);
  max-width: 620px;
}
.t-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.t-who {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-top: 2px;
}
.t-row.is-coexa .t-who { color: var(--grad-b); }
.t-msg { font-size: 15px; color: var(--ink); line-height: 1.5; }
.t-row.is-prospect .t-msg { color: var(--ink-dim); }

/* ---------- Key / value ledger rows (02 Calls + secondary stats) ---------- */
.kv-ledger { border-top: 1px solid var(--border); max-width: 560px; }
.kv-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.kv-k {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  white-space: nowrap;
}
.kv-fill {
  border-bottom: 1px dotted rgba(255, 255, 255, 0.22);
  margin-bottom: 5px;
  min-width: 12px;
}
.kv-v {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  text-align: right;
  max-width: 300px;
}
.kv-v.is-num { font-family: var(--font-mono); font-weight: 600; }
.kv-v.is-good { color: var(--good); font-family: var(--font-mono); font-weight: 600; }
.kv-v.is-hot { color: var(--hot); font-family: var(--font-mono); font-weight: 600; }

/* ---------- Bracket callouts: technical corner marks, not cards ---------- */
.bracket-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 24px;
  margin-bottom: 36px;
  max-width: 760px;
}
.bracket { position: relative; padding: 22px 18px; }
.bx { position: absolute; width: 14px; height: 14px; }
.bx.tl { top: 0; left: 0; border-top: 2px solid var(--grad-a); border-left: 2px solid var(--grad-a); }
.bx.tr { top: 0; right: 0; border-top: 2px solid var(--grad-b); border-right: 2px solid var(--grad-b); }
.bx.bl { bottom: 0; left: 0; border-bottom: 2px solid var(--grad-a); border-left: 2px solid var(--grad-a); }
.bx.br { bottom: 0; right: 0; border-bottom: 2px solid var(--grad-b); border-right: 2px solid var(--grad-b); }
.bracket .num {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: clamp(24px, 3.2vw, 38px);
  color: var(--ink);
  line-height: 1.1;
}
.bracket .label { margin-top: 8px; font-size: 13px; color: var(--ink-dim); }
.bracket .sub {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
}

/* ---------- Funnel ledger (04 Tracks) ---------- */
.funnel-ledger {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 560px;
  border-top: 1px solid var(--border);
}
.funnel-ledger li {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 16px;
  align-items: baseline;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.f-idx { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); }
.f-name { font-size: 14px; color: var(--ink-dim); }
.f-val { font-family: var(--font-mono); font-weight: 600; font-size: 15px; color: var(--ink); }

/* ---------- Closing ---------- */
.closing { padding: 88px 0 130px; }
.closing .eyebrow { margin-bottom: 20px; }
.closing h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.3;
  max-width: 18ch;
  margin: 0 0 40px;
  color: var(--ink);
}
.cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 18px 30px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border: 1.5px solid transparent;
  background-image: linear-gradient(var(--canvas-bg), var(--canvas-bg)), var(--grad);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  transition: color 0.15s ease;
}
.cta:hover, .cta:focus-visible { color: #fff; }
.cta svg { width: 14px; height: 14px; flex: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .rail { display: none; }
}

@media (max-width: 720px) {
  .ledger-section { grid-template-columns: 1fr; gap: 20px; padding: 52px 0; }
  .ledger-spine {
    position: static;
    display: flex;
    align-items: baseline;
    gap: 12px;
  }
  .spine-num { font-size: 34px; }
  .spine-label { margin-top: 0; }
  .ghost-num { font-size: min(260px, 46vw); }
}

@media (max-width: 560px) {
  :root { --gutter: 20px; }
  .t-row { grid-template-columns: 1fr; gap: 4px; }
  .kv-row { grid-template-columns: 1fr; gap: 4px; }
  .kv-fill { display: none; }
  .kv-v { text-align: left; max-width: none; }
  .hero h1 .line2 { margin-left: 0; }
  .head-tag { font-size: 10px; }
}

@media (max-width: 400px) {
  :root { --gutter: 16px; }
  .bracket-row { grid-template-columns: 1fr 1fr; gap: 16px; }
  .funnel-ledger li { grid-template-columns: 22px 1fr auto; gap: 10px; }
  .t-row { padding: 12px 0; }
}
