/* Doetinchemse Molens — publieke site v1.0.0 */
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-latin-wght-normal.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-latin-wght-italic.woff2") format("woff2"); font-weight: 300 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 300 800; font-style: normal; font-display: swap; }

:root {
  --bg: #faf7f1;
  --bg-alt: #f2ece1;
  --surface: #ffffff;
  --ink: #1e2a25;
  --ink-soft: #3c4a43;
  --muted: #66746c;
  --line: #e4dccd;
  --primary: #2f5d50;
  --primary-dark: #22463c;
  --primary-soft: #e3ece8;
  --accent: #c48a2c;
  --accent-soft: #f6ead3;
  --flag-red: #ae1c28;
  --flag-blue: #21468b;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(30,42,37,.05), 0 10px 30px -12px rgba(30,42,37,.18);
  --shadow-lg: 0 2px 4px rgba(30,42,37,.06), 0 24px 50px -20px rgba(30,42,37,.28);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 120px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--primary-dark); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; color: var(--ink); font-variation-settings: "SOFT" 50, "WONK" 0; }
h1 { font-size: clamp(2.3rem, 5vw, 3.9rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); }
h3, .h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 780px; }
.center { text-align: center; }
.kicker { display: inline-block; font: 600 .78rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 34em; }
.btn { display: inline-flex; align-items: center; gap: .5em; background: var(--primary); color: #fff; border: 0; border-radius: 999px; padding: 14px 26px; font: 600 1rem/1 var(--sans); text-decoration: none; cursor: pointer; transition: background .2s, transform .2s, box-shadow .2s; box-shadow: 0 8px 20px -10px rgba(47,93,80,.7); }
.btn:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); }
.plain-btn { background: none; border: 0; padding: 0; cursor: zoom-in; display: block; width: 100%; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(250,247,241,.92); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-logo { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-family: var(--serif); font-size: 1.25rem; font-weight: 650; }
.brand-text small { color: var(--muted); font-size: .8rem; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 6px; }
.site-nav a { display: block; padding: 10px 14px; border-radius: 999px; color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: .96rem; }
.site-nav a:hover { background: var(--primary-soft); color: var(--primary-dark); }
.site-nav a.nav-cta { background: var(--ink); color: #fff; padding: 10px 18px; }
.site-nav a.nav-cta:hover { background: var(--primary); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; width: 44px; height: 44px; cursor: pointer; }
.bars, .bars::before, .bars::after { display: block; width: 20px; height: 2px; background: var(--ink); margin: 0 auto; position: relative; transition: .2s; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -6px; } .bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { top: 0; transform: rotate(-45deg); }

/* ---------- Ticker (lopende nieuwsbalk) ---------- */
.ticker { background: var(--primary); color: #fff; font-size: .9rem; }
.ticker-inner { display: flex; align-items: center; gap: 14px; height: 42px; }
.ticker-label { flex: none; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; background: rgba(255,255,255,.14); padding: 6px 12px; border-radius: 999px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(196,138,44,.7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(196,138,44,0); } 100% { box-shadow: 0 0 0 0 rgba(196,138,44,0); } }
.ticker-viewport { flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-track { display: flex; width: max-content; animation: ticker 45s linear infinite; }
.ticker:hover .ticker-track, .ticker:focus-within .ticker-track, .ticker.paused .ticker-track { animation-play-state: paused; }
.ticker-list { display: flex; list-style: none; margin: 0; padding: 0; }
.ticker-list li { white-space: nowrap; padding-right: 48px; display: flex; align-items: center; gap: 10px; }
.ticker-list li::before { content: "✦"; color: var(--accent); font-size: .7rem; }
.ticker-date { opacity: .7; font-variant-numeric: tabular-nums; }
.ticker-list a { color: #fff; text-decoration: none; font-weight: 500; }
.ticker-list a:hover { text-decoration: underline; }
.ticker-pause { flex: none; background: transparent; border: 1px solid rgba(255,255,255,.35); color: #fff; border-radius: 999px; width: 30px; height: 30px; font-size: .62rem; cursor: pointer; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 80px; background:
  radial-gradient(900px 400px at 85% 0%, var(--accent-soft), transparent 70%),
  radial-gradient(700px 400px at 0% 100%, var(--primary-soft), transparent 70%); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: 20px; }
.stats { display: flex; gap: 40px; margin: 40px 0 0; padding-top: 28px; border-top: 1px solid var(--line); }
.stats div { display: flex; flex-direction: column-reverse; }
.stats dd { margin: 0; font: 600 2.8rem/1 var(--serif); color: var(--primary); font-variant-numeric: tabular-nums; }
.stats dt { color: var(--muted); font-size: .9rem; margin-top: 6px; }
.hero-photo { position: relative; margin: 0; }
.hero-photo img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 28px 28px 28px 120px; box-shadow: var(--shadow-lg); background: var(--bg-alt); }
.hero-photo figcaption { position: absolute; right: 14px; bottom: 12px; font-size: .72rem; color: #fff; background: rgba(0,0,0,.45); padding: 3px 9px; border-radius: 999px; }
.flag-badge { position: absolute; left: -24px; bottom: 54px; background: var(--surface); padding: 14px 18px; border-radius: 14px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 10px; font-size: .95rem; }
.flag-badge strong { color: var(--primary); }
.flag { width: 26px; height: 18px; border-radius: 2px; background: linear-gradient(var(--flag-red) 33.3%, #fff 33.3% 66.6%, var(--flag-blue) 66.6%); box-shadow: 0 0 0 1px var(--line); animation: wave 3s ease-in-out infinite; transform-origin: left center; }
@keyframes wave { 50% { transform: skewY(-4deg) scaleX(.95); } }

/* ---------- Secties ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head.row { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.intro { color: var(--ink-soft); font-size: 1.08rem; }
.note { margin-top: 32px; padding: 18px 22px; background: var(--accent-soft); border-left: 4px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--ink-soft); }
.empty { color: var(--muted); font-style: italic; }

/* ---------- Molens ---------- */
.mill-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 28px; }
.mill-card { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; }
.mill-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.mill-photo { position: relative; border: 0; padding: 0; cursor: zoom-in; background: var(--bg-alt); display: block; }
.mill-photo img { width: 100%; aspect-ratio: 4/3; object-fit: cover; transition: transform .5s; }
.mill-card:hover .mill-photo img { transform: scale(1.04); }
.photo-hint { position: absolute; right: 12px; bottom: 12px; background: rgba(255,255,255,.92); color: var(--ink); font: 600 .78rem/1 var(--sans); padding: 8px 12px; border-radius: 999px; }
.mill-body { padding: 24px 24px 26px; flex: 1; display: flex; flex-direction: column; }
.mill-body h3 { font-size: 1.6rem; margin-bottom: 10px; }
.mill-desc { color: var(--ink-soft); }
.mill-meta { color: var(--ink-soft); font-size: .95rem; }
.ico { display: inline-block; width: 1.4em; color: var(--accent); }
.hours { margin-top: auto; background: var(--primary-soft); border-radius: var(--radius-sm); padding: 14px 16px; font-size: .95rem; color: var(--primary-dark); }
.hours-label { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); margin-bottom: 4px; }

/* ---------- Nieuws (scrollbare balk) ---------- */
.rail-controls { display: flex; align-items: center; gap: 10px; }
.rail-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 1.1rem; cursor: pointer; transition: .2s; }
.rail-btn:hover:not(:disabled) { background: var(--primary); color: #fff; border-color: var(--primary); }
.rail-btn:disabled { opacity: .35; cursor: default; }
.link-more { margin-left: 8px; font-weight: 600; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 340px); gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 24px; padding: 6px 4px 22px; margin: 0 -4px; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--accent) transparent; }
.rail::-webkit-scrollbar { height: 8px; }
.rail::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 8px; }
.rail.dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.rail .news-card { scroll-snap-align: start; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px; }
.news-card { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; }
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.news-img { display: block; background: var(--bg-alt); }
.news-img img, .news-img-ph { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; }
.news-img-ph { background: url("../img/molen-placeholder.svg") center/cover, var(--primary-soft); }
.news-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.news-body time { font-size: .8rem; color: var(--accent); font-weight: 600; letter-spacing: .04em; }
.news-body h3, .news-body h2 { margin: 6px 0 8px; font-size: 1.25rem; }
.news-body h3 a, .news-body h2 a { color: var(--ink); text-decoration: none; }
.news-body h3 a:hover, .news-body h2 a:hover { color: var(--primary); }
.news-body p { color: var(--ink-soft); font-size: .95rem; }
.news-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.read-more { font-weight: 600; text-decoration: none; }
.event-link { display: inline-flex; align-items: center; gap: 4px; font-size: .85rem; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 6px 12px; border-radius: 999px; text-decoration: none; }
.event-link:hover { background: var(--accent); color: #fff; }
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 40px; }
.pager a { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--surface); text-decoration: none; box-shadow: var(--shadow); }
.pager a[aria-current] { background: var(--primary); color: #fff; }

/* ---------- Artikel ---------- */
.article-page h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
.back { font-weight: 600; text-decoration: none; }
.article-img { margin: 28px 0; }
.article-img img { border-radius: var(--radius); box-shadow: var(--shadow); margin: 0 auto; max-height: 80vh; width: auto; }
.prose { font-size: 1.07rem; color: var(--ink-soft); }
.prose p { margin-bottom: 1.1em; }

/* ---------- Over ---------- */
.about-grid { display: grid; grid-template-columns: 1.3fr .8fr; gap: 56px; align-items: start; }
.org-card { background: var(--surface); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); border-top: 5px solid var(--accent); }
.org-card img { border-radius: var(--radius-sm); margin-bottom: 20px; aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.org-card dl { margin: 0; display: grid; gap: 10px; }
.org-card dl div { display: flex; justify-content: space-between; gap: 12px; border-top: 1px dashed var(--line); padding-top: 10px; font-size: .95rem; }
.org-card dt { color: var(--muted); }
.org-card dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: start; }
.contact-form { background: var(--surface); padding: 32px; border-radius: var(--radius); box-shadow: var(--shadow); display: grid; gap: 18px; }
.contact-form label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
.contact-form input, .contact-form textarea { font: inherit; font-weight: 400; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); background: #fff; }
.contact-form .btn { justify-self: start; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 14px 16px; border-radius: var(--radius-sm); font-weight: 500; }
.alert.ok { background: var(--primary-soft); color: var(--primary-dark); }
.alert.err { background: #fbe7e7; color: #8a1f1f; }
.contact-cards { display: grid; gap: 14px; }
.contact-card { background: var(--surface); padding: 20px 22px; border-radius: var(--radius-sm); box-shadow: var(--shadow); border-left: 4px solid var(--primary); }
.contact-card h3 { font-size: 1.1rem; margin-bottom: 4px; }
.contact-card p { margin: 0; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.78); padding: 64px 0 28px; font-size: .95rem; }
.site-footer h4 { color: #fff; font-size: 1.15rem; margin-bottom: 14px; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); margin-top: 44px; padding-top: 22px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: .82rem; }
.footer-bottom p { margin: 0; }
.footer-bottom .credit { opacity: .7; max-width: 560px; }

/* ---------- Lightbox ---------- */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 92vw; max-height: 92vh; }
.lightbox::backdrop { background: rgba(20,26,23,.86); }
.lightbox img { max-width: 92vw; max-height: 84vh; border-radius: 12px; }
.lightbox-caption { color: #fff; text-align: center; margin: 10px 0 0; font-size: .9rem; }
.lightbox-close { position: fixed; top: 16px; right: 20px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }

/* ---------- Animatie bij scrollen ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-photo { max-width: 520px; }
  .flag-badge { left: 14px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav-toggle { display: block; }
  .site-nav { position: absolute; top: 76px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 10px 16px 18px; display: none; box-shadow: var(--shadow); }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; }
  .site-nav a { padding: 12px 14px; }
  .brand-text small { display: none; }
  .wrap { padding: 0 16px; }
  .hero { padding: 40px 0 56px; }
  .section { padding: 64px 0; }
  .stats { gap: 28px; }
  .rail { grid-auto-columns: 82%; }
  .rail-btn { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .contact-form { padding: 22px; }
  .ticker-label { font-size: 0; gap: 0; padding: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-track { animation: none; }
  .ticker-viewport { overflow-x: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .flag, .pulse { animation: none; }
}
