/* "Wat is Freshboo?": het zakje in het midden, losse ingrediënten (bamboe, houtskool, mineralen, planten)
   die eromheen zweven, voordelen als labels en een reuzentitel erachter.
   De hele sectie past op één scherm: de hoogte is 100svh en alles schaalt mee met die hoogte.
   Het beeld (images/about-scene/) is één gegenereerde stilleven-foto, uitgesneden in een basis (zakje, bamboe, houtskoolhoop)
   en 12 losse stukjes. Die stukjes bewegen los van elkaar en zweven rond het product.
   Beweging: stukjes zweven in een zachte baan, labels deinen, stippen pulseren, titel schuift mee met scrollen, lichte muis-parallax. */

.about {
  --gap: clamp(8px, 1.4vw, 20px);

  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  margin: var(--gap);
  height: clamp(640px, calc(100svh - var(--gap) * 2), 1040px);
  border-radius: clamp(18px, 2.2vw, 32px);
  color: var(--black);
  background:
    radial-gradient(ellipse 62% 64% at 50% 50%, #fbfaf6 0%, rgba(251, 250, 246, 0) 74%),
    linear-gradient(180deg, #eceae3 0%, #e4e1d8 100%);
}

.about-comp {
  --dot: clamp(28px, 2.4cqw, 38px);

  position: relative;
  min-width: 0;
  min-height: 0;
  container-type: size;
}

/* de scene en de labels liggen exact op elkaar: zelfde formaat, zelfde plek */
.about-scene,
.about-callouts {
  --sh: min(88cqh, 52cqw); /* hoogte van het beeld: past in de sectie, en nooit breder dan de sectie */
  --sw: calc(var(--sh) * 1.7726); /* 1021 x 576 */
  --u: calc(var(--sw) / 1000);

  position: absolute;
  z-index: 2; /* boven de gloed (1) en de titel (0), onder de labels (6) */
  left: 50%;
  bottom: 1.5cqh;
  width: var(--sw);
  height: var(--sh);
  translate: -50% 0;
}

/* ---------- reuze-titel achter het zakje ---------- */

.about-title {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 1.5cqh;
  margin: 0;
  white-space: nowrap;
  font-size: min(13.4cqw, 27cqh);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 1.05;
  color: transparent;
  background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0.78) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 8px 22px rgba(70, 58, 30, 0.1));
  translate: calc(-50% + var(--p, 0) * 5cqw + var(--mx, 0) * -14px) 0;
  pointer-events: none;
  user-select: none;
  transition: opacity 1.4s ease;
}

.about-glow {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 56cqh;
  width: min(120cqh, 80cqw);
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.45) 40%, rgba(255, 255, 255, 0) 68%);
  pointer-events: none;
  animation: about-breathe 7s ease-in-out infinite alternate;
  transition: opacity 1.6s ease;
}

/* ---------- de scene ---------- */

.about-scene__shadow {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 1%;
  width: 66%;
  height: 8%;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(58, 46, 22, 0.34) 0%, rgba(58, 46, 22, 0) 70%);
  filter: blur(12px);
  transition: opacity 1.2s ease 0.4s;
}

/* basis: zakje, bamboe, houtskoolhoop. Staat stil, ademt alleen heel licht */
.about-base {
  position: absolute;
  z-index: 3;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  transform-origin: 50% 100%;
  translate: calc(var(--mx, 0) * -6px) calc(var(--my, 0) * -4px);
  animation: about-sway 9s ease-in-out infinite alternate;
  transition:
    opacity 1s ease,
    scale 1.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.about-base img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 16px 22px rgba(58, 46, 22, 0.2)) drop-shadow(0 2px 4px rgba(58, 46, 22, 0.14));
}

/* losse stukjes: span = positie + parallax + ingang, i = zweef x, b = zweef y, img = draai */
.about-fx {
  position: absolute;
  z-index: 4;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  transform-origin: var(--ox) var(--oy);
  translate: calc(var(--mx, 0) * var(--k) * -1px) calc(var(--my, 0) * var(--k) * -0.6px);
  transition:
    opacity 0.9s ease calc(0.25s + var(--d) * 3),
    scale 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) calc(0.15s + var(--d) * 3);
}

.about-fx--back {
  z-index: 2;
}

.about-fx i,
.about-fx b {
  display: block;
}

.about-fx i {
  animation: fx-x var(--tx) ease-in-out calc(var(--d) * -20) infinite alternate;
}

.about-fx b {
  animation: fx-y var(--ty) ease-in-out calc(var(--d) * -17) infinite alternate;
}

