/* ==========================================================================
   Aamu Compliance — visual identity inherited from Aamu Editions
   Tokens, typefaces and layout rhythm are taken from aamueditions.fi so the
   two read as siblings. See site/BRAND.md before changing anything here.
   ========================================================================== */

:root {
  /* Ink */
  --ink: #111111;
  --ink-soft: #313131;
  --muted: #6E6B60;
  --muted-on-dark: #B4B1A6;

  /* Ground */
  --paper: #F8F6EE;
  --surface: #FFFFFF;
  --surface-warm: #F1EDE1;

  /* Structure */
  --line: #E2DDCE;
  --line-soft: #ECE8DB;

  /* Accents */
  --yellow: #FCF99D;
  --yellow-deep: #EDE87A;
  --plum: #5B2A46;
  --terracotta: #C25A3C; /* 4.03:1 on paper — large text and rules only, never body copy */

  /* Semantic (audit results) */
  --good: #2F6B45;
  --warn: #8A6D00;
  --bad: #A33A28;

  --maxw: 1160px;
  --t: 150ms cubic-bezier(.4, 0, .2, 1);

  --f-display: "Alice", Georgia, "Times New Roman", serif;
  --f-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --f-logo: "Jost", "DM Sans", sans-serif;

  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-soft);
  font: 400 17px/1.65 var(--f-body);
  font-synthesis-weight: none;
}

/* --- Skip link: we sell accessibility; the site has to be exemplary ------- */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 12px 18px;
  font: 500 15px/1 var(--f-body); text-decoration: none;
}
.skip:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}
.band-dark :focus-visible, .band-yellow :focus-visible { outline-color: var(--ink); }
.band-dark :focus-visible { outline-color: var(--yellow); }

/* --- Bands: the page is a stack of full-bleed colour fields -------------- */
.band { width: 100%; }
.band-paper  { background: var(--paper); }
.band-surface{ background: var(--surface); }
.band-warm   { background: var(--surface-warm); }
.band-dark   { background: var(--ink); color: var(--paper); }
.band-yellow { background: var(--yellow); color: var(--ink); }
.band + .band { border-top: 1px solid var(--line); }
.band-dark + .band, .band + .band-dark, .band-yellow + .band, .band + .band-yellow { border-top: 0; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
.section { padding: 76px 0; }
.section-tight { padding: 48px 0; }

/* --- Type --------------------------------------------------------------- */
.eyebrow {
  font: 600 11.5px/1.3 var(--f-body);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}
.band-dark .eyebrow { color: var(--yellow); }

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.012em;
  text-wrap: balance;
  margin: 0 0 18px;
}
.band-dark h1, .band-dark h2, .band-dark h3, .band-dark h4 { color: var(--paper); }

h1 { font-size: clamp(38px, 5.6vw, 60px); line-height: 1.04; }
h2 { font-size: clamp(27px, 3.4vw, 38px); line-height: 1.15; }
h3 { font-size: 21px; line-height: 1.25; margin-bottom: 10px; }
h4 { font-size: 18px; line-height: 1.3; margin-bottom: 8px; }

p { margin: 0 0 16px; max-width: 66ch; }
.lede { font-size: 19.5px; line-height: 1.6; color: var(--ink-soft); max-width: 60ch; }
.band-dark p, .band-dark li { color: var(--muted-on-dark); }
.band-dark .lede { color: var(--paper); }

a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
.band-dark a { color: var(--yellow); }

small, .small { font-size: 14px; }
.muted { color: var(--muted); }
.band-dark .muted { color: var(--muted-on-dark); }

