/* ============================================================
   /product — design system v2.

   Measured against Legora, Harvey and Affinity (3 product pages
   each). What they do and v1 did not:

     · Separation is by GROUND, not by rule. Legora draws exactly
       one border on a whole page; v1 drew 114 hairline edges.
     · Neutrals are near-achromatic. Their off-whites sit at
       chroma 1-5; the old cream (#f5f2e8) was chroma 13 and read
       as beige.
     · Surfaces are FILLED, never outlined.
     · Few radii, applied consistently.

   Palette: stone + black, with a dark blue-grey accent. Texture
   is generated (SVG turbulence), so it costs nothing to ship.
   ============================================================ */

.product-page {
  /* -- Stone: near-achromatic, chroma <= 4 -- */
  --stone-0: #fafaf9; /* page ground             */
  --stone-1: #f1f0ee; /* alternate band          */
  --stone-2: #e7e6e3; /* surface on a stone band */

  /* -- Ink -- */
  --ink: #0b0b0c; /* full-bleed dark band    */
  --ink-2: #161618; /* raised surface on ink   */

  /* -- Accent: dark blue-grey -- */
  --slate: #39434f;
  --slate-deep: #2b333c;
  --slate-soft: #5a6674;

  /* -- Type -- */
  --text: #101012;
  --text-muted: rgba(16, 16, 18, 0.62);
  /* 0.60, not 0.42: at 0.42 this token rendered 2.79:1 on --stone-0 and
     failed WCAG AA on the eyebrows and doc meta lines. 0.60 gives 4.9:1. */
  --text-faint: rgba(16, 16, 18, 0.6);
  --on-dark: #f1f0ee;
  --on-dark-muted: rgba(241, 240, 238, 0.66);
  /* 0.52, not 0.42: at 0.42 the plate tags and close-band links measured
     3.71:1 on --ink. 0.52 gives 5.2:1. */
  --on-dark-faint: rgba(241, 240, 238, 0.52);

  /* System UI for headings — FK Display is retired. */
  --display: 'Geist Variable', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', monospace;

  /* -- Square everywhere; only buttons are pills. -- */
  --r: 0;
  --pill: 999px;

  /* -- Motion (docs/solutions-research.md §3). Use these, nothing else. -- */
  --motion-fast: 160ms;
  --motion-base: 400ms;
  --motion-slow: 700ms;
  --motion-ease: cubic-bezier(0.22, 1, 0.36, 1);

  --gutter: 12rem;
  --measure: 1180px;

  background: var(--stone-0) !important;
  color: var(--text);
}
@media (max-width: 1440px) {
  .product-page {
    --gutter: 1.5rem;
  }
}

/* styles.css paints a fixed dark sheet via body::before. */
.product-page::before {
  background-color: var(--stone-0);
}
/* styles.css makes <main> a shrink-wrapping flex box with a fade-in. */
.product-page main.pd {
  display: block;
  min-height: auto;
  padding: 0;
  opacity: 1;
  animation: none;
}

.pd-hero-inner,
.pd-pillars-inner,
.pd-problem-inner,
.pd-block-inner,
.pd-caps-inner,
.pd-stack-inner,
.pd-numbers-inner,
.pd-proof-inner,
.pd-next-inner,
.pd-close-inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
@media (min-width: 1441px) {
  .pd-hero-inner,
  .pd-pillars-inner,
  .pd-problem-inner,
  .pd-block-inner,
  .pd-caps-inner,
  .pd-stack-inner,
  .pd-numbers-inner,
  .pd-proof-inner,
  .pd-next-inner,
  .pd-close-inner {
    max-width: none;
  }
}

/* ---- Generated grain. Over dark bands only, where it reads. ---- */
.pd-tex {
  position: relative;
  isolation: isolate;
}
.pd-tex::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.3'/%3E%3C/svg%3E");
}
.pd-tex > * {
  position: relative;
  z-index: 1;
}

/* ---------- Hero — copy left, shot bleeding off the right edge ----------
   Reference (Legora /product/workflows): the eyebrow and headline sit at
   the top of a narrow left column, the subhead and CTA drop to the bottom
   of it, and the image runs past the right edge of the page. */
.pd-hero {
  position: static;
  padding: 0;
  /* Pure white first screen, as on the reference. */
  background: #ffffff;
}
.pd-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.3fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: stretch;
  max-width: none;
  padding-left: var(--gutter);
  /* The shot stops at the right margin, aligned with the nav's Join
     waitlist button — the page's content edge. No bleed. */
  padding-right: var(--gutter);
  /* The first screen is the hero: nav is 72px, this takes the rest, so the
     pillar and problem bands stay below the fold. */
  min-height: calc(100vh - 72px);
  min-height: calc(100dvh - 72px);
  /* Small, equal breathing space above and below BOTH columns: the shot
     starts just under the nav and ends flush with the CTA line, never
     touching the fold. */
  /* Tight under the nav; roomier above the fold. */
  padding-top: 0.75rem;
  padding-bottom: clamp(1.25rem, 2vw, 2rem);
  box-sizing: border-box;
}

