/* ════════════════════════════════════════════════════════════
   STRIDE — Shared landing utilities
   ════════════════════════════════════════════════════════════ */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}
.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 640px) {
  .container, .container-narrow { padding: 0 20px; }
}

/* ────── Nav ────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 22px 0;
  transition: background 0.3s var(--ease-out), backdrop-filter 0.3s var(--ease-out), padding 0.3s var(--ease-out);
}
.nav.is-scrolled {
  background: rgba(254, 252, 249, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  padding: 14px 0;
  border-bottom: 1px solid var(--ink-08);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--ink);
}
.brand .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--coral);
  border-radius: var(--r-full);
  vertical-align: middle;
  margin-left: 6px;
  margin-bottom: 3px;
}
.nav-cta {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  background: var(--ink);
  padding: 10px 18px;
  border-radius: var(--r-full);
  transition: transform 0.2s var(--ease-out), background 0.2s var(--ease-out);
}
.nav-cta:hover { background: var(--coral); transform: translateY(-1px); }

/* ────── Sections ────── */
section { position: relative; }

.section-pad {
  padding: var(--s-120) 0;
}
.section-pad-sm {
  padding: var(--s-80) 0;
}

@media (max-width: 640px) {
  .section-pad { padding: 80px 0; }
  .section-pad-sm { padding: 56px 0; }
}

/* ────── Eyebrow ────── */
.eyebrow {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--coral-dark);
}
.eyebrow.on-dark { color: var(--coral-light); }

/* ────── Headings ────── */
.h-display {
  font-family: var(--font-heading);
  font-size: var(--t-display);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.02;
  color: var(--ink);
}
.h-mega {
  font-family: var(--font-heading);
  font-size: var(--t-mega);
  font-weight: 900;
  letter-spacing: -3px;
  line-height: 0.95;
  color: var(--ink);
}
.h1 {
  font-family: var(--font-heading);
  font-size: var(--t-h1);
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.08;
  color: var(--ink);
}
.h2 {
  font-family: var(--font-heading);
  font-size: var(--t-h2);
  font-weight: 800;
  letter-spacing: -0.4px;
  line-height: 1.15;
}
.h3 {
  font-family: var(--font-heading);
  font-size: var(--t-h3);
  font-weight: 700;
  letter-spacing: -0.2px;
  line-height: 1.2;
}

.lede {
  font-size: var(--t-body-lg);
  color: var(--slate);
  line-height: 1.55;
  max-width: 56ch;
}

/* ────── Buttons ────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  padding: 16px 28px;
  border-radius: var(--r-full);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), background 0.25s var(--ease-out);
  letter-spacing: 0.2px;
}
.btn-primary {
  background: var(--coral);
  color: var(--white);
  box-shadow: var(--shadow-coral);
}
.btn-primary:hover {
  background: var(--coral-dark);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(224, 122, 95, 0.45);
}
.btn-ghost {
  color: var(--ink);
  border: 1.5px solid var(--ink-15);
}
.btn-ghost:hover { border-color: var(--ink); }

/* ────── Form ────── */
.early-form {
  display: flex;
  gap: 8px;
  background: var(--white);
  border: 1.5px solid var(--ink-15);
  border-radius: var(--r-full);
  padding: 6px 6px 6px 20px;
  max-width: 560px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
@media (max-width: 620px) {
  .early-form {
    flex-direction: column;
    align-items: stretch;
    border-radius: var(--r-xl);
    padding: 12px;
    gap: 8px;
  }
  .early-form input {
    padding: 14px 16px !important;
    border-radius: var(--r-full);
    background: var(--cream);
  }
  .early-form button[type="submit"] {
    padding: 14px 22px;
  }
}
.early-form:focus-within {
  border-color: var(--coral);
  box-shadow: 0 0 0 5px rgba(224, 122, 95, 0.12);
}
.early-form.is-stacked {
  flex-direction: column;
  align-items: stretch;
  border-radius: var(--r-xl);
  padding: 12px;
  gap: 8px;
}
.early-form input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 15px;
  padding: 10px 0;
  color: var(--ink);
  min-width: 0;
}
.early-form.is-stacked input {
  padding: 14px 16px;
  border-radius: var(--r-full);
  background: var(--cream);
}
.early-form input::placeholder { color: var(--slate-light); }
.early-form button[type="submit"] {
  background: var(--coral);
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  padding: 12px 22px;
  border-radius: var(--r-full);
  transition: background 0.2s, transform 0.2s;
  white-space: nowrap;
  letter-spacing: 0.3px;
}
.early-form button[type="submit"]:hover { background: var(--coral-dark); transform: translateY(-1px); }
.early-form .form-error {
  color: var(--coral-dark);
  font-size: 13px;
  font-weight: 500;
  margin-top: 8px;
  display: none;
  padding: 0 14px;
  line-height: 1.4;
  align-items: center;
  gap: 6px;
}
.early-form .form-error::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: var(--r-full);
  background: var(--coral-dark);
  flex-shrink: 0;
  /* Exclamation mark drawn with two box-shadow dots so we don't need a font glyph. */
  background-image:
    radial-gradient(circle at 50% 35%, var(--white) 0 1px, transparent 1.5px),
    radial-gradient(circle at 50% 65%, var(--white) 0 1px, transparent 1.5px);
  background-size: 100% 50%, 100% 50%;
  background-position: 0 0, 0 100%;
  background-repeat: no-repeat;
}
.early-form.has-error .form-error { display: inline-flex; }
.early-form.has-error {
  border-color: var(--coral-dark);
  /* Subtle shake on error to draw the eye without being aggressive. */
  animation: form-shake 0.4s var(--ease-out);
}
@keyframes form-shake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-4px); }
  40%      { transform: translateX(4px); }
  60%      { transform: translateX(-2px); }
  80%      { transform: translateX(2px); }
}

