/* Buttons */
.btn {
  /* per-variant values: circle color, label color, arrow color */
  --btn-color: var(--color-pastel-blood);
  --btn-label-color: var(--color-persian-plum);
  --btn-arrow-color: var(--color-persian-plum);
  display: inline-flex;
  align-items: center;
  gap: 1px; /* pill and arrow circle touch, 1px apart */
  text-decoration: none;
  position: relative;
  isolation: isolate;
}

.btn-pill {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(62 * var(--u));
  padding: 0 calc(46 * var(--u));
  border-radius: calc(50 * var(--u));
  overflow: hidden;
}

.btn-label {
  position: relative;
  z-index: 1;
  font-weight: var(--body-b-weight);
  font-size: var(--body-b-size);
  line-height: var(--body-b-line-height);
  color: var(--btn-label-color);
  text-transform: uppercase;
  white-space: nowrap;
}

.btn-arrow {
  position: relative;
  width: calc(62 * var(--u));
  height: calc(62 * var(--u));
  flex-shrink: 0;
  border-radius: 50%;
}

.btn-arrow::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--btn-color);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.btn-arrow::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--btn-arrow-color);
  -webkit-mask: var(--arrow-mask) center / 100% 100% no-repeat;
  mask: var(--arrow-mask) center / 100% 100% no-repeat;
}

.btn:hover .btn-arrow::before,
.btn:focus-visible .btn-arrow::before {
  opacity: 1;
}

/* One big circle sits behind both parts. Its center is the left-middle of the
   button and its radius is the button width. The pill and the arrow circle are
   cut out of it with clip-path so the gradient runs across both. On hover the
   center slides to the right end (the tile is 2x the button, so the radius stays
   the same). */
.btn::before,
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
      circle farthest-side at 50% 50%,
      var(--btn-color) 0%,
      color-mix(in srgb, var(--btn-color) 10%, transparent) 100%
    )
    100% 50% / 200% 100% no-repeat;
  backdrop-filter: blur(calc(10 * var(--u)));
  transition: background-position 0.6s ease;
}

.btn:hover::before,
.btn:hover::after,
.btn:focus-visible::before,
.btn:focus-visible::after {
  background-position: 0% 50%;
}

/* pill */
.btn::before {
  clip-path: inset(0 calc(62 * var(--u) + 1px) 0 0 round calc(50 * var(--u)));
}

/* arrow circle */
.btn::after {
  clip-path: circle(calc(31 * var(--u)) at calc(100% - 31 * var(--u)) 50%);
}

/* sage button */
.btn-sage {
  --btn-color: var(--color-sea-nymph);
  --btn-label-color: var(--color-pine-forest);
  --btn-arrow-color: var(--color-pine-forest);
}

/* small filled button (event cards) */
.btn-small .btn-pill {
  background: var(--color-sage-26);
}

.btn-small .btn-label {
  color: var(--color-pine-forest);
}

.btn-small .btn-arrow {
  display: none;
}

.btn-small::before,
.btn-small::after {
  display: none;
}

@media (max-width: 600px) {
  .btn-pill {
    height: auto;
    min-height: calc(62 * var(--u));
    padding: calc(14 * var(--u)) calc(32 * var(--u));
  }
  .btn-label {
    white-space: normal;
  }
}

/* Headings */
.title-lg {
  font-weight: var(--h2-weight);
  font-size: var(--h2-size);
  text-transform: uppercase;
}

/* Big two-tone heading: page heroes and the CTA band. */
.title-xl {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  font-weight: var(--h1-weight);
  font-size: var(--display-size);
  text-transform: uppercase;
}

.title-xl > span {
  display: block;
}

/* section: side gutters + space under it */
.section {
  padding: 0 var(--page-gutter) var(--section-space);
}

/* page hero: title left, text right (-stack = one column) */
.page-hero {
  padding: var(--hero-top) var(--page-gutter) calc(80 * var(--u));
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: calc(60 * var(--u));
  flex-wrap: wrap;
}

