/* ============================================================
   Ardmillan Retirement Living — landing page
   Design reference: Figma "LP / Ads" — Frame 31 (desktop 1440),
   Frame 30 (mobile 360), Frame 19 (carousel / gallery / FAQ copy)
   ============================================================ */

:root {
  --page: #f3f3f3;
  --white: #fff;
  --black: #000;
  --charcoal: #434343;
  --steel: #676762;
  --muted: #707070;
  --yellow: #ffc100;
  --wash: rgba(255, 193, 0, 0.07);
  --line: rgba(0, 0, 0, 0.4);

  --sans: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Fluid scale: 360px viewport -> 1440px viewport (design width) */
  /* Split B sets the hero heading at 40px, not A's 65.5px — the longer
     headline is typeset smaller in the "Split" frame. Same 30px floor. */
  --fs-h1: clamp(1.875rem, 1.667rem + 0.926vw, 2.5rem);
  --fs-h2: clamp(1.875rem, 1.458rem + 1.852vw, 3.125rem);
  --fs-h3: clamp(1.25rem, 1.083rem + 0.741vw, 1.5rem);
  --fs-support: clamp(1.375rem, 1.208rem + 0.741vw, 1.875rem);
  --fs-body: clamp(1.0625rem, 1rem + 0.278vw, 1.25rem);
  --fs-eyebrow: clamp(0.875rem, 0.75rem + 0.556vw, 1.25rem);
  --fs-quote: clamp(1.125rem, 1rem + 0.556vw, 1.5rem);

  --gutter: 26px;
  --content: 1176px;
  /* Gallery + its caption sit on the 1200px grid (Figma x=120), not the 1176 one */
  --content-wide: 1200px;
  --nav-h: clamp(56px, 36px + 5.556vw, 116px);
  --radius: 10px;

  /* Shared by the gallery track and its slides — they must not diverge */
  --slide-ease-time: 0.55s;
  --slide-ease: cubic-bezier(0.33, 1, 0.68, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Lets the FAQ animate to height:auto instead of snapping open */
  interpolate-size: allow-keywords;
  /* The closed mobile menu is a fixed panel parked at translateX(100%), which
     otherwise doubles the document's scroll width. `clip` rather than `hidden`
     because hidden on the root forces the other axis to auto and breaks the
     sticky nav; clip creates no scroll container. */
  overflow-x: clip;
}

/* Anchored sections must clear the sticky nav instead of hiding under it */
:where(#residences, #services, #location, #register, #top) {
  scroll-margin-top: calc(var(--nav-h) + 24px);
}

body {
  margin: 0;
  background: var(--page);
  color: var(--black);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.5;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
button { font: inherit; }

.container {
  width: min(100% - (var(--gutter) * 2), var(--content));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 100;
  padding: 12px 20px;
  background: var(--black);
  color: var(--white);
  text-decoration: none;
}
.skip-link:focus { left: 16px; top: 16px; }

:where(a, button, summary, input, textarea):focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

/* ---------- Shared type ---------- */

.eyebrow {
  margin: 0;
  font-family: var(--display);
  font-weight: 300;
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.4;
}
.eyebrow--light { color: var(--white); }

.section-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: var(--fs-h2);
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.section-title--light { color: var(--white); }

.section-lede {
  margin: 0;
  font-size: var(--fs-body);
  line-height: 1.5;
  letter-spacing: -0.01em;
}

/* ---------- Button ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(44px, 40px + 1.111vw, 56px);
  min-width: clamp(208px, 189px + 5.37vw, 266px);
  padding: 0 28px;
  /* justify-content centres the label as a block; without this, a label that
     wraps (very narrow viewports) left-aligns its lines inside that block. */
  text-align: center;
  border: 0;
  border-radius: 90px;
  background: var(--black);
  color: var(--white);
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(1rem, 0.926rem + 0.33vw, 1.25rem);
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.btn:hover { background: #222; }
.btn:active { transform: translateY(1px); }

/* ============================================================
   NAV
   ============================================================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.06);
  will-change: transform;
  transition:
    transform 0.5s cubic-bezier(0.33, 1, 0.68, 1),
    opacity 0.4s cubic-bezier(0.33, 1, 0.68, 1);
}
/* Retracts exactly as the form's top edge meets the nav (see main.js) */
.nav.is-hidden {
  transform: translateY(-101%);
  opacity: 0;
  pointer-events: none;
}

.nav__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  width: min(100% - (var(--gutter) * 2), var(--content));
  min-height: var(--nav-h);
  margin-inline: auto;
}

.nav__logo { flex: none; display: block; }
.nav__logo img { width: clamp(150px, 17.7vw, 255px); height: auto; }

.nav__panel {
  display: contents;
}

.nav__links {
  display: flex;
  gap: 30px;
  margin-inline: auto;
}
.nav__links a {
  color: var(--steel);
  font-size: var(--fs-body);
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: color 0.2s ease;
}
.nav__links a:hover { color: var(--black); }

.nav__cta { flex: none; min-width: 266px; }

/* CSS-only mobile menu via :target — survives Trellis upload with no JS,
   and uses no <input>, which Trellis would otherwise detect as a form field */
.nav__burger,
.nav__close { display: none; }

/* ---------- Full-screen mobile menu (CSS only, survives Trellis) ---------- */

@media (max-width: 900px) {
  .nav__inner { gap: 12px; }

  /* Logo stays above the open panel, top-left, as requested */
  .nav__logo { position: relative; z-index: 2; }

  .nav__burger {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    margin-left: auto;
    cursor: pointer;
  }
  .nav__burger span {
    display: block;
    height: 2px;
    background: var(--black);
  }

  /* Close control lives inside the panel, on the burger's spot */
  .nav__close {
    position: absolute;
    top: 0;
    right: var(--gutter);
    display: block;
    width: 32px;
    height: calc(var(--nav-h));
    cursor: pointer;
  }
  .nav__close::before,
  .nav__close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 32px;
    height: 2px;
    background: var(--black);
  }
  .nav__close::before { transform: rotate(45deg); }
  .nav__close::after { transform: rotate(-45deg); }

  /* Hide the burger while the panel is open so the two never overlap */
  .nav__inner:has(.nav__panel:target) .nav__burger { opacity: 0; pointer-events: none; }

  .nav__panel {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(28px, 6vh, 48px);
    height: 100dvh;
    padding: calc(var(--nav-h) + 24px) var(--gutter) 48px;
    background: var(--white);
    /* Slides in from the right edge */
    transform: translateX(100%);
    visibility: hidden;
    transition:
      transform 0.45s cubic-bezier(0.65, 0, 0.35, 1),
      visibility 0s linear 0.45s;
  }
  .nav__panel:target {
    transform: translateX(0);
    visibility: visible;
    transition:
      transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
      visibility 0s;
  }

  .nav__links {
    flex-direction: column;
    align-items: center;
    gap: clamp(20px, 4vh, 34px);
    margin: 0;
  }
  .nav__links a {
    font-family: var(--display);
    font-size: clamp(1.75rem, 6vw, 2.5rem);
    font-weight: 500;
    color: var(--black);
    letter-spacing: -0.01em;
    /* Staggered reveal once the panel has wiped open */
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.33, 1, 0.68, 1);
  }
  .nav__cta {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.33, 1, 0.68, 1);
  }
  .nav__panel:target :where(.nav__links a, .nav__cta) {
    opacity: 1;
    transform: none;
  }
  .nav__panel:target .nav__links a:nth-child(1) { transition-delay: 0.22s; }
  .nav__panel:target .nav__links a:nth-child(2) { transition-delay: 0.29s; }
  .nav__panel:target .nav__links a:nth-child(3) { transition-delay: 0.36s; }
  .nav__panel:target .nav__cta { transition-delay: 0.43s; }

  /* The open menu owns the screen — don't let the page scroll behind it */
  .nav:has(.nav__panel:target) { position: fixed; inset-inline: 0; }
  body:has(.nav__panel:target) { overflow: hidden; }
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "copy  media"
    "quote media";
  align-content: center;
  background: linear-gradient(var(--wash), var(--wash)), var(--page);
}

