/* LS Pool & Spa — Design System + Skin engine */

:root {
  /* Default palette: Modernized navy + cream (Monica's pick) */
  --ink: #0B1F3A;
  --ink-2: #15315C;
  --ink-soft: #2B4870;
  --paper: #F5EFE6;
  --paper-2: #EFE6D6;
  --paper-3: #FBF7F0;
  --aqua: #5BA8C4;
  --aqua-deep: #2E7A95;
  --sand: #D9C5A7;
  --star: #E0A11E; /* review gold — readable on cream, unlike --sand */
  --line: rgba(11, 31, 58, 0.12);
  --line-soft: rgba(11, 31, 58, 0.06);
  --muted: rgba(11, 31, 58, 0.72);

  /* Type */
  --font-display: "Manrope", -apple-system, sans-serif;
  --font-body: "Manrope", -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Spacing scale */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-6: 24px; --space-8: 32px; --space-12: 48px; --space-16: 64px;
  --space-20: 80px; --space-24: 96px; --space-32: 128px;

  /* Density */
  --section-y: var(--space-32);
  --container-max: 1280px;
  --container-pad: clamp(20px, 4vw, 48px);

  /* SKIN tokens (overridden by [data-skin]) — defaults = Varm */
  --radius-card: 20px;
  --radius-img: 18px;
  --radius-btn: 999px;
  --radius-pill: 999px;
  --radius-field: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 18px 44px -26px rgba(11,31,58,0.22);
  --shadow-soft: 0 10px 30px -18px rgba(11,31,58,0.18);
  --bg-alt: var(--paper-2);
  --bg-card: var(--paper-3);
  --head-weight: 600;
  --head-tracking: -0.02em;
  --head-leading: 1.04;
  --eyebrow-weight: 600;
  --eyebrow-tracking: 0.14em;
  --motif-opacity: 0.5;
  --hairline: 1px solid var(--line);
  --border-card: 1px solid var(--line-soft);
}

/* ============ PALETTES ============ */
[data-palette="tropical"] {
  --ink: #0A3D3D; --ink-2: #115E59; --ink-soft: #1D6E69;
  --paper: #FBF6EC; --paper-2: #F4ECD9; --paper-3: #FFFCF4;
  --aqua: #14B8A6; --aqua-deep: #0D9488; --sand: #F5C57E;
  --line: rgba(10,61,61,0.14); --line-soft: rgba(10,61,61,0.06); --muted: rgba(10,61,61,0.72);
}
[data-palette="midnight"] {
  --ink: #050B17; --ink-2: #0F1B33; --ink-soft: #1F2E50;
  --paper: #F2F1EE; --paper-2: #E6E5E1; --paper-3: #FFFFFE;
  --aqua: #7FB8CE; --aqua-deep: #3D7A92; --sand: #C7BEAA;
  --line: rgba(5,11,23,0.14); --line-soft: rgba(5,11,23,0.06); --muted: rgba(5,11,23,0.72);
}

/* ============ TYPE PAIRINGS ============ */
[data-type="sans"] { --font-display: "Manrope", -apple-system, sans-serif; --font-body: "Manrope", -apple-system, sans-serif; }
[data-type="editorial"] { --font-display: "Fraunces", serif; --font-body: "Inter", -apple-system, sans-serif; }
[data-type="modern"] { --font-display: "Instrument Serif", serif; --font-body: "Inter Tight", -apple-system, sans-serif; }
[data-type="classic"] { --font-display: "Cormorant Garamond", serif; --font-body: "Manrope", -apple-system, sans-serif; }
/* serif displays read better a touch heavier-tracked */
[data-type="editorial"], [data-type="modern"], [data-type="classic"] { --head-weight: 400; }

/* ============ DENSITY ============ */
[data-density="compact"] { --section-y: var(--space-16); }
[data-density="spacious"] { --section-y: var(--space-32); }

/* ============ SKINS ============ */
/* Varm — default (warm, soft, personal). Friendly hero. */
[data-skin="varm"] {
  --radius-card: 20px; --radius-img: 18px; --radius-btn: 999px; --radius-pill: 999px; --radius-field: 12px;
  --shadow-card: 0 18px 44px -26px rgba(11,31,58,0.22);
  --bg-alt: var(--paper-2); --bg-card: var(--paper-3);
  --head-weight: 600; --head-tracking: -0.02em;
  --motif-opacity: 0.55;
}
/* Redaktionell — editorial, sharp, big type, hairlines. Editorial hero. */
[data-skin="redaktionell"] {
  --radius-card: 3px; --radius-img: 2px; --radius-btn: 4px; --radius-pill: 4px; --radius-field: 3px;
  --shadow-card: none; --shadow-soft: none;
  --bg-alt: #F1EEE7; --bg-card: #FCFAF5;
  --head-weight: 500; --head-tracking: -0.035em; --head-leading: 0.98;
  --eyebrow-tracking: 0.22em;
  --motif-opacity: 0;
  --border-card: 1px solid var(--line);
}
/* Djup — dramatic, immersive, cooler & darker tints, sharper rounding. Immersive hero. */
[data-skin="djup"] {
  --radius-card: 12px; --radius-img: 10px; --radius-btn: 8px; --radius-pill: 999px; --radius-field: 8px;
  --shadow-card: 0 24px 60px -30px rgba(5,12,28,0.5);
  --bg-alt: #E8E6E0; --bg-card: #FBFAF6;
  --head-weight: 700; --head-tracking: -0.03em;
  --motif-opacity: 0.25;
  --line: color-mix(in srgb, var(--ink) 22%, transparent);
}
/* Kust — coastal, airy, organic, prominent waves. Coastal hero. */
[data-skin="kust"] {
  --radius-card: 26px; --radius-img: 22px; --radius-btn: 999px; --radius-pill: 999px; --radius-field: 16px;
  --shadow-card: 0 22px 50px -30px rgba(20,90,110,0.28);
  --bg-alt: #E9F0EE; --bg-card: #FBFCFA;
  --head-weight: 600; --head-tracking: -0.022em;
  --motif-opacity: 1;
}