.page-hero-stack {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  flex-wrap: nowrap;
}

/* outline color per heading (default --color-outline) */
.events-title,
.single-title,
.about-title,
.process-title,
.intro-title,
.services-title {
  --outline-color: var(--color-persian-plum);
}

.hero-title,
.cultures-title {
  --outline-color: var(--color-black);
}

.cta-title {
  --outline-color: var(--color-pine-forest);
}

.different-title {
  --outline-color: var(--color-pine-forest);
}

.testimonials-title {
  --outline-color: var(--color-pastel-blood);
}

.contact-title {
  --outline-color: #292929;
}

/* CTA band */
:root .cta {
  position: relative;
  margin: 0 var(--page-gutter) var(--section-space); /* :root beats WordPress's rule that zeroes the last block's bottom margin */
  border-radius: calc(24 * var(--u));
  overflow: hidden;
  isolation: isolate;
  /* height comes from the tile grid (4 rows) */
}

.cta-blobs {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.cta-blob {
  position: absolute;
  border-radius: 50%;
  background: var(--color-sea-nymph);
  filter: blur(calc(32 * var(--u)));
  will-change: transform;
}

.cta-blob-1 {
  width: calc(560 * var(--u));
  height: calc(560 * var(--u));
  left: 10%;
  top: -15%;
  animation: blob-float-1 12s ease-in-out infinite;
}

.cta-blob-2 {
  width: calc(460 * var(--u));
  height: calc(460 * var(--u));
  right: 8%;
  bottom: -20%;
  animation: blob-float-2 14s ease-in-out infinite;
}

.cta-blob-3 {
  width: calc(340 * var(--u));
  height: calc(340 * var(--u));
  left: 42%;
  top: 30%;
  animation: blob-float-3 10s ease-in-out infinite;
}

/* blobs swap sides and pause a moment after each move */
@keyframes blob-float-1 {
  0%,
  18% {
    transform: translate(0, 0) scale(1);
  }
  40%,
  58% {
    transform: translate(calc(500 * var(--u)), calc(70 * var(--u))) scale(1.06);
  }
  76%,
  88% {
    transform: translate(calc(220 * var(--u)), calc(-60 * var(--u))) scale(0.97);
  }
  100% {
    transform: translate(0, 0) scale(1);
  }
}

@keyframes blob-float-2 {
  0%,
  16% {
    transform: translate(0, 0) scale(1);
  }
  38%,
  56% {
    transform: translate(calc(-480 * var(--u)), calc(-60 * var(--u))) scale(1.05);
  }
  74%,
  88% {
    transform: translate(calc(-200 * var(--u)), calc(60 * var(--u))) scale(0.97);
  }
  100% {
    transform: translate(0, 0) scale(1);
  }
}

@keyframes blob-float-3 {
  0%,
  20% {
    transform: translate(0, 0) scale(1);
  }
  42%,
  60% {
    transform: translate(calc(-340 * var(--u)), calc(-80 * var(--u))) scale(1.07);
  }
  78%,
  90% {
    transform: translate(calc(320 * var(--u)), calc(80 * var(--u))) scale(0.95);
  }
  100% {
    transform: translate(0, 0) scale(1);
  }
}

/* Tile grid is added by main.js. It sits in normal flow, so it sets the band height. */
.cta-tiles {
  --tiles-cols: 13;
  --tiles-rows: 4;
  --tiles-gap: calc(4 * var(--u));
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(var(--tiles-cols), 1fr);
  gap: var(--tiles-gap);
  padding: 0;
  pointer-events: none;
  /* no background so the blob shows through the gaps */
}

/* The tiles come from JS, so reserve their final height while the grid is empty.
   Otherwise the footer jumps down when they load (% padding = band width). */
.cta-tiles:empty {
  padding-top: calc(
    (100% - (var(--tiles-cols) - 1) * var(--tiles-gap)) / var(--tiles-cols) * var(--tiles-rows) +
      (var(--tiles-rows) - 1) * var(--tiles-gap)
  );
}

/* Each tile is two squares on top of each other: the tile itself is the tinted
   back square, ::before is the front one with only the shine border. */
.cta-tile {
  position: relative;
  aspect-ratio: 1;
  border-radius: calc(12 * var(--u));
  background: var(--color-sage-20);
  /* No backdrop-filter on the tiles: 50+ of them over animated blobs made
     scrolling to the footer laggy in Chrome, and it barely showed. */
}

/* shine: 1px border that fades out at the top-right and bottom-left corners */
.cta-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(45deg, transparent, var(--color-shine), transparent);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.cta-inner {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--page-gutter);
  padding: var(--page-gutter);
  box-sizing: border-box;
}