.hero__copy { grid-area: copy; }
.hero__media { grid-area: media; }
.testimonial { grid-area: quote; }

.hero__copy,
.hero > .testimonial {
  padding-left: max(var(--gutter), (100vw - var(--content)) / 2);
  padding-right: clamp(var(--gutter), 3vw, 43px);
}

.hero__copy { padding-block: clamp(38px, 4.3vw, 62px) 0; }
.hero > .testimonial { padding-bottom: clamp(34px, 3.3vw, 47px); }

.hero__title {
  margin: clamp(18px, 3.2vw, 46px) 0 0;
  /* Split B measure: the "Split" frame sets this heading in a 499px box.
     Narrow enough to keep "in" off line two, so the break stays
     "Beautifully considered / boutique retirement living / in Moonee Ponds." */
  max-width: 505px;
  font-family: var(--display);
  font-weight: 500;
  font-size: var(--fs-h1);
  line-height: 1.2;
  letter-spacing: -0.041em;
}

.hero__lede {
  margin: clamp(20px, 2.4vw, 34px) 0 0;
  /* 470 not A's 530: keeps "easier." on line two, the two-line break the
     "Split" frame sets in its 447px box. */
  max-width: 470px;
  letter-spacing: -0.01em;
}

.hero__copy .btn { margin-top: clamp(20px, 1.4vw, 20px); }

