/* =====================================================================
   TjekDinVurdering (TDV2) — B2C Sub-brand Tokens
   Warm, calm, editorial. Built on STPL principles (cool, stringent,
   near-invisible) but adapted for danske boligejere — softer paper
   tones, serif display, du-form voice. Inter + Instrument Serif.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  /* ---------- Color: ink & paper ---------- */
  --ink-900:        #15140F;  /* primary text — warm near-black */
  --ink-700:        #2A2823;  /* hover ink */
  --ink-500:        #5A544C;  /* secondary text, metadata — WCAG AA 6.4:1 mod paper */
  --ink-300:        #B8B3A8;  /* disabled, hint text */
  --ink-200:        #D9D4C8;  /* hairlines */
  --ink-100:        #ECE7DC;  /* dividers on paper */

  --paper:          #F7F3EC;  /* page background — warm cream */
  --paper-deep:     #EFE9DE;  /* section backgrounds */
  --paper-card:     #FFFFFF;  /* card / modal surface */
  --paper-tint:     #FBF8F2;  /* lightest tint */

  /* ---------- Color: brand accent (own forest) ---------- */
  --forest-900:     #1F3F32;
  --forest-700:     #2E5D4A;  /* primary brand accent */
  --forest-500:     #4A7C66;
  --forest-200:     #B5C9BD;
  --forest-100:     #D7E2D8;
  --forest-50:      #ECF1EA;

  /* ---------- Traffic light: B2C — desaturated, calm ---------- */
  --signal-green-900:  #2E5938;
  --signal-green-500:  #4A7C59;
  --signal-green-100:  #DCE7D6;

  --signal-amber-900:  #7A5418;
  --signal-amber-500:  #B98328;
  --signal-amber-100:  #F1E3C2;

  --signal-red-900:    #6E2820;
  --signal-red-500:    #A4382C;
  --signal-red-100:    #EFD3CD;

  /* Status-prik (5 varianter for fejltjek-rækker) */
  --dot-clean:        var(--signal-green-500);  /* ren */
  --dot-possible:     #C68E3C;                  /* mulig fejl */
  --dot-likely:       var(--signal-red-500);    /* sandsynlig fejl */
  --dot-missing:      var(--ink-300);           /* manglende data */
  --dot-irrelevant:   var(--ink-200);           /* ikke relevant */

  /* Strength badge */
  --strength-strong:    var(--signal-red-500);
  --strength-moderate:  #C68E3C;
  --strength-weak:      var(--ink-500);
  --strength-rejected:  var(--ink-300);

  /* ---------- Semantic ---------- */
  --fg-primary:     var(--ink-900);
  --fg-secondary:   var(--ink-500);
  --fg-tertiary:    var(--ink-300);
  --fg-accent:      var(--forest-700);
  --fg-on-dark:     var(--paper);

  --bg-page:        var(--paper);
  --bg-section:     var(--paper-deep);
  --bg-card:        var(--paper-card);
  --bg-tint:        var(--paper-tint);
  --bg-dark:        var(--ink-900);
  --bg-accent:      var(--forest-700);
  --bg-accent-soft: var(--forest-50);

  --line-hairline:  var(--ink-200);
  --line-rule:      var(--ink-100);
  --line-strong:    var(--ink-900);
  --line-accent:    var(--forest-700);

  /* ---------- Type ---------- */
  --font-sans:    'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-serif:   'Instrument Serif', 'Iowan Old Style', Georgia, serif;

  --fw-light:     300;
  --fw-regular:   400;
  --fw-medium:    500;
  --fw-semi:      600;

  /* Web scale (px) — B2C reads larger than print */
  --fs-display-xl: 88px;
  --fs-display:    64px;
  --fs-h1:         44px;
  --fs-h2:         28px;
  --fs-h3:         20px;
  --fs-h4:         17px;
  --fs-body:       16px;
  --fs-small:      14px;
  --fs-micro:      12px;
  --fs-label:      11px;

  --ls-display:    -0.02em;
  --ls-h1:         -0.015em;
  --ls-h2:         -0.01em;
  --ls-tight:      -0.005em;
  --ls-body:       0;
  --ls-label:      0.14em;
  --ls-kicker:     0.2em;

  --lh-tight:      1.05;
  --lh-heading:    1.2;
  --lh-body:       1.55;
  --lh-loose:      1.7;

  /* ---------- Spacing (4pt) ---------- */
  --sp-1:   4px;
  --sp-2:   8px;
  --sp-3:   12px;
  --sp-4:   16px;
  --sp-5:   20px;
  --sp-6:   24px;
  --sp-8:   32px;
  --sp-10:  40px;
  --sp-12:  48px;
  --sp-16:  64px;
  --sp-20:  80px;
  --sp-24:  96px;
  --sp-32:  128px;

  /* ---------- Borders & radii ---------- */
  --b-hair:    0.5px solid var(--line-hairline);
  --b-rule:    1px solid var(--line-hairline);
  --b-strong:  1px solid var(--ink-900);
  --b-accent:  2px solid var(--forest-700);
  --b-marker:  3px solid var(--forest-700);

  /* B2C SaaS may use small radii — kept tiny */
  --r-none:  0;
  --r-xs:    2px;
  --r-sm:    4px;
  --r-md:    8px;     /* cards */
  --r-pill:  999px;   /* badges only */

  /* ---------- Layout ---------- */
  --content-max:       1180px;
  --content-narrow:    760px;
  --gutter-mobile:     20px;
  --gutter-desktop:    32px;

  /* ---------- Motion ---------- */
  --ease:        cubic-bezier(0.2, 0.6, 0.2, 1);
  --t-fast:      120ms;
  --t-base:      180ms;
  --t-slow:      280ms;

  /* ---------- Elevation (very restrained) ---------- */
  /* Brand allows cards to sit on hairline OR fill, not both.
     A single ultra-soft shadow is allowed for sticky elements only. */
  --shadow-sticky: 0 1px 2px rgba(21, 20, 15, 0.04), 0 8px 24px rgba(21, 20, 15, 0.06);
}

