/* Flow Inside — cross-page responsive refinements
   Loaded last. Phone stays compact; tablet gets real multi-column layouts
   that use the available width. Desktop art direction stays intact.
*/

/* ------------------------------------------------------------------ */
/* Framed images: always fill their aspect-ratio containers            */
/* ------------------------------------------------------------------ */

.shape-blob > img,
.shape-blob-b > img,
.shape-blob-c > img,
.shape-blob-d > img,
.shape-circle > img,
[class$="__pic"] > img,
.hero__main-pic > img,
.hero__float > img,
.story__main > img,
.care-block__pic > img,
.disciplines__pic > img,
.people__member-pic > img,
.workshops__pic > img,
.offer-detail__pic > img,
.offer-aside__float > img,
.profile__pic > img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  display: block;
}

/* ------------------------------------------------------------------ */
/* Phones (≤639px)                                                     */
/* ------------------------------------------------------------------ */

@media (max-width: 639px) {
  .orb--mist,
  .orb--leaf {
    width: min(42vw, 14rem) !important;
    height: min(42vw, 14rem) !important;
  }

  .hero,
  .page-hero,
  .offer-hero,
  .team-hero {
    padding-top: var(--s-4);
    padding-bottom: var(--s-5);
  }

  .hero__grid,
  .page-hero__grid,
  .offer-hero__grid,
  .team-hero__grid {
    gap: var(--s-4);
  }

  .hero__title,
  .page-hero h1,
  .offer-hero h1,
  .team-hero h1 {
    margin-bottom: var(--s-3);
  }

  .hero__text {
    margin-bottom: var(--s-4);
  }

  .hero__main-pic,
  .page-hero__pic,
  .offer-hero__pic,
  .team-hero__pic {
    width: 100%;
    max-width: min(20.5rem, 100%);
    margin-inline: 0;
  }

  .page-hero__pic,
  .offer-hero__pic,
  .team-hero__pic {
    aspect-ratio: 5 / 4;
  }

  .hero__main-pic img,
  .page-hero__pic img,
  .offer-hero__pic img,
  .team-hero__pic img {
    object-position: center;
  }

  .story,
  .disciplines,
  .care,
  .people,
  .workshops {
    padding-block: var(--s-5);
  }

  .story {
    padding-top: var(--s-4);
  }

  .care-block {
    margin-bottom: var(--s-5);
    gap: var(--s-3);
  }

  .care-block__visual,
  .care-block__pic {
    max-width: min(18rem, 100%);
    margin-inline: 0;
  }

  .care__intro,
  .people__head,
  .page-section__intro {
    margin-bottom: var(--s-4);
  }

  .page-section {
    padding-block: var(--s-4);
  }

  .page-section:has(.rent-match) {
    padding-bottom: var(--s-6);
  }

  .work-block {
    padding-block: var(--s-4);
    gap: var(--s-3);
  }

  .work-block__pic,
  .offer-block__pic {
    max-width: min(20rem, 100%);
    aspect-ratio: 5 / 4;
  }

  .offer-block {
    padding-block: var(--s-4);
  }

  .offer-detail {
    padding-top: var(--s-4);
    padding-bottom: var(--s-5);
  }

  .profile {
    padding-block: var(--s-4);
  }

  .practical {
    padding-top: var(--s-5);
    padding-bottom: var(--s-6);
  }

  .practical__shell {
    border-radius: 1.75rem;
    padding: 1.5rem 1.25rem;
  }

  .btn-row {
    width: 100%;
  }

  .btn-row > .btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}

/* ------------------------------------------------------------------ */
/* TABLET — small + large (640–1099)                                   */
/* Real multi-column layouts that use the wrap width.                  */
/* ------------------------------------------------------------------ */

