/* ==================================================================
   Peptide Corpus — public landing page, below-the-fold styles.

   Pairs with the critical block inlined in web/index.html. That block owns
   the nav, the hero and the shared primitives (.wrap, .btn, .chip, .sr-only,
   the reduced-motion rule). Nothing here repeats them — if you need a
   primitive, it is already defined there. This file starts at the proof
   section and runs to the footer.

   Every colour is a semantic alias from /assets/tokens/colors.css. No raw ramp
   values, no hex.
   ================================================================== */

/* ------------------------------------------------------------------
   Section rhythm
   ------------------------------------------------------------------ */
main section {
  padding: clamp(48px, 6vw, 84px) 0;
  scroll-margin-top: 80px; /* sticky nav must not cover an anchored heading */
}

/* Alternating bands give the page structure without a single decorative image. */
.band {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.sec-head {
  max-width: 58ch;
  margin-bottom: clamp(28px, 3.5vw, 44px);
}
.sec-head-center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.sec-head h2 {
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: var(--weight-black);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.sec-head .sub {
  margin-top: var(--space-4);
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: var(--leading-relaxed);
  color: var(--text-muted);
}

/* ------------------------------------------------------------------
   Proof — the co-formulation vial check
   ------------------------------------------------------------------ */
.vial {
  max-width: 860px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.vial-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: var(--space-4);
  align-items: end;
  padding: var(--space-5);
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.vial-field {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
}
.vial-field label {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--text-muted);
}
.vial-field select {
  width: 100%;
  min-height: var(--control-h-lg);
  padding: 0 var(--space-3);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
}
.vial-field select:hover {
  border-color: var(--text-subtle);
}

.vial-result {
  padding: var(--space-5);
}

.vial-verdict {
  margin-bottom: var(--space-4);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  line-height: var(--leading-snug);
  text-wrap: balance;
}

.vial-axes {
  display: grid;
  gap: var(--space-1);
}
.vial-axis {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: var(--space-4);
  align-items: baseline;
  padding: var(--space-3) 0;
  border-top: 1px solid var(--border-subtle);
}
.vial-axis dt {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
}
.vial-axis dd {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--text-muted);
}

/* --text-muted, not --text-subtle: this is copy, and --text-subtle measures
   2.3:1 on --bg. The same choice is made everywhere small print carries meaning. */
.vial-foot {
  padding: 0 var(--space-5) var(--space-5);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* Revealed only by the <noscript> block in the head. */
.noscript-note {
  display: none;
  padding: 0 var(--space-5) var(--space-5);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

@media (max-width: 720px) {
  .vial-controls {
    grid-template-columns: minmax(0, 1fr);
  }
  .vial-axis {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-2);
  }
}

/* ------------------------------------------------------------------
   What it does — three capabilities, not a twelve-icon grid
   ------------------------------------------------------------------ */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
}

.cap {
  padding: var(--space-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.cap-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: var(--space-4);
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-soft-border);
  border-radius: var(--radius-sm);
}
.cap-icon svg {
  width: 22px;
  height: 22px;
}

.cap h3 {
  margin-bottom: var(--space-2);
  font-size: var(--text-xl);
  font-weight: var(--weight-extrabold);
  letter-spacing: -0.01em;
}
.cap p {
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--text-muted);
}

.cap-detail {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px dashed var(--border);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: var(--leading-relaxed);
  color: var(--text);
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .cap-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ------------------------------------------------------------------
   Comparison — by category, never by competitor name
   ------------------------------------------------------------------ */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.table-scroll:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.cmp {
  width: 100%;
  min-width: 660px;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.cmp th,
.cmp td {
  padding: var(--space-4);
  text-align: center;
  border-bottom: 1px solid var(--border-subtle);
}
.cmp thead th {
  font-size: var(--text-xs);
  font-weight: var(--weight-extrabold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--border);
}
.cmp tbody th[scope="row"] {
  text-align: left;
  font-weight: var(--weight-semibold);
  white-space: nowrap;
}
.cmp tbody tr:last-child th,
.cmp tbody tr:last-child td {
  border-bottom: 0;
}

/* Our column is tinted, not ticked-out: it carries a dash of its own. */
.cmp .is-us {
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}
.cmp thead .is-us {
  color: var(--accent);
  background: var(--accent-soft);
}

/* Marks carry a glyph AND a visually-hidden word, so colour is never the
   only channel. */
.m {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  line-height: 1;
}
/* --text-subtle and --warning both land near 2.5:1 on the surface, under the
   3:1 floor for a graphical object. Darkened against --text so the glyph is
   legible without leaving the semantic palette. */
.m-yes { color: var(--success); }
.m-no { color: var(--text-muted); }
.m-part { color: color-mix(in srgb, var(--warning) 84%, var(--text)); }

.cmp-notes {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-5);
  max-width: 72ch;
}
.cmp-notes li {
  display: flex;
  gap: var(--space-3);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--text-muted);
}

/* ------------------------------------------------------------------
   Where the data comes from — the ladder and the trust points
   ------------------------------------------------------------------ */
.trust {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 52px);
  align-items: start;
}

/* An actual ladder: two rails, seven rungs. The rungs step down in accent
   strength so the hierarchy reads before the labels do. */
.ladder {
  position: relative;
  padding: var(--space-4) var(--space-4);
}
.ladder::before,
.ladder::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--border-strong);
  border-radius: var(--radius-pill);
}
.ladder::before { left: 0; }
.ladder::after { right: 0; }

.rung {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px var(--space-3);
  align-items: baseline;
  margin-bottom: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-xs);
  box-shadow: var(--shadow-xs);
}
.rung:last-child { margin-bottom: 0; }

