/* /partnership - motion-led partner program page.
   Builds on the tokens, buttons and footer in site.css.
   Every animation is opt-out: prefers-reduced-motion collapses the page to a
   plain vertical document, and the horizontal act becomes a normal stack on
   narrow screens. */

.partner { overflow-x: clip; }
/* display rules below must never beat the hidden attribute */
.partner [hidden] { display: none !important; }
.partner main { max-width: none; margin: 0; padding: 0; }

.skip {
  position: absolute; left: -9999px; top: 12px; z-index: 100;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px 16px; font-size: 14px;
}
.skip:focus { left: 16px; }

/* ---------- nav ---------- */
.pnav {
  position: fixed; inset: 0 0 auto; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  max-width: 1240px; margin: 0 auto; padding: 18px 40px;
  transition: transform .35s ease, background .35s ease, border-color .35s ease, padding .35s ease;
  border-bottom: 1px solid transparent;
}
.pnav.is-stuck {
  background: rgba(11, 13, 18, .82); backdrop-filter: blur(12px);
  border-bottom-color: var(--border); padding-top: 12px; padding-bottom: 12px;
  left: 0; right: 0; max-width: none;
}
.pnav.is-stuck > * { max-width: 1240px; }
.pnav-links { display: flex; gap: 26px; font-size: 14px; color: var(--text-dim); font-weight: 500; }
.pnav-links a:hover { color: var(--text); }

/* ---------- hero ---------- */
.stage {
  position: relative; min-height: 100svh;
  display: grid; place-items: center; padding: 120px 40px 80px;
  overflow: hidden; isolation: isolate;
}
.stage-bg { position: absolute; inset: -10% -10% 0; z-index: -1; pointer-events: none; }
.stage-bg span {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5;
  will-change: transform;
}
.stage-bg span:nth-child(1) { width: 520px; height: 520px; background: #6366f1; top: -60px; left: 4%; }
.stage-bg span:nth-child(2) { width: 420px; height: 420px; background: #8b5cf6; top: 22%; right: 2%; }
.stage-bg span:nth-child(3) { width: 460px; height: 460px; background: #ec4899; bottom: -140px; left: 34%; opacity: .32; }
.stage-grid {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 20%, transparent 75%);
  opacity: .5;
}

.stage-inner { max-width: 940px; text-align: center; position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 26px;
  padding: 7px 16px; border-radius: 999px; font-size: 13px; font-weight: 500; color: #c7d2fe;
  background: rgba(99, 102, 241, .12); border: 1px solid rgba(99, 102, 241, .3);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: #818cf8; box-shadow: 0 0 0 0 rgba(129, 140, 248, .6); animation: pulse 2.6s ease-out infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(129, 140, 248, 0); } 100% { box-shadow: 0 0 0 0 rgba(129, 140, 248, 0); } }

.stage h1 {
  font-size: clamp(42px, 7.2vw, 88px); line-height: 1.02; letter-spacing: -.035em; font-weight: 800;
  margin: 0 0 24px;
}
.stage h1 .word { display: inline-block; }
.stage-lead { max-width: 640px; margin: 0 auto 36px; font-size: clamp(16px, 2vw, 20px); color: #e2e6f2; }
.stage-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.stage-meta {
  list-style: none; margin: 44px 0 0; padding: 0;
  display: flex; gap: 12px 32px; justify-content: center; flex-wrap: wrap;
  color: var(--text-dim); font-size: 14px;
}
.stage-meta li { display: flex; align-items: center; gap: 8px; }
.stage-meta svg { width: 16px; height: 16px; color: #818cf8; }

.cue {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
}
.cue i { display: block; width: 1px; height: 38px; background: linear-gradient(var(--muted), transparent); animation: cue 2.2s ease-in-out infinite; }
@keyframes cue { 0%, 100% { transform: scaleY(.4); transform-origin: top; opacity: .4; } 50% { transform: scaleY(1); opacity: 1; } }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2, .7, .3, 1), transform .7s cubic-bezier(.2, .7, .3, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- horizontal act ---------- */
.rail { position: relative; }
.rail-sticky {
  position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; justify-content: center;
  overflow: hidden; gap: 28px; padding: 96px 0 64px;
}
.rail-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 0 40px; max-width: 1240px; width: 100%; margin: 0 auto; }
.rail-head h2 { margin: 0; font-size: clamp(22px, 3vw, 30px); letter-spacing: -.02em; }
.rail-head p { margin: 6px 0 0; color: var(--text-dim); font-size: 15px; max-width: 460px; }
.rail-bar { width: 180px; height: 3px; border-radius: 999px; background: var(--surface-2); overflow: hidden; flex: none; }
.rail-bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--grad); transition: width .12s linear; }
.rail-track { display: flex; gap: 22px; padding: 0 40px; will-change: transform; }

.panel {
  flex: 0 0 min(420px, 78vw); display: flex; flex-direction: column; gap: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.012));
  border: 1px solid var(--border); border-radius: 20px; padding: 30px;
  min-height: 420px;
}
.panel-ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: rgba(99,102,241,.14); color: #a5b4fc; }
.panel-ic svg { width: 22px; height: 22px; }
.panel-kicker { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.panel h3 { margin: 0; font-size: 22px; letter-spacing: -.01em; }
.panel p { margin: 0; color: var(--text-dim); font-size: 15px; }
.panel ul { list-style: none; margin: auto 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.panel li { display: flex; gap: 10px; font-size: 14px; color: var(--text-dim); }
.panel li::before { content: ''; flex: none; width: 6px; height: 6px; margin-top: 8px; border-radius: 50%; background: var(--accent); }
.panel.is-accent { background: linear-gradient(160deg, rgba(99,102,241,.18), rgba(236,72,153,.08)); border-color: rgba(99,102,241,.35); }

/* ---------- steps ---------- */
.flow { max-width: 1240px; margin: 0 auto; padding: 120px 40px; }
.flow-head { max-width: 620px; margin-bottom: 48px; }
.flow-head h2 { margin: 0 0 10px; font-size: clamp(28px, 4vw, 42px); letter-spacing: -.025em; }
.flow-head p { margin: 0; color: var(--text-dim); font-size: 16px; }
.flow-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; }
.flow-list li { background: var(--bg); padding: 28px 30px; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 20px; align-items: start; transition: background .3s ease; }
.flow-list li:hover { background: var(--bg-soft); }
.flow-n { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--accent); border: 1px solid rgba(99,102,241,.4); border-radius: 10px; padding: 6px 0; text-align: center; }
.flow-list h3 { margin: 0 0 6px; font-size: 18px; }
.flow-list p { margin: 0; color: var(--text-dim); font-size: 15px; }

