/* ============================================================
   THE HEARTSPACE — Components (components.css)
   ------------------------------------------------------------
   Reusable UI: buttons, header/nav, footer, cards, forms,
   badges, pills, toast. Shared across every page.
   ============================================================ */

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  padding: 0.9em 1.6em;
  font-size: var(--step-0);
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: var(--radius-pill);
  transition: transform var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn .icon { width: 1.1em; height: 1.1em; }

/* Primary — plum fill */
.btn--primary {
  background: var(--green-700);
  color: var(--cream);
  box-shadow: var(--shadow-md);
}
.btn--primary:hover { background: var(--green-600); box-shadow: var(--shadow-lg); }

/* Gold — the "hero" call to action */
.btn--gold {
  background: linear-gradient(135deg, var(--coral-400), var(--coral-500));
  color: var(--green-900);
  box-shadow: var(--shadow-gold);
}
.btn--gold:hover { filter: brightness(1.04); box-shadow: var(--shadow-lg); }

/* Ghost — outline on light backgrounds */
.btn--ghost {
  border: 1.5px solid var(--green-300);
  color: var(--green-700);
}
.btn--ghost:hover { border-color: var(--green-700); background: var(--green-100); }

/* Light — for use on dark/plum backgrounds */
.btn--light {
  background: rgba(255, 255, 255, 0.1);
  color: var(--cream);
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(6px);
}
.btn--light:hover { background: rgba(255, 255, 255, 0.2); }

.btn--sm { padding: 0.6em 1.1em; font-size: var(--step--1); }
.btn--block { width: 100%; }

/* Quiet text link with animated underline */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-weight: 500;
  color: var(--green-700);
}
.link-arrow .icon { transition: transform var(--dur-fast) var(--ease-out); }
.link-arrow:hover .icon { transform: translateX(4px); }

/* ============================================================
   BADGES & PILLS
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.35em 0.85em;
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: var(--radius-pill);
  background: var(--coral-100);
  color: var(--coral-600);
}
.badge--dark { background: var(--green-100); color: var(--green-700); }
.badge--solid { background: var(--green-700); color: var(--cream); }

/* Programme-type colour coding (subtle tints within the palette) */
.badge--session   { background: #dcefe9; color: #116152; } /* teal-green */
.badge--workshop  { background: #fce5db; color: #cc5334; } /* coral      */
.badge--retreat   { background: #cfe6df; color: #0d4238; } /* deep teal  */
.badge--online    { background: #d9efe3; color: #2f8a5f; } /* fresh green*/
.badge--event     { background: #fbe9d6; color: #b07a2c; } /* warm amber */

/* Stock pills */
.pill-stock { font-weight: 500; font-size: var(--step--1); }
.pill-stock--in  { color: var(--status-in); }
.pill-stock--low { color: var(--status-low); }
.pill-stock--out { color: var(--status-out); }

/* ============================================================
   HEADER / NAVIGATION  (injected by layout.js)
   ============================================================ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-header);
  transition: background var(--dur-med) var(--ease-out),
              box-shadow var(--dur-med) var(--ease-out),
              padding var(--dur-med) var(--ease-out);
  padding-block: 1.25rem;
}
/* Solid, blurred state once the user scrolls */
.site-header.is-scrolled {
  background: rgba(244, 248, 246, 0.85);
  backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: var(--shadow-sm);
  padding-block: 0.7rem;
}
/* Pages with a light hero start with dark text; overridden by .header--on-dark */
.site-header .nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 0.01em;
  color: var(--green-800);
  white-space: nowrap;
  flex-shrink: 0;
}
.brand__mark {
  width: 34px; height: 34px;
  flex-shrink: 0;
}
.brand strong { font-weight: 600; }
.brand span { color: var(--coral-600); font-style: italic; }

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 1.4vw, 1.75rem);
}
.nav__links a {
  position: relative;
  font-size: var(--step-0);
  color: var(--ink);
  padding-block: 0.3rem;
  white-space: nowrap;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1.5px;
  background: var(--coral-500);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-fast) var(--ease-out);
}
.nav__links a:hover::after,
.nav__links a[aria-current="page"]::after { transform: scaleX(1); }

.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

/* Currency selector */
.currency {
  position: relative;
}
.currency__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--cream);
  font-size: var(--step--1);
  font-weight: 500;
}
.currency__menu {
  position: absolute;
  right: 0; top: calc(100% + 0.5rem);
  min-width: 190px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 0.4rem;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: all var(--dur-fast) var(--ease-out);
}
.currency[data-open="true"] .currency__menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.currency__menu button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: var(--step--1);
  text-align: left;
}
.currency__menu button:hover { background: var(--green-100); }
.currency__menu button[aria-selected="true"] { color: var(--coral-600); font-weight: 600; }