/* ────── Designed success state ────── */
.form-success {
  display: none;
  max-width: 560px;
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--coral);
  border-radius: var(--r-2xl);
  box-shadow: 0 12px 32px rgba(224, 122, 95, 0.18);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.form-success.is-visible {
  display: block;
  animation: success-in 0.6s var(--ease-out) forwards;
}
@keyframes success-in {
  to { opacity: 1; transform: translateY(0); }
}
.form-success-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.form-success .check {
  width: 36px;
  height: 36px;
  border-radius: var(--r-full);
  background: var(--coral);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 0 0 6px rgba(224, 122, 95, 0.16);
  /* Animated checkmark draw — small piece of theater. */
  position: relative;
}
.form-success .check svg {
  width: 18px;
  height: 18px;
  stroke: var(--white);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.form-success .check svg path {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
}
.form-success.is-visible .check svg path {
  animation: check-draw 0.6s 0.25s var(--ease-out) forwards;
}
@keyframes check-draw {
  to { stroke-dashoffset: 0; }
}
.form-success-title {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.3px;
  line-height: 1.2;
}
.form-success-body {
  font-size: 14px;
  color: var(--slate);
  line-height: 1.55;
  margin-bottom: 16px;
}
.form-success-body strong { color: var(--ink); font-weight: 600; }
.form-success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.form-success-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--coral-dark);
  background: var(--coral-bg);
  padding: 10px 18px;
  border-radius: var(--r-full);
  border: 0;
  cursor: pointer;
  text-align: center;
  text-wrap: balance;
  transition: background 0.2s, transform 0.2s;
}
.form-success-share:hover {
  background: var(--coral);
  color: var(--white);
  transform: translateY(-1px);
}
.form-success-share .copied {
  color: var(--green);
  font-size: 12px;
  margin-left: 6px;
  opacity: 0;
  transition: opacity 0.3s;
}
.form-success-share.copied .copied { opacity: 1; }
.form-success-meta {
  font-size: 12px;
  color: var(--slate-light);
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* Dark variant for success block on ink-navy backgrounds (final CTA).
   Class lives on the form-success element itself, so use compound selectors. */
.form-success.on-dark-bg {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(224, 122, 95, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.form-success.on-dark-bg .form-success-title { color: var(--white); }
.form-success.on-dark-bg .form-success-body  { color: rgba(255, 255, 255, 0.72); }
.form-success.on-dark-bg .form-success-body strong { color: var(--white); }
.form-success.on-dark-bg .form-success-meta {
  color: rgba(255, 255, 255, 0.4);
  border-color: rgba(255, 255, 255, 0.12);
}
/* Share button on dark bg — keep the coral chip but lift contrast */
.form-success.on-dark-bg .form-success-share {
  background: rgba(224, 122, 95, 0.18);
  color: var(--coral-light);
}
.form-success.on-dark-bg .form-success-share:hover {
  background: var(--coral);
  color: var(--white);
}

.form-fineprint {
  font-size: 12px;
  color: var(--slate-light);
  margin-top: 12px;
  max-width: 460px;
}

/* ════════════════════════════════════════════════════════════
   MODAL — signup sheet (bottom-up on mobile, centered on desktop)
   ════════════════════════════════════════════════════════════ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(27, 33, 56, 0.55);
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease-out);
}
body.is-modal-open .modal-backdrop {
  opacity: 1;
  pointer-events: auto;
}
body.is-modal-open { overflow: hidden; }

.modal {
  position: fixed;
  z-index: 101;
  /* Desktop: centered modal */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  width: min(560px, calc(100% - 32px));
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  background: var(--white);
  border-radius: var(--r-2xl);
  box-shadow: 0 30px 80px rgba(27, 33, 56, 0.35);
  padding: 32px 32px 28px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s var(--ease-out), transform 0.32s var(--ease-out);
}
body.is-modal-open .modal {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}
.modal::-webkit-scrollbar { width: 0; }

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: var(--r-full);
  background: var(--inset);
  color: var(--slate);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  transition: background 0.2s, color 0.2s, transform 0.2s;
  cursor: pointer;
  z-index: 2;
}
.modal-close:hover {
  background: var(--ink);
  color: var(--white);
  transform: rotate(90deg);
}
.modal-close svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2.5; }