.testimonial { margin: clamp(32px, 6.9vw, 100px) 0 0; }
.testimonial__stars { width: clamp(180px, 19vw, 274px); height: auto; }
.testimonial__quote {
  margin: 20px 0 0;
  max-width: 489px;
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--fs-quote);
  line-height: 1.375;
  letter-spacing: -0.01em;
}
.testimonial__by {
  display: flex;
  align-items: center;
  gap: 17px;
  margin: 17px 0 0;
  letter-spacing: -0.01em;
}
.testimonial__by img {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
}

/* The media box owns the height; the slideshow inside it is taken out of
   flow so the photo's intrinsic 0.8 aspect can never push the hero taller.
   Height is tied to viewport height, not width — a vw-based height grew the
   hero as the window widened, or as you zoomed out. 908px is the design's
   height, so it is the ceiling, with a floor for short windows. */
.hero__media {
  position: relative;
  align-self: stretch;
  min-height: clamp(420px, 82svh, 908px);
}

/* ---------- Hero slideshow ----------
   Slides are stacked and cross-fade on autoplay/dot change (main.js toggles
   .is-active). The first slide stays visible with no JS at all: the
   :first-child rule below is the no-script fallback. */

.slideshow { position: absolute; inset: 0; }

.slideshow__track {
  position: relative;
  height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.slideshow__slide {
  position: absolute;
  inset: 0;
  height: 100%;
  opacity: 0;
  transition: opacity 1.1s ease;
}
.slideshow__slide:first-child,
.slideshow__slide.is-active { opacity: 1; z-index: 1; }
.slideshow__slide img { width: 100%; height: 100%; object-fit: cover; }

/* This street render sits mostly-sky in its top half; a centred crop shows
   too much of it on the hero's short mobile aspect, so bias the crop down. */
.slideshow__slide--sky img { object-position: center 78%; }

.slideshow__dots {
  position: absolute;
  z-index: 1;
  left: 30px;
  bottom: 29px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 37px;
  padding: 0 16px;
  border-radius: 82px;
  background: rgba(255, 255, 255, 0.52);
  backdrop-filter: blur(12.4px);
}
/* Dots are built by main.js — don't leave an empty pill if scripts are stripped */
.slideshow__dots:empty { display: none; }
.slideshow__dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.slideshow__dot[aria-selected="true"] { background: var(--white); }

/* ============================================================
   VALUE CARDS
   ============================================================ */

.values { padding-block: clamp(28px, 3.7vw, 53px) clamp(28px, 3.5vw, 50px); }

.values__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 38px;
}

