/* Castle House Nursing Home — shared base styles & components
   Warm & homely · WCAG-AAA minded · plain CSS so it works on file:// */

:root {
  --cream: #F8F4EE;
  --cream-100: #F0E6D9;
  --sage-600: #9A5430;   /* terracotta — primary accent */
  --sage-700: #7E4427;
  --forest: #2A211B;     /* warm espresso */
  --forest-700: #3A2C22;
  --clay-500: #B5673C;
  --clay-600: #9A5430;
  --gold: #A9854A;
  --ink: #2A211B;
  --muted: #6B5D52;
  --ease-out: cubic-bezier(.23, 1, .32, 1);     /* strong ease-out for UI */
  --ease-in-out: cubic-bezier(.77, 0, .175, 1); /* strong ease-in-out for movement */
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', system-ui, sans-serif;
  color: var(--ink);
  background-color: var(--cream);
  /* Premium base: warm cream gradient (E) + faint diamond trellis (C) */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cpath d='M24 0 L48 24 L24 48 L0 24 Z' fill='none' stroke='%239A5430' stroke-opacity='0.08' stroke-width='1'/%3E%3Ccircle cx='24' cy='24' r='1.4' fill='%239A5430' fill-opacity='0.10'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #FBF8F2 0%, #F8F4EE 42%, #F2EADD 100%);
  background-size: 48px 48px, cover;
  background-position: center top, center;
  background-repeat: repeat, no-repeat;
  background-attachment: scroll, fixed;
  overflow-x: hidden;          /* safety net against accidental horizontal scroll */
  font-size: 1.0625rem;        /* 17px base, generous for older readers */
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Subtle film-grain over everything — gives the warm palette a tactile,
   "printed paper" quality (Editorial Luxury). Fixed + pointer-events:none, so
   it never intercepts clicks or repaints while scrolling. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%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");
}
@media (prefers-reduced-motion: reduce) { body::after { opacity: 0.02; } }

h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  line-height: 1.14;
  letter-spacing: -0.005em;
  color: var(--ink);
  font-weight: 600;
  font-feature-settings: "liga" 1, "kern" 1;
}

/* Large, elegant display serif for hero + feature headlines (Cormorant Garamond,
   matching the editorial-luxury feel of high-end care homes) */
.display {
  font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.005em;
  font-feature-settings: "liga" 1, "kern" 1;
}

/* Feature icons — refined, ultra-light line icons with no chunky box.
   One rule governs size + stroke + colour everywhere, overriding inline attrs. */
.feat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(154, 84, 48, 0.09);
  box-shadow: inset 0 0 0 1px rgba(154, 84, 48, 0.16);
  color: var(--clay-600);
  transition: background .25s ease, color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.feat-icon svg {
  width: 25px;
  height: 25px;
  stroke-width: 1.7;
}
.card-hover:hover .feat-icon {
  background: var(--clay-600);
  color: #fff;
  box-shadow: inset 0 0 0 1px var(--clay-600);
  transform: translateY(-1px);
}

/* Small section index labels (01, 02 …) */
.section-num {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  background: rgba(169, 133, 74, 0.10);
  border-radius: 2px;
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

/* Soft green grade over feature photography (kept light & airy) */
.tint { position: relative; }
.tint > img { display: block; }
.tint::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(42,33,27,0.05), rgba(42,33,27,0.22));
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* Accessible focus ring everywhere (3px) */
a, button, input, textarea, select, [tabindex] {
  outline: none;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--sage-700);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--sage-700);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 0.75rem 0.75rem;
  font-weight: 700;
  transition: top 160ms ease;
}
.skip-link:focus { top: 0; }

/* ---------- Buttons (Berkley-style: sharp, stately, skewed wipe-fill hover) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 54px;
  padding: 1.05rem 1.8rem 0.95rem;
  border-radius: 0;
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0;
  text-transform: uppercase;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  isolation: isolate; /* keeps the ::before wipe beneath the label without span wrappers */
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}
/* The wipe panel — slides in from the left at a -10° skew on hover */
.btn::before {
  content: '';
  position: absolute;
  top: -1px; bottom: -1px; left: -5%;
  width: 110%;
  z-index: -1;
  transform: translateX(-101%) skew(-10deg);
  transition: transform 300ms var(--ease-out);
}
.btn svg { transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover::before { transform: translateX(0) skew(-10deg); }
  .btn:hover svg:last-child { transform: translateX(3px); }
}
/* Press feedback — instant scale so every button feels like it heard the click */
.btn:active { transform: scale(0.97); }

