/* ReplyPack — replypack.com sales site.
 *
 * Deliberately hand-written CSS with no build step, no framework and no
 * dependencies: this site ships to a static host on the apex domain while
 * the product app ships to Cloud Run on app.replypack.com
 * (infra/PROVISIONING.md step 14), and the two should not share a release
 * cadence. A founder editing a headline before a call should not need a
 * toolchain to do it.
 *
 * The tokens below are copied from apps/web/app/globals.css — the product's
 * own design system ("Working Machine": flat, square corners, hairline
 * borders instead of shadows, Source Serif 4 display over IBM Plex Sans
 * body). Copied rather than imported, with the same provenance-header
 * convention the engine modules use, because a separate deploy that
 * silently drifts is better than one that breaks when the app's stylesheet
 * moves. Divergence is expected; when the app's palette changes, this file
 * is a deliberate follow-up, not an automatic one.
 *
 * Two colours carry meaning and are never used decoratively anywhere on
 * this site — the same rule the product enforces:
 *   --p-black      a redaction bar. Nothing else.
 *   --p-purple-*   "the machine proposed this; nobody has ruled on it yet".
 */

/* ── Primitives ─────────────────────────────────────────────────────────── */
:root {
  --p-charcoal-950: #161b21;
  --p-charcoal-900: #222a33;
  --p-charcoal-700: #3b4650;

  --p-ink-900: #1c2321;
  --p-ink-700: #3f4643;
  --p-ink-500: #5c6360;
  --p-ink-300: #c9cfca;
  --p-ink-200: #dde1dc;
  --p-ink-100: #e9ecea;

  --p-paper: #f6f4ef;
  --p-white: #ffffff;
  --p-black: #111412;

  --p-green-700: #155844;
  --p-green-50: #eff6f1;

  --p-amber-700: #7a4b00;
  --p-amber-100: #fcefd4;

  --p-purple-700: #5b3e9e;
  --p-purple-300: #9b7ed9;
  --p-purple-50: #f3effb;

  /* ── Semantics ────────────────────────────────────────────────────────── */
  --s-accent: var(--p-charcoal-950);
  --s-accent-hover: var(--p-charcoal-900);
  --s-bg-chrome: var(--p-charcoal-900);
  --s-ink: var(--p-ink-900);
  --s-ink-soft: var(--p-ink-700);
  --s-ink-muted: var(--p-ink-500);
  --s-line: var(--p-ink-300);
  --s-line-soft: var(--p-ink-200);
  --s-ground: var(--p-paper);
  --s-surface: var(--p-white);

  --radius: 0;
  --motion: 120ms ease-out;

  --font-serif: "Source Serif 4", Georgia, serif;
  --font-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --measure: 1080px;
}

/* ── Reset ──────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Anchored sections must clear the sticky masthead. */
  scroll-padding-top: 72px;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--s-ground);
  color: var(--s-ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

ul,
ol {
  list-style: none;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 12px;
  z-index: 1000;
  background: var(--p-white);
  color: var(--s-accent);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 16px;
  transition: top var(--motion);
}

.skip-link:focus {
  top: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Type ───────────────────────────────────────────────────────────────── */
.display,
.h2,
.h3,
.h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.display {
  font-size: clamp(38px, 5.2vw, 62px);
}

.display .beat {
  display: block;
}

.h2 {
  font-size: clamp(28px, 3.4vw, 40px);
}

.h3 {
  font-size: 20px;
  line-height: 1.25;
}

.h4 {
  font-size: 17px;
  line-height: 1.3;
}

.lede {
  font-size: 18.5px;
  line-height: 1.6;
  color: var(--s-ink-soft);
}

.body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--s-ink-soft);
}

.small {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--s-ink-soft);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--s-ink-muted);
}

/* ── Layout ─────────────────────────────────────────────────────────────── */
.wrap {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding-inline: 24px;
}

.section {
  padding-block: 88px;
}

.section--surface {
  background: var(--s-surface);
}

.section--ground {
  background: var(--s-ground);
}

.section--tint {
  background: var(--p-green-50);
}

.section--dark {
  background: var(--s-bg-chrome);
  color: var(--p-paper);
}

.section-head {
  max-width: 720px;
  margin-bottom: 48px;
}

.section-head .eyebrow {
  display: block;
  margin-bottom: 16px;
}

.section-head .h2 {
  margin-bottom: 16px;
}

/* Explicit column counts rather than `repeat(auto-fit, minmax(...))`.
   auto-fit picks the most columns that fit, which for a known item count
   produces orphans at in-between widths — at 834px the four-item grids landed
   3 + 1, with a lone card stranded on its own row. Every grid here has a fixed
   number of items, so the honest thing is to say what the counts are: a
   four-item grid goes 4 -> 2 -> 1 and never 3. Widths are mobile-first, so the
   base rule is the single column. */
.grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

/* Three short facts — they tolerate a narrow column, so they go 1 -> 3. */
.facts-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .facts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Three text-heavy cards. 2 + 1 leaves the third stranded beside a gap, so
   they hold one column until there is room for all three. */