.pd-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 3rem;
  /* Extra top offset for the eyebrow only — the bottom edge (CTA) sits
     flush with the shot's bottom edge. */
  padding: clamp(2rem, 4vw, 3.5rem) 0 0;
}

.pd-eyebrow {
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 1.5rem;
}
.pd-eyebrow a {
  color: inherit;
  text-decoration: none;
}
.pd-eyebrow a:hover {
  color: var(--text);
}
.pd-eyebrow span {
  margin: 0 0.4em;
}

.pd-h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--text);
  max-width: 15ch;
  margin: 0;
}

.pd-hero-foot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
}
.pd-sub {
  font-size: 0.92rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 40ch;
  margin: 0;
}

.pd-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 1.4rem;
  background: var(--slate);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--pill);
  white-space: nowrap;
  transition: background 0.2s ease;
}
.pd-cta:hover {
  background: var(--slate-deep);
}
.pd-cta span {
  transition: transform 0.2s ease;
}
.pd-cta:hover span {
  transform: translateX(3px);
}

/* The shot fills its column and runs to the page edge. */
.pd-hero-shot {
  /* The image is taken out of flow so its intrinsic ratio can never drive
     the row height — a square source in a wide column was forcing the hero
     past the viewport and pushing the CTA below the fold. */
  position: relative;
  overflow: hidden;
  min-height: 0;
}
.pd-hero-shot picture {
  display: block;
}
.pd-hero-shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
}
/* The schematic motif needs breathing room rather than cropping. */
.pd-hero-shot .pm {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem clamp(2rem, 4vw, 4rem) 2rem 0;
}

/* Pages with no shot (overview, trust) keep the copy column full width. */
.pd-hero-solo .pd-hero-inner,
.pd-hero-inner.pd-hero-solo {
  grid-template-columns: minmax(0, 1fr);
  padding-right: var(--gutter);
}
.pd-hero-solo .pd-h1 {
  max-width: 20ch;
}
.pd-hero-solo .pd-sub {
  max-width: 58ch;
}
.pd-hero-solo .pd-hero-copy {
  gap: 2rem;
}

@media (max-width: 980px) {
  .pd-hero-inner {
    grid-template-columns: 1fr;
    padding-right: var(--gutter);
  }
  .pd-hero-copy {
    gap: 2rem;
  }
  .pd-hero-shot {
    min-height: 0;
  }
  .pd-hero-shot img {
    height: auto;
  }
}

/* ---------- Pillars — a stone band, no rules ---------- */
.pd-pillars {
  background: var(--stone-1);
  padding: clamp(2.75rem, 5vw, 4rem) 0;
}
.pd-pillars-inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3.5rem);
}
.pd-pillar h2 {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  margin: 0 0 0.6rem;
}
.pd-pillar p {
  font-size: 0.92rem;
  font-weight: 300;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0;
}
@media (max-width: 820px) {
  .pd-pillars-inner {
    grid-template-columns: 1fr;
  }
}

/* ---------- Problem — the dark moment ---------- */
.pd-problem {
  background: var(--ink);
  padding: clamp(4.5rem, 9vw, 8rem) 0;
}
.pd-problem-inner p {
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.8vw, 2.3rem);
  font-weight: 400;
  line-height: 1.28;
  letter-spacing: -0.01em;
  color: var(--on-dark);
  max-width: 26ch;
  margin: 0;
}

/* ---------- Feature blocks — one continuous band, nothing ruled ----------
   The figure simply changes side; the ground does not change. */
.pd-block {
  padding: clamp(3.5rem, 6vw, 5.5rem) 0;
  background: var(--stone-0);
}
.pd-block:first-of-type {
  padding-top: clamp(5rem, 9vw, 8rem);
}
.pd-block:last-of-type {
  padding-bottom: clamp(5rem, 9vw, 8rem);
}
/* Legora's ratio: the copy takes roughly a third, the figure the rest —
   and the figure keeps the wide column on BOTH sides. The old flip only
   swapped order, which dropped a left-side figure into the narrow track
   and shrank it. */