.about-fx img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 9px rgba(58, 46, 22, 0.26));
  animation: fx-spin calc(var(--tx) * 1.3) ease-in-out calc(var(--d) * -13) infinite alternate;
}

/* ---------- voordelen: label + lijntje + pulserende stip ---------- */

.about-callouts {
  z-index: 6;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
}

.about-callout {
  position: absolute;
  left: calc(var(--ax) * 1%);
  top: calc(var(--ay) * 1%);
  pointer-events: auto;
  translate: calc(var(--mx, 0) * var(--k, 14) * -0.5px) calc(var(--my, 0) * var(--k, 14) * -0.3px);
}

/* de stip staat precies op het ankerpunt */
.about-callout--l {
  transform: translate(calc(-100% + var(--dot) / 2), -50%);
}

.about-callout--r {
  transform: translate(calc(var(--dot) / -2), -50%);
}

.about-callout__in {
  display: flex;
  align-items: center;
  animation: about-bob var(--bob, 5.5s) ease-in-out var(--bd, 0s) infinite alternate;
  transition:
    opacity 0.6s ease calc(0.9s + var(--i, 0) * 0.14s),
    scale 0.85s cubic-bezier(0.3, 1.5, 0.5, 1) calc(0.9s + var(--i, 0) * 0.14s);
}

.about-callout--l .about-callout__in {
  flex-direction: row;
  transform-origin: right center;
}

.about-callout--r .about-callout__in {
  flex-direction: row-reverse;
  transform-origin: left center;
}

.about-callout__pill {
  width: max-content;
  max-width: clamp(150px, 17cqw, 260px);
  margin: 0;
  padding: 0.8em 1.3em;
  border-radius: 1.75em;
  background: #fff;
  color: #3a3632;
  font-size: clamp(12px, 1.12cqw, 16px);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: balance;
  box-shadow:
    0 14px 32px rgba(58, 46, 22, 0.16),
    0 1px 4px rgba(58, 46, 22, 0.12);
}

.about-callout__pill strong {
  font-weight: 700;
  color: var(--black);
}

.about-callout__line {
  flex: none;
  width: calc(var(--len, 6) * 1cqw);
  height: 1px;
  transition: scale 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) calc(1.05s + var(--i, 0) * 0.14s);
}

.about-callout--l .about-callout__line {
  background: linear-gradient(to right, rgba(17, 17, 17, 0), rgba(17, 17, 17, 0.5));
  transform-origin: right center;
}

.about-callout--r .about-callout__line {
  background: linear-gradient(to left, rgba(17, 17, 17, 0), rgba(17, 17, 17, 0.5));
  transform-origin: left center;
}

.about-callout__dot {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: var(--dot);
  height: var(--dot);
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 8px 20px rgba(58, 46, 22, 0.22),
    0 1px 3px rgba(58, 46, 22, 0.14);
}

.about-callout__dot svg {
  width: 46%;
  height: 46%;
  fill: var(--green-deep);
}

.about-callout__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(47, 95, 70, 0.7);
  animation: about-ping 3s ease-out infinite;
  animation-delay: calc(var(--i, 0) * -0.7s);
}

/* ---------- ingang: alles vliegt vanuit het zakje naar buiten, labels poppen na elkaar ---------- */

.about.is-ready:not(.is-in) .about-base {
  opacity: 0;
  scale: 0.94;
}

.about.is-ready:not(.is-in) .about-fx {
  opacity: 0;
  scale: 0.3;
}

.about.is-ready:not(.is-in) .about-glow,
.about.is-ready:not(.is-in) .about-title,
.about.is-ready:not(.is-in) .about-scene__shadow {
  opacity: 0;
}

.about.is-ready:not(.is-in) .about-callout__in {
  opacity: 0;
  scale: 0.7;
}

.about.is-ready:not(.is-in) .about-callout__line {
  scale: 0 1;
}

/* ---------- onderkant: tekst, plekken, knop (compact, zodat alles op één scherm past) ---------- */

.about-foot {
  position: relative;
  z-index: 7;
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  align-items: end;
  gap: clamp(20px, 4vw, 64px);
  padding: clamp(10px, 1.2vw, 18px) clamp(20px, 3.4vw, 56px) clamp(18px, 2vw, 30px);
}

