/* ==================================================================
   Bloum — site styles
   Geometry & typography extracted from Figma (1440 frame, see design/).
   Fonts: Inter (nav/body), Averia Serif Libre (flower quotes).
   TODO before production: self-host fonts (GDPR) instead of Google CDN.

   Layout model: the masthead, card column and footer scroll normally;
   the flower, vases and menu are FIXED to the viewport. scene.js adds
   scroll-driven sway on top of the idle CSS animations.
   ================================================================== */

:root {
  /* Scheme accents */
  --bladgroen:  #53a058;
  --koraalrood: #f9434f;
  --violetpaars:#7e25b7;
  --zonnegeel:  #fec339;

  /* Palette */
  --inkt:   #040404;
  --wit:    #ffffff;
  --papier: #f3efe3;

  --accent: var(--bladgroen);
  --col: 566px;          /* content column, from Figma */
}

[data-scheme="bladgroen"]   { --accent: var(--bladgroen); }
[data-scheme="koraalrood"]  { --accent: var(--koraalrood); }
[data-scheme="violetpaars"] { --accent: var(--violetpaars); }
[data-scheme="zonnegeel"]   { --accent: var(--zonnegeel); }

/* ---- per-page scene geometry ----
   Each flower/vase pair is a different illustration; offsets are % of
   the illustration box, sizes are vw at the 1440 reference frame.
   --quote-* places the quote inside the bloom (cx = horizontal center). */
[data-page="over-bloum"] {
  --bubble-ink: #ffffff;
  --flower-w: 34.72vw; --flower-right: -2.22vw; --flower-ar: 0.4643;
  --quote-top: 28.4%; --quote-cx: 49.1%; --quote-w: 66%; --quote-fs: 4.8cqw;
  --vases-w: 16.23vw; --vases-ar: 0.8432;
  --vase-a-l: 0%;      --vase-a-t: 25.61%; --vase-a-w: 63.18%; --vase-a-z: 2;
  --vase-b-l: 57.33%;  --vase-b-t: 0%;     --vase-b-w: 42.67%; --vase-b-z: 1;
}
[data-page="waar-te-koop"] {
  --bubble-ink: #040404;
  --flower-w: 46.18vw; --flower-right: -8.95vw; --flower-ar: 0.6159;
  --quote-top: 23.5%; --quote-cx: 53.7%; --quote-w: 34%; --quote-fs: 3.61cqw;
  --vases-w: 15.39vw; --vases-ar: 0.7782;
  --vase-a-l: 0%;      --vase-a-t: 0%;     --vase-a-w: 63.32%; --vase-a-z: 1;
  --vase-b-l: 40.52%;  --vase-b-t: 0%;     --vase-b-w: 59.48%; --vase-b-z: 2;
}
[data-page="producten"] {
  --bubble-ink: #040404;
  --flower-w: 44.35vw; --flower-right: -11.43vw; --flower-ar: 0.5941;
  --quote-top: 21.5%; --quote-cx: 42.2%; --quote-w: 45%; --quote-fs: 3.76cqw;
  --vases-w: 15.86vw; --vases-ar: 0.8126;
  --vase-a-l: 0%;      --vase-a-t: 27.53%; --vase-a-w: 62.06%; --vase-a-z: 2;
  --vase-b-l: 38.54%;  --vase-b-t: 0%;     --vase-b-w: 61.46%; --vase-b-z: 1;
}
[data-page="nieuwsbrief"] {
  --bubble-ink: #fffbfb;
  --flower-w: 45.3vw; --flower-right: -8.08vw; --flower-ar: 0.6068;
  --quote-top: 24.7%; --quote-cx: 52.6%; --quote-w: 42%; --quote-fs: 3.68cqw;
  --vases-w: 14.83vw; --vases-ar: 0.693;
  --vase-a-l: 0%;      --vase-a-t: 0%;     --vase-a-w: 54.76%; --vase-a-z: 1;
  --vase-b-l: 35.58%;  --vase-b-t: 19.14%; --vase-b-w: 64.42%; --vase-b-z: 2;
}

