/* Ateljékassan design system: tokens first, then base, layout, components, sections. */
:root {
  --brand: #a8461f;          /* terracotta: the atelier */
  --brand-strong: #8a3818;
  --brand-tint: #fbefe8;
  --accent: #1d6a63;         /* deep teal: bookkeeping calm */
  --accent-tint: #e6f2f0;
  --success: #1e7a43;
  --danger: #b3261e;
  --g0: #ffffff; --g50: #faf8f5; --g100: #f3efe9; --g200: #e6e0d6; --g400: #a59d90;
  --g600: #5f5a52; --g800: #2c2925; --g900: #1b1916;
  --bg: var(--g0); --bg-alt: var(--g50); --surface: var(--g0); --text: var(--g900); --muted: var(--g600);
  --line: var(--g200); --on-brand: #ffffff;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --fs-0: 0.875rem; --fs-1: 1rem; --fs-2: 1.125rem; --fs-3: 1.25rem; --fs-4: 1.75rem; --fs-5: 2.5rem; --fs-6: 3.5rem;
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px; --s6: 64px; --s7: 96px;
  --radius: 14px; --radius-sm: 8px;
  --shadow: 0 1px 2px rgb(27 25 22 / 6%), 0 8px 24px rgb(27 25 22 / 8%);
  --wrap: 1080px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #e8875c; --brand-strong: #f19a72; --brand-tint: #3a2419;
    --accent: #6cc3b9; --accent-tint: #15302d; --success: #5cc98a; --danger: #ff8a80;
    --bg: #161412; --bg-alt: #1e1b18; --surface: #23201c; --text: #f1ece5; --muted: #b5ada1;
    --line: #3a352f; --on-brand: #1b1209;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 8px 24px rgb(0 0 0 / 35%);
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 var(--fs-1)/1.55 var(--font); }
img, svg { max-width: 100%; height: auto; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-strong); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 var(--s2); letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw + 1rem, var(--fs-6)); font-weight: 750; }
h2 { font-size: clamp(1.6rem, 2.5vw + 1rem, var(--fs-5)); font-weight: 720; }
h3 { font-size: var(--fs-3); font-weight: 650; }
p { margin: 0 0 var(--s2); max-width: 68ch; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: var(--s1) var(--s2); z-index: 100; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Layout */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--s2); }
.section { padding: var(--s6) 0; }
.section.alt { background: var(--bg-alt); }
.section-head { max-width: 720px; margin-bottom: var(--s4); }
.eyebrow { display: inline-block; font-size: var(--fs-0); font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: var(--s1); }
.lead { font-size: var(--fs-2); color: var(--muted); }
.grid { display: grid; gap: var(--s3); }
@media (min-width: 720px) { .grid.cols-2 { grid-template-columns: repeat(2, 1fr); } .grid.cols-3 { grid-template-columns: repeat(3, 1fr); } .grid.cols-4 { grid-template-columns: repeat(4, 1fr); } .section { padding: var(--s7) 0; } }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid transparent; transition: border-color .15s, padding .15s; }
.site-header.scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); min-height: 64px; transition: min-height .15s; }
.site-header.scrolled .nav { min-height: 52px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: var(--fs-2); color: var(--text); text-decoration: none; }
.brand svg { width: 28px; height: 28px; color: var(--brand); }
.nav nav { display: flex; align-items: center; gap: var(--s3); }
.nav nav a:not(.btn) { color: var(--muted); text-decoration: none; font-weight: 550; }
.nav nav a:not(.btn):hover { color: var(--text); }
@media (max-width: 719px) { .nav nav a:not(.btn) { display: none; } }

/* Buttons and pills */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 var(--s3); border-radius: 999px; font: 650 var(--fs-1)/1 var(--font); text-decoration: none; cursor: pointer; border: 2px solid transparent; transition: background-color .15s, color .15s, transform .15s, box-shadow .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--on-brand); box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 30%, transparent); }
.btn-primary:hover { background: var(--brand-strong); color: var(--on-brand); }
.btn-secondary { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-secondary:hover { background: var(--brand-tint); color: var(--brand-strong); }
.btn-sm { min-height: 44px; padding: 0 var(--s2); font-size: var(--fs-0); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: var(--fs-0); color: var(--text); text-decoration: none; }
.pill svg { width: 16px; height: 16px; color: var(--success); flex: none; }
a.pill:hover { border-color: var(--accent); color: var(--text); }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s3); box-shadow: var(--shadow); }
.card h3 { margin-bottom: var(--s1); }
.card p { color: var(--muted); margin: 0; }
.icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-tint); color: var(--brand); margin-bottom: var(--s2); }
.icon svg { width: 24px; height: 24px; }

