/* Base: variables, reset, body/background and global font/color basis. */

:root {
  --primary: #ff4d00;
  --primary-2: #d94300;
  --accent: #b83a22;
  --text: #f4f4f3;
  --muted: rgba(244, 244, 243, 0.72);
  --bg-base: #fff;
  --bg-light: #f5efe6;
  --bg-alt: #fdfcf9;
  --text-primary: #3a3a3a;
  --text-secondary: #6a6a6a;
  --accent-orange: #ff4d00;
  --accent-orange-light: rgba(255, 77, 0, 0.06);
  --border-light: rgba(255, 77, 0, 0.08);
  --shadow-soft: rgba(0, 0, 0, 0.08);
  --bg-warm-top: #f9f4ed;
  --bg-warm-mid: #f6ead8;
  --bg-warm-bottom: #f2dfc5;
  --surface-warm: #fffaf3;
  --surface-warm-2: #fff4e8;
  --text-warm: #3a2f28;
  --muted-warm: rgba(73, 58, 48, 0.78);
  --border-warm: rgba(170, 106, 58, 0.24);
  --warm-highlight: #f97316;
  --warm-highlight-2: #ff8a00;
  --warm-shadow: rgba(169, 99, 49, 0.24);
  --bbq-card-surface-top: #fffaf4;
  --bbq-card-surface-bottom: #fdf0e9;
  --bbq-card-border: rgba(186, 120, 64, 0.28);
  --bbq-card-text: #3a2f28;
  --bbq-card-muted: rgba(72, 55, 42, 0.78);
  --bbq-card-shadow: rgba(130, 79, 41, 0.16);
  --bbq-card-ember: #f97316;
  --bbq-card-selected-top: #fff7ed;
  --bbq-card-selected-bottom: #ffe7d2;
  --radius: 16px;
  --page-padding: clamp(10px, 2.6vw, 24px);
  --font-display: "Bangers", "Impact", "Haettenschweiler", "Arial Narrow", sans-serif;
  --font-body: "Outfit", "Segoe UI", system-ui, sans-serif;
}

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

html,
body {
  height: 100%;
  width: 100%;
}

html {
  font-size: clamp(15px, 0.24vw + 14px, 18px);
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
  isolation: isolate;

  --heat-x: 30%;
  --heat-y: 20%;
  --heat-x2: 70%;
  --heat-y2: 40%;
  --heat-x3: 50%;
  --heat-y3: 70%;

  background:
    radial-gradient(circle at var(--heat-x) var(--heat-y), rgba(255, 77, 0, 0.28), transparent 45%),
    radial-gradient(circle at var(--heat-x2) var(--heat-y2), rgba(255, 55, 20, 0.24), transparent 50%),
    radial-gradient(circle at var(--heat-x3) var(--heat-y3), rgba(200, 35, 10, 0.2), transparent 55%),
    linear-gradient(180deg, #0f0f10, #18181b 42%, #0b0b0c);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: repeating-radial-gradient(
    circle,
    rgba(255, 255, 255, 0.015),
    rgba(255, 255, 255, 0.015) 1px,
    transparent 2px,
    transparent 6px
  );
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  box-shadow: inset 0 0 160px rgba(0, 0, 0, 0.75);
  pointer-events: none;
  z-index: 0;
}

/* Warm BBQ Light Mode */
body.light-mode {
  --text: var(--text-warm);
  --muted: var(--muted-warm);
  --accent: var(--warm-highlight);
  --primary: var(--warm-highlight);
  --primary-2: var(--warm-highlight-2);
  --bbq-card-surface-top: #fffaf4;
  --bbq-card-surface-bottom: #fdf0e9;
  --bbq-card-border: rgba(186, 120, 64, 0.32);
  --bbq-card-text: #3a2f28;
  --bbq-card-muted: rgba(72, 55, 42, 0.8);
  --bbq-card-shadow: rgba(130, 79, 41, 0.18);
  --bbq-card-ember: #f97316;
  --bbq-card-selected-top: #fff7ed;
  --bbq-card-selected-bottom: #ffe7d2;
  color: var(--text-primary);
  background:
    radial-gradient(circle at var(--heat-x) var(--heat-y), rgba(255, 156, 84, 0.16), transparent 46%),
    radial-gradient(circle at var(--heat-x2) var(--heat-y2), rgba(255, 183, 114, 0.14), transparent 52%),
    linear-gradient(180deg, #f5efe6, #efe3d3);
  background-attachment: fixed;
}

body.light-mode::before {
  background: repeating-radial-gradient(
    circle,
    rgba(95, 60, 35, 0.04),
    rgba(95, 60, 35, 0.04) 1px,
    transparent 2px,
    transparent 7px
  );
  mix-blend-mode: multiply;
}

body.light-mode::after {
  box-shadow: inset 0 0 140px rgba(138, 83, 36, 0.12);
}

body.light-mode .navigatie {
  background: transparent;
  color: var(--text-warm);
}

body.light-mode .navigatie-links a {
  color: rgba(60, 40, 25, 0.82);
  text-shadow: none;
}

body.light-mode .menu-knop {
  background: rgba(255, 250, 240, 0.9);
  border-color: rgba(160, 95, 45, 0.25);
}

body.light-mode .menu-knop span {
  background: rgba(73, 47, 27, 0.9);
}

body.light-mode .card,
body.light-mode #output .card {
  background: linear-gradient(180deg, var(--surface-warm), var(--surface-warm-2));
  border-color: var(--border-warm);
  box-shadow: 0 20px 34px var(--warm-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

body.light-mode .card p,
body.light-mode .flow-hint,
body.light-mode .subtle {
  color: var(--muted-warm);
}

body.light-mode .flow-label,
body.light-mode .section-title,
body.light-mode .section-subtitle,
body.light-mode .card h2,
body.light-mode .card h3,
body.light-mode footer {
  color: var(--text-warm);
}

body.light-mode input,
body.light-mode .styled-input,
body.light-mode .styled-select,
body.light-mode select {
  background: rgba(255, 252, 246, 0.96);
  color: var(--text-warm);
  border-color: rgba(170, 106, 58, 0.3);
}

body.light-mode input::placeholder,
body.light-mode .styled-input::placeholder {
  color: rgba(73, 47, 27, 0.58);
}

body.light-mode .flip-front,
body.light-mode .flip-back {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(253, 241, 226, 0.95)),
    linear-gradient(180deg, #fffaf4, #fdf2e8);
  border-color: rgba(186, 120, 64, 0.24);
  color: var(--bbq-card-text);
}