/* ---- reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--inkt);
  background: var(--papier);
  -webkit-font-smoothing: antialiased;
}

/* ==================================================================
   Menu — fixed white pill, floats over everything
   ================================================================== */
.topnav {
  position: fixed;
  z-index: 20;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: min(var(--col), calc(100vw - 24px));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: var(--wit);
  padding: 18px 40px;
  border-radius: 10px;
  box-shadow: 0 4px 5px rgba(0, 0, 0, .1);
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.5;
}
.topnav__link { text-decoration: none; white-space: nowrap; }
.topnav__link:hover,
.topnav__link.is-active { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }

/* ==================================================================
   Masthead — colored band with the full-bleed wordmark.
   The wordmark keeps its intrinsic ratio; it must never distort.
   ================================================================== */
.masthead {
  position: relative;
  z-index: 1;
  background: var(--accent);
  padding: 116px clamp(12px, 1.67vw, 32px) clamp(14px, 1.53vw, 26px);
}
.wordmark img { width: 100%; height: auto; }

/* ==================================================================
   Scene — flower + vases, fixed to the viewport (scene.js animates)
   ================================================================== */
.scene { position: fixed; inset: 0; z-index: 2; pointer-events: none; }

.flower {
  position: absolute;
  top: calc(116px + 6.39vw);           /* glued to the wordmark top edge */
  right: var(--flower-right);
  width: clamp(230px, var(--flower-w), 780px);
  aspect-ratio: var(--flower-ar);
  container-type: inline-size;
  transform-origin: 55% 88%;
  will-change: transform;
}
.flower__inner {
  width: 100%; height: 100%;
  transform-origin: 55% 95%;
  animation: flower-sway 11s ease-in-out infinite alternate;
}
.flower__inner svg { width: 100%; height: 100%; display: block; overflow: visible; }
.flower__text {
  position: absolute;
  top: var(--quote-top);
  left: var(--quote-cx);
  transform: translateX(-50%) rotate(calc(var(--wind, 0) * 4deg));
  transform-origin: 50% 130%;
  width: var(--quote-w);
  margin: 0;
  text-align: center;
  font-family: "Averia Serif Libre", Georgia, serif;
  font-size: var(--quote-fs);
  line-height: 1.2;
  letter-spacing: -.08em;
  color: var(--bubble-ink);
}

/* ---- flower parts: idle breathing (individual `rotate` keyframes)
   composes with the wind response (`transform`, driven by --wind from
   scene.js). transform-box makes origins local to each part. ---- */
.f-bloom, .f-stem, .f-leaf, .f-stamen, .f-sprig {
  transform-box: fill-box;
  transform: rotate(calc(var(--wind, 0) * var(--amp, 4deg)));
}
.f-stem   { --amp: 2deg;  transform-origin: 50% 98%; animation: sway-soft 9s ease-in-out infinite alternate; }
.f-bloom  { --amp: 5deg;  transform-origin: 50% 90%; animation: sway-soft 6.5s -2.1s ease-in-out infinite alternate; }
.f-leaf   { --amp: 6deg;  animation: sway-leaf 5.5s ease-in-out infinite alternate; }
.f-leaf-2 { --amp: -5deg; animation-duration: 7.2s; animation-delay: -1.6s; }
.f-leaf-3 { --amp: 7deg;  animation-duration: 6.1s; animation-delay: -3.1s; }
.f-stamen { --amp: 13deg; transform-origin: 50% 96%; animation: sway-stamen 4.6s ease-in-out infinite alternate; }
.f-stamen-2 { animation-delay: -1.4s; animation-duration: 5.3s; }
.f-stamen-3 { animation-delay: -2.6s; animation-duration: 4.1s; }
.f-sprig  { --amp: 5deg;  animation: sway-leaf 7.6s -2.4s ease-in-out infinite alternate; }

/* Hinge points: each part pivots where it attaches to the stem, so tips
   never separate from the plant. Origins are % of the part's own bbox. */
