/* ─────────────────────────────────────────────────────────
   CRA3 — "The Blueprint"
   Enterprise transformation, engineered. Drafting-table
   aesthetic: blueprint hero, drafting-paper body, plex type.
   ───────────────────────────────────────────────────────── */

:root {
  --blueprint: #122e63;
  --blueprint-deep: #0c2350;
  --bp-line: rgba(214, 228, 255, 0.16);
  --bp-grid: rgba(214, 228, 255, 0.07);
  --bp-ink: #eaf1ff;
  --bp-muted: #9db4dd;
  --draft: #f7f5f0;
  --draft-raise: #fdfcf9;
  --ink: #18243c;
  --muted: #5d6880;
  --faint: #8b94a8;
  --line: rgba(24, 36, 60, 0.14);
  --line-soft: rgba(24, 36, 60, 0.08);
  --accent: #1f4fd8;
  --alert: #d23b2e;
  --good: #177a4c;
  --font-sans: "IBM Plex Sans", "Helvetica Neue", Helvetica, sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --pad-x: clamp(20px, 5vw, 72px);
  --maxw: 1240px;
}

* { box-sizing: border-box; }
html { background: #122e63; }

body {
  margin: 0;
  background: var(--draft);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: #fff; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em 0; text-wrap: pretty; }
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--pad-x); padding-right: var(--pad-x); }

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ── Nav ─────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px var(--pad-x);
  background: rgba(18, 46, 99, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.nav.over-light { background: rgba(247, 245, 240, 0.8); border-bottom-color: var(--line); }
.logo-lockup { height: 24px; width: auto; display: block; filter: brightness(0) invert(0.96); transition: filter 0.3s ease; }
.nav.over-light .logo-lockup { filter: none; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 16px;
  padding: 15px 30px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease;
}
.btn-light { background: var(--bp-ink); color: var(--blueprint-deep); }
.btn-light:hover { transform: translateY(-1px); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { transform: translateY(-1px); }
.btn-small { padding: 9px 18px; font-size: 14px; border-radius: 5px; }
.nav .btn-small { background: var(--bp-ink); color: var(--blueprint-deep); }
.nav.over-light .btn-small { background: var(--ink); color: var(--draft); }

/* ── Hero (blueprint) ────────────────────────────────── */
.hero {
  position: relative;
  background:
    linear-gradient(rgba(18, 46, 99, 0), rgba(12, 35, 80, 0.55)),
    repeating-linear-gradient(0deg, var(--bp-grid) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, var(--bp-grid) 0 1px, transparent 1px 28px),
    var(--blueprint);
  color: var(--bp-ink);
  padding: clamp(140px, 16vw, 200px) 0 clamp(72px, 8vw, 120px) 0;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}
.hero-stamp {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bp-muted);
  border: 1px solid var(--bp-line);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border-radius: 4px;
  margin-bottom: 32px;
}
.hero-h {
  font-size: clamp(46px, 6.4vw, 92px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 600;
  max-width: 15ch;
}
.hero-sub {
  margin-top: 26px;
  color: var(--bp-muted);
  font-size: clamp(16px, 1.5vw, 20px);
  max-width: 50ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }

.hero-draft { position: relative; }
.hero-draft svg { width: 100%; height: auto; display: block; }
.draft-line { stroke: var(--bp-ink); stroke-width: 1.4; fill: none; opacity: 0.9; }
.draft-line.dim { opacity: 0.35; }
.draft-accent { stroke: #6ea8ff; }
.draft-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  fill: var(--bp-muted);
  text-transform: uppercase;
}
@media (prefers-reduced-motion: no-preference) {
  .draft-anim {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    animation: draft-draw 2.8s cubic-bezier(0.3, 0, 0.2, 1) 0.3s forwards;
  }
  @keyframes draft-draw { to { stroke-dashoffset: 0; } }
}
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-draft { max-width: 480px; }
}

/* facts strip under hero */
.facts {
  background: var(--blueprint-deep);
  color: var(--bp-ink);
  border-top: 1px solid var(--bp-line);
}
.facts-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--bp-line);
}
.fact { background: var(--blueprint-deep); padding: 22px var(--pad-x); }
.fact-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bp-muted);
  display: block;
  margin-bottom: 4px;
}
.fact-val { font-size: 15.5px; }
@media (max-width: 760px) { .facts-row { grid-template-columns: 1fr; } }