@media (min-width: 1000px) {
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.grid--2wide {
  gap: 32px 56px;
}

@media (min-width: 760px) {
  .grid--2wide {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition:
    background-color var(--motion),
    border-color var(--motion),
    color var(--motion);
}

.btn--primary {
  background: var(--s-accent);
  border-color: var(--s-accent);
  color: var(--p-white);
}

.btn--primary:hover {
  background: var(--s-accent-hover);
}

.btn--invert {
  background: var(--p-white);
  border-color: var(--p-white);
  color: var(--s-accent);
}

.btn--invert:hover {
  background: var(--p-paper);
}

.btn--ghost {
  background: transparent;
  border-color: var(--p-ink-300);
  color: var(--p-white);
}

.btn--ghost:hover {
  background: var(--p-white);
  border-color: var(--p-white);
  color: var(--s-accent);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.link-arrow {
  font-size: 14px;
  font-weight: 600;
  color: var(--s-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--s-line);
  transition: text-decoration-color var(--motion);
}

.link-arrow:hover {
  text-decoration-color: currentColor;
}

/* ── Masthead ───────────────────────────────────────────────────────────── */
.masthead {
  background: var(--s-bg-chrome);
  color: var(--p-paper);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--s-bg-chrome);
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-block: 16px;
  border-bottom: 1px solid var(--p-ink-700);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
}

.brand__word {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--p-white);
}

/* The wordmark glyph: a bordered square holding three bars — solid,
   part-width, then outline-only. Proposed / partial / outstanding. It is
   name-agnostic on purpose (apps/web/app/components/BrandMark.tsx). */
.glyph {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border: 1.5px solid currentColor;
  color: var(--p-white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding-inline: 5px;
}

.glyph span {
  height: 3px;
  background: currentColor;
}

.glyph span:nth-child(2) {
  width: 60%;
}

.glyph span:nth-child(3) {
  background: transparent;
  border: 0.5px solid currentColor;
}

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

.topnav a {
  font-size: 14px;
  color: var(--p-ink-300);
  padding-block: 4px;
  border-bottom: 1px solid transparent;
  transition:
    color var(--motion),
    border-color var(--motion);
}

.topnav a:hover {
  color: var(--p-white);
  border-bottom-color: var(--p-white);
}

.topnav a.is-cta {
  color: var(--p-white);
  font-weight: 600;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  align-items: center;
  padding-block: 80px 96px;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1fr 1fr;
  }
}

.hero .eyebrow {
  display: block;
  color: var(--p-ink-300);
  margin-bottom: 16px;
}

.hero .display {
  color: var(--p-white);
  margin-bottom: 24px;
}

.hero__lede {
  font-size: 18.5px;
  line-height: 1.6;
  color: var(--p-ink-300);
  max-width: 540px;
  margin-bottom: 36px;
}

/* ── The hero specimen ──────────────────────────────────────────────────── */
.specimen {
  background: var(--s-surface);
  border: 1px solid var(--p-ink-700);
}

.specimen__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--s-line-soft);
}

.specimen__clock {
  color: var(--p-amber-700);
  background: var(--p-amber-100);
  padding: 4px 8px;
}

.specimen__page {
  display: grid;
  gap: 13px;
  padding: 24px 16px;
}

.specimen__line {
  display: flex;
  align-items: center;
  gap: 6px;
}

.specimen__line span {
  height: 11px;
  background: var(--p-ink-100);
}

/* The only two treatments on this site that carry meaning. Drawn with the
   same tokens the review workspace uses (globals.css .redaction-mark-*). */
.is-redacted {
  background: var(--p-black) !important;
}

.is-proposed {
  background: var(--p-purple-50) !important;
  border: 1.5px dashed var(--p-purple-300);
}

.specimen__decision {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--s-line-soft);
  background: var(--s-ground);
}

.specimen__badge {
  color: var(--p-purple-700);
  background: var(--p-purple-50);
  padding: 4px 8px;
}

.specimen__actions {
  margin-left: auto;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--s-ink);
}

.specimen__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 12px 16px;
  border-top: 1px solid var(--p-ink-700);
  background: var(--s-bg-chrome);
}

.specimen__legend li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--p-ink-300);
}

.swatch {
  width: 22px;
  height: 11px;
  flex-shrink: 0;
}

.swatch.is-proposed {
  border-width: 1px;
}

/* ── Facts strip ────────────────────────────────────────────────────────── */
.facts {
  background: var(--s-surface);
  border-bottom: 1px solid var(--s-line-soft);
  padding-block: 36px;
}

.fact {
  border-left: 2px solid var(--s-accent);
  padding-left: 16px;
}

.fact__stat {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
}

