/* kiwi3.com version 1 (draft). Colours = Material roles from design/tokens.json (app theme, light + dark). */

:root {
  color-scheme: light dark;
  --background: #F5FAF8;
  --on-background: #171D1B;
  --primary: #00685E;
  --surface-container-low: #EFF5F2;
  --outline-variant: #BCC9C6;
  --on-surface-variant: #3D4947;
  --radius-m: 12px;
  --radius-l: 16px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0F1413;
    --on-background: #DEE4E1;
    --primary: #67D9C9;
    --surface-container-low: #171D1B;
    --outline-variant: #3D4947;
    --on-surface-variant: #BCC9C6;
  }
}

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

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

body {
  margin: 0;
  background: var(--background);
  color: var(--on-background);
  font-family: var(--font);
  font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.125rem); /* 17–18 px */
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--primary); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

main > .wrap { margin-top: clamp(3.5rem, 8vw, 6.5rem); }

h1, h2 { line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 0.6em; }
h1 { font-size: clamp(2.25rem, 1.4rem + 4vw, 4rem); font-weight: 750; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); font-weight: 700; }

.small { font-size: 0.875rem; color: var(--on-surface-variant); }

/* Header */
.site-header { border-bottom: 1px solid var(--outline-variant); }
.header-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 4.25rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  color: var(--on-background); text-decoration: none; font-weight: 650; font-size: 1.125rem;
}
.brand img { border-radius: 50%; }
.badge-link { display: inline-block; }
/* The official badge file carries its own transparent margin (about 6 % per side). */
.badge { width: 200px; margin-left: -12px; }
.badge-small { width: 140px; margin: 0 -8px 0 0; }
/* Phones show only the hero badge (owner 2026-11-15). */
@media (max-width: 639px) { .header-badge { display: none; } }

/* Hero */
main > .hero { display: grid; gap: 2rem; margin-top: clamp(2rem, 6vw, 4.5rem); }
.hero .lead { font-size: clamp(1.15rem, 1rem + 0.6vw, 1.4rem); margin: 0 0 1.25rem; max-width: 30em; }
.hero .small { margin: 0.25rem 0 0; }
.hero-picture img { border-radius: var(--radius-l); width: 100%; }
@media (min-width: 900px) {
  main > .hero { grid-template-columns: 1fr 560px; align-items: center; gap: 3rem; }
}

/* Numbers */
.figures {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1.5rem;
}
.figures li { display: flex; flex-direction: column; }
.figure { font-size: min(2.4rem, 6vw); white-space: nowrap; font-weight: 750; line-height: 1.1; letter-spacing: -0.02em; }
.stars { color: var(--primary); font-size: 0.55em; letter-spacing: 0.05em; vertical-align: 0.25em; }
.label { color: var(--on-surface-variant); }
.source { margin-top: 1.25rem; }
.figures { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 1024px) {
  .figures { grid-template-columns: repeat(4, 1fr); }
}

/* Screenshot cards: a scroll row on phones (no script), a grid on wide screens */
.cards {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(70vw, 300px); gap: 1rem;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  padding: 0.25rem 0.25rem 1rem; margin: 0 -0.25rem;
}
.cards picture { scroll-snap-align: start; }
.cards img { border-radius: var(--radius-l); width: 100%; }
/* Desktop: cards at most 220 px (owner 2026-11-15, round 3); three per row centred in the page (owner 2026-11-16), all six in one row once the
   cards can be ≥ ~205 px (below that the caption sub-lines get too small to read; checked at 1280 / 1440). The six-row is wider than the 1100 px text column and is centred on it. */
@media (min-width: 900px) {
  .cards { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 220px)); grid-auto-columns: auto; overflow: visible; justify-content: center; gap: 1.5rem; margin: 0; padding: 0; }
}
@media (min-width: 1400px) {
  .cards {
    --row: min(calc(100vw - 4rem), 1420px);
    grid-template-columns: repeat(6, minmax(0, 220px)); justify-content: center; gap: 1.25rem;
    width: var(--row); margin-inline: calc((100% - var(--row)) / 2);
  }
}

/* Quotes */
.quotes { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.quotes figure {
  margin: 0; height: 100%;
  background: var(--surface-container-low);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-l);
  padding: 1.5rem;
  display: flex; flex-direction: column; justify-content: space-between; gap: 1rem;
}
.quotes blockquote { margin: 0; }
.quotes blockquote p { margin: 0; font-size: 1.1em; }
.quotes figcaption { color: var(--on-surface-variant); font-size: 0.9375rem; }
@media (min-width: 768px) {
  .quotes { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
}

/* Text blocks */
.prose p { max-width: 40em; }
.contact { font-size: 1.15em; }

/* Footer */
.site-footer {
  margin-top: clamp(4rem, 10vw, 7rem);
  border-top: 1px solid var(--outline-variant);
  padding: 2rem 0 2.5rem;
}
.footer-links { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.site-footer p { margin: 0.25rem 0; }
.footer-links a { overflow-wrap: anywhere; }

/* Legal pages (text unchanged from site/public, wrapped in the shared header + footer) */
.legal { max-width: 46em; margin: clamp(2rem, 6vw, 3.5rem) auto 0; padding: 0 clamp(1rem, 4vw, 2rem); line-height: 1.65; }
.legal h1 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.5rem); }
.legal h2 { font-size: 1.25rem; letter-spacing: -0.01em; margin: 2em 0 0.5em; }
.legal ul { padding-left: 1.3em; }
.legal .meta { color: var(--on-surface-variant); margin-bottom: 1.5rem; }
.legal .meta p { margin: 0.25em 0; }
.legal a { overflow-wrap: anywhere; }