.value {
  padding: 26px 33px 30px;
  border: 1px solid var(--charcoal);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.6);
}

.value__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 66px;
  height: 66px;
  border: 1px solid var(--charcoal);
  border-radius: var(--radius);
  background: var(--yellow);
}
.value__icon img { width: 35px; height: 35px; }

.value__title {
  margin: 41px 0 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--fs-h3);
  line-height: 1.792;
  letter-spacing: -0.01em;
}
.value__body {
  margin: 19px 0 0;
  color: var(--muted);
  letter-spacing: -0.01em;
}

/* ============================================================
   LIFE AT ARDMILLAN
   ============================================================ */

.life {
  padding-block: clamp(34px, 3.5vw, 50px) clamp(48px, 6.9vw, 99px);
  background: var(--white);
}

.life__head { text-align: center; }
.life__head .section-title { margin-top: clamp(20px, 2.7vw, 39px); }
.life__head .section-lede {
  max-width: 947px;
  margin: clamp(18px, 2.5vw, 36px) auto 0;
}

/* ---------- Gallery carousel ---------- */

.gallery { margin-top: clamp(32px, 3.9vw, 56px); }

.gallery__track {
  display: flex;
  gap: 21px;
  margin: 0;
  padding-inline: max(var(--gutter), (100vw - var(--content-wide)) / 2);
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: max(var(--gutter), (100vw - var(--content-wide)) / 2);
  scrollbar-width: none;
}
.gallery__track::-webkit-scrollbar { display: none; }

/* Desktop runs as a transform slider (see main.js). The track transition must
   match the slide's flex-basis transition exactly — same duration, same
   easing — or the widening slide and the sliding track drift apart mid-motion,
   which is what made it feel rough. Matched, they stay aligned every frame. */
.gallery.is-slider { overflow: hidden; }
.gallery.is-slider .gallery__track {
  overflow: visible;
  scroll-snap-type: none;
  will-change: transform;
  transition: transform var(--slide-ease-time) var(--slide-ease);
}

/* Upcoming slides sit narrower, as designed — the active one widens */
.gallery__slide {
  position: relative;
  flex: 0 0 min(337px, 62vw);
  scroll-snap-align: start;
  transition: flex-basis var(--slide-ease-time) var(--slide-ease);
}
.gallery__slide.is-active { flex-basis: min(667px, 82vw); }

/* The instant re-point from a clone back to the real slide it mirrors
   (main.js settle()) moves .is-active too — without this, that swap
   animated the width/overlay a second time right after the slide, reading
   as the slide "reopening". */
.gallery.is-snapping .gallery__slide,
.gallery.is-snapping .gallery__slide::after { transition: none; }

.gallery__slide img {
  width: 100%;
  height: min(500px, 34.7vw);
  min-height: 240px;
  object-fit: cover;
}
/* Upcoming slides sit back; JS promotes the active one */
.gallery__slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.gallery__slide.is-active::after { opacity: 0; }

.gallery__footer {
  display: flex;
  align-items: center;
  gap: 24px;
  width: min(100% - (var(--gutter) * 2), var(--content-wide));
  margin-top: clamp(20px, 2.6vw, 38px);
}

.gallery__caption {
  margin: 0;
  max-width: 540px;
  letter-spacing: -0.01em;
}
.gallery__caption b { font-weight: 700; }

.gallery__controls { display: flex; gap: 12px; }

.gallery__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--charcoal);
  border-radius: var(--radius);
  background: #f5f5f5;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.gallery__btn:hover { background: var(--yellow); }
.gallery__btn img { width: 31px; height: 31px; transform: rotate(-90deg); }
.gallery__btn--prev { display: none; }
.gallery__btn--prev img { transform: rotate(90deg); }

/* ============================================================
   PEACE OF MIND
   ============================================================ */