.modal-eyebrow {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--coral-dark);
}
.modal-title {
  font-family: var(--font-heading);
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 800;
  letter-spacing: -0.4px;
  line-height: 1.18;
  color: var(--ink);
  margin: 6px 0 8px;
  max-width: 22ch;
}
.modal-sub {
  font-size: 14px;
  color: var(--slate);
  line-height: 1.5;
  margin-bottom: 22px;
  max-width: 36ch;
}
.modal .early-form { max-width: 100%; }
.modal .form-fineprint { margin-top: 12px; }

/* Mobile: morph into a bottom sheet */
@media (max-width: 640px) {
  .modal {
    top: auto;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    max-height: 88vh;
    border-radius: var(--r-2xl) var(--r-2xl) 0 0;
    padding: 24px 22px 28px;
    transform: translate(0, 100%);
    box-shadow: 0 -20px 60px rgba(27, 33, 56, 0.35);
  }
  body.is-modal-open .modal {
    transform: translate(0, 0);
  }
  /* Drag handle visual at the top of the sheet */
  .modal::before {
    content: "";
    display: block;
    width: 44px;
    height: 4px;
    border-radius: 2px;
    background: var(--ink-15);
    margin: 2px auto 18px;
  }
  .modal-close {
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
  }
  /* Share button: full row, balanced wrap so "path" doesn't hang alone */
  .form-success-actions {
    width: 100%;
  }
  .form-success-share {
    width: 100%;
    padding: 12px 18px;
  }
}

/* ════════════════════════════════════════════════════════════
   STICKY MOBILE CTA — fixed bottom pill that appears past hero
   ════════════════════════════════════════════════════════════ */
.sticky-cta {
  display: none;
}
@media (max-width: 760px) {
  .sticky-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 55;
    padding: 14px 24px;
    border-radius: var(--r-full);
    background: var(--coral);
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.2px;
    box-shadow: 0 12px 32px rgba(224, 122, 95, 0.5), 0 2px 4px rgba(27, 33, 56, 0.15);
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
  }
  .sticky-cta.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  body.is-modal-open .sticky-cta {
    opacity: 0;
    pointer-events: none;
  }
}

/* ────── Footer ────── */
.footer {
  padding: 48px 0 56px;
  border-top: 1px solid var(--border);
  background: var(--cream);
}
.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-meta {
  font-size: 13px;
  color: var(--slate);
}
.footer-links {
  display: flex;
  gap: 24px;
  font-size: 13px;
  color: var(--slate);
}
.footer-links a:hover { color: var(--ink); }