/* ---------- application ---------- */
.apply-stage { position: relative; padding: 110px 40px 130px; overflow: hidden; }
.apply-stage::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(900px 500px at 50% 0%, rgba(99,102,241,.14), transparent 70%);
}
.apply-wrap { max-width: 760px; margin: 0 auto; }
.apply-head { text-align: center; margin-bottom: 34px; }
.apply-head h2 { margin: 0 0 10px; font-size: clamp(28px, 4vw, 44px); letter-spacing: -.025em; }
.apply-head p { margin: 0; color: var(--text-dim); font-size: 16px; }

.quiz { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; }
.quiz-top { display: flex; align-items: center; gap: 16px; padding: 18px 26px; border-bottom: 1px solid var(--border); }
.quiz-bar { flex: 1; height: 4px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.quiz-bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--grad); transition: width .45s cubic-bezier(.2,.7,.3,1); }
.quiz-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.quiz-body { position: relative; padding: 34px 30px 28px; min-height: 230px; transition: height .42s cubic-bezier(.2,.7,.3,1); }
@media (prefers-reduced-motion: reduce) { .quiz-body { transition: none; } }

/* Inactive questions are hidden from assistive tech too, but only after the
   fade-out has finished, so the transition still reads as motion. */
.step { position: absolute; inset: 34px 30px 28px; display: flex; flex-direction: column; gap: 12px; opacity: 0; visibility: hidden; transform: translateY(18px); pointer-events: none; transition: opacity .45s ease, transform .45s cubic-bezier(.2,.7,.3,1), visibility 0s linear .45s; }
.step.is-active { position: relative; inset: auto; opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition-delay: 0s; }
.step.is-leaving { opacity: 0; transform: translateY(-14px); }
.step-q { margin: 0; font-size: clamp(22px, 3.2vw, 30px); letter-spacing: -.02em; line-height: 1.2; }
.step-hint { margin: -4px 0 2px; color: var(--text-dim); font-size: 14px; max-width: 46ch; }
/* One answer per screen: the control is sized to the answer, not the card.
   Single-line answers are capped so a short name does not sit under a rule
   the width of the page. */
