/* ==========================================================================
   Heerendispuut FUBAR — stijlblad
   ========================================================================== */

:root {
  /* Huiskleuren uit het logo: oranje en blauw */
  --navy: #0c1a3d;
  --navy-2: #142a5e;
  --blue: #0033a0;
  --gold: #f26b1d;
  --gold-soft: #ffb27a;
  --cream: #f7f4ee;
  --paper: #ffffff;
  --ink: #1a1d24;
  --muted: #5e6470;
  --line: #e4ddd0;

  --correct: #3d7a4f;
  --present: #d9a13b;
  --absent: #5a5f69;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* Wide Latin als het lokaal geinstalleerd is, anders Ultra (Google Fonts) */
  --wide: "Wide Latin", "Ultra", Georgia, serif;

  --max: 1120px;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(15, 27, 45, 0.08);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }

/* Grijs logo als lichte schaduw achter de lichte secties; scrolt mee met de pagina */
.section:not(.section-alt) {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.section:not(.section-alt)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url("../fotos/logo.png") center 40px / auto min(85%, 540px) no-repeat;
  filter: grayscale(1);
  opacity: 0.07;
}

/* Op de ledenpagina blijft het logo midden in beeld staan tijdens het scrollen */
.section.section-leden::before {
  background-image: url("../fotos/logo-grijs.png");
  background-position: center center;
  background-size: min(78vw, 760px) auto;
  background-attachment: fixed;
  filter: none;
}

.fubar {
  font-family: var(--wide);
  font-weight: 400;
}

/* "FUBAR" in Wide Latin als afbeelding (fotos/fubar-wit.png), zodat het
   ook op telefoons klopt. 0.74em = hoogte van de hoofdletters bij die tekstgrootte. */
.wordmark {
  display: inline-block;
  height: 0.74em;
  width: auto;
  max-width: none;
  vertical-align: baseline;
}

.brand .wordmark {
  display: block;
  height: 0.74em;
  background: none;
  border-radius: 0;
  padding: 0;
  margin: 0.2em 0 0.3em;
}

.hero h1 .wordmark {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  filter: drop-shadow(0 2px 14px rgba(0, 0, 0, 0.45));
}

.wordle-head h1 .wordmark { display: block; margin: 0 auto; }

img { max-width: 100%; display: block; }

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: 0.01em;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 12px;
}

/* ---------- Header / navigatie ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 27, 45, 0.97);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(242, 107, 29, 0.25);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
}

.brand img {
  height: 46px;
  width: auto;
  background: #fff;
  border-radius: 8px;
  padding: 4px 6px;
}

.brand-text {
  font-family: var(--wide);
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.brand-text small {
  display: block;
  font-family: var(--sans);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--gold-soft);
  margin-top: -2px;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: #fff;
  border-color: var(--gold);
}

@media (max-width: 900px) {
  .nav-links { gap: 20px; }
  .nav-links a { letter-spacing: 0.08em; }
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: #fff;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }

  .nav-links {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--navy);
    border-bottom: 1px solid rgba(242, 107, 29, 0.25);
    display: none;
  }

  .nav-links.open { display: flex; }

  .nav-links a {
    display: block;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .nav-links a[aria-current="page"] { border-color: rgba(255, 255, 255, 0.06); color: var(--gold); }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(12, 26, 61, 0.78) 0%, rgba(12, 26, 61, 0.55) 45%, rgba(12, 26, 61, 0.92) 100%),
    url("../fotos/zeilen-web.jpg") center 40% / cover no-repeat,
    var(--navy);
  color: #fff;
  text-align: center;
  padding: 88px 0 120px;
  min-height: min(82vh, 760px);
  display: flex;
  align-items: center;
}

.hero h1,
.hero .since { text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45); }

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.hero-logo {
  width: 200px;
  height: auto;
  margin: 0 auto 28px;
  background: #fff;
  border-radius: 16px;
  padding: 14px 18px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
}

.hero-logo-fallback {
  width: 150px;
  height: 150px;
  margin: 0 auto 32px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--gold);
}

.hero h1 {
  font-family: var(--wide);
  font-size: clamp(2.2rem, 7vw, 4.4rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}

.hero .since {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.35rem;
  color: var(--gold-soft);
  margin: 0;
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 28px auto 0;
  color: var(--gold);
}

.divider span {
  width: 60px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.divider i {
  width: 7px;
  height: 7px;
  background: currentColor;
  transform: rotate(45deg);
}

/* ---------- Secties ---------- */

