/* ============================================================
   PartnerMatch v4 — bold type, original voice
   Paper + deep navy + electric blue, violet support.
   Signature moves: marker-highlight headline, outline numerals,
   blue offset shadows, ink ticker marquee, blueprint orbital panel.
   ============================================================ */

:root {
  --blue: #2849e8;
  --violet: #6c45d8;
  --paper: #f6f4ee;
  --ink: #0f1736;
  --ink-soft: #4b5374;
  --line: #d9d5c9;
  --white: #ffffff;

  --font-sans: "Space Grotesk", "Helvetica Neue", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --border: 2px solid var(--ink);
  --shadow-blue: 5px 5px 0 var(--blue);
  --shadow-ink: 4px 4px 0 var(--ink);
  --container: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
a { color: inherit; }

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
  display: block;
  margin-bottom: 22px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  background: var(--blue);
  border: var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-ink);
  padding: 14px 30px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.btn-ghost {
  background: var(--paper);
  color: var(--ink);
}

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

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: var(--border);
}

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

.wordmark {
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  text-decoration: none;
}

.wordmark .tick { color: var(--blue); }
.wordmark sup {
  font-family: var(--font-mono);
  font-size: 9px;
  vertical-align: top;
  margin-left: 2px;
}

.nav-actions { display: flex; align-items: center; gap: 26px; }

.nav-actions .nav-link {
  font-size: 15px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
}

.nav-actions .nav-link:hover { color: var(--blue); }
.nav-actions .btn { padding: 10px 22px; font-size: 14.5px; }

/* floating CTA */
.float-cta {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.float-cta.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

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

.hero { padding: 110px 0 96px; }

.hero h1 {
  font-size: clamp(48px, 7.2vw, 104px);
  max-width: 11em;
}

.hero h1 .hl {
  display: inline-block;
  background: var(--blue);
  color: var(--white);
  padding: 0 0.18em 0.05em;
  margin: 0.06em 0;
  border-radius: 6px;
  transform: rotate(-1deg);
}

.hero h1 .outline {
  color: transparent;
  -webkit-text-stroke: 2.5px var(--ink);
}

.hero-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px;
  align-items: end;
  margin-top: 52px;
}

.hero-sub {
  font-size: 19px;
  font-weight: 500;
  color: var(--ink-soft);
  max-width: 33em;
}

.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- ticker marquee ---------- */

.ticker {
  background: var(--ink);
  color: var(--paper);
  border-top: var(--border);
  border-bottom: var(--border);
  overflow: hidden;
  padding: 15px 0;
}

.ticker-track {
  display: flex;
  gap: 0;
  width: max-content;
}

body[data-motion="on"] .ticker-track {
  animation: ticker 28s linear infinite;
}

@keyframes ticker {
  to { transform: translateX(-50%); }
}

.ticker-set {
  display: flex;
  align-items: center;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ticker-set span { padding: 0 18px; }
.ticker-set .star { color: var(--blue); padding: 0; }

/* ---------- eco strip ---------- */

.eco-strip { padding: 44px 0; border-bottom: 1px solid var(--line); }

.eco-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.eco-caption {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.eco-slots { display: flex; align-items: center; gap: 14px 30px; flex-wrap: wrap; }

.eco-item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  opacity: 0.75;
  transition: opacity 0.15s ease;
}

.eco-item:hover { opacity: 1; }
.eco-item img { display: block; }

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

.section { padding: 110px 0; }

.section-title {
  font-size: clamp(34px, 4.4vw, 56px);
  max-width: 15em;
}

.section-title .accent { color: var(--blue); }

/* ---------- numbered problems ---------- */

.numbers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 64px;
  border-top: var(--border);
}

.num-col {
  padding: 36px 32px 8px 0;
}

.num-col + .num-col { padding-left: 32px; border-left: var(--border); }

.num-col .big {
  display: block;
  font-size: 88px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 2px var(--blue);
  margin-bottom: 22px;
}

.num-col h3 { font-size: 21px; margin-bottom: 10px; letter-spacing: -0.01em; }

.num-col p {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-soft);
}

/* ---------- one team / diagram split ---------- */

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 72px;
  align-items: center;
}

.split-copy p {
  font-size: 17px;
  font-weight: 500;
  margin-top: 22px;
  max-width: 31em;
  color: var(--ink-soft);
}

.split-copy p strong { color: var(--ink); }

/* blueprint panel */

.panel {
  background: var(--ink);
  border: var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-blue);
  position: relative;
  padding: 30px;
  display: grid;
  place-items: center;
}

.panel-tag {
  position: absolute;
  top: 18px;
  left: 22px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--paper), transparent 45%);
}

.orbit-stage { position: relative; width: 470px; height: 470px; }

.ring-inner { --r: 120px; }
.ring-outer { --r: 200px; }

.orbit-svg { position: absolute; inset: 0; width: 100%; height: 100%; }

.orbit-path {
  fill: none;
  stroke: var(--paper);
  stroke-width: 1;
  opacity: 0.22;
}