/* --- Buttons: rectangles, never rounded --------------------------------- */
.btn {
  display: inline-block;
  font: 500 15.5px/1 var(--f-body);
  padding: 15px 26px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  transition: background var(--t), color var(--t);
}
.btn:hover { background: transparent; color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.band-dark .btn { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.band-dark .btn:hover { background: transparent; color: var(--paper); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.arrow-link {
  font: 500 15px/1 var(--f-body);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 3px;
}
.arrow-link:hover { border-bottom-width: 2px; }

/* --- Cards: flat, thin warm border, square corners ---------------------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 28px 30px;
}
.card p:last-child { margin-bottom: 0; }
.card .price {
  font: 400 26px/1 var(--f-display);
  color: var(--ink);
  margin: 4px 0 14px;
}
.card .tier-tag {
  display: inline-block;
  font: 600 10.5px/1 var(--f-body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--yellow);
  color: var(--ink);
  padding: 6px 9px;
  margin-bottom: 14px;
}
.card-quiet { background: transparent; }
/* Product-card headings are h2 for correct heading order; keep the h3 visual size. */
.card-title { font-size: 21px; line-height: 1.25; margin-bottom: 10px; }

/* --- Numbered steps (mirrors the Aamu Editions dark band) --------------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid rgba(226, 221, 206, 0.22);
}
.steps li:first-child { border-top: 0; padding-top: 0; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font: 500 15px/1.4 var(--f-body);
  color: var(--yellow);
  letter-spacing: 0.04em;
}
/* The number is the ::before in column 1; title and description both belong in column 2,
   otherwise the description falls into the 44px number column and wraps one word per line. */
.steps b, .steps span { grid-column: 2; }
.steps b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 19px; color: var(--paper); margin-bottom: 3px; }
.steps span { font-size: 15.5px; color: var(--muted-on-dark); }

/* --- Data figures ------------------------------------------------------- */
.figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); }
.figure { padding: 26px 24px; border-left: 1px solid var(--line); }
.figure:first-child { border-left: 0; }
.figure b {
  display: block;
  font: 400 40px/1 var(--f-display);
  color: var(--ink);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.figure span { display: block; margin-top: 8px; font-size: 14.5px; color: var(--muted); }

/* --- Pull quote --------------------------------------------------------- */
.pull {
  font-family: var(--f-display);
  font-size: clamp(23px, 3vw, 33px);
  line-height: 1.35;
  color: var(--ink);
  text-align: center;
  max-width: 24ch;
  margin: 0 auto 18px;
  text-wrap: balance;
}
.pull-attrib { text-align: center; font-size: 14px; color: var(--ink); opacity: 0.72; }

/* --- Header / nav ------------------------------------------------------- */
.site-header { background: var(--yellow); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 16px 32px; max-width: var(--maxw); margin: 0 auto;
}
.logo { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.logo svg { display: block; flex: 0 0 auto; }
.logo-word {
  font: 300 13px/1 var(--f-logo);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  white-space: nowrap;
}
.site-nav { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.site-nav a { font: 400 15.5px/1 var(--f-body); text-decoration: none; color: var(--ink); border-bottom: 1px solid transparent; padding-bottom: 3px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--ink); }
.site-nav .btn { padding: 11px 18px; font-size: 14.5px; color: var(--paper); border-bottom: 1px solid var(--ink); }
.site-nav .btn:hover { background: transparent; color: var(--ink); border-bottom-color: var(--ink); }

/* --- Hero --------------------------------------------------------------- */
.hero { padding: 84px 0 76px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }

/* Scorecard motif: stands in for the book cover on the parent site */
.scorecard { border: 1px solid var(--line); background: var(--surface); padding: 30px 32px; position: relative; }
.scorecard::after {
  content: ""; position: absolute; inset: 14px -14px -14px 14px; background: var(--yellow); z-index: -1;
}
.scorecard .sc-label { font: 600 10.5px/1 var(--f-body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.scorecard .sc-domain { font-family: var(--f-display); font-size: 21px; color: var(--ink); margin: 10px 0 22px; }
.sc-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line-soft); font-size: 15px; }
.sc-row:first-of-type { border-top: 0; }
.sc-score { font-variant-numeric: tabular-nums; font-weight: 500; }
.sc-bar { grid-column: 1 / -1; height: 4px; background: var(--surface-warm); }
.sc-bar > i { display: block; height: 100%; }

/* --- Do / don't --------------------------------------------------------- */
.pledge { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); }
.pledge > div { padding: 28px 30px; border-left: 1px solid var(--line); }
.pledge > div:first-child { border-left: 0; }
.pledge h3 { font: 600 11.5px/1.3 var(--f-body); letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 14px; }
.pledge .yes h3 { color: var(--good); }
.pledge .no h3 { color: var(--bad); }
.pledge ul { margin: 0; padding-left: 18px; }
.pledge li { margin: 8px 0; font-size: 15.5px; }

/* --- Tables (legal pages) ----------------------------------------------- */
.tablewrap { overflow-x: auto; margin: 22px 0; border: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; font-size: 15.5px; background: var(--surface); }
th {
  text-align: left; font: 600 11px/1.3 var(--f-body); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); padding: 13px 16px; border-bottom: 1px solid var(--line); background: var(--surface-warm);
}
td { padding: 13px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
tr:last-child td { border-bottom: 0; }

/* --- Prose (legal pages) ------------------------------------------------ */
.prose h2 { margin-top: 44px; }
.prose h3 { margin-top: 28px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 7px 0; max-width: 64ch; }
.callout { border: 1px solid var(--ink); background: var(--yellow); padding: 22px 26px; margin: 26px 0; }
.callout p:last-child { margin-bottom: 0; }
.callout h2, .callout h3 { margin-top: 0; }

code, .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  background: var(--surface-warm);
  border: 1px solid var(--line);
  padding: 2px 6px;
  overflow-wrap: anywhere;
}
pre.mono { display: block; padding: 14px 16px; overflow-x: auto; white-space: pre-wrap; margin: 16px 0; }