.section { padding: 88px 0; }

.section-alt { background: var(--paper); }

.about {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 64px;
  align-items: start;
}

.about h2 { font-size: clamp(2rem, 4vw, 2.8rem); }

.about-text p { margin: 0 0 1.2em; color: #2c313b; }

.about-text p:first-child::first-letter {
  float: left;
  font-family: var(--serif);
  font-size: 4.2rem;
  line-height: 0.8;
  padding: 6px 10px 0 0;
  color: var(--navy);
  font-weight: 700;
}

@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; gap: 24px; }
}

/* Gewone verwijzingen onderaan een pagina, als lopende tekst */
.verder {
  border-top: 1px solid var(--line);
  padding: 40px 0 48px;
}

.verder p {
  max-width: 720px;
  margin: 0 0 0.6em;
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.5;
  color: #2c313b;
}

.verder a {
  color: var(--navy);
  font-weight: 600;
  text-decoration-color: var(--gold);
  text-underline-offset: 3px;
}

.verder a:hover { color: var(--gold); }

/* ---------- Links ---------- */

.links {
  list-style: none;
  max-width: 760px;
  margin: 0 auto;
  padding: 0;
  border-top: 2px solid var(--gold);
}

.links li {
  display: grid;
  grid-template-columns: 200px 1fr;
  column-gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.links a {
  grid-row: span 2;
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--navy);
  text-decoration-color: var(--gold);
  text-underline-offset: 4px;
}

.links a:hover { color: var(--gold); }

.links span { color: #2c313b; }

.links small { color: var(--muted); font-size: 0.85rem; }

@media (max-width: 560px) {
  .links li { grid-template-columns: 1fr; }
  .links a { grid-row: auto; margin-bottom: 4px; }
}

/* ---------- Geschiedenis ---------- */

.verhaal {
  max-width: 760px;
  margin: 0 auto;
}

.verhaal p { margin: 0 0 1.3em; color: #2c313b; }

.verhaal::after { content: ""; display: block; clear: both; }

.bestuursfoto {
  float: right;
  width: 243px;
  margin: 6px 0 20px 36px;
  padding: 10px 10px 6px;
  background: var(--paper);
  border: 1px solid var(--line);
  transform: rotate(1.5deg);
}

.bestuursfoto figcaption {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  text-align: center;
  color: var(--muted);
  padding-top: 6px;
}

@media (max-width: 560px) {
  .bestuursfoto { float: none; margin: 0 auto 28px; transform: none; }
}

/* ---------- Pagina-kop (subpagina's) ---------- */

.page-head {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
  text-align: center;
  padding: 72px 0 64px;
}

.page-head h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); margin-bottom: 8px; }

.page-head p { color: rgba(255, 255, 255, 0.72); margin: 0 auto; max-width: 560px; }

/* ---------- Leden ---------- */

.leden-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 980px;
  margin: 0 auto 40px;
}

.search {
  flex: 1;
  max-width: 360px;
  padding: 12px 16px;
  font: inherit;
  font-size: 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  outline: none;
}

.search:focus { border-color: var(--gold); }

.lijst-sectie {
  max-width: 980px;
  margin: 0 auto 56px;
}

.lijst-sectie h2 {
  font-size: 2rem;
  color: var(--navy);
  border-bottom: 2px solid var(--gold);
  padding-bottom: 8px;
  margin-bottom: 0;
}

.lijst {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 56px;
}

