/* Plinth website. Tokens follow BRAND_STYLE_GUIDE.md §3 (light + dark). */

@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-garamond-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-garamond-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --linen: #F9F3E9;
  --paper: #FFFCF6;
  --card: #F3EDE2;
  --sand: #E2DCCE;
  --sage-tint: #E3E1CF;
  --sage: #868D72;
  --sage-deep: #6E7560;
  --icon-sage: #9AA68A;
  --ink: #1F1E1B;
  --ink-muted: #6B675F;
  --on-accent: #FFFCF6;

  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", Roboto, "Segoe UI", system-ui, sans-serif;
  --gutter: 20px;
  --max: 1120px;
  --read: 680px;
  --r-card: 16px;
  --r-media: 24px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --linen: #171815;
    --paper: #20221D;
    --card: #262923;
    --sand: #3A3D35;
    --sage-tint: #2C3128;
    --sage: #9AA68A;
    --sage-deep: #B3BEA3;
    --ink: #F3EDE2;
    --ink-muted: #A9A496;
    --on-accent: #171815;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--linen);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--sage); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--sage-deep); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.1; margin: 0 0 .5em; letter-spacing: -0.005em; }
h1 { font-size: clamp(2.6rem, 6vw, 4rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h3 { font-size: 1.5rem; font-weight: 600; }
p { margin: 0 0 1em; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 12px; background: var(--paper); padding: 8px 14px; border-radius: 999px; z-index: 10; }

/* ---------- header / footer ---------- */
.site-head, .site-foot, main > * { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.site-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.wordmark { font: 600 1.9rem/1 var(--serif); letter-spacing: .01em; padding-bottom: 4px; }
.site-nav { display: flex; gap: clamp(14px, 3vw, 28px); font-size: 15px; }
.site-nav a { text-decoration: none; color: var(--ink-muted); }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--ink); }
@media (max-width: 420px) { .site-head .wordmark { display: none; } }

.site-foot {
  display: grid; gap: 32px; grid-template-columns: 1.4fr repeat(auto-fit, minmax(140px, 1fr));
  border-top: 1px solid var(--sand); margin-top: 96px; padding: 48px 0 40px; font-size: 15px;
}
.foot-col { display: flex; flex-direction: column; gap: 8px; }
.foot-col h2 { font: 600 13px/1.4 var(--sans); color: var(--ink-muted); letter-spacing: .04em; text-transform: uppercase; margin: 0 0 4px; }
.foot-col a { text-decoration: none; }
.foot-col a:hover { text-decoration: underline; }
.tagline { font: 500 1.15rem var(--serif); letter-spacing: .15em; color: var(--ink-muted); margin-top: 12px; }
.legal { grid-column: 1 / -1; color: var(--ink-muted); font-size: 14px; margin: 0; }

/* ---------- heroes ---------- */
.hero { display: grid; gap: 40px; align-items: center; padding: 32px 0 56px; }
@media (min-width: 900px) { .hero { grid-template-columns: 1fr 440px; gap: 64px; padding: 48px 0 80px; } }
.a-home .hero h1 { font-size: clamp(3rem, 7.5vw, 5rem); }
.eyebrow { color: var(--sage-deep); font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 14px; }
.lead { font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--ink-muted); max-width: 34em; }
.hero-media, .split-media { margin: 0; }
.hero-media img, .split-media img { border-radius: var(--r-media); width: 100%; max-width: 440px; margin-inline: auto; }
.page-head { padding: 40px 0 24px; max-width: var(--read); }
.page-head h1 { font-size: clamp(2.4rem, 5vw, 3.4rem); }

.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 8px auto 0; padding: 0; font-size: 14px; color: var(--ink-muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--sand); }
.crumbs a { text-decoration: none; }

/* ---------- store / buttons ---------- */
.store { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px;
  border-radius: 999px; background: var(--sage-deep); color: var(--on-accent); font: 600 16px/1 var(--sans); text-decoration: none;
  border: 0; cursor: pointer;
}
.btn:hover { filter: brightness(.92); }
.btn-secondary { background: var(--card); color: var(--ink); border: 1px solid var(--sand); }
.soon {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 999px;
  background: var(--sage-tint); font-size: 15px; font-weight: 500;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sage-deep); }

/* ---------- prose ---------- */
main > .prose { max-width: var(--read); margin-block: 40px; }
.prose h2 { margin-top: 1.4em; }
.prose h3 { margin-top: 1.2em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.prose li::marker { color: var(--sage-deep); }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--sand); }
.cite a { text-decoration: none; color: var(--sage-deep); font-size: .8em; }
.sources { font-size: 15px; color: var(--ink-muted); }