.support {
  padding-block: clamp(48px, 4.7vw, 67px) clamp(48px, 6.1vw, 88px);
  background: var(--charcoal);
  color: var(--white);
}

.support .eyebrow { text-align: center; }
.support__title {
  max-width: 720px;
  margin: clamp(20px, 2.4vw, 34px) auto 0;
  text-align: center;
}

.support__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin: clamp(40px, 4.2vw, 60px) 0 0;
  padding: 0;
  list-style: none;
  text-align: center;
}

.support__item {
  display: grid;
  grid-template-rows: clamp(96px, 12.4vw, 178px) auto auto;
  justify-items: center;
  align-content: start;
}

/* Each icon is centred inside a shared-height box, so the three glyphs sit
   on one horizontal centre line regardless of their differing heights */
.support__figure {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.support__icon {
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
/* Sized against the shared icon box to match the glyph extents in the design
   (the star SVG carries its own padding, so it runs full height) */
.support__item:nth-child(1) .support__icon { height: 71%; }
.support__item:nth-child(2) .support__icon { height: 71%; }
.support__item:nth-child(3) .support__icon { height: 100%; }

.support__name {
  margin: clamp(20px, 1.5vw, 22px) 0 0;
  max-width: 217px;
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--fs-support);
  line-height: 1.433;
  letter-spacing: -0.01em;
}

.support__body {
  margin: clamp(16px, 1.5vw, 22px) 0 0;
  max-width: 310px;
  letter-spacing: -0.01em;
}

/* ============================================================
   LOCATION + MAP
   ============================================================ */

.location {
  padding-block: clamp(40px, 3.7vw, 53px) clamp(48px, 5.8vw, 83px);
  background: var(--white);
  text-align: center;
}

.location .section-title { margin-top: clamp(18px, 2.3vw, 33px); }
.location .section-lede--wide {
  max-width: 1095px;
  margin: clamp(18px, 2.4vw, 34px) auto 0;
}

/* Container queries keep every pin locked to its Figma position at any width */
.map {
  container-type: inline-size;
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1177 / 545;
  margin: clamp(28px, 5.3vw, 76px) auto 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  cursor: zoom-in;
}

.map__zoom {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  /* The Figma icon is white — it was drawn to sit on the dark overlay this
     map no longer has, so the badge carries the contrast instead */
  background: rgba(0, 0, 0, 0.82);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease, background-color 0.25s ease;
}
.map__zoom img { width: 26px; height: 26px; }
.map:hover .map__zoom { transform: scale(1.08); background: var(--black); }

.map__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.map__pin { position: absolute; }

.map__label {
  position: relative;
  z-index: 1; /* label covers the overlapping half of its tail */
  display: flex;
  align-items: center;
  justify-content: center;
  height: 4.861cqw;
  min-height: 22px;
  padding-inline: 1.823cqw;
  border-radius: 9.114cqw;
  background: var(--black);
  color: var(--white);
  font-size: 2.025cqw;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.map__label--home {
  height: 6.537cqw;
  padding-inline: 1.508cqw;
  border-radius: 7.541cqw;
  background: var(--yellow);
}
.map__label--home img { width: 18.014cqw; min-width: 60px; height: auto; }

/* Each tail is placed at its own Figma offset from its label — they are not
   a shared percentage. Rotating about the centre gives an upward-pointing
   triangle at 45deg and a downward one at -135deg. */
.map__tail {
  position: absolute;
  z-index: 0;
  width: 2.836cqw;
  min-width: 11px;
  height: auto;
}
.map__tail--up { transform: rotate(45deg); }
.map__tail--down { transform: rotate(-135deg); }

.map__pin--home    { left: -2.889%; top: 7.156%; }
.map__pin--park    { left: 50.297%; top: 13.178%; }
.map__pin--puckle  { left: 44.690%; top: 32.294%; }
.map__pin--station { left: 9.430%;  top: 43.086%; }
.map__pin--medical { left: 33.985%; top: 64.771%; }

.map__pin--home    .map__tail { left: 13.877cqw; top: 4.496cqw; }
.map__pin--park    .map__tail { left: 4.516cqw;  top: -0.771cqw; }
.map__pin--puckle  .map__tail { left: 7.914cqw;  top: 2.882cqw; }
.map__pin--station .map__tail { left: 27.301cqw; top: -0.771cqw; }
.map__pin--medical .map__tail { left: 8.354cqw;  top: -0.957cqw; }

/* ---------- Map lightbox: pinch / scroll to zoom, drag to pan ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.85);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }

/* The inner is Panzoom's viewport, so it must fill the available space. When
   it shrink-wrapped the image, the pannable area was only as tall as the
   map itself and zooming just clipped to a letterbox slit. */
.lightbox__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  max-width: 1400px;
  overflow: hidden;
  border-radius: 8px;
  transform: scale(0.97);
  transition: transform 0.35s cubic-bezier(0.33, 1, 0.68, 1);
}
.lightbox.is-open .lightbox__inner { transform: scale(1); }

.lightbox__img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  /* Flex items default to min-width:auto, which would hold the map at its
     intrinsic 1799px and defeat max-width — open fitted, then zoom */
  min-width: 0;
  min-height: 0;
  cursor: grab;
  touch-action: none; /* Panzoom owns pinch and drag */
}
.lightbox__img:active { cursor: grabbing; }