/* Icon buttons (cart / account) */
.icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  color: var(--green-700);
  transition: background var(--dur-fast) var(--ease-out);
}
.icon-btn:hover { background: var(--green-100); }
.icon-btn .icon { width: 22px; height: 22px; }
.cart-count, .wish-count {
  position: absolute;
  top: 2px; right: 2px;
  min-width: 18px; height: 18px;
  padding: 0 4px;
  display: grid; place-items: center;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--white);
  background: var(--coral-500);
  border-radius: var(--radius-pill);
  transform: scale(0);
  transition: transform var(--dur-fast) var(--ease-out);
}
.cart-count.is-visible, .wish-count.is-visible { transform: scale(1); }

/* Hamburger (mobile) */
.nav__toggle { display: none; width: 42px; height: 42px; }
.nav__toggle span,
.nav__toggle span::before,
.nav__toggle span::after {
  content: "";
  display: block;
  width: 22px; height: 2px;
  background: var(--green-800);
  border-radius: 2px;
  transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast);
}
.nav__toggle span { position: relative; margin-inline: auto; }
.nav__toggle span::before { position: absolute; top: -7px; }
.nav__toggle span::after { position: absolute; top: 7px; }

/* The mobile overlay lives in the DOM on every page but must stay
   hidden on desktop — its full styling only kicks in ≤900px below. */
.mobile-nav { display: none; }

/* --- Header variant for dark heroes (white text at top) --- */
.header--on-dark:not(.is-scrolled) .brand,
.header--on-dark:not(.is-scrolled) .nav__links a,
.header--on-dark:not(.is-scrolled) .brand strong { color: var(--cream); }
.header--on-dark:not(.is-scrolled) .brand span { color: var(--coral-300); }
.header--on-dark:not(.is-scrolled) .icon-btn { color: var(--cream); }
.header--on-dark:not(.is-scrolled) .icon-btn:hover { background: rgba(255,255,255,0.12); }
.header--on-dark:not(.is-scrolled) .currency__btn {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.28);
  color: var(--cream);
}
.header--on-dark:not(.is-scrolled) .nav__toggle span,
.header--on-dark:not(.is-scrolled) .nav__toggle span::before,
.header--on-dark:not(.is-scrolled) .nav__toggle span::after { background: var(--cream); }

/* --- Mobile navigation overlay --- */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__toggle { display: grid; place-items: center; }
  /* Keep the mobile top bar uncluttered: only search + cart + menu.
     Everything else lives inside the full-screen drawer. */
  .nav-cta, .nav-currency, .nav-wishlist, .nav-account { display: none; }
  .nav__actions { gap: 0.15rem; }

  .mobile-nav {
    position: fixed;
    inset: 0;
    z-index: var(--z-drawer);
    background: var(--green-800);
    color: var(--cream);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--gutter);
    opacity: 0; visibility: hidden;
    transition: opacity var(--dur-med) var(--ease-out), visibility var(--dur-med);
  }
  .mobile-nav.is-open { opacity: 1; visibility: visible; }
  .mobile-nav a {
    font-family: var(--font-display);
    font-size: var(--step-2);
    padding-block: 0.4rem;
    color: var(--cream);
    opacity: 0; transform: translateY(12px);
    transition: opacity var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out);
  }
  .mobile-nav.is-open a { opacity: 1; transform: translateY(0); }
  .mobile-nav a:nth-child(1) { transition-delay: 0.06s; }
  .mobile-nav a:nth-child(2) { transition-delay: 0.10s; }
  .mobile-nav a:nth-child(3) { transition-delay: 0.14s; }
  .mobile-nav a:nth-child(4) { transition-delay: 0.18s; }
  .mobile-nav a:nth-child(5) { transition-delay: 0.22s; }
  .mobile-nav a:nth-child(6) { transition-delay: 0.26s; }
  .mobile-nav a:nth-child(7) { transition-delay: 0.30s; }
  .mobile-nav__close {
    position: absolute;
    top: var(--gutter); right: var(--gutter);
    font-size: 2rem; color: var(--cream);
    width: 44px; height: 44px;
  }
}
body.no-scroll { overflow: hidden; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  display: flex;              /* equal-height cards in a grid row */
  flex-direction: column;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--dur-med) var(--ease-out),
              box-shadow var(--dur-med) var(--ease-out);
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }

.card__media {
  position: relative;
  aspect-ratio: 3 / 2;       /* consistent, calmer proportion */
  overflow: hidden;
  background: linear-gradient(135deg, var(--green-500), var(--green-700));
  flex-shrink: 0;
}
.card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out);
}
.card:hover .card__media img { transform: scale(1.05); }
.card__badges {
  position: absolute;
  top: var(--space-sm); left: var(--space-sm);
  display: flex; gap: 0.4rem; flex-wrap: wrap;
}
/* body grows to fill; the CTA/foot is pushed to a common baseline */
.card__body {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card__title {
  font-size: var(--step-1);
  line-height: 1.2;
  margin-bottom: 0.4rem;
}
.card__meta {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: var(--step--1); color: var(--ink-soft);
  margin-bottom: 0.6rem;
}
.card__meta .icon { width: 15px; height: 15px; flex-shrink: 0; }
.card__price { font-size: var(--step-1); color: var(--green-700); font-weight: 600; }
.card__price del { color: var(--ink-soft); font-weight: 400; font-size: 0.8em; margin-right: 0.35em; }
.card__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  margin-top: auto;          /* pin price/teacher row to the bottom */
  padding-top: var(--space-sm);
}
/* the primary action a card ends with always sits flush at the base */
.card__body > .btn:last-child { margin-top: var(--space-sm); }

/* Small teacher avatar row */
.teacher-chip { display: inline-flex; align-items: center; gap: 0.5rem; }
.teacher-chip img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.teacher-chip span { font-size: var(--step--1); }

/* Star rating */
.stars { display: inline-flex; gap: 2px; color: var(--coral-500); }
.stars .icon { width: 16px; height: 16px; }

/* ============================================================
   FORMS
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 0.45rem; }
.field label { font-size: var(--step--1); font-weight: 500; color: var(--green-700); }
.field .hint { font-size: var(--step--1); color: var(--ink-soft); }
.field .error { font-size: var(--step--1); color: var(--status-out); display: none; }
.field.is-invalid .error { display: block; }

.input, .select, .textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--coral-500);
  box-shadow: 0 0 0 4px var(--coral-100);
}
.field.is-invalid .input,
.field.is-invalid .textarea { border-color: var(--status-out); }
.textarea { min-height: 130px; resize: vertical; }

/* Phone with country code */
.phone-group { display: grid; grid-template-columns: 90px 1fr; gap: 0.5rem; }

/* Checkbox / radio cards */
.check {
  display: flex; align-items: flex-start; gap: 0.65rem;
  font-size: var(--step--1); color: var(--ink-soft);
}
.check input { margin-top: 0.2rem; accent-color: var(--green-700); width: 18px; height: 18px; }

.chip-check {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: var(--step--1);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
}
.chip-check input { position: absolute; opacity: 0; }
.chip-check:has(input:checked) {
  border-color: var(--green-700);
  background: var(--green-100);
  color: var(--green-700);
}

/* Quantity stepper */
.qty {
  display: inline-flex; align-items: center;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.qty button { width: 40px; height: 40px; display: grid; place-items: center; font-size: 1.2rem; color: var(--green-700); }
.qty button:hover { background: var(--green-100); }
.qty input { width: 44px; text-align: center; border: none; background: none; }

/* ============================================================
   FILTER CHIPS (tabs)
   ============================================================ */
.filters {
  display: flex; gap: 0.6rem; flex-wrap: wrap;
}
.filter-chip {
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--line);
  background: var(--cream);
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--ink-soft);
  transition: all var(--dur-fast) var(--ease-out);
}
.filter-chip:hover { border-color: var(--green-300); color: var(--green-700); }
.filter-chip.is-active {
  background: var(--green-700);
  border-color: var(--green-700);
  color: var(--cream);
}

