/* Only what site.js creates or toggles. Layout, type and colour of the page live in site.css. */

.fx-scroll-sentinel {
  position: absolute; top: 0; left: 0; width: 1px; height: 8px;
  visibility: hidden; pointer-events: none;
}

.fx-top-sentinel {
  position: absolute; top: 0; left: 0; width: 1px; height: 1px;
  visibility: hidden; pointer-events: none;
}

/* Effect layers sit above the page (z ≤ 3) and below the header (50), whose menus and sheet must stay on top. */
.fx-layer { position: fixed; inset: 0; z-index: 40; overflow: hidden; pointer-events: none; }

/* ---------- scroll reveal (motion allowed only; content is visible otherwise) */
@media (prefers-reduced-motion: no-preference) {
  .js.fx-reveal [data-reveal] {
    transition: opacity .6s cubic-bezier(.22, 1, .36, 1), transform .7s cubic-bezier(.34, 1.25, .64, 1);
  }
  .js.fx-reveal [data-reveal]:not(.is-revealed) { opacity: 0; transform: translate3d(0, 28px, 0); }
  .js.fx-reveal [data-reveal="left"]:not(.is-revealed) { transform: translate3d(-32px, 0, 0); }
  .js.fx-reveal [data-reveal="right"]:not(.is-revealed) { transform: translate3d(32px, 0, 0); }
  .js.fx-reveal [data-reveal="zoom"]:not(.is-revealed) { transform: scale(.94); }
  .js.fx-reveal [data-reveal-delay="1"] { transition-delay: 80ms; }
  .js.fx-reveal [data-reveal-delay="2"] { transition-delay: 160ms; }
  .js.fx-reveal [data-reveal-delay="3"] { transition-delay: 240ms; }
  .js.fx-reveal [data-reveal-delay="4"] { transition-delay: 320ms; }
}

/* ---------- compare slider: the rendering is clipped over the reality */
.js .compare.is-ready .compare__frame {
  --pos: 50%;
  position: relative; display: block; overflow: hidden;
  touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none;
}
.js .compare.is-ready .compare__img { display: block; width: 100%; pointer-events: none; -webkit-user-drag: none; }
.js .compare.is-ready .compare__img--after { position: relative; height: auto; }
.js .compare.is-ready .compare__img--before {
  position: absolute; inset: 0; height: 100%;
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}
.js .compare.is-ready .compare__tag { z-index: 3; }
.js .compare.is-ready .compare__range {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); border: 0; opacity: 0;
}
.js .compare.is-ready .compare__handle {
  position: absolute; z-index: 2; top: 0; bottom: 0; left: var(--pos);
  width: 3px; margin-left: -1.5px; background: #fff;
  box-shadow: 0 0 0 1px rgb(23 35 49 / .15); pointer-events: none;
}
.js .compare.is-ready .compare__handle::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23bf165b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l-5 6 5 6M15 6l5 6-5 6'/%3E%3C/svg%3E") center / 24px no-repeat;
  box-shadow: 0 4px 14px rgb(23 35 49 / .22);
  transition: transform .2s ease-out;
}
.js .compare.is-ready .compare__frame.is-dragging { cursor: grabbing; }
.js .compare.is-ready .compare__frame.is-dragging .compare__handle::after { transform: scale(1.08); }
@media (hover: hover) and (pointer: fine) {
  .js .compare.is-ready .compare__frame:hover .compare__handle::after { transform: scale(1.08); }
}
.js .compare.is-ready .compare__frame:has(.compare__range:focus-visible) {
  outline: 3px solid var(--ink); outline-offset: 3px;
}
.js .compare.is-ready .compare__frame:has(.compare__range:focus-visible) .compare__handle::after {
  box-shadow: 0 0 0 3px var(--ink), 0 4px 14px rgb(23 35 49 / .22);
}

/* ---------- gallery filter */
@media (prefers-reduced-motion: no-preference) {
  .fx-fade-in { animation: fx-fade-in .45s cubic-bezier(.22, 1, .36, 1) both; }
}
@keyframes fx-fade-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- balloon fields: decorative, behind content, only the balloon shapes take a tap.
   --x and --y are fractions of the room left once the balloon fits, so it never spills out. */