.lightbox__close,
.lightbox__zoom button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: background-color 0.2s ease;
}
.lightbox__close:hover,
.lightbox__zoom button:hover { background: var(--yellow); }

.lightbox__close { position: absolute; top: 12px; right: 12px; z-index: 3; }

.lightbox__zoom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

body.is-locked { overflow: hidden; }

@media (max-width: 760px) {
  .lightbox { padding: 12px; }
  .lightbox__inner { border-radius: 6px; }
  .lightbox__close,
  .lightbox__zoom button { width: 44px; height: 44px; }
}

/* ============================================================
   FAQ
   ============================================================ */

.faq {
  position: relative;
  isolation: isolate;
  padding-block: clamp(40px, 4.2vw, 60px) clamp(56px, 12.5vw, 180px);
}

/* Photo sits behind, then the black scrim, then the yellow wash — the same
   stack the design uses, just built from an <img> instead of a CSS url() */
.faq__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.faq__bg img { width: 100%; height: 100%; object-fit: cover; }

.faq::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(var(--wash), var(--wash)),
    linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3));
}

.faq__title { text-align: center; }

/* Two independent columns — a shared grid made opening one card shove the
   other column's cards around, which is not what the design does */
.faq__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: start;
  gap: 19px;
  margin-top: clamp(28px, 4.7vw, 67px);
}

.faq__col {
  display: flex;
  flex-direction: column;
  gap: 21px;
}

.faq__item {
  border-radius: var(--radius);
  background: var(--white);
}

/* Smooth open/close. interpolate-size (on :root) lets height animate to
   auto; browsers without ::details-content simply open instantly. */
.faq__item::details-content {
  block-size: 0;
  overflow: hidden;
  transition:
    block-size 0.42s cubic-bezier(0.33, 1, 0.68, 1),
    content-visibility 0.42s allow-discrete;
  transition-behavior: allow-discrete;
}
.faq__item[open]::details-content { block-size: auto; }

.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 25px 26px 29px;
  font-weight: 400;
  letter-spacing: -0.01em;
  list-style: none;
  cursor: pointer;
}
.faq__q::-webkit-details-marker { display: none; }

.faq__chevron {
  flex: none;
  width: 25px;
  height: 25px;
  transform: rotate(180deg);
  transition: transform 0.42s cubic-bezier(0.33, 1, 0.68, 1);
}
.faq__item[open] > .faq__q { font-weight: 600; padding-bottom: clamp(16px, 1.9vw, 28px); }
.faq__item[open] .faq__chevron { transform: rotate(0deg); }