/* Hero */
.hero { padding: var(--s5) 0 var(--s6); background: radial-gradient(1200px 500px at 85% -10%, var(--brand-tint), transparent 60%), var(--bg); }
.hero-grid { display: grid; gap: var(--s5); align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.05fr 1fr; } .hero { padding: var(--s6) 0 var(--s7); } }
.hero .lead { font-size: clamp(1.05rem, 1vw + .9rem, var(--fs-3)); }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s3) 0 var(--s2); }
.trust-line { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: var(--fs-0); margin: 0; padding: 0; list-style: none; }
.trust-line li { display: inline-flex; align-items: center; gap: 6px; }
.trust-line svg { width: 16px; height: 16px; color: var(--success); }
.shot { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: 0 20px 50px rgb(27 25 22 / 18%); background: var(--surface); }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { font-size: var(--fs-0); color: var(--muted); padding: 10px 14px; border-top: 1px solid var(--line); }

/* Stakes */
.stakes .card { border-left: 4px solid var(--brand); }
.stat { font-size: var(--fs-5); font-weight: 750; color: var(--brand); line-height: 1; margin-bottom: var(--s1); }
.source { font-size: var(--fs-0); color: var(--muted); }

/* Trust bar */
.trustbar { padding: var(--s4) 0; border-block: 1px solid var(--line); background: var(--bg); }
.trustbar .pills { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* Steps */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { position: relative; }
.steps .num { position: absolute; top: var(--s3); right: var(--s3); font-weight: 750; color: var(--muted); font-size: var(--fs-3); }

/* Comparison */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.compare { width: 100%; min-width: 640px; border-collapse: collapse; font-size: var(--fs-0); }
.compare th, .compare td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { font-size: var(--fs-1); }
.compare tr:last-child td, .compare tr:last-child th { border-bottom: 0; }
.compare .ours { background: var(--brand-tint); }
.compare thead .ours { color: var(--brand); }
.yes, .no, .meh { display: inline-flex; gap: 6px; align-items: flex-start; }
.yes svg { color: var(--success); } .no svg { color: var(--danger); } .meh svg { color: var(--g400); }
.yes svg, .no svg, .meh svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }

/* Pricing */
.price-card { position: relative; display: flex; flex-direction: column; gap: var(--s2); }
.price-card.best { border: 2px solid var(--brand); }
.badge { position: absolute; top: -14px; left: var(--s3); background: var(--brand); color: var(--on-brand); font-size: var(--fs-0); font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.price { font-size: var(--fs-5); font-weight: 750; line-height: 1; }
.price small { font-size: var(--fs-1); font-weight: 500; color: var(--muted); }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checks li { display: flex; gap: 8px; }
.checks svg { width: 18px; height: 18px; color: var(--success); flex: none; margin-top: 3px; }
.guarantee { text-align: center; color: var(--muted); margin: var(--s3) auto 0; }

/* FAQ */
.faq { display: grid; gap: var(--s1); max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 var(--s3); }
.faq summary { cursor: pointer; padding: var(--s2) 0; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: var(--s2); min-height: 44px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--brand); transition: transform .15s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); }

/* Final CTA */
.final { background: var(--brand); color: var(--on-brand); text-align: center; }
.final h2, .final p { color: var(--on-brand); margin-left: auto; margin-right: auto; }
.final .btn-primary { background: var(--on-brand); color: var(--brand); box-shadow: none; }
.final .btn-primary:hover { background: var(--brand-tint); color: var(--brand-strong); }

/* Footer */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--line); padding: var(--s5) 0 var(--s4); font-size: var(--fs-0); color: var(--muted); }
.footer-grid { display: grid; gap: var(--s3); }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h2 { font-size: var(--fs-1); color: var(--text); margin-bottom: var(--s1); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.fineprint { border-top: 1px solid var(--line); margin-top: var(--s4); padding-top: var(--s3); }

/* App and prose pages */
.page { padding: var(--s5) 0 var(--s6); }
.prose { max-width: 760px; }
.prose h2 { font-size: var(--fs-4); margin-top: var(--s5); }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--fs-0); display: block; overflow-x: auto; }
.prose td, .prose th { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.form-grid { display: grid; gap: var(--s2); }
@media (min-width: 720px) { .form-grid.cols-2 { grid-template-columns: repeat(2, 1fr); } .form-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }
label { display: block; font-weight: 650; margin-bottom: 6px; }
.hint { color: var(--muted); font-size: var(--fs-0); margin: 0 0 8px; }
input[type=text], input[type=email], select, input[type=file] { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); color: var(--text); font: inherit; }
input:focus-visible, select:focus-visible { border-color: var(--accent); }
.check-label { display: flex; gap: 8px; align-items: center; font-weight: 500; min-height: 44px; }
.warn { background: var(--brand-tint); border-radius: var(--radius-sm); padding: 10px 14px; margin: 6px 0; }
.err { color: var(--danger); font-weight: 650; }
.ledger { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: var(--fs-0); }
.ledger td, .ledger th { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.ledger .n { text-align: right; }
.stack > * + * { margin-top: var(--s3); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