.orbit-path-dash {
  fill: none;
  stroke: var(--blue);
  stroke-width: 2;
  stroke-dasharray: 2 10;
  stroke-linecap: round;
}

body[data-motion="on"] .orbit-path-dash {
  animation: dashflow 26s linear infinite;
}

@keyframes dashflow { to { stroke-dashoffset: -240; } }

.hub {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  background: var(--blue);
  color: var(--white);
  border: 2px solid var(--paper);
  border-radius: 12px;
  padding: 14px 20px;
  text-align: center;
}

.hub-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 3px;
}

.hub-name { font-weight: 700; font-size: 16px; white-space: nowrap; }

.ring { position: absolute; inset: 0; z-index: 2; }

body[data-motion="on"] .ring-inner { animation: spin 64s linear infinite; }
body[data-motion="on"] .ring-outer { animation: spin 96s linear infinite reverse; }

.orbit-stage:hover .ring,
.orbit-stage:hover .node-chip { animation-play-state: paused; }

@keyframes spin { to { transform: rotate(360deg); } }

.node {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: rotate(var(--a)) translateX(var(--r)) rotate(calc(-1 * var(--a)));
}

.node-chip {
  display: inline-flex;
  align-items: center;
  transform: translate(-50%, -50%);
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 15px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}

body[data-motion="on"] .ring-inner .node-chip { animation: counterspin-i 64s linear infinite; }
body[data-motion="on"] .ring-outer .node-chip { animation: counterspin-o 96s linear infinite; }

@keyframes counterspin-i {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(-360deg); }
}

@keyframes counterspin-o {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

/* code card pinned to panel */
.code-card {
  position: absolute;
  bottom: -24px;
  left: -28px;
  z-index: 5;
  background: var(--paper);
  color: var(--ink);
  border: var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-blue);
  padding: 14px 18px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.8;
}

.code-card .ln { display: block; white-space: pre; }
.code-card .method { color: var(--blue); font-weight: 700; }
.code-card .str { color: var(--violet); }
.code-card .num { color: var(--blue); }
.code-card .ok { color: #157a4b; font-weight: 500; }
.code-card .dim { opacity: 0.5; }

/* ---------- flow (9 steps) ---------- */

.section-flow { padding-top: 0; }

.flow {
  background: var(--white);
  border: var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-blue);
  padding: 42px;
  margin-top: 56px;
}

.flow-track {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  position: relative;
}

.flow-step {
  appearance: none;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  padding: 0 5px 20px;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  color: color-mix(in srgb, var(--ink), var(--white) 50%);
  transition: color 0.2s ease;
}

.flow-step .dot {
  display: block;
  width: 15px;
  height: 15px;
  flex: none;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--white);
  margin: 0 auto 12px;
  transition: background 0.2s ease, transform 0.2s ease;
  position: relative;
  z-index: 2;
}

.flow-step .lbl {
  font-size: 13px;
  font-weight: 700;
  display: block;
  line-height: 1.25;
}

.flow-step:hover { color: var(--ink); }
.flow-step.active { color: var(--ink); }

.flow-step.active .dot {
  background: var(--blue);
  transform: scale(1.3);
}

.flow-step.passed .dot { background: color-mix(in srgb, var(--blue), var(--white) 70%); }

.flow-line {
  position: absolute;
  top: 7px;
  left: calc(100% / 18);
  right: calc(100% / 18);
  height: 2px;
  background: color-mix(in srgb, var(--ink), var(--white) 75%);
  z-index: 1;
}

.flow-line-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: var(--blue);
  transition: width 0.45s ease;
}

.flow-detail {
  margin-top: 28px;
  border-top: var(--border);
  padding-top: 28px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: start;
  min-height: 96px;
}

.flow-detail .idx {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--blue);
  padding-top: 8px;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.flow-detail h3 { font-size: 26px; margin-bottom: 8px; }

.flow-detail p {
  color: var(--ink-soft);
  font-weight: 500;
  max-width: 44em;
}

.flow-detail-body { transition: opacity 0.25s ease, transform 0.25s ease; }
.flow-detail-body.swap { opacity: 0; transform: translateY(6px); }

.flow-nav { display: flex; gap: 10px; padding-top: 4px; }

.flow-nav button {
  appearance: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: var(--border);
  background: var(--white);
  color: var(--ink);
  font-size: 16px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.12s ease, color 0.12s ease;
}

.flow-nav button:hover { background: var(--blue); color: var(--white); }

/* ---------- everything included ---------- */

.included-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 40px;
  margin-top: 60px;
  list-style: none;
  padding: 0;
}

.included-grid li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  font-size: 16px;
  font-weight: 500;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.included-grid li::before {
  content: "+";
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--violet);
  flex: none;
}

.included-note {
  margin-top: 48px;
  font-size: 17px;
  font-weight: 500;
  max-width: 36em;
  color: var(--ink-soft);
}

/* ---------- CTA + form ---------- */