.faq__a { padding: 0 clamp(29px, 5.9vw, 85px) clamp(26px, 4.6vw, 66px) 29px; }
.faq__a p {
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* ============================================================
   REGISTER
   ============================================================ */

.register {
  padding-block: clamp(48px, 4.6vw, 66px) clamp(48px, 4.7vw, 68px);
  background: var(--white);
}

.register__grid {
  display: grid;
  grid-template-columns: minmax(0, 481px) minmax(0, 616px);
  align-items: center;
  justify-content: center;
  gap: 80px;
}

.register__title {
  margin: 0;
  max-width: 405px;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.5rem, 1.181rem + 1.42vw, 2.5rem);
  line-height: 1.2;
}

.register__lede {
  margin: 24px 0 0;
  letter-spacing: -0.01em;
}

.register__brochure {
  width: min(100%, 426px);
  margin: clamp(24px, 6.3vw, 91px) auto 0;
}

/* ---------- Form ---------- */

.form {
  display: grid;
  grid-template-columns: 303fr 282fr;
  align-content: start;
  gap: 20px 31px;
}

.field { display: flex; flex-direction: column; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field--short { grid-column: 1 / -1; max-width: 129px; }

.field label {
  font-size: var(--fs-body);
  letter-spacing: -0.01em;
}

.field input,
.field textarea {
  width: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--page);
  color: var(--black);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.2;
  transition: border-color 0.2s ease;
}
.field textarea { min-height: 155px; resize: vertical; }

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(0, 0, 0, 0.28);
  font-size: 0.875rem;
  letter-spacing: 0.07em;
}

.field input:focus,
.field textarea:focus { border-color: var(--black); }

.form__actions { align-items: flex-start; margin-top: clamp(12px, 2vw, 28px); }
.form__actions .btn { min-width: 266px; }

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  padding-block: clamp(36px, 3.8vw, 54px) clamp(36px, 3.4vw, 49px);
  background: var(--page);
  text-align: center;
}
.footer__logo { width: clamp(170px, 17.7vw, 255px); margin: 0 auto; }
.footer__legal {
  margin: 41px 0 0;
  font-size: clamp(0.9375rem, 0.906rem + 0.14vw, 1.0625rem);
  letter-spacing: -0.01em;
}
/* Not links yet — rendered as plain text so nothing is clickable */
.footer__legal span { color: inherit; }

/* ============================================================
   STICKY MOBILE CTA
   Phone-only bar so the primary action stays reachable while scrolling the
   long page. Hidden the moment the register form itself scrolls into view —
   same "reached" check main.js already uses to retract the nav. ---------- */

.sticky-cta { display: none; }

/* ============================================================
   RESPONSIVE — tablet
   ============================================================ */

/* The 43px line-height suits a one-line title at full width; once it wraps
   that leading opens up an awkward gap, so tighten it before that happens */
@media (max-width: 1300px) {
  .value__title { line-height: 1.25; }
}

@media (max-width: 1100px) {
  .register__grid { grid-template-columns: minmax(0, 616px); justify-items: center; gap: 40px; }
  .register__aside { text-align: center; }
  .register__title, .register__lede { max-width: none; margin-inline: auto; }
  .form { width: 100%; max-width: 616px; }
}

