/* ============================================================
   MÅLERISERVICE LKPG — "Craft Studio" design system v2
   Refined: warm paper neutrals, whisper borders, compressed
   display type, single terracotta accent, generous rhythm.
   ============================================================ */

:root {
  /* Brand — craft terracotta, one accent */
  --accent: #b5542f;
  --accent-dark: #8f3f21;
  --accent-light: #e0875a;
  --accent-soft: #f4e5db;

  /* Warm neutrals (Notion-style, yellow-brown undertones) */
  --ink: #221a13;
  --ink-soft: #5c5147;
  --ink-mute: #93867a;
  --paper: #faf7f2;
  --paper-soft: #f1ebe1;
  --line: rgba(34, 26, 19, 0.1);
  --line-strong: rgba(34, 26, 19, 0.16);

  /* Type */
  --font-sans: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --font-display: Georgia, "Times New Roman", serif;

  /* Layout */
  --container: 76rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 0.75rem;
  --shadow: 0 1px 2px rgba(34, 26, 19, 0.04), 0 12px 32px rgba(34, 26, 19, 0.06);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

[id] {
  scroll-margin-top: 5.5rem; /* clears the single fixed header height (~70px), robust across all breakpoints */
}

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}
a, button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

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

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

/* Compressed display type (Framer-style tight tracking, Notion-style serif warmth) */
h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.06;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
  font-weight: 700;
  text-wrap: balance;
  color: var(--ink);
}
h1 { font-size: clamp(2.75rem, 7vw, 5rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(2rem, 4.5vw, 3.25rem); letter-spacing: -0.025em; }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1.1rem; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(4.5rem, 10vw, 7.5rem); }
.section--soft { background: var(--paper-soft); }

.section__label {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-dark); margin-bottom: 1rem;
}
.section__label::before { content: ""; width: 1.75rem; height: 2px; background: var(--accent); border-radius: 2px; }
.section__lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 46rem; }

/* ---- Buttons (normalized, pill) ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.95rem 1.7rem; min-height: 48px; border-radius: 999px;
  font-weight: 700; font-size: 1rem; line-height: 1.2; text-align: center;
  border: 1px solid transparent; cursor: pointer; font-family: inherit;
  transition: transform 0.15s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); color: #fff; box-shadow: 0 10px 24px rgba(181, 84, 47, 0.3); }
.btn--light { background: #fff; color: #221a13; }
.btn--light:hover { background: var(--accent-soft); color: #221a13; }
/* ghost-dark is always on a DARK hero — fixed light text/border (NOT var(--paper),
   which flips dark in dark mode → invisible on the dark hero). */
.btn--ghost-dark { background: transparent; color: #fbf9f5; border-color: rgba(251, 249, 245, 0.4); }
.btn--ghost-dark:hover { border-color: #fbf9f5; color: #fbf9f5; }

/* ---- Paint swatch ---- */
.swatches { display: flex; gap: 0.5rem; }
.swatch { width: 2.6rem; height: 2.6rem; border-radius: 50%; flex: none; border: 2px solid rgba(255,255,255,0.85); box-shadow: 0 4px 14px rgba(0,0,0,0.2); }

/* ---- Cards (whisper border + layered shadow) ---- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(34,26,19,0.04), 0 18px 44px rgba(34,26,19,0.09); }

/* ---- Utility ---- */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: -100%; left: 1rem; z-index: 100; background: var(--accent); color: #fff; padding: 0.75rem 1.25rem; border-radius: 0 0 0.5rem 0.5rem; font-weight: 700; }
.skip-link:focus { top: 0; }

@media print {
  .header, .footer, .contact__form, .btn { display: none !important; }
  body { font-size: 12pt; color: #000; background: #fff; }
  a { color: #000; text-decoration: underline; }
  .section { padding-block: 1rem; }
}

/* ============================================================
   DARK MODE — follows system setting by default, or the toggle.
   Flips the warm paper surfaces to a dark warm charcoal while
   keeping the charcoal hero/footer consistent. Set via data-theme.
   Uses html[data-theme=dark] (higher specificity than :root) so
   the accent override beats the config injection in Seo.astro.
   ============================================================ */
html[data-theme="dark"] {
  --accent: #e0875a;
  --accent-dark: #f0a27c;
  --accent-light: #e0875a;
  --accent-soft: rgba(224, 135, 90, 0.16);

  --ink: #f2ece3;
  --ink-soft: #c3b8ab;
  --ink-mute: #94897d;
  --paper: #191310;
  --paper-soft: #211a15;
  --line: rgba(242, 236, 227, 0.12);
  --line-strong: rgba(242, 236, 227, 0.22);

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.5);

  color-scheme: dark;
}
:root {
  color-scheme: light;
}