.cta-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: calc(20 * var(--u));
}

/* round glass button */
.cta-circle {
  position: relative;
  flex-shrink: 0;
  width: calc(280 * var(--u));
  height: calc(280 * var(--u));
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(6 * var(--u));
  text-align: center;
  text-decoration: none;
  color: var(--color-pine-forest);
  background: var(--color-sage-26);
  backdrop-filter: blur(calc(7 * var(--u))) saturate(160%);
  -webkit-backdrop-filter: blur(calc(7 * var(--u))) saturate(160%);
  transition: background 0.25s ease;
}

.cta-circle::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(45deg, transparent, var(--color-shine), transparent);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.cta-circle:hover,
.cta-circle:focus-visible {
  background: color-mix(in srgb, var(--color-sea-nymph) 68%, transparent);
}

.cta-circle-title {
  text-transform: uppercase;
  font-weight: var(--body-b-weight);
  font-size: var(--body-b-size);
}

.cta-circle-sub {
  font-size: max(var(--font-min), calc(16 * var(--fu)));
}

.cta-title {
  color: var(--color-pine-forest);
}

.cta-text {
  color: var(--color-pine-forest);
  font-weight: var(--body-b-weight);
  font-size: max(var(--font-min), calc(36 * var(--fu)));
  line-height: var(--body-r-line-height);
}

@media (prefers-reduced-motion: reduce) {
  .cta-blob {
    animation: none;
  }
}

/* main.js pauses the blobs while the band is off screen */
.cta.is-offscreen .cta-blob {
  animation-play-state: paused;
}

@media (max-width: 767px) {
  .cta-tiles {
    --tiles-cols: 6;
    --tiles-rows: 8;
    grid-template-columns: repeat(var(--tiles-cols), 1fr);
  }
  /* stacked: copy on top, button bottom right */
  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: calc(40 * var(--u));
  }
  .cta-copy {
    align-self: flex-start;
  }
  .cta-circle {
    align-self: flex-end;
    width: calc(230 * var(--u));
    height: calc(230 * var(--u));
  }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(calc(24 * var(--u)));
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Placeholder block (swap for real images/video) */
.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(24 * var(--u));
  border-radius: calc(16 * var(--u));
  overflow: hidden;
  background: var(--color-sea-nymph);
  color: var(--color-pine-forest);
  font-weight: var(--body-b-weight);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: max(var(--font-min), calc(14 * var(--fu)));
}

/* Floating WhatsApp button, fixed on screen (every page except Contact).
   Same glow-circle language as .to-top-icon: a blurred colour blob clipped
   to a circle, with a solid glyph on top. */
.whatsapp-float {
  position: fixed;
  right: calc(40 * var(--u));
  bottom: calc(40 * var(--u));
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(62 * var(--u));
  height: calc(62 * var(--u));
  border-radius: 50%;
  overflow: hidden;
  background: #ba586133;
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* hidden once the footer scrolls into view */
.whatsapp-float.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.whatsapp-float::before {
  content: "";
  position: absolute;
  inset: -20%;
  background: var(--color-pastel-blood);
  filter: blur(calc(20 * var(--u)));
}

.whatsapp-float-icon {
  position: relative;
  width: calc(28 * var(--u));
  height: calc(28 * var(--u));
  color: #fff;
}
