/* =========================================================================
   PULSE — AI Maturity Assessment
   Light / cream theme. Brand: deep navy ink, coral accents, red-orange
   primary, warm cream ground. Higher contrast than the deck's dark variant.
   ========================================================================= */
:root {
  --bg:         #FBF7F1;   /* warm cream page ground */
  --bg-deep:    #F3EBDD;   /* deeper cream well (CTA block) */
  --surface:    #FFFFFF;   /* cards */
  --surface-2:  #FFF1ED;   /* soft coral tint: hover / active / selected */

  --ink:        #010C45;   /* headings + primary text (brand deep navy) */
  --body:       #39435F;   /* body copy */
  --muted:      #626E8A;   /* secondary */
  --muted-dim:  #939BB0;   /* tertiary */

  --coral:      #C73A30;   /* legible brand coral: eyebrows, borders, gauge */
  --coral-soft: #FC9990;   /* soft coral for tints */
  --red:        #EF6250;   /* primary, active state, weakest rail */
  --red-hover:  #E4513F;
  --white:      #FFFFFF;   /* text on coral / red only */

  --line:       rgba(1,12,69,0.12);
  --line-soft:  rgba(1,12,69,0.07);

  --shadow-sm:  0 2px 8px rgba(1,12,69,0.06), 0 1px 2px rgba(1,12,69,0.04);
  --shadow-md:  0 10px 30px rgba(1,12,69,0.09), 0 2px 6px rgba(1,12,69,0.05);

  --font-sans: "Poppins", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--coral); text-decoration: none; }
a:hover { color: var(--red); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--coral);
  margin: 0;
}