/* Primary — solid terracotta; wipe deepens it */
.btn-primary {
  background: var(--sage-600);
  color: #fff;
}
.btn-primary::before { background: rgba(0,0,0,.12); }

/* Clay — same warm accent for cream / dark feature blocks */
.btn-clay {
  background: var(--clay-600);
  color: #fff;
}
.btn-clay::before { background: rgba(0,0,0,.12); }

/* Secondary — outlined; wipe floods terracotta, label flips white */
.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: rgba(42,33,27,.3);
}
.btn-outline::before { background: var(--sage-600); }
@media (hover: hover) and (pointer: fine) {
  .btn-outline:hover { color: #fff; border-color: var(--sage-600); }
  .btn-outline:hover svg { color: #fff; }
}

/* Ghost — over light imagery */
.btn-ghost {
  background: rgba(255,255,255,.92);
  color: var(--ink);
  border-color: rgba(255,255,255,.6);
}
.btn-ghost::before { background: var(--sage-600); }
@media (hover: hover) and (pointer: fine) {
  .btn-ghost:hover { color: #fff; }
}

/* Light glass — over dark / photo overlays; wipe floods white, label flips dark */
.btn-light {
  background: rgba(255,255,255,.14);
  color: #fff;
  border-color: rgba(255,255,255,.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.btn-light::before { background: #fff; }
@media (hover: hover) and (pointer: fine) {
  .btn-light:hover { color: var(--ink); border-color: #fff; }
}

/* Larger, confident button for hero / primary moments */
.btn-lg {
  min-height: 60px;
  padding: 1.2rem 2.2rem 1.1rem;
  font-size: 0.9rem;
}

/* ---------- Eyebrow / chips ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  background: rgba(154, 84, 48, 0.09);
  border-radius: 2px;
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clay-600);
}
/* On dark/photo sections the eyebrow uses a light inline colour — give it a
   matching translucent-light pill instead of the terracotta tint. */
.bg-forest-700 .eyebrow, .bg-sage-800 .eyebrow, .bg-ink .eyebrow,
.page-hero .eyebrow, [style*="rgba(42,33,27"] .eyebrow {
  background: rgba(255, 255, 255, 0.12);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #fff;
  border: 1px solid rgba(76,102,80,0.2);
  color: var(--sage-700);
  border-radius: 2px;
  padding: 0.4rem 0.9rem;
  font-weight: 600;
  font-size: 0.95rem;
}

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border: 1px solid rgba(42,33,27,0.12);
  border-radius: 2px;
  box-shadow: none;
  transition: box-shadow 220ms ease, transform 220ms ease, border-color 220ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .card-hover:hover {
    box-shadow: 0 18px 36px -18px rgba(44,42,38,0.4);
    border-color: rgba(76,102,80,0.28);
    transform: translateY(-3px);
  }
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 244, 238, 0.94);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  /* Premium scroll motion: glide out on scroll-down, back in on scroll-up */
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.4s ease, background-color 0.4s ease;
  will-change: transform;
}
/* once away from the very top: subtle elevation + slightly more solid */
.site-header.is-scrolled {
  background: rgba(248, 244, 238, 0.97);
  box-shadow: 0 12px 34px -20px rgba(42, 33, 27, 0.5);
}
/* scrolling down: tuck the bar away */
.site-header.is-hidden { transform: translateY(-100%); }
@media (prefers-reduced-motion: reduce) {
  .site-header { transition: box-shadow 0.3s ease, background-color 0.3s ease; }
  .site-header.is-hidden { transform: none; }
}
.nav-link {
  position: relative;
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  padding: 0.4rem 0.1rem;
  transition: color 180ms ease;
}
.nav-link:hover { color: var(--sage-700); }
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--clay-500);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms ease;
}
.nav-link:hover::after { transform: scaleX(1); }
.nav-link[aria-current="page"] { color: var(--sage-700); }
.nav-link[aria-current="page"]::after { transform: scaleX(1); }

/* Mobile menu */
#mobileMenu { display: none; }
#mobileMenu.open { display: block; }

/* ---------- Section helpers ---------- */
.section { padding-top: 6.5rem; padding-bottom: 6.5rem; }
@media (min-width: 1024px) { .section { padding-top: 8.25rem; padding-bottom: 8.25rem; } }
.lead { font-size: 1.1875rem; color: var(--muted); line-height: 1.75; }
.prose-warm p { color: var(--muted); margin-bottom: 1rem; max-width: 65ch; }
.prose-warm p:last-child { margin-bottom: 0; }

/* Decorative divider dot row */
.leaf-rule {
  display: flex; align-items: center; gap: 0.6rem;
  color: var(--clay-500);
}
.leaf-rule::before, .leaf-rule::after {
  content: ''; height: 1px; flex: 1; background: rgba(76,102,80,0.25);
}

/* Fixed-background parallax band — the home stays in view behind the content as
   you scroll over it. Falls back to a normal scrolling background on touch
   devices (iOS doesn't support background-attachment:fixed reliably). */
.parallax-cta {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 34rem;
}
@media (max-width: 820px) {
  .parallax-cta { background-attachment: scroll; }
}

/* Page hero band */
.page-hero {
  background:
    linear-gradient(180deg, rgba(46,64,49,0.72), rgba(46,64,49,0.72));
  background-size: cover;
  background-position: center;
}

/* Image treatments */
.img-frame {
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid rgba(42,33,27,0.10);
  box-shadow: none;
}

/* ---------- Motion reveals (progressive enhancement) ----------
   Reveals are driven by the inline <script type="module"> at the bottom of each
   page, which only hides elements that are below the fold (off-screen) before
   animating them in on scroll. Content is therefore ALWAYS visible by default —
   no dependency on the animation CDN, no flash, nothing to fail-safe. The
   .js-reveal-hidden class below is added by JS only, and instantly removed when
   the element scrolls into view. */
.js-reveal-hidden {
  opacity: 0 !important;
  transform: translateY(26px);
  will-change: opacity, transform;
}
/* Images just fade — clean and sharp, no scale. */
.js-reveal-img {
  opacity: 0 !important;
  will-change: opacity;
}

/* Reduced motion = gentler, not none (Emil): keep colour/opacity transitions that
   aid comprehension, remove movement (transforms) and looping animations. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    /* drop transform from transitions so nothing slides/lifts; keep the rest */
    transition-property: opacity, background-color, color, border-color, box-shadow, filter !important;
    transition-duration: 200ms !important;
  }
  /* neutralise the movement-based states outright */
  .btn:hover, .card-hover:hover { transform: none !important; }
  .nav-link::after { transition: none !important; }
  .js-reveal-hidden { opacity: 1 !important; transform: none !important; }
  .js-reveal-img { opacity: 1 !important; }
}

/* ---------- Team carousel (CircularTestimonials) ---------- */
.team-carousel { width: 100%; }
.tc-grid { display: grid; gap: 2.5rem; }
@media (min-width: 768px) { .tc-grid { grid-template-columns: 1fr 1fr; align-items: center; gap: 3.5rem; } }
.tc-images { position: relative; width: 100%; height: 22rem; perspective: 1000px; }
.tc-img {
  position: absolute; width: 100%; height: 100%;
  object-fit: cover; border-radius: 2px;
  box-shadow: 0 18px 44px -20px rgba(42,33,27,.5);
}
.tc-content { display: flex; flex-direction: column; justify-content: center; }
.tc-name { font-family: 'Poppins', system-ui, sans-serif; font-weight: 800; font-size: 1.7rem; letter-spacing: -0.02em; color: var(--ink); }
.tc-role { color: var(--clay-600); font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.14em; margin-top: 0.35rem; margin-bottom: 1.5rem; }
.tc-quote { color: var(--muted); font-size: 1.125rem; line-height: 1.75; }
.tc-arrows { display: flex; gap: 1rem; padding-top: 2rem; }
@media (min-width: 768px) { .tc-arrows { padding-top: 0; } }
.tc-arrow {
  width: 3rem; height: 3rem; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; border: 1.5px solid rgba(42,33,27,.15); background: #fff; color: var(--ink);
  transition: background-color .25s, color .25s, border-color .25s, transform .15s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .tc-arrow:hover { background: var(--sage-600); color: #fff; border-color: var(--sage-600); }
}
.tc-arrow:active { transform: scale(.94); }

/* ---------- Reviews masonry ---------- */
.reviews-masonry { columns: 1; column-gap: 1.25rem; }
@media (min-width: 640px) { .reviews-masonry { columns: 2; } }
@media (min-width: 1024px) { .reviews-masonry { columns: 3; } }
.review-card { break-inside: avoid; width: 100%; margin-bottom: 1.25rem; }

/* ---------- Expandable offer stack (What we offer) ---------- */
.offer-stack { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 640px) { .offer-stack { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .offer-stack { grid-template-columns: repeat(3, 1fr); } }
.offer-card {
  position: relative;
  display: flex; flex-direction: column;
  text-align: left;
  font: inherit;
  border-radius: 2px;
  background: #fff;
  color: var(--ink);
  border: 1px solid rgba(44,42,38,.08);
  box-shadow: 0 8px 24px -18px rgba(44,42,38,.45);
  padding: 1.6rem 1.75rem;
  cursor: pointer;
  transition: background-color 450ms ease, color 450ms ease,
              box-shadow 450ms ease, border-color 450ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .offer-card:not(.is-active):hover { box-shadow: 0 18px 36px -18px rgba(44,42,38,.4);
    border-color: rgba(154,84,48,.25); }
}
.offer-card .offer-tag { color: var(--muted); transition: color 450ms ease; }
.offer-card .offer-plus {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: 999px;
  border: 1.5px solid rgba(42,33,27,.15);
  transition: transform 400ms var(--ease-out), border-color 450ms ease;
}
.offer-card .offer-more {
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height 520ms var(--ease-out), opacity 380ms ease, margin-top 450ms ease;
}
.offer-card.is-active {
  grid-column: 1 / -1;
  background: var(--card-color, #9A5430);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 24px 48px -22px rgba(42,33,27,.55);
}
.offer-card.is-active h3 { color: #fff; }
.offer-card.is-active .offer-tag { color: rgba(255,255,255,.72); }
.offer-card.is-active .feat-icon { color: #fff; }
.offer-card.is-active .offer-plus { transform: rotate(45deg); border-color: rgba(255,255,255,.45); }
.offer-card.is-active .offer-more { max-height: 12rem; opacity: 1; margin-top: 1rem; }

/* ---------- Minimal carousel (What we offer) ---------- */
.carousel-track {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0.25rem 0.25rem 0.75rem;
  margin: -0.25rem -0.25rem 0;   /* let focus rings/shadows breathe */
  cursor: grab;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track.is-dragging { scroll-snap-type: none; scroll-behavior: auto; cursor: grabbing; }
.carousel-slide {
  scroll-snap-align: start;
  flex: 0 0 86%;
  max-width: 22rem;
}
@media (min-width: 640px) { .carousel-slide { flex-basis: 20rem; } }
.carousel-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 3rem; height: 3rem;
  border-radius: 999px;
  border: 1.5px solid rgba(42,33,27,.15);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(42,33,27,.06);
  transition: transform 160ms var(--ease-out), box-shadow 200ms ease,
              border-color 200ms ease, color 200ms ease, opacity 200ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .carousel-btn:hover { border-color: var(--sage-600); color: var(--sage-700);
    box-shadow: 0 10px 22px -12px rgba(42,33,27,.28); transform: translateY(-2px); }
}
.carousel-btn:active { transform: scale(0.94); }
.carousel-btn[disabled] { opacity: 0.35; cursor: default; pointer-events: none; }

/* ---------- Accreditation logo marquee ---------- */
.marquee {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: marquee 38s linear infinite;
}
.marquee-group {
  display: flex;
  align-items: center;
  gap: 5.5rem;
  padding-right: 5.5rem;
  flex-shrink: 0;
}
.marquee-logo {
  height: 66px;
  width: auto;
  max-width: 250px;
  object-fit: contain;
  flex-shrink: 0;
}
.marquee-logo.is-tall { height: 78px; }   /* narrow crest needs more height */
.marquee-logo.is-round { height: 74px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Photo reel (auto-scrolling, varied sizes) ---------- */
.reel {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.reel-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: marquee 75s linear infinite;
}
/* Paused off-screen by an IntersectionObserver in main.js so these don't keep
   compositing for the rest of the session once scrolled past. */
.reel-track.is-paused,
.marquee-track.is-paused { animation-play-state: paused; }
.reel-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-right: 1.25rem;
  flex-shrink: 0;
}
.reel-img {
  height: 15rem;
  width: auto;
  flex-shrink: 0;
  object-fit: cover;
  border: 1px solid rgba(42,33,27,0.10);
  border-radius: 2px;
}
.reel-img.reel-lg { height: 18.5rem; }
.reel-img.reel-sm { height: 11.5rem; }
@media (max-width: 768px) {
  .reel-img { height: 11rem; }
  .reel-img.reel-lg { height: 13.5rem; }
  .reel-img.reel-sm { height: 8.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .reel { -webkit-mask-image: none; mask-image: none; }
  .reel-track { animation: none; width: auto; flex-wrap: wrap; justify-content: center; gap: 1rem; }
  .reel-group { flex-wrap: wrap; justify-content: center; gap: 1rem; padding-right: 0; }
  .reel-group + .reel-group { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee-track { animation: none; width: auto; flex-wrap: wrap; justify-content: center; }
  .marquee-group { flex-wrap: wrap; justify-content: center; gap: 2.5rem 3rem; padding-right: 0; }
  .marquee-group + .marquee-group { display: none; }
}

/* Hero feature cards — horizontal slide carousel (distinct from the banner's fade) */
.card-slide {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: translateX(100%);
  transition: transform 850ms var(--ease-in-out);
  will-change: transform;
}
.card-slide:first-child { transform: translateX(0); }
@media (prefers-reduced-motion: reduce) {
  .card-slide { transition: none !important; }
}

/* Hero crossfade slider — smooth fade + slow Ken-Burns zoom.
   A touch of blur on the inactive frame masks the two-image overlap mid-fade
   (Emil: blur bridges the visual gap so it reads as one change, not two). */
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transform: scale(1.06);
  filter: blur(8px);
  transition: opacity 1500ms ease, transform 7000ms ease, filter 1500ms ease;
}
.hero-slide.active { opacity: 1; transform: scale(1); filter: blur(0); }

/* Premium service photo cards — title always shown, description reveals on hover */
.offer-photo { box-shadow: 0 10px 28px -20px rgba(42,33,27,.5); transition: box-shadow .4s ease, transform .4s ease; }
.offer-photo:hover { box-shadow: 0 26px 50px -24px rgba(42,33,27,.55); transform: translateY(-3px); }
.offer-img { transition: transform 1200ms cubic-bezier(.22,1,.36,1); }
.offer-photo:hover .offer-img { transform: scale(1.06); }
.offer-reveal {
  max-height: 0; opacity: 0; transform: translateY(8px); overflow: hidden;
  transition: max-height .5s cubic-bezier(.22,1,.36,1), opacity .45s ease, transform .45s ease;
}
.offer-photo:hover .offer-reveal,
.offer-photo:focus-within .offer-reveal { max-height: 12rem; opacity: 1; transform: translateY(0); }
@media (hover: none) { .offer-reveal { max-height: 12rem; opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .offer-img, .offer-reveal, .offer-photo { transition: opacity .3s ease; }
  .offer-photo:hover .offer-img, .offer-photo:hover { transform: none; }
}

/* Botanical corner flourishes on light sections (Berkley-style) */
.section-floral { position: relative; isolation: isolate; }
.floral-corner { position: absolute; width: clamp(130px, 15vw, 260px); aspect-ratio: 1; color: var(--clay-600); opacity: 0.4; pointer-events: none; z-index: -1; }
.floral-tl { top: 0; left: 0; }
.floral-tr { top: 0; right: 0; transform: scaleX(-1); }
.floral-bl { bottom: 0; left: 0; transform: scaleY(-1); }
.floral-br { bottom: 0; right: 0; transform: rotate(180deg); }
@media (max-width: 640px) { .floral-corner { width: 100px; opacity: 0.26; } }

/* ---------- Intro / welcome screen ---------- */
#intro {
  position: fixed; inset: 0; z-index: 9999;
  background-color: #2A211B;
  background-image: linear-gradient(rgba(42,33,27,0.66), rgba(42,33,27,0.82)), url("img/photos/Front-of-home-August-2019.jpg");
  background-size: cover; background-position: center; background-repeat: no-repeat;
  display: flex; align-items: center; justify-content: center; text-align: center;
}
.intro-inner { padding: 2rem; }
.intro-crest {
  position: relative; width: 92px; height: 122px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 1.9rem;
  animation: introCrest 1s var(--ease-out) both;
}
.intro-shield { position: absolute; inset: 0; width: 100%; height: 100%; }
.intro-leaf { width: 42px; height: auto; display: block; position: relative; margin-top: -6px; }
.intro-leaf-solo { width: 46px; height: auto; display: block; margin: 0 auto 1.7rem; animation: introCrest 1s var(--ease-out) both; }
.intro-eyebrow {
  color: rgba(248,244,238,0.6); text-transform: uppercase;
  letter-spacing: 0.34em; font-size: 0.72rem; font-weight: 600;
  font-family: 'Poppins', system-ui, sans-serif;
  animation: introUp .8s .45s var(--ease-out) both;
}
.intro-title {
  font-family: 'Cormorant Garamond', Georgia, serif; color: #F8F4EE;
  font-size: clamp(2.8rem, 8vw, 4.75rem); font-weight: 500; line-height: 1;
  margin-top: 0.55rem; letter-spacing: 0.01em;
  animation: introUp .9s .6s var(--ease-out) both;
}
.intro-rule {
  display: block; width: 70px; height: 1px; margin: 1.5rem auto;
  background: rgba(201,131,90,0.85); transform-origin: center;
  animation: introRule .8s .95s var(--ease-out) both;
}
.intro-sub {
  color: rgba(248,244,238,0.5); text-transform: uppercase;
  letter-spacing: 0.24em; font-size: 0.66rem; font-weight: 600;
  font-family: 'Poppins', system-ui, sans-serif;
  animation: introUp .8s 1.15s var(--ease-out) both;
}
@keyframes introCrest { from { opacity: 0; transform: scale(0.82); } to { opacity: 1; transform: scale(1); } }
@keyframes introUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes introRule { from { opacity: 0; transform: scaleX(0); } to { opacity: 1; transform: scaleX(1); } }

/* exit — content settles, then the panel lifts away to reveal the site */
.intro-hide .intro-inner { opacity: 0; transform: scale(0.96); transition: opacity .45s var(--ease-out), transform .55s var(--ease-out); }
.intro-hide { transform: translateY(-100%); transition: transform .95s cubic-bezier(.76,0,.24,1) .4s; }
html.intro-lock, html.intro-lock body { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .intro-crest, .intro-eyebrow, .intro-title, .intro-rule, .intro-sub {
    animation: none !important; opacity: 1 !important; transform: none !important;
  }
  .intro-hide { transform: none; opacity: 0; transition: opacity .4s ease; }
  .intro-hide .intro-inner { transition: opacity .3s ease; }
}

/* ---------- Interactive polish (hover devices only) ---------- */
@media (hover: hover) and (pointer: fine) {
  /* gentle zoom on framed photography (div.img-frame > img pattern) */
  .img-frame > img { transition: transform .7s var(--ease-out); }
  .img-frame:hover > img { transform: scale(1.045); }
  /* clickable cards lift slightly and firm their hairline */
  a.card, .card-hover { transition: border-color .25s ease, box-shadow .3s ease, transform .3s var(--ease-out); }
  a.card:hover, .card-hover:hover {
    border-color: rgba(42,33,27,0.18);
    box-shadow: 0 12px 30px -20px rgba(42,33,27,0.45);
    transform: translateY(-3px);
  }
  /* reel: hovering focuses one photo, gently settling the rest */
  .reel-img { transition: transform .5s var(--ease-out), filter .45s ease; }
  .reel:hover .reel-img { filter: brightness(0.94); }
  .reel-img:hover { filter: none; transform: scale(1.03); }
}

/* ---------- Gallery lightbox ---------- */
[data-lightbox-gallery] figure { cursor: zoom-in; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(20, 16, 13, 0.92);
  padding: clamp(1rem, 5vw, 3rem);
}
.lightbox.is-open { display: flex; }
.lightbox-img {
  max-width: min(92vw, 1400px);
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox-close { top: 1.25rem; right: 1.25rem; }
.lightbox-prev { left: 1.25rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1.25rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) {
  .lightbox-close { width: 2.5rem; height: 2.5rem; font-size: 1.4rem; top: 0.75rem; right: 0.75rem; }
  .lightbox-prev, .lightbox-next { width: 2.5rem; height: 2.5rem; font-size: 1.4rem; }
  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
}