/* ── Section scaffolding (drafting paper) ────────────── */
.section { padding: clamp(88px, 11vw, 152px) 0; }
.section-rule { border-top: 1px solid var(--line); }
.kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 22px;
}
.section-h {
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  max-width: 22ch;
}
.section-sub { color: var(--muted); font-size: clamp(16px, 1.4vw, 19px); max-width: 62ch; margin-top: 22px; }

/* ── Pipeline ────────────────────────────────────────── */
.pipeline { margin-top: clamp(40px, 5vw, 60px); }
.stage-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--draft-raise);
}
.stage-tab {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-start;
  padding: 14px 18px;
  background: transparent;
  border: none;
  border-right: 1px solid var(--line-soft);
  font-family: var(--font-sans);
  cursor: pointer;
  text-align: left;
}
.stage-tab:last-child { border-right: none; }
.stage-tab:hover { background: rgba(31, 79, 216, 0.05); }
.stage-tab .num { font-family: var(--font-mono); font-size: 11px; color: var(--faint); }
.stage-tab .name { font-weight: 600; font-size: 14.5px; color: var(--muted); white-space: nowrap; }
.stage-tab.on { background: var(--accent); }
.stage-tab.on .num { color: rgba(255, 255, 255, 0.7); }
.stage-tab.on .name { color: #fff; }

.stage-panel {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--draft-raise);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  overflow: hidden;
}
.stage-visual {
  padding: clamp(24px, 3vw, 44px);
  border-right: 1px solid var(--line-soft);
  background:
    repeating-linear-gradient(0deg, var(--line-soft) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(90deg, var(--line-soft) 0 1px, transparent 1px 26px);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}
.stage-visual svg { width: 100%; max-width: 460px; height: auto; }
.stage-copy { padding: clamp(24px, 3vw, 44px); display: flex; flex-direction: column; gap: 18px; }
.stage-h { font-size: clamp(22px, 2.2vw, 30px); letter-spacing: -0.02em; }
.stage-copy p { color: var(--muted); margin: 0; font-size: 16px; }
.io { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.io-row { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.io-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  flex: 0 0 44px;
}
.io-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.io-chip {
  font-size: 13px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--draft);
  color: var(--ink);
}
.io-chip.out { border-color: rgba(31, 79, 216, 0.35); color: var(--accent); background: rgba(31, 79, 216, 0.05); }

.stage-nav { display: flex; gap: 10px; margin-top: auto; padding-top: 10px; }
.stage-step {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s ease;
}
.stage-step:hover { border-color: var(--accent); color: var(--accent); }
.stage-step.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.stage-step.primary:hover { opacity: 0.92; color: #fff; }
.stage-step:disabled { opacity: 0.35; cursor: default; }
.stage-step:disabled:hover { border-color: var(--line); color: var(--ink); }

/* shared diagram styles */
.dg-line { stroke: var(--ink); stroke-width: 1.3; fill: none; }
.dg-line.soft { opacity: 0.4; }
.dg-box { fill: var(--draft-raise); stroke: var(--ink); stroke-width: 1.3; }
.dg-box.agent { stroke: var(--accent); fill: rgba(31, 79, 216, 0.06); }
.dg-box.hot { stroke: var(--alert); fill: rgba(210, 59, 46, 0.06); }
.dg-label { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.06em; fill: var(--muted); text-transform: uppercase; }
.dg-label.hot { fill: var(--alert); }
.dg-label.acc { fill: var(--accent); }
.dg-label.good { fill: var(--good); }
.dg-bar { fill: var(--ink); opacity: 0.25; }
.dg-bar.acc { fill: var(--accent); opacity: 0.9; }

@media (max-width: 880px) {
  .stage-panel { grid-template-columns: 1fr; }
  .stage-visual { border-right: none; border-bottom: 1px solid var(--line-soft); min-height: 240px; }
  .stage-tab { flex: 1 1 33%; border-bottom: 1px solid var(--line-soft); }
}

/* ── Roles ───────────────────────────────────────────── */
.roles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-top: clamp(36px, 5vw, 56px); }
.role { background: var(--draft-raise); padding: clamp(24px, 3vw, 40px); }
.role-who {
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.role-quote { font-size: clamp(18px, 1.8vw, 23px); font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; }
.role-ans { color: var(--muted); font-size: 15px; margin: 12px 0 0 0; }
.role.wide { grid-column: 1 / -1; }
@media (max-width: 760px) { .roles { grid-template-columns: 1fr; } .role.wide { grid-column: auto; } }

/* ── Digital twin (blueprint again) ──────────────────── */
.twin {
  background:
    repeating-linear-gradient(0deg, var(--bp-grid) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, var(--bp-grid) 0 1px, transparent 1px 28px),
    var(--blueprint);
  color: var(--bp-ink);
}
.twin .kicker { color: #8fb6ff; }
.twin .section-h { color: var(--bp-ink); }
.twin .section-sub { color: var(--bp-muted); }
.twin-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--bp-line);
  border: 1px solid var(--bp-line);
  border-radius: 8px;
  overflow: hidden;
  margin-top: clamp(36px, 5vw, 56px);
}
.twin-cell { background: rgba(12, 35, 80, 0.85); padding: clamp(24px, 3vw, 40px); }
.twin-cell .mono { color: var(--bp-muted); display: block; margin-bottom: 14px; }
.twin-big { font-size: clamp(34px, 4vw, 56px); font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.twin-cell.win .twin-big { color: #8fd6ae; }
.twin-cell p { color: var(--bp-muted); font-size: 15px; margin: 14px 0 0 0; }
@media (max-width: 700px) { .twin-compare { grid-template-columns: 1fr; } }

/* ── CTA / Footer ────────────────────────────────────── */
.cta { text-align: center; }
.cta-h { font-size: clamp(34px, 4.6vw, 62px); letter-spacing: -0.03em; line-height: 1.04; max-width: 18ch; margin: 0 auto; }
.cta-sub { color: var(--muted); max-width: 54ch; margin: 22px auto 0 auto; }
.cta-action { margin-top: 40px; display: flex; justify-content: center; }

.footer { padding: 56px 0 36px 0; border-top: 1px solid var(--line); }
.footer-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 24px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 28px; font-size: 14.5px; color: var(--muted); }
.footer-links a:hover { color: var(--ink); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--faint);
}

/* pipeline coda — Perform, outside the numbered stages */
.pipeline-coda {
  margin-top: 20px;
  border: 1px dashed var(--line-strong, rgba(24, 36, 60, 0.28));
  border-radius: 8px;
  background: transparent;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(20px, 3vw, 40px);
  padding: clamp(20px, 2.6vw, 36px);
  align-items: center;
}
.coda-visual svg { width: 100%; max-width: 380px; height: auto; display: block; }
.coda-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--good);
  display: block;
  margin-bottom: 10px;
}
.coda-h { font-size: clamp(19px, 1.9vw, 25px); letter-spacing: -0.02em; margin-bottom: 10px; }
.coda-copy p { color: var(--muted); font-size: 15.5px; margin: 0; }
@media (max-width: 880px) {
  .pipeline-coda { grid-template-columns: 1fr; }
}

/* footer brand block: logo + tagline */
.footer-brand-blk { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.footer-tagline {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

/* larger footer logo */
.footer .logo-lockup { height: 48px; }

/* live-exercise link under the Simulate chart */
.stage-visual { flex-direction: column; gap: 18px; }
.stage-visual-link {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--good);
  white-space: nowrap;
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid rgba(23, 122, 76, 0.35);
  background: rgba(23, 122, 76, 0.07);
}
@media (prefers-reduced-motion: no-preference) {
  .stage-visual-link { animation: sim-link-pulse 2.2s ease-in-out infinite; }
}
@keyframes sim-link-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.stage-visual-link:hover {
  animation-play-state: paused;
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 3px;
}


/* literal definition line in the hero (CRA5 draft) */
.hero-definition {
  margin: 26px 0 0 0;
  max-width: 52ch;
  padding: 14px 18px;
  border: 1px dashed var(--bp-line);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--bp-ink);
  background: rgba(12, 35, 80, 0.35);
}