/* ────── Reveal ────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

/* ────── Word-by-word reveal ────── */
[data-word-reveal] .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.4em);
  filter: blur(2px);
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out), filter 0.45s var(--ease-out);
}
[data-word-reveal].words-in .w {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}
[data-word-reveal].words-in .w:nth-child(2)  { transition-delay: 0.03s; }
[data-word-reveal].words-in .w:nth-child(3)  { transition-delay: 0.06s; }
[data-word-reveal].words-in .w:nth-child(4)  { transition-delay: 0.09s; }
[data-word-reveal].words-in .w:nth-child(5)  { transition-delay: 0.12s; }
[data-word-reveal].words-in .w:nth-child(6)  { transition-delay: 0.15s; }
[data-word-reveal].words-in .w:nth-child(7)  { transition-delay: 0.18s; }
[data-word-reveal].words-in .w:nth-child(8)  { transition-delay: 0.21s; }
[data-word-reveal].words-in .w:nth-child(9)  { transition-delay: 0.24s; }
[data-word-reveal].words-in .w:nth-child(10) { transition-delay: 0.27s; }
[data-word-reveal].words-in .w:nth-child(11) { transition-delay: 0.30s; }
[data-word-reveal].words-in .w:nth-child(12) { transition-delay: 0.33s; }
[data-word-reveal].words-in .w:nth-child(13) { transition-delay: 0.36s; }
[data-word-reveal].words-in .w:nth-child(14) { transition-delay: 0.39s; }
[data-word-reveal].words-in .w:nth-child(15) { transition-delay: 0.42s; }
[data-word-reveal].words-in .w:nth-child(16) { transition-delay: 0.45s; }
[data-word-reveal].words-in .w:nth-child(17) { transition-delay: 0.48s; }
[data-word-reveal].words-in .w:nth-child(18) { transition-delay: 0.51s; }
[data-word-reveal].words-in .w:nth-child(19) { transition-delay: 0.54s; }
[data-word-reveal].words-in .w:nth-child(20) { transition-delay: 0.57s; }
[data-word-reveal].words-in .w:nth-child(n+21) { transition-delay: 0.60s; }

/* ────── Concept switcher (top-right pill on desktop, compact bottom on mobile) ──────
   Hidden by default on production traffic. Shown only when ?preview=1 is in
   the URL — which the internal share page automatically appends to its links.
   That keeps the public landing pages clean while letting the team navigate
   between concepts during review.
*/
.concept-switcher {
  position: fixed;
  top: 22px;
  right: 24px;
  z-index: 60;
  display: none;   /* hidden unless body.is-preview-mode is set by JS */
  gap: 4px;
  background: rgba(27, 33, 56, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 4px;
  border-radius: var(--r-full);
  box-shadow: var(--shadow-lg);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
body.is-preview-mode .concept-switcher { display: inline-flex; }
.concept-switcher a {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.6);
  padding: 8px 12px;
  border-radius: var(--r-full);
  transition: color 0.2s, background 0.2s;
}
.concept-switcher a:hover { color: var(--white); }
.concept-switcher a.active {
  background: var(--coral);
  color: var(--white);
}
/* Overview entry — visually distinct from concept entries (it's navigation, not a peer). */
.concept-switcher a.overview {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.10);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  margin-right: 4px;
  padding-right: 14px;
  border-radius: var(--r-full) 6px 6px var(--r-full);
}
.concept-switcher a.overview:hover {
  background: rgba(255, 255, 255, 0.18);
  color: var(--white);
}
/* Translucent state — applied while scrolling so it doesn't dominate. */
.concept-switcher.is-dim { opacity: 0.45; }
.concept-switcher.is-dim:hover { opacity: 1; }

/* Mobile: bottom-right, very compact — never bottom-center where it covers
   the main content column. */
@media (max-width: 640px) {
  .concept-switcher {
    top: auto;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    transform: none;
    padding: 3px;
  }
  .concept-switcher a {
    font-size: 10px;
    padding: 6px 9px;
    letter-spacing: 0.4px;
  }
  /* The mobile switcher only ever shows ONE label — the active concept —
     plus two dots for the other two, so it doesn't span the page. */
  .concept-switcher a:not(.active):not(.overview) .label { display: none; }
  .concept-switcher a:not(.active):not(.overview) {
    width: 24px;
    height: 24px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .concept-switcher a:not(.active):not(.overview)::before {
    content: "";
    width: 6px;
    height: 6px;
    background: currentColor;
    border-radius: var(--r-full);
    opacity: 0.5;
  }
  /* Overview keeps its label on mobile too — it's the way back. */
  .concept-switcher a.overview {
    padding: 6px 10px;
    font-size: 10px;
  }
}

/* Reserve a slim bottom buffer so the floating switcher pill doesn't sit
   directly on top of content, while keeping the page tight on mobile. */
@media (max-width: 640px) {
  body { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
}
