/* Pincite — placeholder marketing site.
   Spec: docs/MARKETING_SITE_SPEC.md
   Constraints that are NOT stylistic preferences (spec §0.4, §6):
     - no external assets: no webfonts, no CDN, no remote images
     - no JavaScript: dark mode is prefers-color-scheme only
     - no inline styles anywhere (the _headers CSP forbids them) */

:root {
  --bg: #fbf9f5;
  --surface: #ffffff;
  --rule: #e4ded1;
  --rule-soft: #efeae0;
  --ink: #1c1b18;
  --ink-muted: #56534b;
  --accent: #6d2020;
  --code-bg: #f0ebe1;
  --redact: #ddd6c8;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --measure: 38rem;
  --page: 46rem;

  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5rem;
  --step-3: 2rem;
  --step-4: 2.75rem;

  --space-1: 0.5rem;
  --space-2: 0.875rem;
  --space-3: 1.375rem;
  --space-4: 2.25rem;
  --space-5: 3.5rem;
  --space-6: 5rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141312;
    --surface: #1b1917;
    --rule: #302c27;
    --rule-soft: #24211e;
    --ink: #e8e4dc;
    --ink-muted: #a29c91;
    --accent: #e08b8b;
    --code-bg: #24211e;
    --redact: #322e29;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

main {
  max-width: var(--page);
  margin: 0 auto;
  padding: var(--space-6) 1.5rem 0;
}

p { margin: 0 0 var(--space-3); max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

h1, h2, h3 {
  color: var(--ink);
  text-wrap: balance;
}

h1 {
  font-size: var(--step-4);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 var(--space-3);
}

h2 {
  font-size: var(--step-3);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.018em;
  margin: 0 0 var(--space-3);
}

h3 {
  font-size: var(--step-1);
  font-weight: 640;
  line-height: 1.3;
  letter-spacing: -0.008em;
  margin: 0 0 var(--space-1);
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background-color: var(--code-bg);
  padding: 0.12em 0.36em;
  border-radius: 3px;
  word-break: break-word;
}

/* ---- hero ---------------------------------------------------------- */

.hero {
  padding-bottom: var(--space-5);
}

.lead {
  font-size: var(--step-2);
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -0.012em;
  color: var(--accent);
  margin-bottom: var(--space-3);
  max-width: 30ch;
}

.hero-sub {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--ink-muted);
  margin-bottom: 0;
}

/* ---- sections ------------------------------------------------------ */

section {
  padding: var(--space-5) 0;
  border-top: 1px solid var(--rule);
}

section:last-of-type {
  padding-bottom: var(--space-5);
}

/* ---- problem list -------------------------------------------------- */

.failure-list {
  list-style: none;
  margin: var(--space-4) 0 0;
  padding: 0;
  max-width: var(--measure);
}

.failure-list li {
  padding: 0 0 var(--space-3) var(--space-3);
  border-left: 2px solid var(--rule);
  margin-bottom: var(--space-3);
}

.failure-list li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
}

.failure-list strong {
  display: block;
  font-weight: 650;
  margin-bottom: 0.15rem;
}

/* ---- pillar cards -------------------------------------------------- */

.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  margin-top: var(--space-4);
  background-color: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
}

@media (min-width: 40rem) {
  .cards-grid { grid-template-columns: 1fr 1fr; }
}

.card {
  background-color: var(--surface);
  padding: var(--space-3) var(--space-3) var(--space-4);
}

.card p {
  color: var(--ink-muted);
  margin-bottom: 0;
  font-size: 1rem;
  max-width: none;
}

/* ---- transcript illustration --------------------------------------- */
/* Structure only. No speech content is shown — the bars are redaction,
   not placeholder text (spec §5: do not fake it). */

.transcript-figure {
  margin: var(--space-4) 0 0;
}

.transcript {
  background-color: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: var(--space-3);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.5;
  overflow-x: auto;
}

.tx-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.tx-line:first-child { margin-top: 0; }

.tx-speaker {
  font-weight: 650;
  color: var(--ink);
  white-space: nowrap;
}

.tx-flag {
  font-weight: 400;
  color: var(--accent);
}