.step-field { max-width: 30rem; }
.step-field.is-long { max-width: none; }
.step-field input, .step-field textarea {
  width: 100%; font: inherit; font-size: 17px; line-height: 1.5; color: var(--text);
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px; outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.step-field textarea { resize: none; min-height: 112px; }
.step-field input::placeholder, .step-field textarea::placeholder { color: #5a657e; }
.step-field input:hover, .step-field textarea:hover { border-color: #39415a; }
.step-field input:focus, .step-field textarea:focus {
  border-color: var(--accent); background: var(--surface-2); box-shadow: 0 0 0 3px rgba(99,102,241,.22);
}
.step-field [aria-invalid="true"] { border-color: var(--red); }
.step-field [aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(239,68,68,.2); }
/* Reserved so an error message never shifts the buttons. */
.step-error { min-height: 20px; margin: 0; font-size: 13px; line-height: 1.5; color: #fca5a5; }

.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin: 4px 0 0; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span {
  display: block; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px;
  font-size: 14px; font-weight: 500; background: var(--bg-soft); cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.choice input:hover + span { border-color: rgba(99,102,241,.5); transform: translateY(-2px); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice span { min-height: 48px; display: flex; align-items: center; }
.choice input:checked + span { border-color: rgba(99,102,241,.7); background: rgba(99,102,241,.14); }

.step-foot { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.step-foot .btn { min-height: 44px; }
.step-foot .spacer { flex: 1; }
.step-key { font-size: 12px; color: var(--muted); }
.step-key kbd { font-size: 11px; background: rgba(255,255,255,.06); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; }

.review { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.review div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 16px; font-size: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.review dt { color: var(--text-dim); }
.review dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.review button { background: none; border: 0; color: #a5b4fc; font: inherit; font-size: 13px; cursor: pointer; padding: 0; justify-self: start; }
.review button:hover { text-decoration: underline; }

.done { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px 0; }
.done-ic { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; background: rgba(16,185,129,.14); color: #34d399; }
.done-ic svg { width: 28px; height: 28px; animation: tick .5s .1s both cubic-bezier(.2,.7,.3,1); }
@keyframes tick { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.done h3 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.done p { margin: 0; color: var(--text-dim); font-size: 15px; max-width: 420px; }

.quiz-note { margin: 16px 2px 0; font-size: 12px; color: var(--muted); text-align: center; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- faq + closing ---------- */
.pfaq { max-width: 820px; margin: 0 auto; padding: 0 40px 120px; }
.pfaq h2 { font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -.02em; margin: 0 0 24px; text-align: center; }
.pfaq details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 22px; margin-bottom: 10px; transition: border-color .2s ease; }
.pfaq details[open] { border-color: rgba(99,102,241,.4); }
.pfaq summary { cursor: pointer; font-weight: 600; font-size: 15px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.pfaq summary::-webkit-details-marker { display: none; }
.pfaq summary::after { content: '+'; color: var(--text-dim); font-size: 20px; }
.pfaq details[open] summary::after { content: '−'; }
.pfaq p { color: var(--text-dim); font-size: 14px; margin: 12px 0 0; }

.partner footer { padding-left: 40px; padding-right: 40px; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .pnav { padding: 14px 20px; }
  .pnav-links { display: none; }
  .stage { padding: 104px 20px 72px; }
  .flow, .apply-stage, .pfaq { padding-left: 20px; padding-right: 20px; }
  .flow { padding-top: 80px; padding-bottom: 80px; }
  .apply-stage { padding-top: 70px; padding-bottom: 90px; }
  .quiz-body { padding: 26px 20px 22px; min-height: 210px; }
  .step { inset: 26px 20px 22px; }
  .step-field { max-width: none; }
  .flow-list li { grid-template-columns: 44px minmax(0, 1fr); padding: 22px; gap: 14px; }
  .review div { grid-template-columns: 1fr; gap: 2px; }
  .partner footer { padding-left: 20px; padding-right: 20px; }
}

/* Narrow screens read the horizontal act as a normal stack. */
@media (max-width: 860px), (prefers-reduced-motion: reduce) {
  .rail { height: auto !important; }
  .rail-sticky { position: static; height: auto; padding: 72px 0; gap: 22px; }
  .rail-track { flex-direction: column; transform: none !important; padding: 0 20px; }
  .panel { flex: initial; min-height: 0; }
  .rail-bar { display: none; }
  .rail-head { padding: 0 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .stage-bg span, .cue i, .eyebrow .dot { animation: none; }
  .step { transition: none; }
  .quiz-bar i { transition: none; }
  .done-ic svg { animation: none; }
  .rail-head { padding-left: 40px; padding-right: 40px; }
}
