/* ===== Voorstel: Huizestolk als 3D-wereld ===== */

:root {
  --hs-groen:     #4a8c2a;
  --hs-donker:    #3d4147;
  --hs-midden:    #4a4f55;
  --hs-tekst:     #c8cdd2;
  --hs-tekst-dim: #666d75;
  --bg:           var(--hs-donker);
  --panel:        rgba(74, 79, 85, 0.78);
  --tekst:        var(--hs-tekst);
  --tekst-dim:    var(--hs-tekst-dim);
  --schaduw:      rgba(0, 0, 0, 0.45);

  --rail-strip: 65px;
  --rail-groen: 90px;
}

[data-theme="light"] {
  --bg:        #b9d2e3;
  --panel:     rgba(245, 246, 248, 0.82);
  --tekst:     #3d4147;
  --tekst-dim: #8a919a;
  --schaduw:   rgba(60, 65, 71, 0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: linear-gradient(var(--bg), var(--bg)) fixed;
  color: var(--tekst);
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-weight: 300;
  transition: background 1s ease, color 1s ease;
}
[data-theme="light"] body,
[data-theme="light"] {
  background: linear-gradient(#9ec4dd, #dce8f0) fixed;
}

/* ===== Linker rail ===== */
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: calc(var(--rail-strip) + var(--rail-groen));
  display: grid;
  grid-template-columns: var(--rail-strip) var(--rail-groen);
  z-index: 50;
}
.rail-strip { background: rgba(0, 0, 0, 0.12); }
.rail-green { background: var(--hs-groen); position: relative; }

.br {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  color: rgba(255, 255, 255, 0.92);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: .06em;
  white-space: nowrap;
}

/* ===== 3D canvas, vast op de achtergrond ===== */
#scene3d {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}

/* ===== Navigatiestippen ===== */
.dots {
  position: fixed;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 40;
}
.dots a {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--tekst-dim);
  opacity: 0.6;
  transition: all .3s ease;
}
.dots a.actief {
  background: var(--hs-groen);
  opacity: 1;
  transform: scale(1.35);
}

/* ===== Schermen en panelen ===== */
main { position: relative; z-index: 10; }

.screen {
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  margin-left: calc(var(--rail-strip) + var(--rail-groen));
  padding: 0 56px;
}

.panel {
  background: var(--panel);
  backdrop-filter: blur(8px);
  border-radius: 14px;
  border-left: 6px solid var(--hs-groen);
  box-shadow: 0 18px 50px var(--schaduw);
  padding: 34px 38px;
  max-width: 460px;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .7s ease, transform .7s ease, background 1s ease;
}
.panel.visible { opacity: 1; transform: translateY(0); }

.side-right { margin-left: auto; }
.side-left  { margin-right: auto; }
.center-panel { margin: 0 auto; text-align: center; }

/* ===== Hero ===== */
.hero-panel {
  background: transparent;
  border-left: none;
  box-shadow: none;
  backdrop-filter: none;
  max-width: none;
  align-self: flex-start;
  margin-top: 8vh;
}
.greeting {
  font-size: 20px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--hs-groen);
  font-weight: 600;
}
.names {
  font-size: clamp(34px, 5.5vw, 64px);
  font-weight: 200;
  letter-spacing: .02em;
  margin: 10px 0;
  text-shadow: 0 2px 18px var(--schaduw);
}
.names .amp { color: var(--tekst-dim); font-size: .6em; }
.clock {
  font-size: 26px;
  font-weight: 200;
  color: var(--tekst-dim);
  font-variant-numeric: tabular-nums;
}
.scroll-hint {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--tekst-dim);
  font-size: 14px;
  letter-spacing: .1em;
  animation: hint 2.4s infinite;
}
@keyframes hint {
  0%, 100% { transform: translate(-50%, 0); opacity: .7; }
  50%      { transform: translate(-50%, 8px); opacity: 1; }
}

/* ===== Secties ===== */
.section-title {
  font-size: 21px;
  font-weight: 300;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.14);
  text-decoration: none;
  color: var(--tekst);
  font-size: 13.5px;
  transition: transform .2s ease, background .2s ease;
}
[data-theme="light"] .tile { background: rgba(255, 255, 255, 0.5); }
.tile:hover {
  transform: translateY(-4px) scale(1.04);
  background: rgba(74, 140, 42, 0.25);
}
.tile img { width: 38px; height: 38px; object-fit: contain; }

/* ===== Thema / footer ===== */
.theme-uitleg { color: var(--tekst-dim); margin-bottom: 16px; }
.theme-toggle { display: flex; gap: 18px; justify-content: center; }
.theme-toggle button {
  background: rgba(0, 0, 0, 0.16);
  border: 2px solid transparent;
  border-radius: 50%;
  width: 58px;
  height: 58px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .25s ease, border-color .25s ease;
}
[data-theme="light"] .theme-toggle button { background: rgba(255, 255, 255, 0.55); }
.theme-toggle button:hover { transform: translateY(-3px) scale(1.1); }
[data-theme="light"] #themeLight,
[data-theme="dark"] #themeDark { border-color: var(--hs-groen); }
.theme-toggle img { width: 28px; height: 28px; object-fit: contain; }
.footer-brand {
  margin-top: 26px;
  color: var(--tekst-dim);
  font-size: 14px;
  letter-spacing: .1em;
}

/* ===== Responsief ===== */
@media (max-width: 720px) {
  :root { --rail-strip: 0px; --rail-groen: 44px; }
  .br { font-size: 14px; bottom: 18px; }
  .screen { padding: 0 18px; }
  .panel { padding: 24px 22px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .dots { right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-hint { animation: none; }
  .panel { opacity: 1; transform: none; transition: none; }
}