@media (min-width: 640px) and (max-width: 1099px) {
  /* Orbs: quieter, not dominating tablet composition */
  .orb--mist,
  .orb--leaf {
    width: min(28vw, 16rem) !important;
    height: min(28vw, 16rem) !important;
    opacity: 0.75;
  }

  /* ---- Heroes: side-by-side ---- */
  .hero,
  .page-hero,
  .offer-hero,
  .team-hero {
    padding-top: var(--s-5);
    padding-bottom: var(--s-5);
  }

  .hero__grid,
  .page-hero__grid,
  .offer-hero__grid,
  .team-hero__grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(1.5rem, 3.5vw, 2.75rem);
    align-items: center;
    min-height: 0;
  }

  .hero__main-pic,
  .page-hero__pic,
  .offer-hero__pic,
  .team-hero__pic {
    max-width: 100%;
    width: 100%;
    margin-inline: 0;
  }

  .hero__main-pic {
    aspect-ratio: 1;
    max-width: min(26rem, 100%);
  }

  .page-hero__pic,
  .offer-hero__pic,
  .team-hero__pic {
    aspect-ratio: 5 / 4;
  }

  .hero__text,
  .page-hero__text,
  .offer-hero__text,
  .team-hero__text {
    max-width: none;
  }

  /* ---- Story ---- */
  .story {
    padding-block: var(--s-6);
  }

  .story__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 3.5vw, 2.75rem);
  }

  .story__visual {
    display: block !important;
    max-width: 100%;
    margin-inline: 0;
  }

  .story__copy p {
    max-width: none;
  }

  /* ---- Disciplines: true 2-col tablet composition ---- */
  .disciplines {
    padding-block: var(--s-6);
  }

  .disciplines__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    grid-template-areas:
      "intro visual"
      "index visual";
    column-gap: clamp(1.75rem, 4vw, 3rem);
    row-gap: var(--s-4);
    align-items: start;
  }

  .disciplines__intro { grid-area: intro; }
  .disciplines__index {
    grid-area: index;
    max-width: none;
  }
  .disciplines__visual {
    grid-area: visual;
    max-width: none;
    width: 100%;
    margin: 0;
    align-self: start;
  }

  .disciplines__pic {
    max-width: none;
  }

  /* ---- Care ---- */
  .care {
    padding-block: var(--s-6);
  }

  .care__intro {
    max-width: 36rem;
    margin-bottom: var(--s-5);
  }

  .care-block {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: clamp(1.5rem, 3.5vw, 2.75rem);
    margin-bottom: clamp(2rem, 4vw, 3rem);
  }

  .care-block--flip .care-block__visual { order: 2; }
  .care-block--flip .care-block__copy { order: 1; }

  .care-block__visual {
    max-width: none;
    width: 100%;
    margin-inline: 0;
  }

  .care-block__copy p {
    max-width: none;
  }

  /* ---- People ---- */
  .people {
    padding-block: var(--s-6);
  }

  .people__head {
    margin-bottom: var(--s-5);
  }

  .people__feature {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 3.5vw, 2.75rem);
  }

  .people__feature-visual {
    max-width: none;
    width: 100%;
    margin-inline: 0;
  }

  .people__feature-copy p {
    max-width: none;
  }

  /* ---- Workshops teaser ---- */
  .workshops {
    padding-block: var(--s-6);
  }

  .workshops__grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(1.5rem, 3.5vw, 2.75rem);
    align-items: center;
  }

  .workshops__visual {
    max-width: none;
    width: 100%;
    margin-inline: 0;
  }

  .workshops__copy > p {
    max-width: none;
  }

  /* ---- Aanbod / workshops pages ---- */
  .work-block,
  .offer-block__grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: clamp(1.5rem, 3.5vw, 2.75rem);
  }

  .work-block--flip .work-block__visual,
  .offer-block--flip .offer-block__visual { order: 2; }

  .work-block--flip .work-block__copy,
  .offer-block--flip .offer-block__copy { order: 1; }

  .work-block__pic,
  .offer-block__pic {
    max-width: none;
    width: 100%;
  }

  .work-block__copy p,
  .offer-block__copy p {
    max-width: none;
  }

  .offer-detail__layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(15rem, 0.65fr);
    gap: clamp(1.5rem, 3.5vw, 2.75rem);
    align-items: start;
  }

  .offer-aside {
    position: sticky;
    top: calc(var(--header-h) + var(--safe-top) + 1rem);
  }

  .profile__layout {
    grid-template-columns: minmax(12rem, 0.36fr) minmax(0, 1fr);
    gap: clamp(1.35rem, 3vw, 2.25rem);
  }

  .profile__visual {
    width: 100%;
    max-width: 14.5rem;
    margin-inline: 0;
  }

  .page-section {
    padding-block: var(--s-5);
  }

  .page-section__intro {
    max-width: 42rem;
  }

  .rent-match p {
    max-width: 42rem;
  }

  /* ---- Contact: form + aside side by side ---- */
  .contact-layout {
    grid-template-columns: minmax(0, 1.25fr) minmax(15rem, 0.75fr);
    gap: clamp(1.75rem, 4vw, 3rem);
    align-items: start;
  }

  .contact-form {
    max-width: none;
  }

  .contact-intro__text {
    max-width: none;
  }

  .contact-aside {
    max-width: none;
    width: 100%;
    position: sticky;
    top: calc(var(--header-h) + var(--safe-top) + 1rem);
  }

  .field-row {
    grid-template-columns: 1fr 1fr;
  }

  /* ---- Practical / footer ---- */
  .practical {
    padding-block: var(--s-6);
  }

  .practical__shell {
    border-radius: 2.25rem;
    padding: clamp(1.75rem, 3.5vw, 2.75rem) clamp(1.75rem, 4vw, 3rem);
  }

  /* Keep footer 2×2 on tablet (components.css 4-col starts at 1000px) */
  .site-footer__grid {
    grid-template-columns: 1.15fr 1fr;
    gap: var(--s-4) clamp(1.5rem, 3vw, 2.5rem);
  }
}

/* Larger tablets (iPad Air / Pro portrait): a bit more air */
@media (min-width: 820px) and (max-width: 1099px) {
  .hero__main-pic {
    max-width: min(28rem, 100%);
  }

  .disciplines__layout {
    column-gap: clamp(2rem, 4.5vw, 3.5rem);
  }

  .contact-layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(16rem, 0.7fr);
  }
}

