/* ==========================================================================
   BAKKERIJ DE KORENAAR — stylesheet
   Kleuren, typografie en lay-out zijn hierboven als CSS-variabelen gezet,
   zodat je makkelijk kunt spelen met tinten zonder de hele stylesheet
   door te hoeven.
   ========================================================================== */

:root {
  /* Kleuren — geïnspireerd op deeg, korst en graan */
  --flour: #FBF5EA;      /* lichte achtergrond, kleur van bloem */
  --flour-alt: #F3E9D8;  /* iets donkerder, voor afwisselende secties */
  --crust: #2E1B12;      /* diepbruin, bijna zwart — voor donkere vlakken en tekst */
  --cocoa: #3B2A1E;      /* hoofdtekstkleur, warm donkerbruin */
  --wheat: #D9A73B;      /* goud/graankleur — primaire accent */
  --wheat-dark: #B98526; /* donkerder goud, voor hover-states */
  --brick: #A63D2F;      /* ovensteen-rood — secundaire accent */
  --sage: #6B7F5B;       /* zachtgroen — voor 'vers'-accenten */
  --line: rgba(59, 42, 30, 0.12);

  /* Typografie */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Karla", -apple-system, BlinkMacSystemFont, sans-serif;

  /* Overige */
  --radius: 14px;
  --shadow-soft: 0 10px 30px rgba(46, 27, 18, 0.08);
  --container-width: 1160px;
}

/* ---------- Reset & basis ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--cocoa);
  background: var(--flour);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--crust);
}

p { margin: 0 0 1em; }

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

/* Focus-stijl zichtbaar houden voor toetsenbordgebruikers */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--wheat-dark);
  outline-offset: 2px;
}

/* ---------- Herbruikbare elementen ---------- */
.eyebrow {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  color: var(--brick);
  letter-spacing: 0.02em;
  margin-bottom: 0.6em;
  font-size: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9em 1.6em;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--brick);
  color: var(--flour);
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { background: #8f3226; }

.btn-ghost {
  background: transparent;
  color: var(--crust);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--crust); }

.btn-small { padding: 0.6em 1.2em; font-size: 0.85rem; }

.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.3em 0.8em;
  border-radius: 999px;
  margin-bottom: 0.9em;
}
.tag-gold  { background: rgba(217,167,59,0.18); color: var(--wheat-dark); }
.tag-brick { background: rgba(166,61,47,0.14); color: var(--brick); }
.tag-sage  { background: rgba(107,127,91,0.16); color: var(--sage); }

/* ---------- Scroll-reveal (via JS klasse .in-view) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 245, 234, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.site-header.scrolled {
  box-shadow: 0 4px 20px rgba(46,27,18,0.08);
  border-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--crust);
  margin-right: auto;
}
.logo em { font-style: italic; color: var(--brick); }

.logo-icon {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--brick);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.logo-icon path { fill: var(--wheat); stroke: var(--brick); }

.main-nav {
  display: flex;
  gap: 28px;
}
.main-nav a {
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 4px 0;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--brick);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}
.main-nav a:hover::after { transform: scaleX(1); }

.nav-cta { white-space: nowrap; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--crust);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  padding-top: 64px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--flour) 0%, var(--flour-alt) 100%);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding-bottom: 96px;
}

.hero-text h1 {
  font-size: clamp(2.2rem, 4vw + 1rem, 3.4rem);
  max-width: 14ch;
}

.hero-sub {
  max-width: 46ch;
  font-size: 1.05rem;
  color: var(--cocoa);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px 0 40px;
}

.hero-stats {
  display: flex;
  gap: 32px;
  margin: 0;
  flex-wrap: wrap;
}
.hero-stats dt {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--brick);
  font-weight: 600;
}
.hero-stats dd {
  margin: 0;
  font-size: 0.85rem;
  color: var(--cocoa);
}

/* Broodillustratie */
.hero-visual { display: flex; justify-content: center; }
.bread-illustration { width: 100%; max-width: 340px; }
.bread-loaf {
  fill: #D9A05C;
  stroke: var(--crust);
  stroke-width: 3;
}
.bread-shadow { fill: rgba(46,27,18,0.12); }
.bread-score {
  fill: none;
  stroke: var(--crust);
  stroke-width: 3;
  stroke-linecap: round;
}
.steam path {
  fill: none;
  stroke: rgba(59,42,30,0.35);
  stroke-width: 3;
  stroke-linecap: round;
  animation: steam-rise 3.5s ease-in-out infinite;
  transform-origin: bottom center;
}
.steam path:nth-child(2) { animation-delay: 0.6s; }
.steam path:nth-child(3) { animation-delay: 1.2s; }

@keyframes steam-rise {
  0%   { opacity: 0; transform: translateY(6px); }
  35%  { opacity: 0.8; }
  100% { opacity: 0; transform: translateY(-14px); }
}

/* Gescalloopte rand onderaan hero, refereert aan een bakkerszak */
.scallop-divider {
  display: block;
  width: 100%;
  height: 24px;
  fill: var(--flour);
}

/* ==========================================================================
   SECTIES ALGEMEEN
   ========================================================================== */
.section { padding: 88px 0; }
.section-alt { background: var(--flour-alt); }

.section-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section-head h2 { font-size: clamp(1.8rem, 2vw + 1rem, 2.4rem); }
.section-lead { color: var(--cocoa); }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.split-text h2 { font-size: clamp(1.8rem, 2vw + 1rem, 2.4rem); }