/* ------------------------------------------------------------ shell */
.stage {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(20px, 5vw, 48px);
}
.screen { width: 100%; display: none; }
.screen.is-active { display: block; animation: fade-up 0.5s var(--ease) both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.center-col {
  max-width: 680px;
  margin: 0 auto;
  min-height: calc(100vh - 96px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ------------------------------------------------------------ buttons */
.btn {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 16px;
  border: none;
  border-radius: 10px;
  padding: 15px 28px;
  cursor: pointer;
  transition: background 0.18s var(--ease), transform 0.18s var(--ease), color 0.18s var(--ease), box-shadow 0.18s var(--ease);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-primary { background: var(--red); color: var(--white); box-shadow: 0 8px 22px rgba(239,98,80,0.28); }
.btn-primary:hover { background: var(--red-hover); }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost {
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { border-color: var(--coral); color: var(--coral); }
.btn-text {
  background: none; border: none; color: var(--muted);
  font-family: var(--font-sans); font-size: 14px; font-weight: 500;
  cursor: pointer; padding: 8px 4px; display: inline-flex; align-items: center; gap: 6px;
}
.btn-text:hover { color: var(--ink); }

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

/* ============================================================== INTRO */
.intro-logo { height: 44px; width: auto; align-self: flex-start; margin-bottom: 30px; }
.intro-eyebrow { margin-bottom: 22px; }
.intro h1 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 22px;
}
.intro .lede {
  font-size: clamp(17px, 2.4vw, 20px);
  color: var(--muted);
  max-width: 46ch;
  margin: 0 0 30px;
}
.intro .not-ladder {
  border-left: 2px solid var(--red);
  padding: 4px 0 4px 18px;
  margin: 0 0 34px;
  font-size: 15px;
  color: var(--muted);
  max-width: 52ch;
}
.intro .not-ladder strong { color: var(--ink); font-weight: 600; }
.intro-actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.intro-meta {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em;
  color: var(--muted); text-transform: uppercase;
}
.intro-note {
  margin: 20px 0 0; text-align: left; max-width: 48ch;
  font-size: 14px; line-height: 1.55; color: var(--muted); font-style: italic;
}

/* ============================================================== QUESTIONS */
.q-wrap { max-width: 720px; margin: 0 auto; width: 100%; }
.q-top {
  position: sticky; top: 0; z-index: 5;
  padding-top: 8px;
  background: var(--bg);
}
.progress-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 12px;
}
.progress-meta .phase-tag { color: var(--coral); }
.progress-bar {
  height: 4px; background: rgba(1,12,69,0.09); border-radius: 999px; overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0%; background: var(--red); border-radius: 999px;
  transition: width 0.4s var(--ease);
}
.q-body { margin-top: clamp(40px, 8vh, 88px); }
.q-prompt {
  font-family: var(--font-sans); font-weight: 600;
  font-size: clamp(23px, 3.6vw, 32px); line-height: 1.22;
  letter-spacing: -0.015em; margin: 0 0 32px; max-width: 26ch;
  color: var(--ink); text-wrap: balance;
}
.options { display: flex; flex-direction: column; gap: 12px; }
.opt {
  display: flex; align-items: center; gap: 16px;
  text-align: left; width: 100%;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 18px 20px; box-shadow: var(--shadow-sm);
  color: var(--ink); font-family: var(--font-sans); font-size: 16px; line-height: 1.4;
  cursor: pointer;
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease), transform 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
.opt:hover { border-color: var(--coral); background: var(--surface-2); box-shadow: var(--shadow-md); }
.opt.is-selected { border-color: var(--red); background: var(--surface-2); box-shadow: var(--shadow-md); }
.opt .key {
  flex: none; width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  background: rgba(1,12,69,0.05); color: var(--muted);
  border: 1px solid var(--line);
  transition: background 0.16s var(--ease), color 0.16s var(--ease), border-color 0.16s var(--ease);
}
.opt:hover .key { color: var(--coral); border-color: var(--coral); }
.opt.is-selected .key { background: var(--red); color: var(--white); border-color: var(--red); }
.opt .opt-txt { flex: 1; }
.q-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 28px; }
.q-hint {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
  color: var(--muted-dim); text-transform: uppercase;
}

/* ============================================================== DECISION */
.decision { max-width: 640px; margin: 0 auto; text-align: center; }
.decision .check {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 24px;
  display: grid; place-items: center; background: rgba(239,98,80,0.14);
  color: var(--red);
}
.decision h2 {
  font-weight: 700; font-size: clamp(26px, 4vw, 36px); line-height: 1.1;
  letter-spacing: -0.02em; margin: 0 0 14px; color: var(--ink);
}
.decision p { color: var(--muted); font-size: 17px; margin: 0 0 32px; }
.decision-cards { display: flex; gap: 16px; }
.dec-card {
  flex: 1; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 26px 22px; text-align: left; cursor: pointer;
  color: var(--ink); font-family: var(--font-sans); box-shadow: var(--shadow-sm);
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease), transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.dec-card:hover { border-color: var(--coral); background: var(--surface-2); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.dec-card.primary { border-color: var(--red); }
.dec-card.primary:hover { border-color: var(--red); }
.dec-card .dc-eyebrow {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--coral); display: block; margin-bottom: 12px;
}
.dec-card h3 { font-size: 19px; font-weight: 600; margin: 0 0 6px; color: var(--ink); }
.dec-card p { font-size: 14px; color: var(--muted); margin: 0; }

/* ============================================================== REPORT */
.report { max-width: 1000px; margin: 0 auto; }
.report-head { text-align: center; margin-bottom: 44px; }
.report-head .eyebrow { margin-bottom: 14px; }
.report-head h1 {
  font-weight: 700; font-size: clamp(30px, 5vw, 48px); line-height: 1.05;
  letter-spacing: -0.02em; margin: 0 0 10px; color: var(--ink);
}
.report-head .rh-coords {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}

.block-label {
  display: flex; align-items: center; gap: 16px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink);
  margin: 0 0 22px;
}
.block-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ----- matrix ----- */
.matrix-shell { display: grid; grid-template-columns: 34px 1fr; gap: 12px; margin-bottom: 28px; }
.matrix-yaxes { display: flex; flex-direction: column; }
.matrix-yaxes span {
  flex: 1; display: flex; align-items: center; justify-content: center;
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.matrix-plot { position: relative; }
.matrix-grid {
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr;
  gap: 12px; aspect-ratio: 1.5 / 1;
}
.cell {
  position: relative; overflow: hidden; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  padding: 20px 22px; display: flex; flex-direction: column; gap: 6px;
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.cell.is-active {
  border-color: var(--red); background: var(--red);
  box-shadow: 0 16px 44px rgba(239,98,80,0.32);
}
.cell-topline { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cell-here {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  background: rgba(255,255,255,0.2); color: #fff; border-radius: 999px; padding: 3px 10px; white-space: nowrap;
}
.cell-def {
  position: relative; margin: 14px 0 0; font-size: 14px; line-height: 1.55;
  color: rgba(255,255,255,0.95); font-weight: 500; max-width: 34ch;
}
.cell-ghost {
  position: absolute; right: 12px; bottom: -20px;
  font-family: var(--font-mono); font-weight: 600; font-size: 108px; line-height: 1;
  color: rgba(1,12,69,0.05); pointer-events: none; user-select: none;
}
.cell.is-active .cell-ghost { color: rgba(255,255,255,0.16); }
.cell-phase {
  position: relative; font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.cell.is-active .cell-phase { color: rgba(255,255,255,0.85); }
.cell.is-active h3 { color: #fff; }
.cell.is-active .cell-outcome { color: rgba(255,255,255,0.82); }
.cell h3 { position: relative; margin: 0; font-size: 20px; font-weight: 600; color: var(--ink); }
.cell .cell-outcome { position: relative; margin: 0; font-size: 13px; color: var(--muted); }

.matrix-xaxis {
  display: flex; align-items: center; gap: 14px; margin: 24px 0 0 46px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
}
.matrix-xaxis .line { flex: 1; height: 1px; background: var(--line); }

/* ----- phase card ----- */
.phase-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-sm);
  padding: clamp(24px, 4vw, 40px); margin-top: 50px; margin-bottom: 44px;
}
.phase-card .pc-head { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; margin-bottom: 8px; }
.phase-card .pc-no {
  font-family: var(--font-mono); font-weight: 600; font-size: 40px; line-height: 1; color: var(--coral);
}
.phase-card h2 { margin: 0; font-size: clamp(24px, 3.5vw, 32px); font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.phase-card .pc-outcome {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em;
  color: var(--muted); margin: 0 0 22px; text-transform: uppercase;
}
.phase-card .pc-body { font-size: 17px; line-height: 1.65; color: var(--body); margin: 0 0 24px; max-width: 68ch; }
.phase-card .pc-move {
  border-top: 1px solid var(--line); padding-top: 22px; max-width: 68ch;
}
.phase-card .pc-move .mv-label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--red); display: block; margin-bottom: 10px;
}
.phase-card .pc-move p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--muted); }

.fragile {
  display: flex; gap: 14px; align-items: flex-start;
  background: rgba(239,98,80,0.08); border: 1px solid rgba(239,98,80,0.32);
  border-radius: 12px; padding: 18px 20px; margin-top: 22px;
}
.fragile svg { flex: none; color: var(--red); margin-top: 2px; }
.fragile p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--body); }