/* Horizontal scroll row (mobile carousels) */
.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 1fr);
  gap: var(--space-md);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 1rem;
  scrollbar-width: thin;
}
.scroll-row > * { scroll-snap-align: start; }

/* ============================================================
   FOOTER (injected by layout.js)
   ============================================================ */
.site-footer {
  background: var(--green-900);
  color: rgba(248, 243, 236, 0.75);
  padding-top: clamp(2.5rem, 5vw, 3.5rem);
}
.site-footer a { color: rgba(248, 243, 236, 0.75); transition: color var(--dur-fast); }
.site-footer a:hover { color: var(--coral-300); }
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
  gap: var(--space-md) var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer__brand .brand { color: var(--cream); margin-bottom: var(--space-sm); }
.footer__brand .brand strong { color: var(--cream); }
.footer__brand p { font-size: var(--step--1); max-width: 34ch; }
.footer__col h4 { color: var(--cream); font-size: var(--step-0); font-family: var(--font-body); font-weight: 600; margin-bottom: var(--space-sm); }
.footer__col ul { display: flex; flex-direction: column; gap: 0.6rem; font-size: var(--step--1); }

.footer__subscribe .field { margin-bottom: 0.6rem; }
.footer__subscribe .input { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.14); color: var(--cream); }
.footer__subscribe .input::placeholder { color: rgba(248,243,236,0.5); }

.footer__social { display: flex; gap: 0.6rem; margin-top: var(--space-sm); }
.footer__social a {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
}
.footer__social a:hover { border-color: var(--coral-400); background: rgba(212,176,113,0.12); }
.footer__social .icon { width: 18px; height: 18px; }

.footer__bottom {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: var(--space-sm);
  padding-block: var(--space-sm);
  font-size: var(--step--1);
}
.footer__bottom .love { color: var(--coral-300); }

@media (max-width: 900px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  /* Two-column footer. Brand spans the top; the two short link lists
     (Explore + Care) sit side-by-side so they align with no gap; the
     newsletter goes full-width below where its form has room. */
  .footer__grid { grid-template-columns: 1fr 1fr; column-gap: var(--space-md); row-gap: var(--space-lg); }
  .footer__brand { grid-column: 1 / -1; text-align: center; }
  .footer__brand .brand { justify-content: center; }
  .footer__brand p { margin-inline: auto; }
  .footer__social { justify-content: center; }
  .footer__grid > *:nth-child(2) { grid-column: 1; }   /* Explore → left  */
  .footer__grid > *:nth-child(3) { grid-column: 2; }   /* Care → right    */
  .footer__subscribe { grid-column: 1 / -1; }          /* Stay Connected → full width */
}
/* Footer bottom bar: spread across on desktop, centred stack on mobile */
@media (max-width: 560px) {
  .footer__bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.4rem;
  }
}

/* ============================================================
   TOAST (add-to-cart confirmation etc.)
   ============================================================ */
.toast-wrap {
  position: fixed;
  right: var(--space-md); bottom: var(--space-md);
  z-index: var(--z-toast);
  display: flex; flex-direction: column; gap: 0.6rem;
}
.toast {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.9rem 1.2rem;
  background: var(--green-800);
  color: var(--cream);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  transform: translateY(20px); opacity: 0;
  transition: all var(--dur-med) var(--ease-out);
}
.toast.is-visible { transform: translateY(0); opacity: 1; }
.toast .icon { width: 20px; height: 20px; color: var(--coral-400); }

/* ============================================================
   CART DRAWER
   ============================================================ */