.tx-time {
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tx-body {
  margin: 0.3rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  max-width: none;
}

.tx-redact {
  display: block;
  height: 0.62em;
  border-radius: 2px;
  background-color: var(--redact);
}

.w-3 { width: 2.2rem; }
.w-4 { width: 3.1rem; }
.w-5 { width: 4rem; }
.w-6 { width: 5rem; }
.w-7 { width: 6.2rem; }
.w-8 { width: 7.4rem; }
.w-9 { width: 8.8rem; }

.tx-gap {
  margin: var(--space-2) 0 0;
  padding: 0.3rem 0.5rem;
  color: var(--accent);
  background-color: var(--code-bg);
  border-left: 2px solid var(--accent);
  border-radius: 0 3px 3px 0;
  font-size: 0.78125rem;
  max-width: none;
}

.transcript-figure figcaption {
  margin-top: var(--space-2);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink-muted);
  max-width: var(--measure);
}

/* ---- steps --------------------------------------------------------- */

.steps {
  list-style: none;
  counter-reset: step;
  margin: var(--space-4) 0 0;
  padding: 0;
  max-width: var(--measure);
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.75rem;
  margin-bottom: var(--space-4);
}

.steps li:last-child { margin-bottom: 0; }

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.05em;
  width: 1.85rem;
  height: 1.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rule);
  border-radius: 50%;
  font-size: 0.875rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  background-color: var(--surface);
}

.steps p {
  color: var(--ink-muted);
  margin-bottom: 0;
}

/* ---- architecture -------------------------------------------------- */

.arch-list {
  margin: var(--space-4) 0 0;
  padding-left: 1.1rem;
  max-width: var(--measure);
}

.arch-list li {
  margin-bottom: var(--space-2);
  padding-left: 0.3rem;
}

.arch-list li:last-child { margin-bottom: 0; }

.arch-list::marker { color: var(--ink-muted); }

.status-callout {
  margin-top: var(--space-4);
  padding: var(--space-3);
  background-color: var(--surface);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 0 4px 4px 0;
  max-width: var(--measure);
}

.status-callout p {
  margin-bottom: 0;
  color: var(--ink-muted);
  font-size: 1rem;
}

.status-callout strong { color: var(--ink); }

/* ---- footer -------------------------------------------------------- */

footer {
  max-width: var(--page);
  margin: 0 auto;
  padding: var(--space-4) 1.5rem var(--space-6);
  border-top: 1px solid var(--rule);
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ink-muted);
}

footer p {
  margin-bottom: 0.2rem;
  max-width: none;
}

footer p:last-child { margin-bottom: 0; }

/* ---- secondary pages (privacy) --------------------------------------- */

.page-head {
  padding-bottom: var(--space-4);
}

.page-sub {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--ink-muted);
  margin-bottom: 0;
}

/* ---- links ----------------------------------------------------------- */
/* The home page still has none in its body. These exist for the footer's privacy
   link and for the two outbound links in privacy.html — the accent is otherwise
   unspent (spec §5), so it is what marks a link. */

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover { text-decoration-thickness: 2px; }

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

footer a { color: var(--ink-muted); }
footer a:hover { color: var(--accent); }

/* ---- 404 ------------------------------------------------------------ */
/* 404.html only. This is the one page on the site that carries a link, so it is
   also the only place the accent gets spent on an interactive state (spec §5 notes
   the accent is otherwise unspent) and the only place a focus ring can appear. */

.notfound {
  padding-bottom: var(--space-5);
}

.notfound p {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--ink-muted);
  margin-bottom: var(--space-2);
}

.notfound p:last-child { margin-bottom: 0; }

.notfound a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.notfound a:hover { text-decoration-thickness: 2px; }

.notfound a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- small screens ------------------------------------------------- */

@media (max-width: 30rem) {
  :root {
    --step-4: 2.25rem;
    --step-3: 1.625rem;
    --space-6: 3.25rem;
    --space-5: 2.5rem;
  }

  main { padding-left: 1.25rem; padding-right: 1.25rem; }
  footer { padding-left: 1.25rem; padding-right: 1.25rem; }
  .card { padding: var(--space-3); }
}

/* ---- print --------------------------------------------------------- */
/* This buyer prints things. Make it survive paper. */

@media print {
  :root {
    --bg: #ffffff;
    --surface: #ffffff;
    --ink: #000000;
    --ink-muted: #333333;
    --accent: #000000;
    --rule: #999999;
    --code-bg: #ffffff;
    --redact: #cccccc;
  }

  body { font-size: 11pt; line-height: 1.45; }
  main, footer { max-width: none; padding: 0; }
  section { padding: 1.25rem 0; break-inside: avoid; }
  .cards-grid { break-inside: avoid; }
  .card { border: 1px solid var(--rule); }
  .transcript-figure, .status-callout { break-inside: avoid; }
  h1, h2, h3 { break-after: avoid; }
}