/* ------------------------------------------------------------------ */
/* Very small phones / fold outer cover (≤360)                         */
/* ------------------------------------------------------------------ */

@media (max-width: 360px) {
  .hero__main-pic,
  .page-hero__pic,
  .offer-hero__pic,
  .team-hero__pic,
  .work-block__pic,
  .offer-block__pic {
    max-width: 100%;
  }

  /* Float portrait eats precious width on SE / fold cover */
  .hero__float {
    display: none;
  }

  .nav-panel a {
    font-size: clamp(1.4rem, 7vw, 1.85rem);
    padding: 0.7rem 0.85rem;
    min-height: 2.75rem;
  }

  .btn {
    min-height: 2.75rem;
    padding-inline: 1.1rem;
  }

  .practical__shell {
    padding: 1.25rem 1rem;
    border-radius: 1.35rem;
  }
}

/* Ultra-narrow fold cover */
@media (max-width: 300px) {
  :root {
    --gutter: 0.85rem;
  }

  .orb--mist,
  .orb--leaf {
    display: none;
  }

  .hero__title,
  .page-hero h1,
  .offer-hero h1,
  .team-hero h1 {
    font-size: clamp(1.55rem, 9vw, 1.85rem);
  }
}

/* ------------------------------------------------------------------ */
/* Short landscape (phones / fold inner / browser chrome)              */
/* Width often hits tablet breakpoints; height is the real constraint. */
/* ------------------------------------------------------------------ */

@media (max-height: 500px) and (orientation: landscape) {
  .orb--mist,
  .orb--leaf {
    opacity: 0.35;
    width: min(22vw, 10rem) !important;
    height: min(22vw, 10rem) !important;
  }

  .hero,
  .page-hero,
  .offer-hero,
  .team-hero {
    padding-top: 0.65rem;
    padding-bottom: 0.85rem;
    min-height: 0;
  }

  .hero__grid,
  .page-hero__grid,
  .offer-hero__grid,
  .team-hero__grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: clamp(0.85rem, 2.5vw, 1.5rem);
    align-items: center;
  }

  .hero__title,
  .page-hero h1,
  .offer-hero h1,
  .team-hero h1 {
    font-size: clamp(1.35rem, 3.2vw, 1.85rem);
    margin-bottom: 0.45rem;
  }

  .hero__text,
  .page-hero__text p,
  .offer-hero__text p,
  .team-hero__text p {
    font-size: 0.92rem;
    margin-bottom: 0.65rem;
  }

  .hero__float,
  .offer-aside__float {
    display: none !important;
  }

  .hero__main-pic,
  .page-hero__pic,
  .offer-hero__pic,
  .team-hero__pic {
    max-width: min(11.5rem, 32vw);
    aspect-ratio: 1;
    margin-inline: 0;
  }

  .btn-row {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .btn-row > .btn {
    flex: 0 1 auto;
    min-height: 2.4rem;
    padding: 0.45rem 1rem;
    font-size: 0.88rem;
  }

  .story,
  .disciplines,
  .care,
  .people,
  .workshops,
  .page-section,
  .offer-detail,
  .profile {
    padding-block: 1.25rem;
  }

  .contact-layout {
    grid-template-columns: minmax(0, 1.2fr) minmax(12rem, 0.8fr);
    gap: 1.25rem;
  }

  .field-row {
    grid-template-columns: 1fr 1fr;
  }

  .practical__shell {
    padding: 1.15rem 1.25rem;
  }
}

/* Extra-short landscape (≈ iPhone SE land / browser bars) */
@media (max-height: 420px) and (orientation: landscape) {
  .hero__text,
  .page-hero__text,
  .offer-hero__text {
    margin-bottom: 0.4rem;
  }

  .hero__text p,
  .page-hero__text p,
  .offer-hero__text p {
    font-size: 0.86rem;
    line-height: 1.45;
  }

  .hero__main-pic,
  .page-hero__pic,
  .offer-hero__pic,
  .team-hero__pic {
    max-width: min(9.5rem, 28vw);
  }
}

/* Small/mid tablets: stack email/phone for comfortable touch targets */
@media (min-width: 640px) and (max-width: 819px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------------ */
/* Large desktops + ultrawide                                          */
/* ------------------------------------------------------------------ */

@media (min-width: 1600px) {
  .wrap {
    max-width: var(--max);
  }

  .hero__grid {
    gap: clamp(2.5rem, 4vw, 4rem);
  }

  .hero__main-pic {
    max-width: min(30rem, 100%);
  }
}

@media (min-width: 2200px) {
  :root {
    --max: 1240px;
    --gutter: clamp(2rem, 4vw, 3rem);
  }
}

/* Desktop: ensure story visual stays visible */
@media (min-width: 1100px) {
  .story__visual {
    display: block;
  }
}

/* Reduced motion: keep layout intact, quiet decorative motion only */
@media (prefers-reduced-motion: reduce) {
  .orb--mist,
  .orb--leaf {
    animation: none !important;
  }
}