[data-page="over-bloum"]   .f-leaf-1 { transform-origin: 4% 88%; }   /* right small, tip up-right */
[data-page="over-bloum"]   .f-leaf-2 { transform-origin: 4% 8%; }    /* right big, tip down-right */
[data-page="over-bloum"]   .f-leaf-3 { transform-origin: 96% 92%; }  /* left, tip up-left */
[data-page="over-bloum"]   .f-bloom  { transform-origin: 50% 92%; }
[data-page="waar-te-koop"] .f-leaf-1 { transform-origin: 38% 6%; }   /* bottom leaf */
[data-page="waar-te-koop"] .f-leaf-2 { transform-origin: 4% 92%; }   /* side leaf, tip upward */
[data-page="waar-te-koop"] .f-bloom  { transform-origin: 45% 88%; }
[data-page="waar-te-koop"] .f-sprig  { transform-origin: 90% 80%; }
[data-page="producten"]    .f-leaf-1 { transform-origin: 4% 8%; }    /* bottom right, tip down */
[data-page="producten"]    .f-leaf-2 { transform-origin: 96% 88%; }  /* left, tip up-left */
[data-page="producten"]    .f-bloom  { transform-origin: 57% 96%; }
[data-page="producten"]    .f-sprig  { transform-origin: 2% 96%; }   /* berry branch, joins stem low */
[data-page="nieuwsbrief"]  .f-leaf-1 { transform-origin: 4% 6%; }    /* right, tip down-right */
[data-page="nieuwsbrief"]  .f-leaf-2 { transform-origin: 96% 6%; }   /* left, tip down-left */
[data-page="nieuwsbrief"]  .f-leaf-3 { transform-origin: 96% 90%; }  /* mid, tip up-left */
[data-page="nieuwsbrief"]  .f-bloom  { transform-origin: 58% 92%; }

@keyframes sway-soft   { from { rotate: -.7deg; }  to { rotate: .9deg; } }
@keyframes sway-leaf   { from { rotate: -1.7deg; } to { rotate: 2.1deg; } }
@keyframes sway-stamen { from { rotate: -2.4deg; } to { rotate: 2.8deg; } }

.vases {
  position: absolute;
  left: clamp(12px, 7.8vw, 128px);
  bottom: clamp(20px, 4vh, 48px);
  width: clamp(104px, var(--vases-w), 300px);
  aspect-ratio: var(--vases-ar);
  transform-origin: 50% 100%;
  will-change: transform;
}
.vases img { position: absolute; height: auto; }
.vases__a {
  left: var(--vase-a-l); top: var(--vase-a-t); width: var(--vase-a-w);
  z-index: var(--vase-a-z);
  animation: vase-bob 6.5s ease-in-out infinite alternate;
}
.vases__b {
  left: var(--vase-b-l); top: var(--vase-b-t); width: var(--vase-b-w);
  z-index: var(--vase-b-z);
  animation: vase-bob 7.5s ease-in-out -3.2s infinite alternate;
}

@keyframes flower-sway {
  from { transform: rotate(-.35deg) translateY(0); }
  to   { transform: rotate(.45deg) translateY(-4px); }
}
@keyframes vase-bob {
  from { transform: translateY(0) rotate(-.6deg); }
  to   { transform: translateY(-5px) rotate(.8deg); }
}

/* ==================================================================
   Page content — the 566px column from the design
   ================================================================== */
.page {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: calc(var(--col) + 32px);
  margin: clamp(72px, 8.82vw, 150px) auto clamp(56px, 7.8vw, 160px);
  padding: 0 16px;
}

.card {
  background: var(--wit);
  border-radius: 20px;
  padding: 40px;
}
.card__title {
  margin: 0 0 32px;
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.5;
}
.card__body { font-size: 1rem; line-height: 1.5; }
.card__body p { margin: 0 0 1.5em; }
.card__body p:last-child { margin-bottom: 0; }