.cart-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(420px, 100vw);
  z-index: var(--z-drawer);
  background: var(--ivory);
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform var(--dur-med) var(--ease-out);
  display: flex; flex-direction: column;
}
.cart-drawer.is-open { transform: translateX(0); }
.cart-backdrop {
  position: fixed; inset: 0;
  z-index: var(--z-drawer);
  background: rgba(33, 21, 38, 0.4);
  backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden;
  transition: opacity var(--dur-med) var(--ease-out), visibility var(--dur-med);
}
.cart-backdrop.is-open { opacity: 1; visibility: visible; }
.cart-drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-md);
  border-bottom: 1px solid var(--line);
}
.cart-drawer__items { flex: 1; overflow-y: auto; padding: var(--space-md); display: flex; flex-direction: column; gap: var(--space-sm); }
.cart-item { display: grid; grid-template-columns: 72px 1fr auto; gap: 0.8rem; }
.cart-item img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--radius-sm); }
.cart-item__name { font-weight: 500; font-size: var(--step--1); }
.cart-item__variant { font-size: 0.8rem; color: var(--ink-soft); }
.cart-item__remove { font-size: 0.8rem; color: var(--status-out); }
.cart-drawer__foot { padding: var(--space-md); border-top: 1px solid var(--line); }
.cart-empty { text-align: center; color: var(--ink-soft); padding: var(--space-xl) var(--space-md); }

/* ============================================================
   WISHLIST — heart toggle on cards + save button
   ============================================================ */
.wish-btn {
  position: absolute;
  top: var(--space-sm); right: var(--space-sm);
  z-index: 2;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(4px);
  transition: transform var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out);
}
.wish-btn .icon { width: 20px; height: 20px; }
.wish-btn:hover { transform: scale(1.1); color: var(--coral-500); }
.wish-btn.is-wished {
  color: var(--white);
  background: var(--coral-500);
}
.wish-btn.is-wished .icon { fill: currentColor; }

/* "Save to Wishlist" line button on the product detail page */
.wish-line.is-wished { border-color: var(--coral-400); color: var(--coral-600); background: var(--coral-100); }
.wish-line.is-wished .icon { fill: currentColor; }

/* ============================================================
   GLOBAL SEARCH OVERLAY
   ============================================================ */
.search-overlay {
  position: fixed; inset: 0;
  z-index: var(--z-modal);
  background: rgba(10, 53, 46, 0.45);
  backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden;
  transition: opacity var(--dur-med) var(--ease-out), visibility var(--dur-med);
  padding: clamp(1rem, 8vh, 6rem) var(--gutter) var(--gutter);
  overflow-y: auto;
}
.search-overlay.is-open { opacity: 1; visibility: visible; }
.search-panel {
  max-width: 720px;
  margin-inline: auto;
  background: var(--cream);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: translateY(-12px);
  transition: transform var(--dur-med) var(--ease-out);
}
.search-overlay.is-open .search-panel { transform: translateY(0); }
.search-bar {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--line);
}
.search-bar > .icon { width: 22px; height: 22px; color: var(--ink-soft); flex-shrink: 0; }
.search-input {
  flex: 1; border: none; background: none;
  padding: 1rem 0; font-size: var(--step-1);
  font-family: var(--font-display);
}
.search-input:focus { outline: none; }
.search-close { width: 40px; height: 40px; display: grid; place-items: center; color: var(--ink-soft); border-radius: 50%; }
.search-close:hover { background: var(--green-100); color: var(--green-700); }
.search-results { max-height: 60vh; overflow-y: auto; padding: 0.5rem; }
.search-hint { color: var(--ink-soft); padding: 2rem 1rem; text-align: center; }
.search-group { padding: 0.5rem; }
.search-group h4 {
  font-family: var(--font-body); font-size: var(--step--1);
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--coral-600); padding: 0.5rem;
}
.search-item {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.6rem; border-radius: var(--radius-md);
  transition: background var(--dur-fast) var(--ease-out);
}
.search-item:hover { background: var(--green-100); }
.search-item img { width: 52px; height: 52px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.search-item span { display: flex; flex-direction: column; }
.search-item small { color: var(--ink-soft); font-size: var(--step--1); }

/* ============================================================
   LUXURY POLISH — preloader, back-to-top, sheen, grain
   ============================================================ */

/* Brand preloader (once per session) */
.preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: linear-gradient(160deg, var(--green-800), var(--green-900));
  display: grid; place-content: center; justify-items: center; gap: 1.25rem;
  transition: opacity 0.8s var(--ease-out), visibility 0.8s;
}
.preloader.is-done { opacity: 0; visibility: hidden; }
.preloader__lotus { width: 66px; height: 66px; animation: breathe 2.2s var(--ease-in-out) infinite; }
@keyframes breathe { 0%,100% { transform: scale(1); opacity: 0.9; } 50% { transform: scale(1.12); opacity: 1; } }
.preloader__word { font-family: var(--font-display); font-size: var(--step-2); color: var(--cream); letter-spacing: 0.02em; }
.preloader__word span { color: var(--coral-400); font-style: italic; }
.preloader__bar { width: 130px; height: 2px; background: rgba(255,255,255,0.15); border-radius: 2px; overflow: hidden; }
.preloader__bar span { display: block; width: 40%; height: 100%; background: var(--coral-400); animation: loadbar 1.1s var(--ease-in-out) infinite; }
@keyframes loadbar { 0% { transform: translateX(-130%); } 100% { transform: translateX(340%); } }
body.is-loading { overflow: hidden; }