.cta {
  background: var(--ink);
  border-top: var(--border);
  color: var(--paper);
  padding: 110px 0 120px;
}

.cta-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 72px;
  align-items: start;
}

.cta-copy .eyebrow { color: var(--blue); }

.cta-copy h2 {
  font-size: clamp(36px, 4.6vw, 60px);
  color: var(--paper);
}

.cta-copy h2 .hl {
  display: inline-block;
  background: var(--blue);
  color: var(--white);
  padding: 0 0.18em 0.05em;
  border-radius: 6px;
  transform: rotate(-1deg);
}

.cta-copy p {
  margin-top: 24px;
  font-size: 18px;
  font-weight: 500;
  max-width: 30em;
  color: color-mix(in srgb, var(--paper), var(--ink) 25%);
}

.cta-alt { margin-top: 26px; font-size: 15.5px; }

.cta-alt a {
  color: var(--paper);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.cta-meta {
  margin-top: 36px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--paper), transparent 40%);
}

.audit-form {
  background: var(--paper);
  color: var(--ink);
  border: var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-blue);
  padding: 38px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 7px;
}

.field input,
.field textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  background: var(--white);
  border: var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  transition: box-shadow 0.15s ease;
}

.field textarea { resize: vertical; min-height: 96px; }

.field input:focus,
.field textarea:focus {
  outline: none;
  box-shadow: 3px 3px 0 var(--blue);
}

.field input.invalid { border-color: #c2370f; box-shadow: 3px 3px 0 #c2370f; }

.chip-group { display: flex; flex-wrap: wrap; gap: 9px; }
.chip-group label { display: inline-flex; margin: 0; cursor: pointer; }

.chip-group input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.chip-group .chip {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  background: var(--white);
  border: var(--border);
  border-radius: 999px;
  padding: 7px 14px;
  transition: all 0.12s ease;
}

.chip-group label:hover .chip { box-shadow: 2px 2px 0 var(--ink); }

.chip-group input:checked + .chip {
  background: var(--blue);
  color: var(--white);
  box-shadow: 2px 2px 0 var(--ink);
  font-weight: 700;
}

.chip-group input:focus-visible + .chip {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.audit-form .btn { width: 100%; margin-top: 8px; }

.form-success { text-align: center; padding: 56px 20px; }

.form-success .mark {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--blue);
  border: var(--border);
  color: var(--white);
  font-size: 24px;
  font-weight: 700;
  display: grid;
  place-items: center;
  margin: 0 auto 24px;
}

.form-success h3 { font-size: 24px; margin-bottom: 12px; }
.form-success p { font-weight: 500; max-width: 26em; margin: 0 auto; }

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

.footer {
  background: var(--paper);
  border-top: var(--border);
  padding: 38px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer .fine {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-soft);
}

/* ---------- scroll reveals ---------- */

@media (prefers-reduced-motion: no-preference) {
  body[data-motion="on"] .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    transition-delay: var(--d, 0s);
  }

  body[data-motion="on"] .reveal.in {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-motion="on"] .ring-inner,
  body[data-motion="on"] .ring-outer,
  body[data-motion="on"] .node-chip,
  body[data-motion="on"] .orbit-path-dash,
  body[data-motion="on"] .ticker-track {
    animation: none;
  }
}

/* ---------- responsive ---------- */

@media (max-width: 1020px) {
  .split-grid { grid-template-columns: 1fr; gap: 64px; }
  .cta-grid { grid-template-columns: 1fr; gap: 48px; }
  .flow-track { grid-template-columns: repeat(3, 1fr); row-gap: 18px; }
  .flow-line { display: none; }
  .numbers-grid { grid-template-columns: 1fr; border-top: none; }
  .num-col { padding: 28px 0; border-top: var(--border); }
  .num-col + .num-col { padding-left: 0; border-left: none; }
  .hero-foot { grid-template-columns: 1fr; gap: 32px; align-items: start; }
  .included-grid { grid-template-columns: 1fr 1fr; }
  .nav-actions .nav-link { display: none; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .section { padding: 76px 0; }
  .hero { padding: 72px 0 64px; }
  .hero h1 .outline { -webkit-text-stroke-width: 1.5px; }
  .orbit-stage { width: 320px; height: 320px; }
  .ring-inner { --r: 82px; }
  .ring-outer { --r: 138px; }
  .node-chip { font-size: 9.5px; padding: 5px 10px; }
  .hub { padding: 10px 14px; }
  .hub-name { font-size: 13px; }
  .panel { padding: 16px; }
  .code-card { position: static; margin-top: 18px; width: 100%; }
  .flow { padding: 26px; }
  .flow-track { grid-template-columns: repeat(2, 1fr); }
  .flow-detail { grid-template-columns: 1fr; gap: 12px; }
  .form-row { grid-template-columns: 1fr; }
  .audit-form { padding: 26px; }
  .included-grid { grid-template-columns: 1fr; }
  .eco-inner { justify-content: flex-start; }
}