@media (max-width: 900px) {
  /* Stack the hero at the same width the nav collapses. Two columns below
     this left the copy around 380px wide, which crushed the headline. */
  .hero {
    grid-template-columns: 1fr;
    grid-template-areas: "copy" "media" "quote";
  }
  .hero__copy { padding-bottom: clamp(28px, 3vw, 40px); }
  .hero > .testimonial { padding-top: clamp(24px, 3vw, 40px); }

  /* Stacked: no copy column to set the height, so the media box sets its own,
     capped against both width and viewport height with a floor. */
  .hero__media { min-height: clamp(280px, min(63vw, 48svh), 520px); }

  /* Frame 30 drops the card chrome and the heading — icon and copy only.
     The heading stays in the accessibility tree so the list keeps its labels. */
  .values__grid { grid-template-columns: 1fr; gap: 34px; }
  .value {
    display: grid;
    grid-template-columns: 49px 1fr;
    align-items: center;
    column-gap: 15px;
    padding: 0;
    border: 0;
    background: none;
  }
  .value__icon { width: 49px; height: 49px; }
  .value__icon img { width: 29px; height: 29px; }
  .value__title {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .value__body { margin: 0; color: var(--black); }

  .support__grid { grid-template-columns: 1fr; gap: 48px; }
  .support__title { max-width: none; }

  /* Columns flatten into a single stack in DOM order */
  .faq__grid { grid-template-columns: 1fr; gap: 21px; }
  .faq__col { display: contents; }
}

/* ============================================================
   RESPONSIVE — mobile (Figma Frame 30, 360px)
   ============================================================ */

@media (max-width: 760px) {
  /* Frame 30 stacks copy, then image, then the quote card lifted over it */
  .hero {
    grid-template-columns: 1fr;
    grid-template-areas: "copy" "media" "quote";
    background: none;
  }
  .hero__copy {
    padding: 38px var(--gutter) 34px;
    background: linear-gradient(var(--wash), var(--wash)), var(--page);
  }
  .hero__title { margin-top: 0.35em; }
  .hero__lede { margin-top: 22px; }

  /* Frame 30 is 290 of 360 wide (80.5vw); floored and capped against the
     viewport so it holds up on short phones and small tablets alike */
  .hero__media { min-height: clamp(240px, min(80.5vw, 42svh), 340px); }
  .slideshow__dots { left: 24px; bottom: 34px; height: 30px; padding: 0 12px; }

  .hero > .testimonial {
    position: relative;
    z-index: 2;
    width: calc(100% - (var(--gutter) * 2));
    margin: -25px auto 0;
    padding: 22px 24px 26px;
    border-radius: var(--radius);
    background: #faf6e9;
  }
  .testimonial__quote { margin-top: 14px; }
  .testimonial__by { margin-top: 18px; }

  /* Mobile gallery is a single full-bleed image, no peek */
  .gallery__track { padding-inline: 0; scroll-padding-left: 0; gap: 0; }
  .gallery__slide,
  .gallery__slide.is-active { flex-basis: 100%; }
  .gallery__slide img { height: min(95.5vw, 380px); }
  .gallery__footer { flex-direction: column; align-items: flex-start; gap: 18px; }
  .gallery__btn { width: 42px; height: 42px; border-radius: 50%; }
  .gallery__btn--prev { display: flex; }

  .support__name { max-width: 280px; }

  /* Plain map on mobile — the supplied mobile crop has a dark overlay and a
     cursor baked in, and the zoom affordance is our own badge instead */
  .map { aspect-ratio: 308 / 210; }
  /* Mobile FAQ backdrop now swaps via <picture> in the HTML instead */
  .map__label { font-size: 3.4cqw; height: 8cqw; }
  /* Frame 30 keeps only the Ardmillan marker on the mobile map */
  .map__pin:not(.map__pin--home) { display: none; }
  .map__pin--home { left: 4%; top: 8%; }
  .map__label--home { height: 14cqw; }
  .map__label--home img { width: 33cqw; }

  .faq__q { padding: 20px; }
  .faq__a { padding: 0 20px 20px; }

  .field--short { max-width: 100%; }
  .form { grid-template-columns: 1fr; }

  .sticky-cta {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    justify-content: center;
    padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
    background: var(--black);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.25);
    transition: transform 0.4s cubic-bezier(0.33, 1, 0.68, 1), opacity 0.3s ease;
  }
  .sticky-cta .btn { width: 100%; }
  .sticky-cta.is-hidden {
    transform: translateY(110%);
    opacity: 0;
    pointer-events: none;
  }
}

/* ============================================================
   RESPONSIVE — phones only
   ============================================================ */

/* Variant A caps the heading at 266px here to reproduce Frame 30's phone
   break. There is no mobile Split frame, and that cap was measured for A's
   shorter wording — on this headline it forces six cramped lines. B lets the
   heading run the full column instead. */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