/* Back-to-top */
.to-top {
  position: fixed; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem);
  z-index: var(--z-header);
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--green-700); color: var(--cream);
  display: grid; place-items: center; box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity var(--dur-med) var(--ease-out), visibility var(--dur-med),
              transform var(--dur-med) var(--ease-out), background var(--dur-fast);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--green-600); transform: translateY(-3px); }
.to-top .icon { transform: rotate(180deg); width: 22px; height: 22px; }

/* Sheen sweep on the primary gold/coral CTA */
.btn { position: relative; overflow: hidden; }
.btn--gold::after {
  content: ""; position: absolute; top: 0; left: -60%;
  width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.45), transparent);
  transform: skewX(-18deg);
  transition: left 0.6s var(--ease-out);
  pointer-events: none;
}
.btn--gold:hover::after { left: 130%; }

/* Tactile film grain on dark sections */
.hero::before, .testimonials::before, .cta-band::before,
.site-footer::before, .page-hero--image::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.05; mix-blend-mode: overlay;
}
.testimonials, .cta-band, .site-footer { position: relative; overflow: hidden; }

/* ============================================================
   BOOK-A-DEMO CTA — mobile button + attention pulse
   ============================================================ */
/* In the mobile drawer, render "Book a Free Demo" as a real button
   (matching the desktop coral CTA) rather than a plain text link. */
.mobile-nav__cta {
  display: inline-flex; align-items: center; justify-content: center;
  align-self: flex-start;
  margin-top: 1.25rem;
  padding: 0.85em 1.8em;
  background: linear-gradient(135deg, var(--coral-400), var(--coral-500));
  color: var(--green-900) !important;
  border-radius: var(--radius-pill);
  font-family: var(--font-body) !important;
  font-size: var(--step-0) !important;
  font-weight: 600;
}

/* A gentle pulsing glow to draw the eye — on desktop (.nav-cta) and
   mobile (.mobile-nav__cta). Keeps the button's own drop shadow. */
@keyframes ctaPulse {
  0%   { box-shadow: var(--shadow-gold), 0 0 0 0 rgba(239, 127, 90, 0.55); }
  70%  { box-shadow: var(--shadow-gold), 0 0 0 12px rgba(239, 127, 90, 0); }
  100% { box-shadow: var(--shadow-gold), 0 0 0 0 rgba(239, 127, 90, 0); }
}
.nav-cta, .mobile-nav__cta { animation: ctaPulse 1.8s var(--ease-out) infinite; }
@media (prefers-reduced-motion: reduce) {
  .nav-cta, .mobile-nav__cta { animation: none; }
}

/* ============================================================
   BRAND LOGO (image wordmark — assets/images/brand-logo.png)
   ============================================================ */
.brand__logo { height: 30px; width: auto; display: block; }
.site-header.is-scrolled .brand__logo { height: 28px; }
/* Whiten the terracotta wordmark on dark surfaces */
.header--on-dark:not(.is-scrolled) .brand__logo,
.site-footer .brand__logo,
.auth__aside .brand__logo { filter: brightness(0) invert(1); }
.auth__aside .brand__logo { height: 34px; margin-bottom: 0.5rem; }
.preloader__logo { height: 46px; width: auto; max-width: 70vw; filter: brightness(0) invert(1); }
