/*
 * Styles of the website. Colours repeat the tokens of the application
 * (frontend/src/styles/tokens.css, decision #36); values marked "derived" are tints or shades of
 * the palette or of the slate scale. System fonts only, as in the application.
 */

:root {
  --brand: #3d9c91;
  --brand-hover: #176b66;
  --brand-muted: #83cfc0;
  --brand-soft: #b9e3d9;
  --brand-surface: #e5f3ee;
  --brand-strong: #176b66;
  --brand-strong-hover: #125652;
  --on-brand: #ffffff;
  /* Derived: Pale Sage, lightened, for alternating sections. */
  --brand-wash: #f4faf7;

  --cat-red: #d96f68;
  --cat-red-surface: #f7e2e1;
  --cat-yellow: #e7c66a;
  --cat-yellow-surface: #f7ebcb;
  --cat-purple: #8b79b7;
  --cat-purple-surface: #e8e4f1;
  --cat-grey: #6b7280;
  --cat-grey-surface: #eef0f3;

  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --ink: #0f172a;
  /* Derived (slate 600): secondary text, at least 6:1 on every surface of the site. */
  --ink-muted: #475569;

  --warning: #826217;
  --warning-surface: #faf4e1;

  --radius: 1rem;
  --shadow: 0 1px 2px rgb(15 23 42 / 0.04), 0 4px 16px rgb(15 23 42 / 0.05);
  --font-sans: ui-sans-serif, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --header-height: 4.25rem;

  color-scheme: light;
}

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

[id] {
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(1.7rem, 1.3rem + 1.5vw, 2.35rem);
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.2rem;
}

h4 {
  font-size: 1.05rem;
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--brand-hover);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--brand-strong-hover);
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 0.25rem;
}

main:focus {
  outline: none;
}

ul,
ol {
  padding: 0;
  margin: 0;
}

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