/* ==================================================================
   Footer — same column as the card, pinned to the page bottom
   ================================================================== */
.site-footer {
  width: 100%;
  max-width: calc(var(--col) + 32px);
  margin: auto auto 0;
  padding: 40px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 1rem;
  color: rgba(0, 0, 0, .4);
}
.site-footer__social { display: flex; gap: 10px; }
.site-footer__social a { display: block; transition: color .15s; }
.site-footer__social a:hover { color: var(--inkt); }
.site-footer__social svg { width: 20px; height: 20px; fill: currentColor; }

/* ==================================================================
   Waar te koop — verkooppunten
   ================================================================== */
.shops { list-style: none; margin: 32px 0 0; padding: 0; }
.shop {
  display: grid;
  padding: 24px 0;
  border-bottom: 1px solid rgba(4, 4, 4, .15);
  font-size: 1rem;
  line-height: 1.5;
}
.shops .shop:first-child { padding-top: 0; }
.shop__addr { white-space: pre-line; }
.shop__web { text-decoration: none; }
.shop__web:hover { text-decoration: underline; }

/* ==================================================================
   Nieuwsbrief — signup (input full width, button below, per design)
   ================================================================== */
.signup { display: flex; flex-direction: column; align-items: flex-start; margin-top: 32px; }
.signup__input {
  width: 100%;
  border: 1px solid rgba(4, 4, 4, .18);
  border-radius: 10px;
  padding: 20px;
  font: inherit;
  background: var(--wit);
}
.signup__input::placeholder { color: rgba(0, 0, 0, .4); }
.signup__input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.signup__btn {
  margin-top: 20px;
  border: 0;
  border-radius: 22px;
  padding: 10px 20px;
  background: var(--inkt);
  color: var(--wit);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}
.signup__btn:hover { opacity: .85; }

/* ==================================================================
   Producten — gallery + lightbox
   ================================================================== */
.gallery { display: grid; gap: 40px; }
.gallery__item {
  border: 0; padding: 0; margin: 0; background: none; cursor: zoom-in;
  border-radius: 20px; overflow: hidden; display: block;
}
.gallery__item img { width: 100%; height: auto; }
.gallery-empty { color: rgba(0, 0, 0, .55); }

.lightbox {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  padding: 4vmin; background: rgba(20, 18, 14, .88);
}
.lightbox[hidden] { display: none; }
.lightbox__img { max-width: 92vw; max-height: 92vh; width: auto; height: auto; border-radius: 6px; }
.lightbox__close {
  position: absolute; top: 1rem; right: 1.25rem;
  width: 2.5rem; height: 2.5rem; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .15); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.lightbox__close:hover { background: rgba(255, 255, 255, .28); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ==================================================================
   Mobile — same layered composition, scaled down (no stacking):
   wordmark stays full-bleed, flower overlaps band + card edge,
   vases stand on the viewport floor.
   ================================================================== */
@media (max-width: 760px) {
  .topnav {
    top: 12px; left: 12px; right: 12px;
    transform: none;
    width: auto;
    padding: 12px 14px;
    font-size: .6875rem;
    gap: .5rem;
  }
  .masthead { padding: 68px 14px 14px; }
  .flower {
    top: calc(68px + 6.2vw);
    width: max(calc(var(--flower-w) * 1.4), 210px);
  }
  /* asymmetric gutter: a right-hand lane where the fixed flower stays
     visible (and sways) while the card scrolls past it */
  .page { margin-top: calc(20vw + 40px); padding: 0 44px 0 14px; }
  .card { padding: 28px 22px; }
  .card__title { font-size: 1.625rem; margin-bottom: 24px; }
  /* The full-width card leaves the vases no clean spot on small screens */
  .vases { display: none; }
  .site-footer { padding: 32px 14px; font-size: .875rem; }
}

@media (prefers-reduced-motion: reduce) {
  .flower__inner, .vases__a, .vases__b,
  .f-bloom, .f-stem, .f-leaf, .f-stamen, .f-sprig { animation: none; }
}