.pd-block-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.55fr) minmax(0, 1.45fr);
  gap: clamp(2rem, 5vw, 5rem);
  /* Top-aligned like the reference: the copy starts level with the top
     of the figure rather than floating at its vertical centre. */
  align-items: start;
}
.pd-block-flip .pd-block-inner {
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.55fr);
}
.pd-block-flip .pd-block-copy {
  order: 2;
}
.pd-block-flip .pd-block-figure {
  order: 1;
}
.pd-block-n {
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  color: var(--slate-soft);
  margin: 0 0 1rem;
}
.pd-block-copy h2 {
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.1vw, 1.75rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--text);
  max-width: 20ch;
  margin: 0 0 0.85rem;
}

/* Plain sentence under the heading; the technical aside is a true
   footnote beneath it, quiet and last — it used to render as a bold
   lede, which led every block with architecture jargon. */
.pd-block-body {
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text);
  max-width: 42ch;
  margin: 0 0 1.1rem;
}
.pd-block-foot {
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--text-faint);
  max-width: 42ch;
  margin: 0;
}
.pd-block-note {
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.74rem;
  line-height: 1.7;
  color: var(--slate-soft);
  max-width: 46ch;
  margin: 0;
}
@media (max-width: 900px) {
  .pd-block-inner,
  .pd-block-flip .pd-block-inner {
    grid-template-columns: 1fr;
  }
  .pd-block-flip .pd-block-copy,
  .pd-block-flip .pd-block-figure {
    order: initial;
  }
}

/* Figure plate — a filled surface, awaiting real product imagery. */
/* A real product-UI still in the block figure. Shown at its natural
   ratio — screenshots are composed, never cropped. */
.pd-block-shot {
  display: block;
}
.pd-block-shot img {
  display: block;
  width: 100%;
  height: auto;
}
.pd-block-clip {
  display: block;
  width: 100%;
  height: auto;
  /* The poster paints behind the element (inline background-image) over
     stone, so a decoding video can never flash black or show the page. */
  background-color: var(--stone-1);
  background-size: cover;
  background-position: center;
}

.pd-plate {
  aspect-ratio: 16 / 10;
  background: var(--ink);
  /* Image holders are square-cornered, as on all three references. */
  border-radius: 0;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.pd-plate-tag,
.pd-plate-cap {
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--on-dark-faint);
}
.pd-plate-cap {
  text-transform: none;
  letter-spacing: 0;
  color: var(--on-dark-muted);
}
.pd-plate-art {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1.5rem 0;
}
.pd-plate-bar {
  height: 8px;
  border-radius: var(--pill);
  background: rgba(241, 240, 238, 0.14);
}
.pd-plate-bar.pd-plate-accent {
  background: var(--slate-soft);
}

/* ---------- Capability band — filled cards, no grid lines ---------- */
.pd-caps {
  background: var(--stone-1);
  padding: clamp(4rem, 8vw, 6.5rem) 0;
}
.pd-caps-head,
.pd-next-inner h2 {
  font-family: var(--display);
  font-size: clamp(1.4rem, 2.3vw, 1.9rem);
  font-weight: 400;
  color: var(--text);
  margin: 0 0 2.25rem;
}
.pd-caps-grid,
.pd-next-grid,
.pd-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}
.pd-cap {
  background: var(--stone-0);
  border-radius: var(--r);
  padding: 1.75rem;
}
.pd-cap h3 {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  margin: 0 0 0.55rem;
}
.pd-cap p {
  font-size: 0.88rem;
  font-weight: 300;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0;
}

/* ---------- Proof — the accent band ---------- */
.pd-proof {
  background: var(--slate);
  padding: clamp(4.5rem, 9vw, 7rem) 0;
}
.pd-quote {
  margin: 0 0 2.5rem;
}
.pd-quote blockquote {
  font-family: var(--display);
  font-size: clamp(1.4rem, 2.8vw, 2.2rem);
  font-weight: 400;
  line-height: 1.3;
  color: #fff;
  max-width: 26ch;
  margin: 0 0 1.25rem;
}
.pd-quote blockquote::before {
  content: '“';
}
.pd-quote blockquote::after {
  content: '”';
}
.pd-quote figcaption {
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}
.pd-trust {
  list-style: none;
  margin: 0 0 1.75rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.pd-trust li {
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.72rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--pill);
  padding: 0.5rem 1rem;
}
/* .pd-link used to be `color: #fff; opacity: .75` unconditionally, which only
   worked because every use happened to sit on a dark band. Dropped on a light
   section it rendered #fefefe on #fafaf9 — 1.03:1, invisible. It now defaults
   to the light-background colour, and the dark bands opt in. */
.pd-link {
  font-size: 0.9rem;
  color: var(--slate);
  text-decoration: none;
  transition:
    color 0.2s ease,
    opacity 0.2s ease;
}
.pd-link:hover {
  color: var(--ink);
}