.fx-balloon {
  --w: calc(var(--s, 1) * clamp(34px, 5.5vw, 70px));
  position: absolute;
  left: calc((100% - var(--w)) * var(--x, .5));
  top: calc((100% - var(--w) * 1.8) * var(--y, .5));
  width: var(--w); aspect-ratio: 40 / 72;
}
.fx-balloon__float { display: block; width: 100%; height: 100%; transform: rotate(var(--tilt, 0deg)); transform-origin: 50% 90%; }
.fx-balloon svg { display: block; width: 100%; height: 100%; overflow: visible; }
.fx-balloon__body, .fx-balloon__knot { fill: var(--c); pointer-events: visiblePainted; cursor: pointer; }
/* The gradients live in one hidden <svg> (site.js); every balloon references them by id. */
.fx-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.fx-balloon__body { stroke: rgb(120 30 70 / .14); stroke-width: .6; }
.fx-balloon__knot { filter: brightness(.82); }
.fx-balloon__string { fill: none; stroke: rgb(23 35 49 / .35); stroke-width: .7; stroke-linecap: round; pointer-events: none; }
.fx-balloon__hl { fill: url(#fx-hl); pointer-events: none; }
.fx-balloon__sheen { fill: url(#fx-sheen); pointer-events: none; }
.fx-balloon__rim { fill: none; stroke: #fff; stroke-opacity: .35; stroke-width: 1.1; stroke-linecap: round; pointer-events: none; }
.fx-balloon__dot { fill: #fff; opacity: .85; pointer-events: none; }
/* Depth, for the storm: far is small and soft, near is large with a shadow. */
.fx-depth-far { filter: blur(1.5px) saturate(.8); opacity: .85; }
.fx-depth-near { filter: drop-shadow(0 10px 14px rgb(90 10 45 / .22)); }
@media (hover: hover) and (pointer: fine) {
  .balloon-field .fx-balloon__body:hover { filter: brightness(1.06); }
}

.fx-confetti {
  position: absolute; width: 7px; height: 10px; margin: -5px 0 0 -3.5px;
  border-radius: 1px; background: var(--c); pointer-events: none;
  animation: fx-confetti .8s cubic-bezier(.2, .7, .3, 1) forwards;
}
.fx-pop-text {
  position: absolute; pointer-events: none; transform: translate(-50%, -50%);
  font: italic 700 1rem/1 var(--font-display);
  color: var(--ink);
  animation: fx-pop-text .7s ease-out forwards;
}

@media (prefers-reduced-motion: no-preference) {
  .fx-balloon__float { animation: fx-bob var(--dur, 7s) ease-in-out var(--delay, 0s) infinite alternate; }
  .fx-balloon.is-rising { animation: fx-rise 1.6s cubic-bezier(.22, 1, .36, 1) both; }
  .fx-balloon.is-popping .fx-balloon__float { animation: fx-squash .2s ease-in forwards; }
  .balloon-field.is-paused *, .fx-tab-hidden .fx-balloon * { animation-play-state: paused !important; }
}

@keyframes fx-bob {
  from { transform: translate3d(0, 0, 0) rotate(var(--tilt, 0deg)); }
  50% { transform: translate3d(var(--sway, 6px), -10px, 0) rotate(calc(var(--tilt, 0deg) * -.5)); }
  to { transform: translate3d(calc(var(--sway, 6px) * -.5), -18px, 0) rotate(var(--tilt, 0deg)); }
}
@keyframes fx-rise { from { transform: translateY(var(--rise, 300px)); opacity: 0; } 25% { opacity: 1; } }
@keyframes fx-squash {
  50% { transform: scale(1.18, .82); }
  to { transform: scale(1.4); opacity: 0; }
}
@keyframes fx-confetti { to { transform: translate(var(--dx), calc(var(--dy) + 24px)) rotate(var(--r)); opacity: 0; } }
@keyframes fx-pop-text {
  from { opacity: 0; transform: translate(-50%, -50%) scale(.6); }
  25% { opacity: 1; transform: translate(-50%, -80%) scale(1.1); }
  to { opacity: 0; transform: translate(-50%, -150%); }
}

/* ---------- balloon storm: over the page but never catches a tap */
.fx-storm { position: fixed; inset: 0; z-index: 40; overflow: hidden; pointer-events: none; }
/* Behind every in-flow block, over the page background only (the thank-you page on phones). */
.fx-storm--behind { z-index: -1; }
.fx-storm .fx-balloon { top: auto; bottom: 12px; }
.fx-storm .fx-balloon__body, .fx-storm .fx-balloon__knot { pointer-events: none; cursor: auto; }
@media (prefers-reduced-motion: no-preference) {
  .fx-storm:not(.is-static) .fx-balloon {
    top: 100%; bottom: auto;
    animation: fx-storm-rise var(--dur, 4s) cubic-bezier(.3, .1, .4, 1) var(--delay, 0s) both;
  }
}
@keyframes fx-storm-rise { to { transform: translateY(calc(-100vh - 100%)); } }

/* ---------- toast */
.fx-toast {
  position: fixed; z-index: 45; left: 50%; bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem;
  width: min(calc(100% - 32px), 30rem); padding: .5rem .5rem .5rem 1rem;
  border-radius: 1rem; background: var(--ink); color: #fff;
  box-shadow: 0 12px 32px rgb(23 35 49 / .3);
}
.fx-toast__text { flex: 1 1 12rem; margin: 0; font-size: 1rem; line-height: 1.4; }
.fx-toast__link { display: inline-flex; align-items: center; min-height: 44px; color: #fff; font-weight: 700; }
.fx-toast__close {
  flex: none; width: 44px; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
  .fx-toast__close:hover { background: rgb(255 255 255 / .14); }
}
.fx-toast__link:focus-visible, .fx-toast__close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .fx-toast { animation: fx-toast-in .4s cubic-bezier(.34, 1.4, .64, 1) both; }
  .fx-toast.is-leaving { animation: fx-toast-out .25s ease-in forwards; }
}
@keyframes fx-toast-in { from { opacity: 0; transform: translate(-50%, 24px); } }
@keyframes fx-toast-out { to { opacity: 0; transform: translate(-50%, 16px); } }

/* ---------- wordmark bounce */
.fx-letter { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .fx-bouncing .fx-letter { animation: fx-letter .6s cubic-bezier(.34, 1.56, .64, 1) calc(var(--i, 0) * 40ms) both; }
}
@keyframes fx-letter {
  40% { transform: translateY(-.35em) rotate(-6deg); }
  70% { transform: translateY(.05em); }
}

/* ---------- lightbox: no View Transition (site.css names the header for those), plain CSS only */
html.fx-lightbox-open { overflow: hidden; padding-right: var(--fx-scrollbar, 0px); }
.fx-lightbox {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; overflow: hidden; background: transparent; color: #fff;
}
.fx-lightbox[open] { display: flex; flex-direction: column; }
.fx-lightbox::backdrop { background: rgb(40 8 26 / .92); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.fx-lightbox__stage {
  display: grid; place-items: center; flex: 1; min-height: 0;
  padding: max(72px, calc(env(safe-area-inset-top) + 64px)) 12px 8px;
}
.fx-lightbox__figure { display: grid; justify-items: center; gap: 14px; margin: 0; }
/* A fixed box: photos of any shape sit inside it, so nothing around them moves on a step. */
.fx-lightbox__frame {
  position: relative; display: grid; grid-template: 100% / 100%; place-items: center;
  width: min(92vw, 1100px); height: min(70vh, calc(100vh - 230px)); height: min(70dvh, calc(100dvh - 230px));
  touch-action: pan-y pinch-zoom;
  transform: translateX(var(--drag, 0px)); transition: transform .25s var(--ease-out, ease-out);
}
.fx-lightbox__frame.is-dragging { transition: none; }
.fx-lightbox__img {
  grid-area: 1 / 1; display: block; width: auto; height: auto; max-width: 100%; max-height: 100%;
  object-fit: contain; border-radius: 20px; box-shadow: 0 24px 60px rgb(0 0 0 / .4);
  opacity: 0; transition: opacity .12s ease-in;
  user-select: none; -webkit-user-drag: none;
}
.fx-lightbox__img:not([src]) { visibility: hidden; }
.fx-lightbox__img.is-current { opacity: 1; transition: opacity .2s var(--ease-out, ease-out); }
.fx-lightbox__loader { grid-area: 1 / 1; width: 40px; aspect-ratio: 40 / 72; opacity: 0; pointer-events: none; transition: opacity .2s ease-out; }
.fx-lightbox__frame.is-loading .fx-lightbox__loader { opacity: 1; }
.fx-lightbox__loader svg { display: block; width: 100%; height: 100%; overflow: visible; }
.fx-lightbox__loader .fx-balloon__body, .fx-lightbox__loader .fx-balloon__knot { pointer-events: none; cursor: auto; }
.fx-lightbox__caption {
  max-width: 40rem; margin: 0; padding-inline: 1rem; text-align: center;
  font: italic 400 20px / 1.3 var(--font-display, "Fraunces", Georgia, serif); color: #fff;
}
.fx-lightbox__counter { margin: 0; min-width: 4.5rem; text-align: center; font: 600 .875rem / 1 var(--font-text, "DM Sans", system-ui, sans-serif); color: rgb(255 255 255 / .85); letter-spacing: .04em; }
.fx-lightbox__bar {
  display: flex; align-items: center; justify-content: center; gap: 1.5rem;
  padding: 10px 16px max(16px, env(safe-area-inset-bottom));
}
.fx-lightbox__button {
  display: grid; place-items: center; flex: none;
  width: 52px; height: 52px; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 50%;
  background: #fff; color: var(--raspberry, #bf165b); cursor: pointer;
  box-shadow: 0 6px 18px rgb(0 0 0 / .25);
  transition: transform .2s var(--ease-spring, ease-out), box-shadow .2s ease-out;
}
.fx-lightbox__button[hidden] { display: none; }
.fx-lightbox__button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.fx-lightbox__button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.fx-lightbox__close {
  position: absolute; width: 48px; height: 48px;
  top: max(14px, env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right));
}
@media (min-width: 768px) {
  .fx-lightbox__stage { padding: 64px 88px; }
  .fx-lightbox__frame {
    width: min(92vw, calc(100vw - 176px), 1100px);
    height: min(78vh, calc(100vh - 190px)); height: min(78dvh, calc(100dvh - 190px));
  }
  /* Beside the photo, centred on it; the counter sits under the caption area. */
  .fx-lightbox__bar { display: contents; }
  .fx-lightbox__prev, .fx-lightbox__next { position: absolute; top: 50%; margin-top: -26px; }
  .fx-lightbox__prev { left: max(20px, env(safe-area-inset-left)); }
  .fx-lightbox__next { right: max(20px, env(safe-area-inset-right)); }
  .fx-lightbox__counter { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); }
}
@media (hover: hover) and (pointer: fine) {
  .fx-lightbox__button:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgb(0 0 0 / .3); }
}
@media (prefers-reduced-motion: no-preference) {
  .fx-lightbox[open]::backdrop { animation: fx-lightbox-fade .2s ease-out; }
  .fx-lightbox[open] .fx-lightbox__figure { animation: fx-lightbox-in .24s var(--ease-out, ease-out); }
  .fx-lightbox[open] .fx-lightbox__button, .fx-lightbox[open] .fx-lightbox__counter { animation: fx-lightbox-fade .2s ease-out; }
  .fx-lightbox.is-closing::backdrop { animation: fx-lightbox-fade-out .2s ease-in forwards; }
  .fx-lightbox.is-closing .fx-lightbox__figure { animation: fx-lightbox-out .2s ease-in forwards; }
  .fx-lightbox.is-closing .fx-lightbox__button, .fx-lightbox.is-closing .fx-lightbox__counter { animation: fx-lightbox-fade-out .2s ease-in forwards; }
  .fx-lightbox__loader .fx-balloon__float { animation: fx-bob 1.6s ease-in-out infinite alternate; }
}
@keyframes fx-lightbox-fade { from { opacity: 0; } }
@keyframes fx-lightbox-fade-out { to { opacity: 0; } }
@keyframes fx-lightbox-in { from { opacity: 0; transform: scale(.96); } }
@keyframes fx-lightbox-out { to { opacity: 0; transform: scale(.96); } }

/* ---------- back-to-top balloon: desktop with a mouse only */
.fx-top {
  position: fixed; z-index: 45;
  right: max(24px, env(safe-area-inset-right)); bottom: max(24px, env(safe-area-inset-bottom));
  display: none; width: 52px; height: 94px; margin: 0; padding: 0; border: 0; border-radius: 26px 26px 50% 50%;
  background: transparent; color: inherit; cursor: pointer;
  opacity: 0; visibility: hidden;
  transition: opacity .4s ease-out, visibility 0s linear .4s;
}
@media (min-width: 960px) and (hover: hover) { .fx-top { display: block; } }
.fx-top.is-shown:not(.is-popped) { opacity: 1; visibility: visible; transition: opacity .4s ease-out, visibility 0s; }
.fx-top svg { display: block; width: 100%; height: 100%; overflow: visible; }
.fx-top .fx-balloon__body { stroke: rgb(23 35 49 / .1); stroke-width: .8; }
.fx-top .fx-balloon__knot { filter: brightness(.85); }
.fx-top .fx-balloon__string { stroke: rgb(23 35 49 / .3); stroke-width: .8; }
.fx-top__arrow { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.fx-top:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
@media (hover: hover) and (pointer: fine) {
  .fx-top:hover .fx-balloon__body { filter: brightness(1.08); }
}
@media (prefers-reduced-motion: no-preference) {
  .fx-top .fx-balloon__float { animation: fx-bob 6s ease-in-out infinite alternate; }
  .fx-top.is-popped .fx-balloon__float { animation: fx-squash .2s ease-in forwards; }
}

/* ---------- footer balloon, let go: site.js simulates the flight of a clone */
.fx-air { position: fixed; inset: 0; z-index: 45; overflow: hidden; pointer-events: none; }
.fx-deflate { position: absolute; top: 0; left: 0; width: 44px; aspect-ratio: 40 / 72; --c: url(#fx-g-bubblegum); }
.fx-deflate svg { display: block; width: 100%; height: 100%; overflow: visible; }
.fx-deflate .fx-balloon__body, .fx-deflate .fx-balloon__knot { fill: var(--c); stroke: var(--raspberry, #bf165b); stroke-width: 1; pointer-events: none; }
.fx-deflate .fx-balloon__string { fill: none; stroke: rgb(23 35 49 / .35); stroke-width: .9; transform-box: fill-box; transform-origin: 50% 0; animation: fx-whip .09s linear infinite alternate; }
@keyframes fx-whip { from { transform: rotate(-18deg) skewX(-10deg); } to { transform: rotate(18deg) skewX(10deg); } }
.fx-puff {
  position: absolute; width: var(--p, 4px); height: var(--p, 4px); margin: calc(var(--p, 4px) / -2) 0 0 calc(var(--p, 4px) / -2);
  border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgb(191 22 91 / .12);
  animation: fx-puff .5s ease-out forwards;
}
@keyframes fx-puff { from { opacity: .95; } to { opacity: 0; transform: scale(2.6); } }
.fx-released { opacity: 0; }

/* ---------- ribbon: a click, tap, Enter or Space pauses it; focus inside pauses it too */
.ribbon.is-paused .ribbon__track, .ribbon:focus-within .ribbon__track { animation-play-state: paused; }
.js .ribbon { cursor: pointer; }
.ribbon.is-paused::after {
  content: ""; position: absolute; top: 50%; right: 14px; width: 10px; height: 14px; margin-top: -7px;
  border-inline: 3px solid currentColor; opacity: .7; pointer-events: none;
}

/* ---------- footer balloon: a small lift and swell says it can be clicked (focus ring: site.css) */
@media (prefers-reduced-motion: no-preference) {
  .footer-balloon .icon { transform-origin: 50% 80%; transition: transform .2s var(--ease-spring, ease-out); }
  .footer-balloon:focus-visible .icon { transform: translateY(-3px) scale(1.06); }
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  .footer-balloon:hover .icon { transform: translateY(-3px) scale(1.06); }
}
/* Without motion, the same cue as light and shadow only. */
@media (prefers-reduced-motion: reduce) {
  .footer-balloon:focus-visible .icon { filter: brightness(1.08) drop-shadow(0 3px 4px rgb(156 16 73 / .25)); }
}
@media (prefers-reduced-motion: reduce) and (hover: hover) and (pointer: fine) {
  .footer-balloon:hover .icon { filter: brightness(1.08) drop-shadow(0 3px 4px rgb(156 16 73 / .25)); }
}

@media print {
  .balloon-field, .fx-storm, .fx-toast, .fx-top, .fx-air { display: none !important; }
}