/* ----- rails ----- */
.rails { display: flex; flex-direction: column; gap: 14px; margin-bottom: 44px; }
.rail {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.rail.is-weakest { border-color: var(--red); background: var(--surface-2); box-shadow: 0 0 0 1px var(--red), var(--shadow-md); }
.rail-head {
  display: grid; grid-template-columns: minmax(180px, 240px) 1fr auto; gap: 24px; align-items: center;
  width: 100%; text-align: left; cursor: pointer; font-family: var(--font-sans);
  background: none; border: none; padding: 20px 24px; color: inherit;
}
.rail-info { display: flex; flex-direction: column; gap: 4px; }
.rail-info .r-name { font-size: 16px; font-weight: 600; color: var(--ink); }
.rail-info .r-level { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; color: var(--muted); }
.rail.is-weakest .rail-info .r-level { color: var(--coral); }
.rail-weak-tag {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--red); display: none; margin-top: 2px;
}
.rail.is-weakest .rail-weak-tag { display: block; }
.gauge { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.seg {
  height: 10px; border-radius: 999px; background: rgba(1,12,69,0.09);
  transition: background 0.5s var(--ease);
}
.seg.on { background: var(--coral); }
.rail.is-weakest .seg.on { background: var(--red); }
.rail-chev { color: var(--muted-dim); display: inline-flex; transition: transform 0.25s var(--ease); }
.rail.is-open .rail-chev { transform: rotate(180deg); }

.rail-detail {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s var(--ease);
}
.rail.is-open .rail-detail { grid-template-rows: 1fr; }
.rail-detail-inner { overflow: hidden; }
.rail-detail .rd-means {
  margin: 0; padding: 0 24px 4px; font-size: 15px; line-height: 1.6; color: var(--body); max-width: 74ch;
}
.rail-detail .rd-next {
  margin: 16px 24px 24px; padding: 18px 20px; background: rgba(1,12,69,0.03);
  border: 1px solid var(--line); border-radius: 12px; max-width: 74ch;
}
.rail.is-weakest .rail-detail .rd-next { background: rgba(255,255,255,0.6); }
.rail-detail .rd-label {
  display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--coral); margin-bottom: 12px;
}
.rail-detail ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.rail-detail li {
  position: relative; padding-left: 22px; font-size: 14px; line-height: 1.55; color: var(--body);
}
.rail-detail li::before {
  content: ""; position: absolute; left: 2px; top: 8px; width: 7px; height: 7px;
  border-radius: 2px; background: var(--red);
}