/* ── Steps ──────────────────────────────────────────────────────────────── */
.steps {
  border-top: 1px solid var(--s-line);
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

.steps li {
  border-bottom: 1px solid var(--s-line);
  padding: 28px 24px 32px 0;
}

.steps .eyebrow {
  display: block;
  margin-bottom: 14px;
}

.steps .h4 {
  margin-bottom: 10px;
}

/* ── Split (AI proposes / a person decides) ─────────────────────────────── */
.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  align-items: start;
}

@media (min-width: 860px) {
  .split {
    grid-template-columns: 1fr 1fr;
  }
}

.rule-list li {
  border-left: 2px solid var(--s-accent);
  padding: 4px 0 20px 18px;
}

.rule-list .h4 {
  margin-bottom: 8px;
}

/* ── Segment cards ──────────────────────────────────────────────────────── */
.segment {
  display: flex;
  flex-direction: column;
  background: var(--s-surface);
  border: 1px solid var(--s-line);
  border-top: 3px solid var(--s-accent);
  padding: 28px 24px;
  transition: border-color var(--motion);
}

.segment:hover {
  border-color: var(--s-ink-muted);
}

.segment .eyebrow {
  display: block;
  margin-bottom: 14px;
}

.segment .h3 {
  margin-bottom: 14px;
}

.segment__body {
  margin-bottom: 20px;
}

.ticks {
  display: grid;
  gap: 12px;
  margin: 0 0 24px;
  padding-top: 20px;
  border-top: 1px solid var(--s-line-soft);
}

.ticks li {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--s-ink);
}

.ticks li::before {
  content: "";
  width: 10px;
  height: 2px;
  margin-top: 9px;
  background: var(--s-accent);
}

.segment .link-arrow {
  margin-top: auto;
}

/* ── The pack ───────────────────────────────────────────────────────────── */
.pack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--s-line);
  border: 1px solid var(--s-line);
}

@media (min-width: 600px) {
  .pack {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .pack {
    grid-template-columns: repeat(4, 1fr);
  }
}

.pack > li {
  background: var(--s-surface);
  padding: 28px 24px;
}

.pack__rule {
  display: block;
  width: 28px;
  height: 2px;
  background: var(--s-accent);
  margin-bottom: 18px;
}

/* The redacted bundle is the one item whose rule is a redaction bar. */
.pack__rule--bar {
  background: var(--p-black);
}

.pack .h4 {
  margin-bottom: 10px;
}

/* ── Data / caveat ──────────────────────────────────────────────────────── */
.caveat {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #bfdccb;
  max-width: 780px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--s-ink-muted);
}

.caveat strong {
  color: var(--s-ink-soft);
}

/* ── FAQ ────────────────────────────────────────────────────────────────── */
.faq {
  border-top: 1px solid var(--s-line);
}

.faq details {
  border-bottom: 1px solid var(--s-line);
}

.faq summary {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding-block: 22px;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary:hover {
  color: var(--s-accent-hover);
}

.faq summary::before {
  content: "›";
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--s-ink-muted);
  transition: transform var(--motion);
}

.faq details[open] summary::before {
  transform: rotate(90deg);
}

.faq p {
  margin: 0 0 24px 30px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--s-ink-soft);
}

/* ── Closing CTA + footer ───────────────────────────────────────────────── */
.closing {
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
}

.closing .eyebrow {
  display: block;
  color: var(--p-ink-300);
  margin-bottom: 16px;
}

.closing .h2 {
  color: var(--p-white);
  margin-bottom: 20px;
}

.closing__lede {
  font-size: 17px;
  line-height: 1.65;
  color: var(--p-ink-300);
  margin-bottom: 36px;
}

.closing .btn-row {
  justify-content: center;
}

.site-footer {
  background: var(--s-ground);
  border-top: 1px solid var(--s-line);
  padding-block: 32px;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  font-size: 13px;
  color: var(--s-ink-muted);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-left: auto;
}

.site-footer a:hover {
  color: var(--s-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Small screens ──────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .section {
    padding-block: 64px;
  }

  .wrap {
    padding-inline: 20px;
  }

  /* Four section anchors wrap onto a second row and shove the sign-in link
     out on its own. On a page whose entire navigation is a scroll, the
     anchors are the part that can go; the link that leaves the site stays. */
  .topnav a:not(.is-cta) {
    display: none;
  }

  .hero {
    padding-block: 48px 64px;
  }

  .steps li {
    padding-right: 0;
  }
}

@media (max-width: 480px) {
  .btn-row {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ── Print — a sales page gets printed to PDF and emailed ───────────────── */
@media print {
  .topbar,
  .skip-link,
  .btn-row {
    display: none;
  }

  .section,
  .masthead,
  .section--dark {
    background: #fff !important;
    color: #000 !important;
    padding-block: 24px;
  }

  .hero .display,
  .closing .h2 {
    color: #000 !important;
  }

  .hero__lede,
  .closing__lede,
  .hero .eyebrow,
  .closing .eyebrow {
    color: #333 !important;
  }

  .faq details {
    /* Print every answer, not just the ones a reader happened to open. */
    display: block;
  }

  .faq p {
    display: block !important;
  }
}
