/* PM Central — marketing landing page
   Values lifted verbatim from design_handoff_pmcentral_landing/README.md.
   Palette is the brand kit; do not introduce colours outside :root. */

:root {
  --ink: #101E33;
  --ink-2: #46586F;
  --ink-3: #6E7F94;
  --paper: #EDEFF2;
  --white: #FFFFFF;
  --rule: #C9D2DC;
  --rule-soft: #DCE2E9;
  --rule-dark: #2A3A52;
  --accent: #C2571F;
  --accent-dark: #E8783A;
  --muted-dark: #8698AE;
  --video-ground: #0B1626;

  --font-head: Manrope, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-body: Inter, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;

  /* Measured by landing.js (ResizeObserver on <header>); 70px is the min-height
     fallback if JS never runs. */
  --header-h: 70px;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--paper);
  /* Sticky-header anchor offset: header height + 20px, recomputed live. */
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Fallback for browsers without scroll-padding-top on the root. */
article[id], section[id] { scroll-margin-top: calc(var(--header-h) + 20px); }

a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
h1, h2, p, dl, dd, figure { margin: 0; }

::selection { background: var(--accent); color: var(--white); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 30;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 3px;
  font-size: 14.5px;
}
.skip-link:focus { top: 12px; }

/* ---------- Layout foundation ---------- */

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 40px;
}

.grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0;
}

.rail {
  padding: 60px 28px 60px 0;
  border-right: 1px solid var(--rule);
}

.body {
  padding: 60px 0 60px 44px;
  min-width: 0;
}

/* Rail collapse — a media query, not JS (README: Interactions & behaviour). */
@media (max-width: 759px) {
  .grid { grid-template-columns: 1fr; }
  .rail { border-right: none; padding: 44px 0 14px; }
  .body { border-left: none; padding: 0 0 52px; }
}

/* ---------- Type helpers ---------- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow--accent { color: var(--accent); }
.eyebrow--accent-dark { color: var(--accent-dark); }

.rail__name {
  margin-top: 8px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 25px;
  letter-spacing: -.025em;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 24px;
  border-radius: 3px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15.5px;
  line-height: 1.2;
  transition: .16s ease;
}
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: var(--accent); color: var(--white); }
.btn--ghost { border: 1px solid var(--rule); color: var(--ink); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--closer { padding: 14px 26px; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}
.cta-row--center { justify-content: center; margin-top: 32px; }

/* ---------- 1. Masthead ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(237, 239, 242, .92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule-soft);
}

.masthead__wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 40px;
  min-height: 70px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
}

/* CRITICAL (README §1): "the nav must be the item that yields. It carries
   flex: 1 1 auto; min-width: 0; the lockup and the action group are
   flex: 0 0 auto, and the action group has margin-left: auto so it stays
   right-aligned even when it wraps to a second row. Without this the row's
   min-content width overflows the viewport below ~1000px and clips." */
.lockup {
  display: flex;
  align-items: center;
  gap: 11px;
  white-space: nowrap;
  flex: 0 0 auto;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -.02em;
}
/* Keep height:auto — the mark is 276×192; pinning both axes squashes it. */
.lockup__mark { width: 112px; height: auto; }

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 26px;
  min-width: 0;
  flex: 1 1 auto;
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--ink-2);
}
.nav a:hover { color: var(--accent); }

.masthead__action {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 0 0 auto;
  margin-left: auto;
}
.nav-link {
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--ink-2);
  white-space: nowrap;
}
.nav-link:hover { color: var(--accent); }

/* ---------- 2. Hero ---------- */

.hero { border-bottom: 1px solid var(--rule-soft); }

.hero__wrap { padding: 112px 40px 92px; }

.hero__rail {
  padding: 0 28px 0 0;
  border-right: 1px solid var(--rule);
}
.hero__lines { margin-top: 10px; line-height: 2; }

.hero__body {
  padding: 0 0 0 44px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px 32px;
}

@media (max-width: 759px) {
  .hero__rail { padding: 44px 0 14px; border-right: none; }
  .hero__body { padding: 0 0 52px; }
}

/* CRITICAL (README §2): the two flex bases plus the 32px gap must fit the
   hero's body column (≈649px at a 924px viewport) or the image wraps below
   the text. 270 + 340 + 32 = 642. If either basis changes, re-check that
   img.x > h1.x + h1.width at ~920px and that it still stacks below 760px. */
.hero__text { flex: 1 1 270px; min-width: 0; }
.hero__img {
  flex: 1.6 1 340px;
  min-width: 0;
  max-width: 880px;
  width: 100%;
  height: auto;
}

