/* sifra.be — single stylesheet, no frameworks */

:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --surface-2: #f3efe7;
  --text: #1f1c17;
  --muted: #6b645a;
  --border: #e6e0d4;
  --accent: #b08a4e;
  --accent-strong: #8c6a34;
  --accent-soft: #f4ecdd;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 4px 16px rgb(0 0 0 / 0.05);
  --max: 960px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14120f;
    --surface: #1d1a16;
    --surface-2: #26221c;
    --text: #f1ece3;
    --muted: #a59d90;
    --border: #353027;
    --accent: #d1a965;
    --accent-strong: #e2bf82;
    --accent-soft: #2c261c;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 4px 16px rgb(0 0 0 / 0.25);
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--accent-strong); text-underline-offset: 3px; }
a:hover { color: var(--accent); }

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

h1, h2, h3 { line-height: 1.25; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
h2 { font-size: 1.4rem; margin-top: 2rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

/* ---------- Language switching ----------
   Every translatable element carries lang="en" or lang="nl".
   The active language is set on <html data-lang="…"> by site.js (default: en). */
html[data-lang="en"] body [lang="nl"],
html[data-lang="nl"] body [lang="en"] { display: none !important; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}

main { flex: 1; padding: 2rem 0 3rem; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 10;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 64px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}
.brand img { width: 36px; height: 36px; }

.site-nav { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  font-weight: 500;
}
.site-nav a:hover { color: var(--text); background: var(--surface-2); }
.site-nav a[aria-current="page"] { color: var(--text); background: var(--accent-soft); }

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.lang-toggle button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
}
.lang-toggle button[aria-pressed="true"] { background: var(--accent); color: #fff; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 1.5rem 0 1rem; }
.hero .logo { width: 120px; height: 120px; margin-bottom: 1rem; }
.hero p { color: var(--muted); max-width: 38rem; margin: 0 auto 1rem; }

.page-head { margin-bottom: 1.5rem; }
.page-head p { color: var(--muted); max-width: 42rem; }

.breadcrumb { font-size: 0.9rem; color: var(--muted); margin-bottom: 0.75rem; }
.breadcrumb a { color: var(--muted); }

/* ---------- Tiles (homepage hub) ---------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}
.tile {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.tile:hover,
.tile:focus-visible { transform: translateY(-2px); border-color: var(--accent); color: var(--text); }
.tile .icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}
.tile .icon svg { width: 24px; height: 24px; }
.tile strong { font-size: 1.1rem; }
.tile span.desc { color: var(--muted); font-size: 0.95rem; }
.tile .host { margin-top: auto; font-size: 0.85rem; color: var(--accent-strong); font-weight: 600; }

/* ---------- Cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 0.25rem; }
.meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.75rem; }

.section-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  justify-content: center;
  color: var(--muted);
}

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface);
}
.btn:hover { border-color: var(--accent); color: var(--text); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }

/* ---------- Tags ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; padding: 0; margin: 0.5rem 0 1rem; }
.tags li {
  font-size: 0.8rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
}

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 1rem 0; padding: 0 0 0 1.25rem; border-left: 2px solid var(--border); }
.timeline li { position: relative; margin-bottom: 1.25rem; }
.timeline li::before {
  content: "";
  position: absolute;
  left: calc(-1.25rem - 6px);
  top: 0.45em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}
.timeline time { display: block; font-size: 0.85rem; font-weight: 600; color: var(--accent-strong); }

/* ---------- Long-form text (privacy policies) ---------- */
.prose { max-width: 46rem; }
.prose h2 { font-size: 1.2rem; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: 0.35rem; }
.notice {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin: 1rem 0 1.5rem;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer .container { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; }
.site-footer a { color: var(--muted); }

/* ---------- 404 ---------- */
.not-found { text-align: center; padding: 3rem 0; }
.not-found .code { font-size: 5rem; font-weight: 800; color: var(--accent); line-height: 1; margin-bottom: 0.5rem; }

@media (max-width: 560px) {
  .site-header .container { padding-top: 0.5rem; padding-bottom: 0.5rem; }
  .site-nav { order: 3; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .tile { transition: none; }
  .tile:hover { transform: none; }
}