.container {
  width: min(72rem, 100% - 2.5rem);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  background: var(--brand-strong);
  color: var(--on-brand);
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

/* --- Placeholders: values that still have to be supplied ---------------------------------- */

.placeholder {
  padding: 0.05em 0.35em;
  border-radius: 0.3rem;
  outline: 1px dashed var(--warning);
  background: var(--warning-surface);
  color: var(--warning);
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* --- Buttons --------------------------------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.875rem;
  padding: 0.7rem 1.35rem;
  border: 1px solid var(--brand-strong);
  border-radius: 0.65rem;
  background: var(--brand-strong);
  color: var(--on-brand);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.button:hover {
  background: var(--brand-strong-hover);
  border-color: var(--brand-strong-hover);
  color: var(--on-brand);
}

.button-secondary {
  background: var(--surface);
  border-color: var(--brand-muted);
  color: var(--brand-strong);
}

.button-secondary:hover {
  background: var(--brand-surface);
  border-color: var(--brand);
  color: var(--brand-strong-hover);
}

.button-small {
  min-height: 2.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
}

.button-light {
  background: var(--surface);
  border-color: var(--surface);
  color: var(--brand-strong);
}

.button-light:hover {
  background: var(--brand-surface);
  border-color: var(--brand-surface);
  color: var(--brand-strong-hover);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* --- Header ---------------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 0.96);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: var(--header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

.brand-name {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav-wide {
  margin-left: auto;
}

.nav-wide ul {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}

.nav-wide a {
  display: block;
  padding: 0.45rem 0.7rem;
  border-radius: 0.5rem;
  color: var(--ink-muted);
  font-size: 0.97rem;
  font-weight: 500;
  text-decoration: none;
}

.nav-wide a:hover {
  background: var(--brand-surface);
  color: var(--brand-strong);
}

.nav-narrow {
  display: none;
  margin-left: auto;
}

.nav-narrow summary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.5rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.6rem;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.nav-narrow summary::-webkit-details-marker {
  display: none;
}

.nav-narrow summary::before {
  content: "";
  width: 1rem;
  height: 0.75rem;
  border-block: 2px solid currentColor;
  background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat;
}

.nav-narrow[open] summary {
  background: var(--brand-surface);
  border-color: var(--brand-muted);
}

.nav-narrow nav {
  position: absolute;
  top: calc(100% + 1px);
  right: 0;
  left: 0;
  padding: 0.75rem 0 1.25rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 12px 24px rgb(15 23 42 / 0.08);
}

.nav-narrow ul {
  list-style: none;
}

.nav-narrow li a {
  display: block;
  padding: 0.7rem 0.25rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}

.nav-narrow p {
  margin-top: 1rem;
}

@media (max-width: 63.99rem) {
  .nav-wide {
    display: none;
  }

  .nav-narrow {
    display: block;
    margin-left: 0;
  }

  .header-app {
    margin-left: auto;
  }
}

@media (max-width: 29.99rem) {
  .header-app {
    display: none;
  }

  .nav-narrow {
    margin-left: auto;
  }
}

/* --- Hero ------------------------------------------------------------------------------------ */

.hero {
  padding-block: clamp(2.5rem, 6vw, 5rem) clamp(2.5rem, 5vw, 4rem);
  background:
    radial-gradient(60rem 30rem at 85% 10%, var(--brand-surface), transparent 70%),
    linear-gradient(180deg, var(--brand-wash), var(--surface));
}

.hero-inner {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}

@media (min-width: 60rem) {
  .hero-inner {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.25rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--brand-soft);
  border-radius: 999px;
  background: var(--surface);
  color: var(--brand-strong);
  font-size: 0.9rem;
  font-weight: 600;
}

.status-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--cat-yellow);
  box-shadow: 0 0 0 3px var(--cat-yellow-surface);
}

.lead {
  max-width: 38rem;
  margin-bottom: 2rem;
  color: var(--ink-muted);
  font-size: clamp(1.1rem, 1rem + 0.35vw, 1.25rem);
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 2rem;
  list-style: none;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.hero-facts li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-facts li::before {
  content: "";
  width: 0.45rem;
  height: 0.8rem;
  margin-top: -0.2rem;
  border-right: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
  transform: rotate(45deg);
}

.hero-figure {
  margin: 0;
}

.hero-figure .illustration {
  width: 100%;
  max-width: 34rem;
  margin-inline: auto;
  filter: drop-shadow(0 18px 30px rgb(23 107 102 / 0.12));
}

figcaption {
  margin-top: 0.75rem;
  color: var(--ink-muted);
  font-size: 0.85rem;
  text-align: center;
}

/* --- Sections -------------------------------------------------------------------------------- */

.section {
  padding-block: clamp(3.5rem, 7vw, 6rem);
}

.hero + .section {
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
}

.section-tinted {
  border-block: 1px solid var(--line);
  background: var(--brand-wash);
}

.section-head {
  max-width: 46rem;
  margin-bottom: 2.5rem;
}

.section-head > p:not(.kicker) {
  color: var(--ink-muted);
  font-size: 1.1rem;
}

.kicker {
  margin-bottom: 0.6rem;
  color: var(--brand-strong);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.grid {
  display: grid;
  gap: 1.25rem;
  list-style: none;
}

@media (min-width: 44rem) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 64rem) {
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.card {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card p {
  color: var(--ink-muted);
}

.note {
  margin-top: 1.75rem;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.callout {
  margin-top: 2rem;
  padding: 1.1rem 1.35rem;
  border-left: 4px solid var(--brand);
  border-radius: 0 0.75rem 0.75rem 0;
  background: var(--brand-surface);
}

.list {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1rem;
  padding-left: 1.25rem;
}

.list li::marker {
  color: var(--brand);
}

.subhead {
  margin-top: 3.5rem;
  margin-bottom: 1.25rem;
}

.split {
  display: grid;
  gap: 2.5rem 3.5rem;
  margin-top: 3.5rem;
}

@media (min-width: 60rem) {
  .split {
    grid-template-columns: 1fr 1fr;
  }

  .split-narrow {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}

.split-narrow {
  margin-top: 0;
}

.split > div > p {
  color: var(--ink-muted);
}

/* Problem */

.figure {
  display: flex;
  flex-direction: column;
}

.card .figure-number {
  margin-bottom: 0.5rem;
  color: var(--brand-strong);
  font-size: clamp(2.1rem, 1.7rem + 1.2vw, 2.7rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.card.figure p:nth-child(2) {
  color: var(--ink);
}

.figure-context {
  font-size: 0.92rem;
}

.figure-source {
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
}

/* How it works */

.step-number {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: var(--brand-surface);
  color: var(--brand-strong);
  font-weight: 700;
}

.categories {
  display: grid;
  gap: 1rem;
  list-style: none;
}

.category {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.category p {
  margin: 0;
  color: var(--ink-muted);
}

.category .category-name {
  color: var(--ink);
  font-weight: 650;
}

.swatch {
  flex: none;
  width: 2.75rem;
  height: 1.5rem;
  margin-top: 0.1rem;
  border-radius: 0.3rem 0.3rem 0 0;
  border-bottom: 3px solid;
}

.swatch-red {
  background: var(--cat-red-surface);
  border-color: var(--cat-red);
}

.swatch-yellow {
  background: var(--cat-yellow-surface);
  border-color: var(--cat-yellow);
}

.swatch-purple {
  background: var(--cat-purple-surface);
  border-color: var(--cat-purple);
}

.swatch-grey {
  background: var(--cat-grey-surface);
  border-color: var(--cat-grey);
}

.case-figure {
  max-width: 30rem;
  margin: 1.5rem 0 0;
}

.method h4 {
  color: var(--brand-strong);
}

/* Checks */

.area h3 {
  font-size: 1.1rem;
}

.sources {
  margin-top: 3rem;
  padding: 1.75rem;
  border: 1px solid var(--brand-soft);
  border-radius: var(--radius);
  background: var(--brand-wash);
}

.sources > p {
  max-width: 48rem;
  color: var(--ink-muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0.5rem 0 1.25rem;
  list-style: none;
}

.chips li {
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--brand-soft);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.95rem;
}

/* Privacy */

.checklist h3 {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  font-size: 1.1rem;
}

.checklist h3::before {
  content: "";
  flex: none;
  width: 0.45rem;
  height: 0.8rem;
  margin: -0.25rem 0.35rem 0 0.3rem;
  border-right: 2.5px solid var(--brand);
  border-bottom: 2.5px solid var(--brand);
  transform: rotate(45deg);
}

/* Status */

.timeline {
  display: grid;
  gap: 0;
  max-width: 48rem;
  list-style: none;
}

.timeline li {
  position: relative;
  padding: 0 0 1.75rem 2rem;
  border-left: 2px solid var(--brand-soft);
}

.timeline li:last-child {
  padding-bottom: 0.25rem;
}

.timeline li::before {
  content: "";
  position: absolute;
  top: 0.3rem;
  left: -0.5rem;
  width: 0.9rem;
  height: 0.9rem;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 1px var(--brand-soft);
}

.timeline li:first-child::before {
  background: var(--cat-yellow);
}

.timeline h3 {
  margin-bottom: 0.35rem;
  font-size: 1.1rem;
}

.timeline p {
  color: var(--ink-muted);
}

/* About */

.person h3 {
  margin-bottom: 0.1rem;
  font-size: 1.35rem;
}

.card .person-role {
  margin-bottom: 0.9rem;
  color: var(--brand-strong);
  font-weight: 600;
}

/* Contact */

.section-contact {
  background: var(--brand-strong);
  color: var(--on-brand);
}

.section-contact p {
  max-width: 38rem;
  color: rgb(255 255 255 / 0.92);
  font-size: 1.1rem;
}

.contact-inner {
  display: grid;
  gap: 1.75rem;
  align-items: center;
}

@media (min-width: 60rem) {
  .contact-inner {
    grid-template-columns: 1.4fr 1fr;
  }

  .contact-action {
    justify-self: end;
  }
}

.contact-action .button {
  min-height: 3.25rem;
  padding-inline: 1.6rem;
  font-size: 1.05rem;
}

/* --- Footer ---------------------------------------------------------------------------------- */

.site-footer {
  padding-block: 2.5rem;
  border-top: 1px solid var(--line);
  background: var(--surface-muted);
  font-size: 0.95rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  justify-content: space-between;
}

.footer-brand p {
  max-width: 26rem;
  margin-top: 0.6rem;
  color: var(--ink-muted);
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  list-style: none;
}

.site-footer nav a {
  display: inline-block;
  padding-block: 0.3rem;
  color: var(--ink);
}

/* --- Legal pages ----------------------------------------------------------------------------- */

.legal {
  max-width: 48rem;
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.legal h1 {
  margin-bottom: 1.5rem;
  font-size: clamp(1.9rem, 1.5rem + 1.5vw, 2.6rem);
}

.legal-section {
  padding-block: 1.25rem;
  border-top: 1px solid var(--line);
}

.legal-section h2 {
  font-size: 1.2rem;
  letter-spacing: 0;
}

.legal-section p,
.legal-section li {
  overflow-wrap: anywhere;
}

.legal-updated {
  margin-top: 1.5rem;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.not-found .actions {
  margin-top: 1.5rem;
}

@media print {
  .site-header,
  .nav-narrow,
  .skip-link {
    display: none;
  }

  .section-contact {
    background: none;
    color: inherit;
  }
}

/* Portrait next to the text; above it on narrow screens. */

.person {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
}

@media (min-width: 30rem) {
  .person {
    flex-direction: row;
    align-items: center;
    gap: 1.75rem;
  }
}

.person-photo {
  flex: none;
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  border: 3px solid var(--brand-soft);
  object-fit: cover;
  background: var(--brand-surface);
}

.card .person-links {
  margin-top: 0.75rem;
  margin-bottom: 0;
}

.person-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
}
