/* ─────────────────────────────────────────────────────────────
   CarbnTrace · EltavaLabs — low-carbon stylesheet
   Rules this file keeps to, so the site stays light:
   · system fonts only (no web-font downloads)
   · no images, no gradients, no shadows, no blur, no filters
   · flat colour, dark mode follows the system (cheaper on OLED)
   · motion limited to short colour transitions
   ───────────────────────────────────────────────────────────── */

:root {
  --bg:        #f5f3ec;   /* warm paper */
  --paper:     #fbfaf6;   /* cards */
  --ink:       #1d201b;
  --muted:     #565d52;
  --line:      #dbd7ca;
  --accent:    #2d6a4f;   /* forest */
  --accent-ink:#ffffff;
  --accent-soft:#e2ebe3;
  --warn:      #8a4b12;

  --serif: ui-serif, "New York", "Iowan Old Style", Charter, "Bitstream Charter", Georgia, serif;
  --sans:  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono:  ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --r: 14px;
  --r-sm: 8px;
  --gutter: clamp(16px, 4vw, 32px);
  --max: 68rem;
  --t: 160ms ease-out;
  color-scheme: light;
}

/* EltavaLabs pages: same system, teal instead of forest */
[data-brand="elt"] {
  --accent: #0f766e;
  --accent-soft: #dcecea;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e100e; --paper: #161916; --ink: #e9e7e0; --muted: #a4aa9f;
    --line: #2b302a; --accent: #86c9a2; --accent-ink: #0e100e; --accent-soft: #1b2820;
    --warn: #e0a86b; color-scheme: dark;
  }
  :root[data-brand="elt"] { --accent: #5ed1c2; --accent-soft: #14282a; }
  .brand .logo { background-image: url("logo-dark.webp"); }
}

/* ── Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  text-rendering: optimizeLegibility;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5.6vw, 3.9rem); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.3rem; }
h1 em, h2 em { font-style: italic; color: var(--accent); }
p { margin: 0; }
a { color: inherit; text-decoration-color: var(--line); text-underline-offset: 3px; transition: color var(--t), text-decoration-color var(--t); }
a:hover { color: var(--accent); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
strong { font-weight: 600; }
svg { display: block; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: var(--r-sm); z-index: 100; }
.skip:focus { left: 8px; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.02em; }
.muted { color: var(--muted); }

/* ── Nav ────────────────────────────────────────────── */
.nav { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; gap: 24px; min-height: 64px; }
/* Brand lockup: the wordmark is an image, the text stays for screen readers */
.brand { display: inline-flex; align-items: center; font-size: 0; line-height: 0; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand .logo { display: block; width: 168px; height: 30px; background: url("logo.webp") left center / contain no-repeat; }
footer .brand .logo { width: 157px; height: 28px; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { font-size: 0.9375rem; color: var(--muted); text-decoration: none; padding: 10px 0; }
.nav-links a:hover { color: var(--ink); }
.nav-end { display: flex; align-items: center; gap: 8px; }
@media (max-width: 820px) { .nav-links { display: none; } .nav-end { margin-left: auto; } }

/* ── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent;
  font: 500 0.9688rem/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: background-color var(--t), color var(--t), border-color var(--t);
  touch-action: manipulation;
}
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--ink); color: var(--bg); }
.btn.quiet { border-color: var(--line); color: var(--ink); }
.btn.quiet:hover { border-color: var(--ink); color: var(--ink); }
.btn.small { min-height: 44px; padding: 0 16px; font-size: 0.9063rem; }
@media (max-width: 480px) { .nav .btn.small { display: none; } }

/* ── Sections ───────────────────────────────────────── */
section { padding: clamp(48px, 6vw, 76px) 0; }
section + section { border-top: 1px solid var(--line); }
.head { max-width: 42rem; margin-bottom: 30px; }
.head p { margin-top: 16px; color: var(--muted); font-size: 1.125rem; }
.lede { font-size: clamp(1.125rem, 2vw, 1.25rem); color: var(--muted); max-width: 36rem; }

/* ── Hero ───────────────────────────────────────────── */
.hero { padding: clamp(32px, 5vw, 64px) 0 clamp(48px, 6vw, 80px); }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.hero h1 { margin: 0 0 22px; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 28px 0 0; padding: 0; list-style: none; font-size: 0.9375rem; color: var(--muted); }
.facts li { display: inline-flex; align-items: center; gap: 8px; }
.facts svg { width: 16px; height: 16px; color: var(--accent); flex: none; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

/* Receipt — the product's output, drawn as a paper slip */
.receipt { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; }
.receipt-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 14px; border-bottom: 1px dashed var(--line); }
.receipt-top b { font: 600 0.9375rem/1.2 var(--sans); }
.receipt ol { list-style: none; margin: 0; padding: 0; }
.receipt li { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.receipt .q { font-weight: 600; font-size: 1rem; line-height: 1.35; }
.receipt .svc { grid-column: 1; font-size: 0.8125rem; color: var(--muted); }
.receipt .wh { grid-row: 1 / span 2; grid-column: 2; text-align: right; font: 600 1.0625rem/1.3 var(--sans); font-variant-numeric: tabular-nums; }
.receipt .wh small { display: block; font-weight: 400; font-size: 0.8125rem; color: var(--muted); }
.receipt-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 16px; }
.receipt-total .big { font: 500 1.75rem/1.1 var(--serif); font-variant-numeric: tabular-nums; }
.receipt-total .sub { font-size: 0.8125rem; color: var(--muted); text-align: right; }
.receipt-note { margin-top: 16px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--accent-soft); font-size: 0.9375rem; }
.caption { margin-top: 12px; font-size: 0.8125rem; color: var(--muted); max-width: 30rem; }

/* ── Plain grid of short points ─────────────────────── */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } .grid-4 { gap: 28px 20px; } }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 24px; }
.card h3 { margin: 14px 0 8px; }
.card p { color: var(--muted); }
.card .icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.card .icon svg { width: 20px; height: 20px; }
.card .idx { font: 500 0.75rem/1 var(--mono); letter-spacing: 0.06em; color: var(--muted); }
.card .src { margin-top: 14px; font-size: 0.8125rem; color: var(--muted); }