.grain-pattern {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(115deg, rgba(217,167,59,0.35) 0 2px, transparent 2px 22px),
    repeating-linear-gradient(25deg, rgba(166,61,47,0.18) 0 2px, transparent 2px 26px),
    linear-gradient(135deg, #E9C97A, #C97F4F);
  box-shadow: var(--shadow-soft);
}

.stat-row {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.stat-row dt {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--brick);
  font-weight: 600;
}
.stat-row dd { margin: 0; font-size: 0.85rem; }

/* ---------- Assortiment kaarten ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
}
.product-card {
  background: var(--flour);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--line);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(46,27,18,0.12);
}
.product-card h3 { font-size: 1.2rem; margin-bottom: 0.3em; }
.product-card p { margin: 0; font-size: 0.95rem; }

/* ---------- Waarom wij ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}
.feature {
  padding-left: 20px;
  border-left: 3px solid var(--wheat);
}
.feature h3 { font-size: 1.1rem; }
.feature p { font-size: 0.95rem; margin: 0; }

/* ---------- Openingstijden ---------- */
.status-badge {
  display: inline-block;
  font-weight: 700;
  padding: 0.5em 1em;
  border-radius: 999px;
  background: rgba(107,127,91,0.15);
  color: var(--sage);
  margin-bottom: 20px;
}
.status-badge.closed {
  background: rgba(166,61,47,0.12);
  color: var(--brick);
}

.hours-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.hours-table th, .hours-table td {
  text-align: left;
  padding: 10px 4px;
  border-bottom: 1px solid var(--line);
  font-weight: 400;
}
.hours-table th { color: var(--crust); font-weight: 600; }
.hours-table tr:last-child th,
.hours-table tr:last-child td { border-bottom: none; }

.map-placeholder {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--crust);
  box-shadow: var(--shadow-soft);
}
.map-lines {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(217,167,59,0.15) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, rgba(217,167,59,0.15) 0 1px, transparent 1px 40px);
}
.map-pin {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--flour);
}
.map-pin::before {
  content: "";
  display: block;
  width: 16px; height: 16px;
  margin: 0 auto 10px;
  border-radius: 50% 50% 50% 0;
  background: var(--brick);
  transform: rotate(-45deg);
  box-shadow: 0 0 0 6px rgba(217,167,59,0.25);
}
.map-pin span {
  display: inline-block;
  font-size: 0.85rem;
  background: rgba(46,27,18,0.7);
  padding: 6px 12px;
  border-radius: 999px;
}

/* ---------- Testimonial ---------- */
.testimonial {
  text-align: center;
  background: var(--crust);
  color: var(--flour);
}
.testimonial .container { max-width: 720px; }
.quote-mark { width: 40px; margin: 0 auto 20px; fill: var(--wheat); }
.quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.2rem, 1.4vw + 1rem, 1.6rem);
  line-height: 1.5;
}
.quote-author {
  margin-top: 16px;
  color: var(--wheat);
  font-weight: 700;
  font-size: 0.9rem;
}

/* ---------- Contact ---------- */
.contact-list { list-style: none; padding: 0; margin: 24px 0 0; }
.contact-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.contact-list li:first-child { padding-top: 0; }
.contact-list strong { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--brick); }
.contact-list a:hover { text-decoration: underline; }

.contact-form {
  background: var(--flour);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-soft);
}
.form-row { margin-bottom: 18px; display: flex; flex-direction: column; }
.form-row label { font-size: 0.85rem; font-weight: 700; margin-bottom: 6px; }
.form-row input,
.form-row textarea {
  font: inherit;
  padding: 0.7em 0.9em;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--cocoa);
  resize: vertical;
}
.form-row input:focus,
.form-row textarea:focus { border-color: var(--brick); }
.form-row.has-error input,
.form-row.has-error textarea { border-color: var(--brick); }
.form-error {
  display: block;
  min-height: 1.2em;
  font-size: 0.8rem;
  color: var(--brick);
  margin-top: 4px;
}
.form-success {
  margin-top: 16px;
  font-weight: 700;
  color: var(--sage);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: var(--crust);
  color: rgba(251,245,234,0.8);
  padding-top: 56px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(251,245,234,0.12);
}
.footer-brand { max-width: 340px; }
.footer-brand .logo { color: var(--flour); margin-bottom: 12px; }
.footer-brand .logo-icon path { fill: var(--wheat); stroke: var(--wheat); }
.footer-brand p { font-size: 0.9rem; margin: 0; }

.footer-nav { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a { font-size: 0.9rem; }
.footer-nav a:hover { color: var(--wheat); }

.footer-bottom {
  padding: 20px 24px;
  font-size: 0.8rem;
  text-align: center;
  color: rgba(251,245,234,0.55);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 240px; margin: 0 auto; }
  .split { grid-template-columns: 1fr; }
  .split-visual { order: -1; }
}

@media (max-width: 760px) {
  .main-nav {
    position: fixed;
    top: 68px;
    left: 0; right: 0;
    background: var(--flour);
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 8px 0 20px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
    transform: translateY(-130%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  .main-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .main-nav a { padding: 12px 0; width: 100%; text-align: center; }
  .nav-toggle { display: flex; }
  .nav-cta { display: none; }
  .section { padding: 64px 0; }
}

@media (max-width: 480px) {
  .hero-stats { gap: 20px; }
  .contact-form { padding: 22px; }
}