.rung:nth-child(2) { border-left-color: color-mix(in srgb, var(--accent) 84%, var(--border)); }
.rung:nth-child(3) { border-left-color: color-mix(in srgb, var(--accent) 68%, var(--border)); }
.rung:nth-child(4) { border-left-color: color-mix(in srgb, var(--accent) 52%, var(--border)); }
.rung:nth-child(5) { border-left-color: color-mix(in srgb, var(--accent) 36%, var(--border)); }
.rung:nth-child(6) { border-left-color: color-mix(in srgb, var(--accent) 20%, var(--border)); }
.rung:nth-child(7) { border-left-color: var(--border-strong); }

.rung-n {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--text-muted);
}
.rung-id {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  overflow-wrap: anywhere;
}
.rung-gloss {
  grid-column: 2;
  font-size: var(--text-xs);
  line-height: var(--leading-relaxed);
  color: var(--text-muted);
}

.trust-points {
  display: grid;
  gap: var(--space-5);
}
.trust-points h3 {
  margin-bottom: var(--space-2);
  font-size: var(--text-lg);
  font-weight: var(--weight-extrabold);
}
.trust-points p {
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--text-muted);
}

.ondevice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-top: clamp(28px, 3.5vw, 44px);
  padding: var(--space-4) var(--space-5);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
}

@media (max-width: 900px) {
  .trust {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ------------------------------------------------------------------
   Pricing — two columns, no third, no countdown
   ------------------------------------------------------------------ */
.price-toggle {
  display: inline-flex;
  gap: 2px;
  margin: 0 auto clamp(24px, 3vw, 36px);
  padding: 3px;
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
}
/* The toggle is centred by its own row rather than by the section, so the
   plans below can stay left-aligned inside their cards. */
#pricing .price-toggle {
  display: flex;
  width: max-content;
}

.pt-btn {
  min-height: var(--control-h-sm);
  padding: 0 var(--space-5);
  background: transparent;
  color: var(--text-muted);
  border: 0;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
}
.pt-btn.is-on {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-xs);
}

.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
  align-items: start;
}

.plan {
  display: grid;
  gap: var(--space-4);
  padding: clamp(24px, 3vw, 32px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.plan-pro {
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-md);
}

.plan-name {
  font-size: var(--text-xl);
  font-weight: var(--weight-extrabold);
}
.plan-price {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}
.plan-amt {
  font-family: var(--font-mono);
  font-size: clamp(32px, 4vw, 42px);
  font-weight: var(--weight-extrabold);
  letter-spacing: -0.02em;
}
.plan-per {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  color: var(--text-muted);
}
.plan-note,
.plan-lead {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--text-muted);
}
.plan-lead {
  margin-bottom: calc(var(--space-2) * -1);
  color: var(--text);
  font-weight: var(--weight-semibold);
}

.plan-list {
  display: grid;
  gap: var(--space-3);
}
.plan-list li {
  position: relative;
  padding-left: var(--space-6);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}
.plan-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 12px;
  height: 6px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

.price-foot {
  margin-top: var(--space-6);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

@media (max-width: 820px) {
  .plans {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------ */
.site-foot {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
}

.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 48px);
  padding: clamp(40px, 5vw, 64px) 0 var(--space-8);
}

.foot-about .brand {
  margin-bottom: var(--space-4);
}
.foot-disc {
  max-width: 46ch;
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--text-muted);
}
.foot-disc + .foot-disc {
  margin-top: var(--space-3);
}

.foot-col h2 {
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--weight-extrabold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}
.foot-col ul {
  display: grid;
  gap: var(--space-3);
}
.foot-col a {
  font-size: var(--text-sm);
  color: var(--text-muted);
  overflow-wrap: anywhere;
}
.foot-col a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* Policy links sit under the section columns, one step quieter — present and findable without
   competing with the nav they follow. The generated pages get this row from scripts/lib/layout.mjs
   and style it in doc.css; the homepage is hand-written and loads site.css, not doc.css, so the
   equivalent rule has to live here. Do not "fix" that by importing doc.css: it is the document
   stylesheet and would restyle the whole landing page.

   ONE DELIBERATE DIVERGENCE from doc.css's .foot-legal, which sets color: var(--text-subtle).
   design/tokens/colors.css states that --text-subtle is decoration only (2.32:1 — well under the
   4.5:1 AA floor) and that meaningful small print belongs on --text-muted. A medical disclaimer on
   a health site is the definition of meaningful, so the size drops a step and the colour does not. */
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
}
.foot-links a {
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.foot-links a:hover {
  color: var(--text);
  text-decoration: underline;
}

.foot-legal {
  padding-bottom: var(--space-6);
}
.foot-legal a {
  font-size: var(--text-xs);
}

.foot-bar {
  padding: var(--space-5) 0;
  border-top: 1px solid var(--border);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

@media (max-width: 760px) {
  .foot-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The free tier lists what ships today above, what needs the app below. The second list is dimmed
   and labelled rather than hidden: the roadmap is worth showing, but it must not read as available. */
.plan-soon { margin: 14px 0 6px; font-size: 11px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-subtle); }
.plan-list-soon li { color: var(--text-subtle); }
.plan-list-soon li::marker { color: var(--text-subtle); }

/* Inline "not yet" marker, same job as .plan-soon in the pricing table: the roadmap stays visible
   without reading as shipped. Inline rather than a block so it sits inside the sentence it qualifies. */
.cap-soon { display: inline-block; margin-right: 5px; padding: 1px 7px; border-radius: var(--r-pill, 999px);
  border: 1px dashed var(--border-strong); font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--text-subtle); vertical-align: 1px; }