/* ============ BASE ============ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--head-weight);
  letter-spacing: var(--head-tracking);
  line-height: var(--head-leading);
  margin: 0;
  text-wrap: balance;
}
p { text-wrap: pretty; margin: 0; }

/* ============ LAYOUT ============ */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--container-pad); }
.section { padding-block: var(--section-y); }
.section--alt { background: var(--bg-alt); }

.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: var(--eyebrow-weight);
  letter-spacing: var(--eyebrow-tracking);
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; opacity: 0.6; }
[data-skin="redaktionell"] .eyebrow::before { width: 28px; }
[data-skin="kust"] .eyebrow::before { width: 10px; height: 10px; border-radius: 50%; background: var(--aqua); opacity: 1; }

/* ============ HEADER ============ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 78px; gap: 28px; flex-wrap: nowrap; }
.site-nav { display: flex; align-items: center; gap: 2px; }
.site-nav a {
  padding: 8px 13px; font-size: 14px; font-weight: 600; border-radius: var(--radius-pill);
  color: var(--ink); opacity: 0.72; transition: all 0.15s ease; white-space: nowrap;
}
.site-nav a:hover { opacity: 1; background: var(--bg-alt); }
.site-nav a[aria-current="page"] { opacity: 1; background: var(--bg-alt); }
.site-header__cta { display: flex; align-items: center; gap: 12px; }
.phone-link { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; white-space: nowrap; }
.phone-link svg { width: 14px; height: 14px; opacity: 0.7; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 22px; border: 1px solid transparent; border-radius: var(--radius-btn);
  font-size: 14px; font-weight: 600; transition: all 0.18s ease; white-space: nowrap;
}
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: var(--ink-2); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: var(--bg-alt); border-color: var(--ink); }
.btn--accent { background: var(--aqua); color: white; }
.btn--accent:hover { background: var(--aqua-deep); }
.btn--sm { padding: 9px 16px; font-size: 13px; }
.btn--lg { padding: 18px 28px; font-size: 15px; }
.btn svg { width: 14px; height: 14px; }

/* ============ FOOTER ============ */
.site-footer { background: var(--ink); color: var(--paper); padding: 80px 0 28px; }
.site-footer a { color: var(--paper); opacity: 0.7; transition: opacity 0.15s; }
.site-footer a:hover { opacity: 1; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 56px; border-bottom: 1px solid rgba(255,255,255,0.12); }
.footer-grid h5 { font-family: var(--font-body); font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; margin: 0 0 18px; opacity: 0.5; }
.footer-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 28px; font-size: 12px; opacity: 0.55; gap: 16px; flex-wrap: wrap; }

/* ============ CARD / FORM ============ */
.card { background: var(--bg-card); border: var(--border-card); border-radius: var(--radius-card); overflow: hidden; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 15px; background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius-field); padding: 12px 14px; color: var(--ink); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ink) 18%, transparent);
}

/* ============ FOCUS (keyboard) ============ */
/* currentColor adapts: ink outline on light sections, paper on navy/dark */
:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; border-radius: 3px; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--ink); outline-offset: 1px;
}
:focus:not(:focus-visible) { outline: none; }

/* ============ MOTIF (placeholder labels, waves) ============ */
.ph-note {
  background: rgba(11,31,58,0.6); color: var(--paper); font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.06em; padding: 6px 12px; border-radius: 999px; text-transform: uppercase; white-space: nowrap;
}
.wave-divider { display: block; width: 100%; height: 60px; opacity: var(--motif-opacity); }
.wave-divider path { fill: var(--aqua); }

/* ============ UTIL ============ */
.divider { height: 1px; background: var(--line); }
.tabular { font-variant-numeric: tabular-nums; }
[data-hide-tweaks="true"] .tweaks-panel { display: none !important; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1080px) { .site-nav { display: none; } }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; }
  .site-header__inner { height: 64px; }
  .phone-link { display: none; }
}

/* ============ IN-PAGE SCROLL + REVEAL (products editorial) ============ */
html { scroll-behavior: smooth; }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal.in { opacity: 1 !important; transform: none !important; transition: none !important; }
}
