/* Samfunnsklar — shared styles.
   Same design system as the app: "Birk med Fjord-typografi".
   Tokens mirror mobile/src/core/theme/index.ts. */

:root {
  --birch: #F6F1E7;
  --surface: #FFFFFF;
  --surface-variant: #F2ECE0;
  --sunken: #ECE5D7;
  --edge: #C3BBAA;
  --border: #E3D9C6;
  --ink: #1C1A17;
  --secondary: #5C564C;
  --muted: #8A7F6A;
  --clay: #B23A2F;
  --clay-dark: #8F2F26;
  --clay-tint: #F7E2DF;
  --forest: #2E5D4B;
  --forest-dark: #1F4436;
  --forest-tint: #E4ECE6;
  --gold: #E8B96A;
  --measure: 34rem;
}

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

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

body {
  margin: 0;
  background: var(--birch);
  color: var(--ink);
  font: 400 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
}

h1, h2, h3, .display {
  font-family: Newsreader, Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0;
}

h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); line-height: 1.06; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); line-height: 1.2; margin-top: 3rem; }
h3 { font-size: 1.2rem; line-height: 1.3; margin-top: 2rem; }

p { margin: 0.9rem 0; color: var(--secondary); }
a { color: var(--clay); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--clay-dark); }

.wrap { max-width: 62rem; margin: 0 auto; padding: 0 clamp(1.25rem, 5vw, 2.5rem); }
.reading { max-width: var(--measure); }

/* Header ------------------------------------------------------------------ */
.masthead {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1.5rem 0;
}
.wordmark {
  font-family: Newsreader, Georgia, serif;
  font-size: 1.25rem; color: var(--ink); text-decoration: none;
}
.masthead nav { display: flex; gap: 1.5rem; font-size: 0.95rem; }
.masthead nav a { color: var(--secondary); text-decoration: none; }
.masthead nav a:hover { color: var(--ink); }

/* The eyebrow ------------------------------------------------------------- */
.eyebrow {
  font-size: 0.7rem; font-weight: 500; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--clay); margin: 0 0 0.6rem;
}

/* Cards — a 2px hard edge, never a blurred shadow. Matches the app. ------- */
.card {
  background: var(--surface);
  border-radius: 20px;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  box-shadow: 0 2px 0 var(--edge);
}

/* Fact chips -------------------------------------------------------------- */
.facts { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.75rem 0; padding: 0; list-style: none; }
.facts li {
  background: var(--forest-tint); color: var(--forest-dark);
  border-radius: 999px; padding: 0.5rem 0.9rem;
  font-size: 0.9rem; font-weight: 500;
}

/* Buttons ----------------------------------------------------------------- */
.btn {
  display: inline-block; border-radius: 14px; padding: 0.95rem 1.6rem;
  font-weight: 600; font-size: 1rem; text-decoration: none;
  background: var(--clay); color: #fff; border: none;
}
.btn:hover { background: var(--clay-dark); color: #fff; }
.btn--quiet {
  background: transparent; color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--border);
}
.btn--quiet:hover { background: var(--sunken); color: var(--ink); }
.btn[aria-disabled="true"] { background: var(--sunken); color: var(--muted); cursor: default; }

/* Footer ------------------------------------------------------------------ */
footer {
  margin-top: 5rem; border-top: 1px solid var(--border);
  padding: 2rem 0 3rem; color: var(--muted); font-size: 0.9rem;
}
footer a { color: var(--secondary); }
footer .cols { display: flex; flex-wrap: wrap; gap: 2rem 3rem; }

/* Legal documents --------------------------------------------------------- */
.doc { padding-bottom: 2rem; }
.doc h2 { font-size: 1.5rem; margin-top: 2.75rem; }
.doc h3 { font-size: 1.1rem; }
.doc ul, .doc ol { color: var(--secondary); padding-left: 1.2rem; }
.doc li { margin: 0.45rem 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: 0.95rem; }
.doc th, .doc td {
  text-align: left; padding: 0.7rem 0.75rem 0.7rem 0;
  border-bottom: 1px solid var(--border); vertical-align: top;
}
.doc th { color: var(--ink); font-weight: 600; }
.doc td { color: var(--secondary); }
.updated { color: var(--muted); font-size: 0.9rem; margin-top: 0.5rem; }

/* A note that needs to be noticed, e.g. "not affiliated with HK-dir" ------ */
.note {
  background: var(--surface-variant); border-radius: 14px;
  padding: 1rem 1.15rem; margin: 1.5rem 0;
  color: var(--secondary); font-size: 0.95rem;
}
.note strong { color: var(--ink); }

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