.lijst-rij {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.lijst-rij.zonder-label { grid-template-columns: 1fr; grid-column: 1 / -1; }

.lijst-label {
  font-weight: 600;
  color: var(--navy);
}

.lijst-namen {
  list-style: none;
  margin: 0;
  padding: 0;
}

.lijst-namen li { padding: 2px 0; }

@media (max-width: 720px) {
  .lijst { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .lijst-rij { grid-template-columns: 1fr; gap: 4px; }
}

.leeg { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.88rem;
  padding: 40px 0;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer strong {
  font-family: var(--wide);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: #fff;
}

/* ---------- Wordle ---------- */

.wordle-page { background: var(--navy); color: #fff; }

.wordle-page .site-footer { background: #0b1422; }

.wordle {
  max-width: 500px;
  margin: 0 auto;
  padding: 32px 16px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wordle-head { text-align: center; margin-bottom: 24px; }

.wordle-head h1 { font-size: clamp(1.9rem, 7vw, 2.6rem); margin-bottom: 0; letter-spacing: 0.02em; }

.wordle-head h1 .fubar { display: block; font-size: 0.9em; }

.wordle-head h1 .wordle-sub {
  display: block;
  font-family: var(--serif);
  font-size: 0.85em;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-top: 2px;
}

.wordle-head p { margin: 0; color: rgba(255, 255, 255, 0.6); font-size: 0.9rem; }

.wordle-actions { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }

.icon-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 999px;
  padding: 6px 14px;
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

.icon-btn:hover { border-color: var(--gold); color: var(--gold); }

.board {
  display: grid;
  grid-template-rows: repeat(6, 1fr);
  gap: 6px;
  width: min(330px, 100%);
  margin-bottom: 28px;
}

.row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.row.shake { animation: shake 0.5s; }

.tile {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  font-family: var(--sans);
  font-size: 2rem;
  font-weight: 700;
  text-transform: uppercase;
  border: 2px solid rgba(255, 255, 255, 0.18);
  user-select: none;
}

.tile.filled { border-color: rgba(255, 255, 255, 0.5); animation: pop 0.1s; }

.tile.correct { background: var(--correct); border-color: var(--correct); }
.tile.present { background: var(--present); border-color: var(--present); color: var(--navy); }
.tile.absent  { background: var(--absent);  border-color: var(--absent); }

.tile.flip { animation: flip 0.5s ease forwards; }

.tile.win { animation: bounce 0.6s ease; }

.keyboard { width: 100%; user-select: none; }

.kb-row {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 8px;
}

.key {
  flex: 1;
  max-width: 44px;
  height: 56px;
  border: 0;
  border-radius: 6px;
  background: #3a4a63;
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
}

.key.wide { max-width: 68px; flex: 1.5; font-size: 0.72rem; }

.key:hover { filter: brightness(1.12); }

.key.correct { background: var(--correct); }
.key.present { background: var(--present); color: var(--navy); }
.key.absent  { background: #273246; color: rgba(255, 255, 255, 0.45); }

.toast {
  position: fixed;
  top: 96px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  color: var(--navy);
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 6px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 100;
}

.toast.show { opacity: 1; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 18, 0.7);
  display: none;
  place-items: center;
  padding: 16px;
  z-index: 90;
}

.modal.open { display: grid; }

.modal-box {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius);
  width: min(420px, 100%);
  padding: 32px 28px 28px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.modal-box h2 { font-size: 2rem; color: var(--navy); }

.modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: 0;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 20px 0;
}

.stats strong { display: block; font-size: 1.8rem; font-family: var(--serif); color: var(--navy); line-height: 1.1; }

.stats span { font-size: 0.72rem; color: var(--muted); line-height: 1.2; display: block; }

.countdown { font-size: 0.9rem; color: var(--muted); margin-bottom: 18px; }

.countdown b { display: block; font-size: 1.6rem; color: var(--navy); font-variant-numeric: tabular-nums; }

.btn {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 12px 28px;
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.btn:hover { background: var(--navy-2); }

.howto { text-align: left; font-size: 0.95rem; }

.howto .row { width: 220px; margin: 8px 0 4px; }

.howto .tile { font-size: 1.3rem; border-color: #c9ccd3; color: var(--navy); }

.howto .tile.correct,
.howto .tile.absent { color: #fff; }

@keyframes pop { 50% { transform: scale(1.1); } }

@keyframes flip {
  0%   { transform: rotateX(0); }
  50%  { transform: rotateX(90deg); }
  100% { transform: rotateX(0); }
}

@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-6px); }
  40%, 60% { transform: translateX(6px); }
}

@keyframes bounce {
  0%, 20% { transform: translateY(0); }
  40% { transform: translateY(-24px); }
  50% { transform: translateY(4px); }
  60% { transform: translateY(-12px); }
  80% { transform: translateY(2px); }
  100% { transform: translateY(0); }
}

@media (max-width: 400px) {
  .key { height: 50px; font-size: 0.85rem; }
  .tile { font-size: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