/* ---------- blocks ---------- */
.split { display: grid; gap: 32px; align-items: center; margin-block: 72px; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 420px; gap: 80px; margin-block: 112px; }
  .split.reverse { grid-template-columns: 420px 1fr; }
  .split.reverse .split-media { order: -1; }
}
.split-text > :last-child { margin-bottom: 0; }
.split-text ul { padding-left: 1.2em; }
.split-text li { margin-bottom: .4em; }
.split-text li::marker { color: var(--sage-deep); }

.cards { display: grid; gap: 16px; margin-block: 40px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) {
  .cards.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .cards.cols-4 { grid-template-columns: repeat(4, 1fr); }
}
.card { display: flex; flex-direction: column; background: var(--card); border-radius: var(--r-card); overflow: hidden; text-decoration: none; }
a.card { transition: transform .25s ease-out; }
a.card:hover { transform: translateY(-2px); }
.card-media { aspect-ratio: 4 / 3; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }
.card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: 1.45rem; margin-bottom: .3em; }
.card-body p { color: var(--ink-muted); font-size: 15.5px; margin: 0; }
.card-more { margin-top: auto; padding-top: 16px; font-size: 14px; font-weight: 600; color: var(--sage-deep); }

.steps { list-style: none; counter-reset: step; padding: 0; display: grid; gap: 28px; margin-block: 40px; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 40px; } }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 14px;
  border-radius: 50%; background: var(--sage-tint); color: var(--sage-deep); font: 600 1.4rem/1 var(--serif);
}
.steps h3 { font-size: 1.45rem; margin-bottom: .3em; }
.steps p { color: var(--ink-muted); margin: 0; }

.compare-wrap { overflow-x: auto; margin-block: 32px; }
.compare { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: var(--r-card); overflow: hidden; }
.compare th, .compare td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--sand); vertical-align: top; }
.compare thead th { font: 600 1.35rem var(--serif); }
.compare tbody th { font-weight: 500; }
.compare td { color: var(--ink-muted); font-size: 15.5px; }
.compare tr:last-child > * { border-bottom: 0; }
@media (max-width: 600px) {
  .compare th, .compare td { padding: 12px 10px; font-size: 14.5px; }
  .compare thead th { font-size: 1.15rem; }
}
.tick { width: 22px; height: 22px; fill: none; stroke: var(--sage-deep); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dash { color: var(--sand); }

.price-line { width: min(100% - 2 * var(--gutter), var(--read)); font: 500 1.5rem/1.3 var(--serif); text-align: center; margin: 32px auto; }

.callout { background: var(--sage-tint); border-radius: var(--r-card); padding: 24px 28px; margin-block: 40px; max-width: var(--read); }
.callout > :last-child { margin-bottom: 0; }

.cta-band {
  text-align: center; background: var(--card); border-radius: var(--r-media);
  padding: 56px var(--gutter); margin-top: 96px; display: flex; flex-direction: column; align-items: center;
}
.cta-band h2 { margin: 18px 0 8px; }
.cta-band p { color: var(--ink-muted); max-width: 32em; }
.cta-band .store { justify-content: center; margin-top: 12px; }
.cta-mark { width: 72px; height: 72px; border-radius: 18px; }

.faq { max-width: var(--read); margin-block: 72px; }
.faq details { border-bottom: 1px solid var(--sand); padding: 4px 0; }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 32px 16px 0; font-weight: 600; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font: 400 1.5rem var(--serif); color: var(--sage-deep); }
.faq details[open] summary::after { content: "–"; }
.faq details > :not(summary) { color: var(--ink-muted); }

.related { margin-top: 72px; }
.related .cards { margin-top: 16px; }

/* Home: the showcase board as a wide figure. */
.showcase { margin-block: 56px; }
.showcase img { border-radius: var(--r-media); width: 100%; }

.link-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-decoration-color: var(--sage); text-underline-offset: 3px; cursor: pointer; }
.legal .link-btn { margin-left: 12px; }

/* Cookie consent (src/client/analytics.js). Accept and Decline carry equal weight. */
.consent {
  position: fixed; z-index: 20; left: 50%; bottom: 16px; transform: translateX(-50%);
  width: min(100% - 2 * 16px, 560px); background: var(--paper); color: var(--ink);
  border: 1px solid var(--sand); border-radius: var(--r-card); padding: 18px 20px;
  box-shadow: 0 8px 28px rgba(31, 30, 27, 0.12); font-size: 15px; line-height: 1.5;
}
.consent p { margin: 0 0 14px; }
.consent-actions { display: flex; gap: 10px; }
.consent-actions .btn { flex: 1; min-height: 44px; }

@media (prefers-reduced-motion: reduce) { a.card { transition: none; } }