/* --- Footer ------------------------------------------------------------- */
.site-footer { background: var(--ink); color: var(--muted-on-dark); padding: 56px 0 34px; }
.site-footer a { color: var(--muted-on-dark); text-decoration: none; }
.site-footer a:hover { color: var(--paper); text-decoration: underline; text-underline-offset: 3px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { font: 600 11px/1.3 var(--f-body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--paper); margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.footer-grid li { margin: 9px 0; }
.footer-note { font-size: 14.5px; max-width: 34ch; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(226, 221, 206, 0.18); font-size: 13.5px;
}
.site-footer .logo { color: var(--paper); margin-bottom: 16px; }

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .grid-3 { grid-template-columns: 1fr; }
  .figures { grid-template-columns: repeat(2, 1fr); }
  .figure:nth-child(3) { border-left: 0; }
  .figure:nth-child(n+3) { border-top: 1px solid var(--line); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* Narrow screens: the nav drops under the logo as one wrapping row instead of a tall
   column squeezed beside it; long Finnish compounds may hyphenate. */
h1, h2, h3, .sc-domain { overflow-wrap: break-word; hyphens: auto; }
@media (max-width: 760px) {
  .header-inner { flex-wrap: wrap; row-gap: 10px; }
  .site-nav { flex: 1 1 100%; gap: 8px 18px; }
  .site-nav .btn { padding: 9px 14px; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .header-inner { padding: 14px 20px; }
  .section { padding: 52px 0; }
  .hero { padding: 52px 0 48px; }
  .grid-2, .pledge, .figures { grid-template-columns: 1fr; }
  .pledge > div, .figure { border-left: 0; border-top: 1px solid var(--line); }
  .pledge > div:first-child, .figure:first-child { border-top: 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .site-nav { gap: 16px; }
}

@media print {
  .site-header, .site-nav, .btn-row { display: none; }
  body { background: #fff; }
}

/* --- Research bars (homepage): share of sites with findings per category ---------- */
.chart { display: grid; gap: 14px; margin: 30px 0 10px; }
.chart-row { display: grid; grid-template-columns: 220px 1fr 64px; gap: 16px; align-items: center; }
.chart-row .chart-label { font-weight: 500; color: var(--ink); }
.chart-row .chart-label small { display: block; font-weight: 400; color: var(--muted); font-size: 13.5px; }
.chart-bar { height: 18px; background: var(--line-soft); position: relative; }
.chart-bar i { position: absolute; inset: 0 auto 0 0; background: var(--ink); }
.chart-row .chart-value { font: 400 24px/1 var(--f-display); color: var(--ink); text-align: right; }
.pillars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 34px; }
.pillar { background: var(--surface); border: 1px solid var(--line); padding: 26px 26px 22px; }
.pillar .pillar-kicker { font: 600 11.5px/1.3 var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.pillar h3 { margin: 0 0 10px; }
.pillar p { margin: 0 0 12px; }
.pillar .fact { display: flex; align-items: baseline; gap: 12px; border-top: 1px solid var(--line-soft); padding-top: 12px; margin-top: 14px; }
.pillar .fact b { font: 400 30px/1 var(--f-display); color: var(--ink); }
.pillar .fact span { font-size: 14.5px; color: var(--muted); }
@media (max-width: 900px) { .pillars { grid-template-columns: 1fr; } .chart-row { grid-template-columns: 1fr 56px; } .chart-row .chart-bar { grid-column: 1 / -1; order: 3; } }
.pillar .fact b { white-space: nowrap; }
.chart-row .chart-value { white-space: nowrap; }
