:root {
  --bg: #FFFFFF;
  --bg-alt: #F2F3EF;
  --text: #1A2118;
  --text-muted: #5E6B5A;
  --accent: #3D6B6B;
  --accent-light: #EBF2F2;
  --warm: #C4965A;
  --warm-light: #F5EDE3;
  --border: #DDE0D8;
  --green: #3D6B4A;
  --red: #A04040;
  --red-light: #F5E8E8;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Karla', system-ui, sans-serif;

  --max-w: 820px;
  --radius: 4px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141916;
    --bg-alt: #1C211E;
    --text: #E5E7E2;
    --text-muted: #8B9486;
    --accent: #5BA3A3;
    --accent-light: #1A2D2D;
    --warm: #D4A86B;
    --warm-light: #2A2218;
    --border: #2D332A;
    --green: #6BAF7A;
    --red: #C06060;
    --red-light: #2A1818;
  }
}
:root[data-theme="dark"] {
  --bg: #141916;
  --bg-alt: #1C211E;
  --text: #E5E7E2;
  --text-muted: #8B9486;
  --accent: #5BA3A3;
  --accent-light: #1A2D2D;
  --warm: #D4A86B;
  --warm-light: #2A2218;
  --border: #2D332A;
  --green: #6BAF7A;
  --red: #C06060;
  --red-light: #2A1818;
}

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

html { scrollbar-gutter: stable; }

[hidden] { display: none !important; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2rem);
}

/* Typography */

h1, h2, h3 {
  font-family: var(--font-display);
  text-wrap: balance;
}

h1 {
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
  margin: 0 0 0.5rem;
}

h2 {
  font-weight: 600;
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  line-height: 1.2;
  margin: 0 0 1rem;
}

h3 {
  font-weight: 600;
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
}

p { margin: 0 0 1rem; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:hover { text-decoration-thickness: 2px; }

/* Navigation */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
  transition: box-shadow 0.2s;
}
.nav.scrolled {
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}
.nav-inner {
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2rem);
}
.nav-brand {
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}
.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.nav-links a {
  white-space: nowrap;
  font-size: 0.88rem;
  color: var(--text-muted);
  text-decoration: none;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.btn-primary { color: #fff; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  margin-right: -0.5rem;
  cursor: pointer;
  color: var(--text);
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px 0;
  background: currentColor;
}
@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem clamp(1.25rem, 4vw, 2rem) 1.25rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 6px 12px rgba(0,0,0,0.06);
  }
  .nav.open .nav-menu { display: flex; }
  .nav-menu a { padding: 0.75rem 0; font-size: 1rem; }
  .nav-menu a.btn-primary { margin-top: 0.5rem; padding: 0.75rem 1rem !important; font-size: 1rem !important; }
}

/* Hero */

.hero {
  padding: clamp(3rem, 10vw, 6rem) 0 clamp(2rem, 6vw, 4rem);
  text-align: center;
}
.hero-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 480px;
  margin: 0 auto 2rem;
}

/* Sections */

.section {
  padding: clamp(2.5rem, 6vw, 4rem) 0;
}
.section + .section {
  border-top: 1px solid var(--border);
}

.section-eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

/* Cards */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.card {
  padding: 1.5rem;
  background: var(--bg-alt);
  border-radius: var(--radius);
}
.card h3 { font-family: var(--font-body); font-size: 1rem; }
.card p { font-size: 0.9rem; color: var(--text-muted); margin: 0; }

/* Review */

.review-score {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 500;
  color: var(--accent);
  line-height: 1;
}

.review-quote {
  font-style: italic;
  color: var(--text-muted);
  padding-left: 1rem;
  border-left: 2px solid var(--border);
  margin: 1rem 0;
}
.review-author {
  font-size: 0.82rem;
  color: var(--text-muted);
  opacity: 0.7;
}

/* Button */

.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: opacity 0.15s;
}
.btn:hover { opacity: 0.85; }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-secondary {
  background: var(--bg-alt);
  color: var(--text);
  border: 1px solid var(--border);
}

/* Form */

.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.form-group textarea { resize: vertical; min-height: 80px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 480px) {
  .form-row { grid-template-columns: 1fr; }
}

/* Calendar */

.calendar {
  margin: 1.5rem 0;
}
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.calendar-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
}
.calendar-nav {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  color: var(--text);
  font-size: 0.9rem;
}
.calendar-nav:hover { background: var(--bg-alt); }

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}
.calendar-day-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.5rem 0;
  letter-spacing: 0.04em;
}
.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  border-radius: var(--radius);
  cursor: pointer;
  position: relative;
}
.calendar-day:hover { background: var(--bg-alt); }
.calendar-day.empty { cursor: default; }
.calendar-day.empty:hover { background: none; }
.calendar-day.blocked {
  color: var(--text-muted);
  opacity: 0.35;
  cursor: not-allowed;
  text-decoration: line-through;
}
.calendar-day.blocked:hover { background: none; }
.calendar-day.selected {
  background: var(--accent);
  color: #fff;
}
.calendar-day.in-range {
  background: var(--accent-light);
  color: var(--text);
}
.calendar-day.today {
  font-weight: 600;
}
.calendar-day.past {
  opacity: 0.25;
  cursor: not-allowed;
}
.calendar-day.past:hover { background: none; }

/* Status badges (beheerpagina) */

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.55rem;
  border-radius: 2px;
}
.badge-green { background: color-mix(in srgb, var(--green) 15%, transparent); color: var(--green); }
.badge-orange { background: var(--warm-light); color: var(--warm); }
.badge-red { background: var(--red-light); color: var(--red); }
.badge-grey { background: var(--bg-alt); color: var(--text-muted); }

/* Admin table */

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.admin-table th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid var(--border);
}
.admin-table td {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }

/* Alerts */

.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}
.alert-success { background: color-mix(in srgb, var(--green) 10%, transparent); color: var(--green); }
.alert-error { background: var(--red-light); color: var(--red); }
.alert-info { background: var(--accent-light); color: var(--accent); }

/* Gallery */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}
.gallery img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius);
}

/* Footer */

.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

/* Utilities */

.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.hidden { display: none !important; }

/* Loading spinner */

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 0.5rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Print */
@media print {
  .nav, .footer { display: none; }
  body { font-size: 10pt; }
}

/* Inloggen (planning en beheer) */

.login-form {
  max-width: 360px;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 2rem;
}
.login-form h2 { font-size: 1.4rem; margin-bottom: 1rem; }
.login-error { color: var(--red); font-size: 0.88rem; margin: 1rem 0 0; }
.nav-user { display: flex; gap: 0.75rem; align-items: center; font-size: 0.82rem; }
.nav-user button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
}
.password-field { position: relative; }
.password-field input { padding-right: 4.5rem; }
.password-field button {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font: inherit;
  font-size: 0.82rem;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
}