.figure { font: 500 clamp(2rem, 4vw, 2.6rem)/1.05 var(--serif); font-variant-numeric: tabular-nums; }
.figure small { font-size: 0.5em; font-family: var(--sans); color: var(--muted); margin-left: 4px; }

/* Steps */
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--accent); color: var(--accent); font: 500 1rem/1 var(--serif);
}

/* Callout */
.callout { display: flex; gap: 16px; align-items: flex-start; margin-top: 28px; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--r); }
.callout svg { width: 22px; height: 22px; flex: none; color: var(--accent); margin-top: 2px; }
.callout p { color: var(--muted); }
.callout strong { color: var(--ink); }

/* ── Research ───────────────────────────────────────── */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.prose p + p { margin-top: 16px; }
.prose p { color: var(--muted); }
.prose strong { color: var(--ink); }

/* Tips list */
.tips { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 40px; }
.tips li { padding: 16px 0; border-top: 1px solid var(--line); }
.tips b { display: block; font: 500 1.1875rem/1.3 var(--serif); margin-bottom: 6px; }
.tips span { color: var(--muted); }
@media (max-width: 620px) { .tips { grid-template-columns: 1fr; } }

/* Band (teams / lab) */
.band { background: var(--paper); }
.band-inner { display: grid; gap: 22px; justify-items: start; }
.band-inner p { max-width: 44rem; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist svg { width: 18px; height: 18px; flex: none; margin-top: 4px; color: var(--accent); }

/* FAQ — native <details>, no script */
.faq { max-width: none; }            /* rows span the container; answers stay narrow below */
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 0; min-height: 44px; cursor: pointer; list-style: none;
  font: 500 1.1875rem/1.35 var(--serif);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 300 1.5rem/1 var(--sans); color: var(--muted); transition: transform var(--t); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 56px 22px 0; color: var(--muted); }   /* stretches; inset clears the marker */
.faq details > div p + p { margin-top: 12px; }

/* Closing CTA */
.closing { text-align: center; }
.closing h2 { max-width: 34rem; margin: 0 auto; }
.closing .ctas { margin-top: 28px; }
.closing p { max-width: 34rem; margin: 16px auto 0; color: var(--muted); }
.closing .ctas { justify-content: center; }

/* ── Footer ─────────────────────────────────────────── */
footer { border-top: 1px solid var(--line); padding: 44px 0 32px; font-size: 0.9375rem; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } }
.foot-grid p { color: var(--muted); margin-top: 12px; max-width: 22rem; }
.foot-grid h4 { margin: 0 0 10px; font: 500 0.75rem/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li a { display: inline-block; padding: 6px 0; text-decoration: none; }
.legal { margin-top: 40px; max-width: 52rem; font-size: 0.8125rem; line-height: 1.6; color: var(--muted); }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 0.8125rem; color: var(--muted); }

/* Privacy / text pages */
.doc { max-width: 44rem; padding-top: clamp(48px, 8vw, 88px); padding-bottom: clamp(48px, 8vw, 88px); }
.doc h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin-bottom: 8px; }
.doc h2 { font-size: 1.5rem; margin: 40px 0 12px; }
.doc p, .doc ul { margin: 0 0 14px; }
.doc ul { padding-left: 1.2rem; }
.doc li { margin: 4px 0; }

/* Cookie consent bar */
.cookie-banner {
  position: fixed; left: var(--gutter); right: var(--gutter); bottom: var(--gutter); z-index: 50;
  max-width: 44rem; margin: 0 auto; padding: 16px 18px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { flex: 1 1 18rem; font-size: 0.875rem; color: var(--muted); }
.cookie-actions { display: flex; gap: 8px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

@media print {
  .nav,   body { background: #fff; color: #000; }
}