.hero__h1 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(36px, 4.2vw, 58px);
  letter-spacing: -.038em;
  line-height: 1.03;
  max-width: 15ch;
  text-wrap: balance;
  color: var(--ink); /* solid fallback */
}
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .hero__h1 {
    background-image: linear-gradient(104deg, #101E33 0%, #1E3B63 42%, #C2571F 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

.lede {
  margin-top: 26px;
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 46ch;
  text-wrap: pretty;
}

/* ---------- 3–8. Stages ---------- */

.stage__grid { border-bottom: 1px solid var(--rule-soft); }

.stage__h2 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(23px, 2.4vw, 31px);
  letter-spacing: -.026em;
  line-height: 1.2;
  max-width: 24ch;
  text-wrap: balance;
}
.stage__h2--wide { max-width: 26ch; }

.stage__intro {
  margin-top: 18px;
  color: var(--ink-2);
  max-width: 64ch;
  text-wrap: pretty;
}

.proofs {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.proof { max-width: 64ch; }
.proof dt {
  display: inline;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 16.5px;
  letter-spacing: -.01em;
}
.proof dd {
  display: inline;
  margin: 0;
  color: var(--ink-2);
  font-size: 16px;
}
/* &nbsp;—&nbsp; lives in the markup; plain spaces collapse and the label
   runs into its description. */
.proof__sep { color: var(--ink-3); font-weight: 500; }

.replaces {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px dashed var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--ink-3);
}
.replaces__label {
  color: var(--accent);
  font-size: 11.5px;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.replaces s {
  text-decoration: line-through;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
}
.replaces__dot { color: var(--rule); }

/* ---------- 9. Ask ---------- */

.ask {
  background: var(--white);
  border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
}
.ask__grid { padding: 80px 0 84px; }
.ask__rail { padding: 0 28px 0 0; border-right: none; }
.ask__body {
  padding: 0 0 0 44px;
  border-left: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 32px;
}
.ask__text { flex: 1 1 300px; min-width: 0; }

@media (max-width: 759px) {
  .ask__rail { padding: 44px 0 14px; }
  .ask__body { padding: 0 0 52px; border-left: none; }
}

.chuck {
  flex: 0 1 240px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.chuck__img { width: 100%; max-width: 260px; height: auto; }
.chuck__caption {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: center;
}
.chuck__tag {
  letter-spacing: .06em;
  text-transform: none;
  font-size: 12.5px;
}

/* ---------- 10. Watch ---------- */

.film {
  background: var(--ink);
  border-bottom: 1px solid var(--rule-soft);
}
.film__grid { padding: 72px 0 76px; }
.film__rail { padding: 0 28px 0 0; border-right: 1px solid var(--rule-dark); }
.film__name { color: var(--paper); }
.film__body { padding: 0 0 0 44px; }
.film__h2 { color: var(--paper); }

@media (max-width: 759px) {
  .film__rail { padding: 44px 0 14px; border-right: none; }
  .film__body { padding: 0 0 52px; }
}

.film__video {
  width: 100%;
  max-width: 760px;
  margin-top: 28px;
  border-radius: 3px;
  background: var(--video-ground);
}
.film__caption {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .06em;
  color: var(--muted-dark);
}

/* ---------- 11. Closer ---------- */

.closer { border-bottom: 1px solid var(--rule-soft); }
.closer__wrap {
  padding: 104px 40px 110px;
  text-align: center;
}
.closer__h2 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(32px, 4.6vw, 52px);
  letter-spacing: -.038em;
  line-height: 1.04;
}

/* ---------- 12. Footer ---------- */

.footer { padding: 28px 0 44px; }
.footer__wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13.5px;
  color: var(--ink-3);
}
.footer__brand { display: flex; align-items: center; gap: 9px; }
.footer__mark { width: 18px; height: auto; opacity: .75; }
.footer__tagline { font-family: var(--font-mono); }

/* ---------- Scroll reveal ---------- */

/* landing.js adds .reveal-pending only when motion is allowed, so no-JS and
   reduced-motion visitors never see the hidden state. */
[data-reveal].reveal-pending {
  opacity: 0;
  transform: translateY(14px);
  will-change: opacity, transform;
}
[data-reveal].reveal-shown {
  opacity: 1;
  transform: none;
  transition: opacity .6s ease, transform .6s cubic-bezier(.16, 1, .3, 1);
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal].reveal-pending,
  [data-reveal].reveal-shown {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