.about-rating {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.about-rating strong {
  color: var(--black);
}

.about-rating svg {
  flex: none;
  width: 14px;
  height: 14px;
  fill: var(--bamboo-mid);
}

.about-statement {
  margin: 0;
  font-size: clamp(24px, 2.5vw, 38px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--black);
  text-wrap: balance;
}

/* het ene bamboe-accent, zelfde verloop als de "Fresh" in het logo */
.about-statement em {
  font-style: normal;
  background: linear-gradient(145deg, var(--bamboo-light) 0%, var(--bamboo-mid) 50%, var(--bamboo-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--bamboo-mid);
}

.about-lead {
  max-width: 58ch;
  margin: 10px 0 0;
  font-size: clamp(13.5px, 1.05vw, 15.5px);
  font-weight: 500;
  line-height: 1.55;
  color: var(--muted);
}

.about-foot__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}

.about-places {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.about-places li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 11px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--black);
}

.about-places svg {
  flex: none;
  width: 18px;
  height: 18px;
  stroke: var(--green);
}

.about-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border: 1px solid var(--black);
  border-radius: 999px;
  background: var(--black);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  transition:
    background 0.22s ease,
    color 0.22s ease;
}

.about-cta svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  transition: transform 0.2s ease;
}

.about-cta:hover,
.about-cta:focus-visible {
  background: transparent;
  color: var(--black);
}

.about-cta:hover svg,
.about-cta:focus-visible svg {
  transform: translateX(3px);
}

/* ---------- keyframes ---------- */

@keyframes fx-x {
  from {
    translate: calc(var(--ax) * var(--u) * -1) 0;
  }
  to {
    translate: calc(var(--ax) * var(--u)) 0;
  }
}

@keyframes fx-y {
  from {
    translate: 0 calc(var(--ay) * var(--u) * -1);
  }
  to {
    translate: 0 calc(var(--ay) * var(--u));
  }
}

@keyframes fx-spin {
  from {
    rotate: calc(var(--sp) * -1);
  }
  to {
    rotate: var(--sp);
  }
}

@keyframes about-sway {
  from {
    rotate: -0.28deg;
  }
  to {
    rotate: 0.28deg;
  }
}

@keyframes about-breathe {
  from {
    scale: 0.94;
  }
  to {
    scale: 1.06;
  }
}

@keyframes about-bob {
  from {
    translate: 0 -5px;
  }
  to {
    translate: 0 5px;
  }
}

@keyframes about-bob-sm {
  from {
    translate: 0 -2px;
  }
  to {
    translate: 0 2px;
  }
}

@keyframes about-ping {
  0% {
    scale: 0.9;
    opacity: 0.75;
  }
  70%,
  100% {
    scale: 2.1;
    opacity: 0;
  }
}

/* buiten beeld: alle animaties pauzeren (scheelt batterij) */
.about.is-offscreen *,
.about.is-offscreen *::before,
.about.is-offscreen *::after {
  animation-play-state: paused !important;
}

/* ---------- lage schermen: foot iets compacter ---------- */

@media (max-height: 760px) and (min-width: 761px) {
  .about-lead {
    display: none;
  }
}

/* ---------- smal: beeld boven, voordelen eronder, daarna de tekst (hier mag het wel scrollen) ---------- */

@media (max-width: 900px) {
  .about-foot {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .about-foot__side,
  .about-places {
    align-items: flex-start;
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .about {
    height: auto;
    display: block;
    margin: 10px;
    border-radius: 22px;
  }

  .about-comp {
    --dot: 30px;
    container-type: inline-size;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20vw;
  }

  .about-title {
    top: 5vw;
    font-size: 13.4cqw;
  }

  .about-glow {
    top: 52vw;
    width: 150cqw;
  }

  .about-scene,
  .about-callouts {
    --sw: min(122cqw, 600px);
    --sh: calc(var(--sw) / 1.7726);
  }

  .about-scene {
    position: relative;
    left: auto;
    bottom: auto;
    translate: none;
    flex: none;
    width: var(--sw);
    height: var(--sh);
    margin-top: 2vw;
  }

  .about-callouts {
    position: relative;
    left: auto;
    bottom: auto;
    translate: none;
    display: grid;
    gap: 12px;
    width: 100%;
    height: auto;
    margin-top: 14px;
    padding: 0 16px;
  }

  .about .about-callout {
    position: static;
    transform: none;
    translate: none;
  }

  .about .about-callout .about-callout__in {
    flex-direction: row-reverse;
    gap: 12px;
    animation-name: about-bob-sm;
  }

  .about .about-callout__line {
    display: none;
  }

  .about .about-callout__pill {
    flex: 1;
    width: auto;
    max-width: none;
    border-radius: 18px;
    padding: 0.85em 1.1em;
    font-size: 14.5px;
    text-align: left;
  }

  .about-foot {
    padding: 28px 20px 28px;
  }

  .about-lead {
    display: block;
  }
}

@media (max-width: 480px) {
  .about-places li {
    font-size: 13px;
    padding: 6px 12px 6px 10px;
  }
}

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