/* ----- stuck callout ----- */
.stuck {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--red); border-radius: 16px; box-shadow: var(--shadow-md);
  padding: clamp(26px, 4vw, 40px); margin-bottom: 44px; position: relative; overflow: hidden;
}
.stuck .stuck-eyebrow {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--coral); display: block; margin-bottom: 14px;
}
.stuck h2 { margin: 0 0 14px; font-size: clamp(22px, 3.4vw, 30px); font-weight: 700; letter-spacing: -0.015em; color: var(--ink); }
.stuck p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--body); max-width: 62ch; }
.stuck .next-move {
  margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line);
}
.stuck .next-move .nm-label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 8px;
}
.stuck .next-move p { color: var(--ink); }

/* ----- CTA ----- */
.cta {
  background: var(--bg-deep); border: 1px solid var(--line); border-radius: 18px;
  padding: clamp(28px, 4vw, 48px); margin-bottom: 40px;
}
.cta h2 { margin: 0 0 10px; font-size: clamp(24px, 3.6vw, 34px); font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.cta .cta-line { color: var(--muted); font-size: 16px; margin: 0 0 28px; max-width: 56ch; }
.cta-form { display: flex; flex-direction: column; gap: 16px; max-width: 560px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
}
.field input, .field select {
  font-family: var(--font-sans); font-size: 16px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; width: 100%;
}
.field input::placeholder { color: var(--muted-dim); }
.field input:focus, .field select:focus { outline: none; border-color: var(--coral); }
.field select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23626E8A' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; padding-right: 44px;
}
.cta-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 6px; }
.cta-fine {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em;
  color: var(--muted); margin: 18px 0 0;
}

.cta-confirm { display: none; text-align: center; padding: 20px 0; }
.cta-confirm.is-shown { display: block; animation: fade-up 0.4s var(--ease) both; }
.cta-confirm .check {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 20px;
  display: grid; place-items: center; background: rgba(239,98,80,0.16); color: var(--red);
}
.cta-confirm h2 { margin: 0 0 10px; color: var(--ink); }
.cta-confirm p { color: var(--muted); max-width: 44ch; margin: 0 auto; }

.report-foot { display: flex; justify-content: center; margin-bottom: 48px; }

/* ----- footer wordmark ----- */
.mark {
  display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap;
  padding-top: 32px; border-top: 1px solid var(--line-soft);
}
.mark .mark-logo { height: 30px; width: auto; }
.mark a.site {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; color: var(--muted);
}
.mark a.site:hover { color: var(--coral); }

/* ============================================================== responsive */
@media (max-width: 720px) {
  .matrix-grid { aspect-ratio: 1 / 1.1; }
  .cell { padding: 16px 16px; }
  .cell h3 { font-size: 17px; }
  .cell-ghost { font-size: 76px; }
  .rail-head { grid-template-columns: 1fr auto; gap: 14px; padding: 18px 18px; }
  .rail-head .gauge { grid-column: 1 / -1; order: 3; }
  .decision-cards { flex-direction: column; }
  .matrix-shell { grid-template-columns: 22px 1fr; gap: 8px; }
  .matrix-yaxes span { font-size: 9px; }
  .matrix-xaxis { margin-left: 30px; font-size: 9px; }
}
@media (max-width: 460px) {
  .opt { padding: 15px 15px; font-size: 15px; gap: 12px; }
  .cell-outcome { display: none; }
}

/* ============================================================== reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .screen.is-active { animation: none; }
}