.pd-problem .pd-link,
.pd-proof .pd-link,
.pd-close .pd-link {
  color: #fff;
  opacity: 0.75;
}
.pd-problem .pd-link:hover,
.pd-proof .pd-link:hover,
.pd-close .pd-link:hover {
  color: #fff;
  opacity: 1;
}

/* ---------- Boundary — now a quiet note inside the capability band ---------- */

/* ---------- Where to next ---------- */
.pd-next {
  background: var(--stone-1);
  padding: clamp(4rem, 7vw, 5.5rem) 0;
}
.pd-next-card,
.pd-tile {
  position: relative;
  display: block;
  background: var(--stone-0);
  border-radius: var(--r);
  padding: 1.75rem;
  text-decoration: none;
  transition: background 0.2s ease;
}
.pd-next-card:hover,
.pd-tile:hover {
  background: #fff;
}
.pd-next-card h3,
.pd-tile h3 {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  margin: 0 0 0.55rem;
}
.pd-next-card p,
.pd-tile p {
  font-size: 0.88rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0 2.5ch 0 0;
}
.pd-next-card span,
.pd-tile span {
  position: absolute;
  right: 1.75rem;
  bottom: 1.75rem;
  color: var(--slate-soft);
  transition: transform 0.2s ease;
}
.pd-next-card:hover span,
.pd-tile:hover span {
  transform: translateX(3px);
}

/* ---------- Overview: stack and numbers ---------- */
.pd-stack {
  background: var(--stone-0);
  padding: clamp(4rem, 8vw, 6.5rem) 0;
}
.pd-tile {
  background: var(--stone-1);
}
.pd-substrate {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.75rem;
  margin-top: 12px;
  padding: 1.6rem 1.75rem;
  background: var(--ink);
  border-radius: var(--r);
}
.pd-substrate strong {
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.76rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #fff;
  margin-right: 0.5rem;
}
.pd-substrate span {
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.72rem;
  color: var(--on-dark-muted);
}

.pd-numbers {
  background: var(--stone-1);
  padding: clamp(3.5rem, 6vw, 5rem) 0;
}
.pd-numbers-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
}
.pd-number {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.pd-number strong {
  font-family: var(--display);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 400;
  line-height: 1;
  color: var(--text);
}
.pd-number span {
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--slate-soft);
}

/* ---------- Close ---------- */
.pd-close {
  background: var(--ink);
  padding: clamp(5rem, 9vw, 8rem) 0;
}
.pd-close-inner {
  text-align: center;
}
.pd-close-inner h2 {
  font-family: var(--display);
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--on-dark);
  max-width: 20ch;
  margin: 0 auto 2.25rem;
}
.pd-close .pd-cta {
  background: var(--stone-0);
  color: var(--text);
}
.pd-close .pd-cta:hover {
  background: #fff;
}

/* ---------- Sibling links in the close band ---------- */
.pd-next-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 2rem;
  margin-top: 3rem;
}
.pd-next-links a {
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.74rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--on-dark-faint);
  text-decoration: none;
  transition: color 0.2s ease;
}
.pd-next-links a:hover {
  color: var(--on-dark);
}

/* ==========================================================================
   Long-form documents (privacy, terms)
   Two columns on desktop: a sticky title rail at left, prose at right.
   Same "separation by ground, no rules" premise as the rest of v2.
   ========================================================================== */

.pd-doc {
  background: var(--stone-0);
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  padding-block: clamp(4rem, 9vw, 7.5rem);
}

.pd-doc-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.5fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.pd-doc-rail {
  position: sticky;
  top: 7rem;
}

/* h2 as well as h1: /privacy and /terms have no other heading so the rail is
   their h1, but /blog and /careers already have an h1 in the hero. */
.pd-doc-rail h1,
.pd-doc-rail h2 {
  font-family: var(--display);
  font-size: clamp(2rem, 3.4vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--text);
  margin: 0;
}

.pd-doc-meta {
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.6875rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 1.25rem 0 0;
}

.pd-doc-body {
  max-width: 68ch;
}

.pd-doc-body h2 {
  font-family: var(--display);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text);
  margin: 2.75rem 0 0.75rem;
}

.pd-doc-body > h2:first-child {
  margin-top: 0;
}

.pd-doc-body p,
.pd-doc-body li {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.pd-doc-body p {
  margin: 0 0 1rem;
}

.pd-doc-body ul {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
}

.pd-doc-body li {
  margin-bottom: 0.4rem;
}

.pd-doc-body a {
  color: var(--slate);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.pd-doc-body a:hover {
  color: var(--ink);
}

@media (max-width: 900px) {
  .pd-doc-inner {
    grid-template-columns: 1fr;
  }
  .pd-doc-rail {
    position: static;
  }
}