/* =====================================================================
   Reset + base
   ===================================================================== */

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

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-weight: var(--fw-regular);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--fg-primary);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
button { font-family: inherit; }

::selection { background: var(--forest-100); color: var(--ink-900); }

/* =====================================================================
   Type primitives
   ===================================================================== */

.t-display-xl, .t-display, .t-h1 {
  font-family: var(--font-serif);
  font-weight: var(--fw-regular);
  letter-spacing: var(--ls-display);
  line-height: var(--lh-tight);
  color: var(--fg-primary);
  margin: 0;
}
.t-display-xl { font-size: clamp(56px, 9vw, var(--fs-display-xl)); }
.t-display    { font-size: clamp(40px, 6.5vw, var(--fs-display)); }
.t-h1         { font-size: clamp(32px, 4.5vw, var(--fs-h1)); line-height: 1.1; letter-spacing: var(--ls-h1); }

.t-h2 {
  font-family: var(--font-sans);
  font-weight: var(--fw-medium);
  font-size: var(--fs-h2);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-h2);
  margin: 0;
}
.t-h3 {
  font-family: var(--font-sans);
  font-weight: var(--fw-medium);
  font-size: var(--fs-h3);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-tight);
  margin: 0;
}
.t-h4 {
  font-family: var(--font-sans);
  font-weight: var(--fw-medium);
  font-size: var(--fs-h4);
  line-height: 1.4;
  margin: 0;
}
.t-body  { font-size: var(--fs-body); line-height: var(--lh-body); margin: 0; }
.t-small { font-size: var(--fs-small); color: var(--fg-secondary); margin: 0; }
.t-micro { font-size: var(--fs-micro); color: var(--fg-secondary); margin: 0; }

.t-label {
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--fg-accent);
}
.t-kicker {
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-kicker);
  text-transform: uppercase;
  color: var(--fg-accent);
}
.t-italic-serif { font-family: var(--font-serif); font-style: italic; font-weight: var(--fw-regular); }

/* Links */
a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line-hairline); transition: border-color var(--t-fast) var(--ease); }
a:hover { border-bottom-color: var(--ink-900); }

/* Hairline rule */
.rule { height: 1px; background: var(--line-hairline); border: 0; margin: 0; }
.rule--strong { background: var(--ink-900); height: 1px; }
.rule--accent { background: var(--forest-700); height: 2px; }

/* Container */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter-mobile);
}
@media (min-width: 720px) {
  .container { padding: 0 var(--gutter-desktop); }
}
.container--narrow { max-width: var(--content-narrow); }

/* Strong = medium (never bold per brand) */
strong, b { font-weight: var(--fw-medium); }

/* =====================================================================
   Accessibility: focus-visible (A2) + reduced motion (A1)
   ===================================================================== */

*:focus { outline: none; }
*:focus-visible {
  outline: 3px solid var(--forest-700, #2E5D4A);
  outline-offset: 2px;
  border-radius: 4px;
}
.btn:focus-visible {
  outline: 3px solid var(--forest-700);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto; }
}
