/* ============================================================
   SANMAN YOJANA — Light Funeral Scheme Theme
   Modern, clean, responsive design with accessibility
   ============================================================ */

:root {
  --primary: #b45309;
  --primary-dark: #92400e;
  --secondary: #78350f;
  --light: #fef3c7;
  --white: #ffffff;
  --text: #1f1917;
  --text-muted: #78350f;
  --border: #f3e8d6;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  /* `clip` keeps the sticky header working (it makes no scroll container);
     `hidden` stays as the fallback for older engines. Declared on <html> too
     so off-canvas reveal transforms can never widen the page on mobile. */
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  font-family: "Poppins", "Noto Sans Devanagari", system-ui, sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Playfair Display", "Noto Serif Devanagari", Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}

p {
  line-height: 1.75;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--light);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
  border-radius: 99px;
  border: 2px solid var(--light);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

::selection {
  background: var(--primary);
  color: white;
}

/* Anchored sections clear the sticky header */
section[id],
[id="enquiry"] {
  scroll-margin-top: 7rem;
}

/* ============================================================
   TOP BAR — a shade lighter than before, now that the navbar below
   it is white, so the two bands don't clash too hard.
   ============================================================ */
.site-topbar {
  background: linear-gradient(115deg, var(--secondary) 0%, var(--primary-dark) 50%, var(--secondary) 100%);
  color: #f2ddc2;              /* warm cream — readable on the brown */
  /* the sticky header below is z-50 — without a stacking context of its own
     the language dropdown would open *behind* the navbar on desktop */
  position: relative;
  z-index: 60;
}

.topbar-link:hover {
  color: #fbbf24;
}

/* Social circles in the top bar — tinted glass on the brown instead of the
   old amber-50 chips, which disappeared against it. */
.tb-soc {
  background: rgba(255, 255, 255, 0.12);
  color: #f2ddc2;
}

.tb-soc:hover {
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
}

.tb-soc-wa:hover {
  background: #16a34a;
  color: #fff;
}

/* ============================================================
   BRAND LOGO (navbar) — image only, no frame or backdrop
   ============================================================ */
.site-logo {
  display: block;
  height: 3.9rem;          /* mobile  */
  width: auto;
  object-fit: contain;
}

@media (min-width: 640px) {
  .site-logo { height: 4.6rem; }   /* tablet  */
}

@media (min-width: 1024px) {
  .site-logo { height: 5.1rem; }   /* desktop */
}

/* Footer uses the same mark, a touch larger */
.footer-logo {
  display: block;
  height: 5.25rem;
  width: auto;
  object-fit: contain;
}

@media (min-width: 640px) {
  .footer-logo { height: 6rem; }
}

/* Footer link lists ("Our Services", "Quick Links") — icon + text row */
.fl-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: padding-left 0.25s ease, color 0.25s ease;
}

.fl-link:hover {
  padding-left: 6px;
}

/* ============================================================
   NAVBAR BAND — soft, faint white (not solid) so the logo's own
   white backdrop sits flush without the band feeling like a stark
   white slab; a light blur keeps it legible over the sticky scroll.
   ============================================================ */
#siteHeader {
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  backdrop-filter: blur(10px) saturate(150%);
  border-bottom: 1px solid rgba(180, 83, 9, 0.12);
}

/* ============================================================
   NAVIGATION LINKS
   ============================================================ */
.nav-link {
  position: relative;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--secondary);
  opacity: 0.85;
  padding: 0.5rem 0;
  transition: opacity 0.3s ease, color 0.3s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2.5px;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  border-radius: 99px;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover,
.nav-link.active {
  opacity: 1;
  color: var(--primary);
}

.nav-link.active::after,
.nav-link:hover::after {
  width: 100%;
}

/* "Contact Now" call-to-action in the navbar. The brown band swallowed the
   old amber-on-amber button, so the fill and the text swap over: warm amber
   on dark brown lettering. */
.nav-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 0.625rem;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #4a2308;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  box-shadow: 0 10px 22px -14px rgba(0, 0, 0, 0.85);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.nav-cta svg {
  width: 1rem;
  height: 1rem;
  transition: transform 0.25s ease;
}

.nav-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.35) 48%, transparent 66%);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -12px rgba(0, 0, 0, 0.95);
}

.nav-cta:hover svg {
  transform: translateX(3px);
}

.nav-cta:hover::after {
  transform: translateX(120%);
}

/* Header-row "Contact Now" only belongs on desktop nav (lg+). Below that the
   hamburger is visible instead, and the same CTA already lives inside the
   mobile dropdown menu — a plain Tailwind "hidden" class can't win here
   because .nav-cta's display:inline-flex above has equal specificity and
   loads later, so this has to override it directly. */
@media (max-width: 1023.98px) {
  .nav-cta-header {
    display: none;
  }
}

/* Hamburger — amber-tinted chip on the white band */
.menu-btn {
  background: rgba(180, 83, 9, 0.08);
  color: var(--secondary);
  transition: background 0.2s ease, color 0.2s ease;
}

.menu-btn:hover {
  background: rgba(180, 83, 9, 0.16);
  color: var(--primary-dark);
}

/* The mobile language toggle lives inside the (now white) header, while the
   same .lang-toggle-light class is also used in the brown top bar — scope
   this override to the header so the top bar chip is untouched. */
#siteHeader .lang-toggle-light {
  background: rgba(180, 83, 9, 0.08);
  color: var(--secondary);
  border: 1px solid rgba(180, 83, 9, 0.2);
}

#siteHeader .lang-toggle-light:hover {
  background: rgba(180, 83, 9, 0.16);
  color: var(--primary-dark);
}

/* ============================================================
   EYEBROW / KICKER — small rule + uppercase label above a heading.
   Lives here (not in a page's inline <style>) because the home,
   services and about CTA bands all use it.
   ============================================================ */
.sx-rule {
  display: inline-block;
  width: 2.5rem;
  height: 2px;
  border-radius: 9999px;
  background: linear-gradient(90deg, #b45309, rgba(180, 83, 9, 0));
}

.sx-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #b45309;
}

.sx-kicker.is-light { color: #fbbf24; }

/* ============================================================
   PREMIUM HERO GLASS — badge pill + hero buttons
   Shared by the home, gallery and packages hero sections so the
   three photo/video heroes read as one system.
   The fill stays almost fully transparent (the photo shows through);
   the "premium" comes from the gradient hairline border, the inner
   top highlight and the slow sheen sweep — not from a solid panel.
   ============================================================ */
.hero-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.55rem 1.15rem;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,.30);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: transparent;
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  backdrop-filter: blur(10px) saturate(150%);
  box-shadow: 0 10px 30px -16px rgba(0,0,0,.8);
  text-shadow: 0 1px 10px rgba(0,0,0,.45);
  overflow: hidden;
}

.hero-pill > * {
  position: relative;
  z-index: 1;
}

.hero-pill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.26) 50%, transparent 62%);
  transform: translateX(-130%);
  animation: heroSheen 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes heroSheen {
  0%, 70% { transform: translateX(-130%); }
  100%    { transform: translateX(130%); }
}

/* Hero buttons — solid amber for the primary action, glass for the rest */
.hero-btn,
.hero-btn-ghost {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 2rem;
  border-radius: 0.85rem;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-image 0.3s ease;
}

.hero-btn > *,
.hero-btn-ghost > * {
  position: relative;
  z-index: 1;
}

.hero-btn::after,
.hero-btn-ghost::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.30) 50%, transparent 62%);
  transform: translateX(-130%);
  transition: transform 0.7s ease;
  pointer-events: none;
}

.hero-btn:hover::after,
.hero-btn-ghost:hover::after {
  transform: translateX(130%);
}

.hero-btn {
  border: 1px solid rgba(255,255,255,.18);
  background-image: linear-gradient(135deg, #b45309 0%, #d97706 52%, #b45309 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.28),
    0 16px 34px -16px rgba(180,83,9,.95);
}

.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.36),
    0 22px 44px -16px rgba(217,119,6,1);
}

.hero-btn-ghost {
  border: 1px solid rgba(255,255,255,.35);
  background: transparent;
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  backdrop-filter: blur(10px) saturate(150%);
  box-shadow: 0 12px 30px -18px rgba(0,0,0,.85);
  text-shadow: 0 1px 10px rgba(0,0,0,.4);
}

.hero-btn-ghost:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.6);
  box-shadow: 0 18px 38px -18px rgba(0,0,0,.9);
}

.hero-btn svg,
.hero-btn-ghost svg {
  width: 1.15rem;
  height: 1.15rem;
}

/* Hero CTA pair — the two buttons stay side by side on phones instead of
   stacking, so the hero copy never gets pushed below the fold. */
.hero-btn-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.625rem;
}

@media (min-width: 640px) {
  .hero-btn-row {
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
  }
}

@media (max-width: 639px) {
  .hero-btn-row > .hero-btn,
  .hero-btn-row > .hero-btn-ghost {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.85rem 0.75rem;
    font-size: 0.875rem;
    gap: 0.4rem;
    white-space: nowrap;
  }
  .hero-btn-row > .hero-btn svg,
  .hero-btn-row > .hero-btn-ghost svg {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
  }
}

@media (max-width: 380px) {
  .hero-btn-row > .hero-btn,
  .hero-btn-row > .hero-btn-ghost {
    padding: 0.8rem 0.5rem;
    font-size: 0.8125rem;
    gap: 0.3rem;
  }
}

/* Pill sizing needs to shrink before the copy wraps awkwardly on phones */
@media (max-width: 480px) {
  .hero-pill {
    font-size: 0.6875rem;
    letter-spacing: 0.10em;
    padding: 0.45rem 0.9rem;
  }
}

/* ============================================================
   LANGUAGE SWITCHER — single icon + dropdown
   ============================================================ */
.lang-switch {
  position: relative;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: background 0.2s ease;
}

.lang-toggle svg {
  width: 1.05rem;
  height: 1.05rem;
  flex: none;
}

.lang-toggle:hover {
  background: rgba(255, 255, 255, 0.24);
}

/* Used only inside the top bar and the header, both of which are brown, so
   this stays a light chip on brown regardless of the visitor's OS dark-mode
   preference. */
.lang-toggle-light {
  background: rgba(255, 255, 255, 0.14);
  color: #fde68a;
  border: 1px solid rgba(253, 230, 138, 0.35);
}

.lang-toggle-light:hover {
  background: rgba(255, 255, 255, 0.26);
  color: #fff;
}

.lang-current {
  text-transform: uppercase;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 140px;
  background: #fff;
  border-radius: 0.75rem;
  border: 1px solid #f1e4d2;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.35);
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 60;
}

.lang-switch.open .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-menu .lang-btn {
  text-align: left;
  padding: 0.55rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #44403c;
  transition: background 0.15s ease, color 0.15s ease;
}

.lang-menu .lang-btn:hover {
  background: #fdf3e4;
  color: var(--primary-dark);
}

.lang-menu .lang-btn.active {
  background: var(--primary);
  color: #fff;
}

/* Mobile menu — carries on the white of the header it drops out of */
#mobileMenu {
  max-height: 0;
  overflow: hidden;
  background: #ffffff;
  border-top: 1px solid rgba(180, 83, 9, 0.16);
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobileMenu.open {
  /* six nav links + CTA, with headroom for the longer Marathi/Hindi labels */
  max-height: 42rem;
}

.mnav-link {
  color: var(--secondary);
  transition: background 0.25s ease, color 0.25s ease;
}

.mnav-link:hover {
  background: rgba(180, 83, 9, 0.08);
  color: var(--primary-dark);
}

.mnav-link.active {
  background: rgba(251, 191, 36, 0.16);
  color: var(--primary);
  font-weight: 700;
}

/* ============================================================
   FLOATING WHATSAPP BUTTON (all pages)
   ============================================================ */
.wa-float {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 9999px;
  background: #25d366;
  color: #fff;
  box-shadow: 0 12px 26px -10px rgba(37, 211, 102, 0.8);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.wa-float:hover,
.wa-float:focus-visible {
  background: #1ebe5b;
  transform: translateY(-3px);
  box-shadow: 0 18px 32px -12px rgba(37, 211, 102, 0.9);
}

.wa-float svg {
  width: 1.65rem;
  height: 1.65rem;
}

/* soft pulse ring */
.wa-float::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #25d366;
  opacity: 0.45;
  z-index: -1;
  animation: wa-pulse 2.4s ease-out infinite;
}

@keyframes wa-pulse {
  0%   { transform: scale(1);   opacity: 0.45; }
  70%  { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1.6); opacity: 0; }
}

@media (min-width: 640px) {
  .wa-float {
    right: 1.5rem;
    bottom: 1.5rem;
    width: 3.5rem;
    height: 3.5rem;
  }
  .wa-float svg { width: 1.8rem; height: 1.8rem; }
}

/* ============================================================
   ACCORDION / FAQ (wired by main.js initAccordion)
   ============================================================ */
.acc {
  border: 1px solid #f3e8d6;
  border-radius: 1rem;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.acc + .acc { margin-top: 0.85rem; }

.acc:hover { border-color: #fcd34d; }

.acc.open {
  border-color: var(--primary);
  box-shadow: 0 16px 34px -22px rgba(120, 53, 15, 0.5);
}

.acc-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  cursor: pointer;
  text-align: left;
  font-weight: 600;
  color: #1c1917;
  background: none;
  border: 0;
  font-family: inherit;
  font-size: 1rem;
}

.acc-head:hover { color: var(--primary); }

.acc-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 9999px;
  background: #fef3c7;
  color: var(--primary);
  transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.acc.open .acc-icon {
  transform: rotate(180deg);
  background: var(--primary);
  color: #fff;
}

.acc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.acc.open .acc-body { max-height: 26rem; }

.acc-body > div {
  padding: 0 1.25rem 1.25rem;
  color: #57534e;
  line-height: 1.75;
  font-size: 0.95rem;
}

/* ============================================================
   LANGUAGE BUTTONS
   ============================================================ */
.lang-btn {
  cursor: pointer;
  transition: all 0.3s ease;
}

.lang-btn.active {
  background: var(--primary) !important;
  color: white !important;
  font-weight: 700;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes floaty {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

.animate-float {
  animation: floaty 3s ease-in-out infinite;
}

@keyframes pulse-soft {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.animate-pulse {
  animation: pulse-soft 2s ease-in-out infinite;
}

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ============================================================
   REVEAL ON SCROLL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.show {
  opacity: 1;
  transform: none;
}

/* Directional variants — pair with .reveal.
   Shorter than the base fade and with no transition-delay, so a pair of
   columns slides in from its own side the moment the block is reached. */
.reveal.reveal-left,
.reveal.reveal-right {
  transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: 0s;
}
.reveal-left { transform: translateX(-56px); }
.reveal-right { transform: translateX(56px); }

/* Smaller travel on phones so the slide stays inside the frame */
@media (max-width: 640px) {
  .reveal-left { transform: translateX(-28px); }
  .reveal-right { transform: translateX(28px); }
}

/* Light variant — a short fade with almost no travel, so the block reads as
   "already there" on phones and slow devices instead of sliding in. Pair with
   .reveal; the doubled class keeps it ahead of the base rule. */
.reveal.reveal-soft {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
  transition-delay: 0s;
}

.reveal.reveal-soft.show {
  opacity: 1;
  transform: none;
}

/* ============================================================
   HOME — "OUR SERVICES" CARDS
   ============================================================ */

/* The lift and the shadow live here rather than in utility classes because
   .reveal.reveal-soft.show above wins on specificity and would otherwise
   flatten a hover transform set on the same element. */
.svc-teaser.reveal.reveal-soft.show {
  transition: opacity 0.3s ease-out, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.4s ease-out;
}

.svc-teaser.reveal.reveal-soft.show:hover {
  transform: translateY(-8px);
}

/* Amber hairline that draws itself across the top of the card on hover. */
.svc-teaser::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, #b45309, #f59e0b, #fcd34d);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 4;
}

.svc-teaser:hover::after { transform: scaleX(1); }

/* Frosted icon tile on the photo — fills amber as the card is hovered. */
.svc-teaser .svc-ico {
  transition: background-color 0.35s ease, color 0.35s ease,
              box-shadow 0.35s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.svc-teaser:hover .svc-ico {
  background-color: rgba(180, 83, 9, 0.95);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -12px rgba(120, 53, 15, 0.9);
}

/* Short accent rule under the heading, drawn out on hover. */
.svc-teaser .svc-rule {
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.svc-teaser:hover .svc-rule { width: 3.5rem; }

/* Learn More — outline pill that fills on hover anywhere over the card. */
.svc-teaser .svc-cta {
  transition: background-color 0.3s ease, border-color 0.3s ease,
              color 0.3s ease, gap 0.3s ease;
}

.svc-teaser:hover .svc-cta {
  background-color: #b45309;
  border-color: #b45309;
  color: #fff;
  gap: 0.75rem;
}

.svc-teaser .svc-cta-arrow {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.svc-teaser:hover .svc-cta-arrow { transform: translateX(2px); }

/* Light sweeping across the photo. Transform/opacity only, and pointer
   devices only, so phones never pay for it. */
.svc-sheen {
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.3) 50%, transparent 62%);
  opacity: 0;
  transform: translateX(-110%);
}

@media (hover: hover) {
  .svc-teaser:hover .svc-sheen {
    opacity: 1;
    transform: translateX(110%);
    transition: transform 0.95s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
  }
}

@media (prefers-reduced-motion: reduce) {
  .svc-teaser.reveal.reveal-soft.show:hover { transform: none; }
  .svc-teaser:hover .svc-ico { transform: none; }
  .svc-teaser .svc-sheen { display: none; }
}

/* ---------- Home services cards ----------
   The cards are on the page from the start and ride in as the section is
   scrolled to; main.js deals out .show card by card. */

/* Titles vary a lot in length, so instead of wrapping to a second row, JS
   (fitOneLineTitles in main.js) shrinks each one's font size just enough to
   keep it on a single line at whatever column width the grid gives it. */
.svc-teaser-title {
  white-space: nowrap;
}

/* The sideways travel is inward on wide screens but crosses the whole card on
   phones, so the panel clips its own overflow rather than letting a card push
   the page sideways. The clip margin leaves room for the drop shadows. */
#svcPanel {
  overflow-x: clip;
  overflow-clip-margin: 32px;
}

/* ---- The cards spread out like a hand of cards ----
   Each card starts pulled in toward the middle of its row, shrunk and tilted,
   then fans out to its own slot. The per-column offsets are set as custom
   properties so one transform serves every breakpoint. `#svcPanel` is used on
   purpose: it outranks the .reveal / .reveal-soft rules that would otherwise
   flatten this back into a plain fade. */
#svcPanel .svc-teaser.reveal.reveal-soft {
  --sx: 0px;
  --sy: 26px;
  --sr: 0deg;
  --ss: 0.9;
  opacity: 0;
  transform-origin: 50% 130%;
  transform: translate3d(var(--sx), var(--sy), 0) rotate(var(--sr)) scale(var(--ss));
  transition: opacity 0.45s ease-out,
              transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

/* One column — the cards come in alternately from the left and from the right
   as the phone is scrolled, so each one arrives from its own side rather than
   the whole strip drifting up. */
@media (max-width: 639px) {
  #svcPanel .svc-teaser.reveal.reveal-soft {
    --sy: 12px;
    --ss: 0.94;
    transform-origin: 50% 50%;
  }
  #svcPanel .svc-teaser.reveal.reveal-soft:nth-child(2n + 1) { --sx: -78px; --sr: -3deg; }
  #svcPanel .svc-teaser.reveal.reveal-soft:nth-child(2n)     { --sx: 78px;  --sr: 3deg; }
}

#svcPanel .svc-teaser.reveal.reveal-soft.show {
  opacity: 1;
  transform: none;
}

/* Hover lift still wins once the card has landed. */
#svcPanel .svc-teaser.reveal.reveal-soft.show:hover {
  transform: translateY(-8px);
  transition: opacity 0.3s ease-out,
              transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.4s ease-out;
}

/* Two columns — the pair starts overlapped in the middle and parts sideways.
   Every offset points inward, so the travel stays inside the grid and never
   widens the page. */
@media (min-width: 640px) {
  #svcPanel .svc-teaser.reveal.reveal-soft:nth-child(2n + 1) { --sx: 70px;  --sr: -4deg; }
  #svcPanel .svc-teaser.reveal.reveal-soft:nth-child(2n)     { --sx: -70px; --sr: 4deg; }
}

/* Four columns — a real fan: the outer cards travel furthest and tilt most. */
@media (min-width: 1024px) {
  #svcPanel .svc-teaser.reveal.reveal-soft { --sy: 34px; --ss: 0.86; }
  #svcPanel .svc-teaser.reveal.reveal-soft:nth-child(4n + 1) { --sx: 170px;  --sr: -7deg; }
  #svcPanel .svc-teaser.reveal.reveal-soft:nth-child(4n + 2) { --sx: 58px;   --sr: -2.5deg; }
  #svcPanel .svc-teaser.reveal.reveal-soft:nth-child(4n + 3) { --sx: -58px;  --sr: 2.5deg; }
  #svcPanel .svc-teaser.reveal.reveal-soft:nth-child(4n + 4) { --sx: -170px; --sr: 7deg; }
}

/* The per-column offsets above are set on :nth-child rules, so :nth-child(n) is
   repeated here to match their weight — a plain selector would lose and the
   cards would still slide. */
@media (prefers-reduced-motion: reduce) {
  #svcPanel .svc-teaser.reveal.reveal-soft,
  #svcPanel .svc-teaser.reveal.reveal-soft:nth-child(n) {
    --sx: 0px;
    --sy: 0px;
    --sr: 0deg;
    --ss: 1;
    transition: none;
  }
}

/* Staggered delays */
.d1 { transition-delay: 0.1s; }
.d2 { transition-delay: 0.2s; }
.d3 { transition-delay: 0.3s; }
.d4 { transition-delay: 0.4s; }
.d5 { transition-delay: 0.5s; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.btn:active {
  transform: translateY(2px);
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 15px -5px rgba(37, 99, 235, 0.5);
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 8px 25px -8px rgba(37, 99, 235, 0.6);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--light);
  color: var(--text);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  background: white;
  border-color: var(--primary);
  color: var(--primary);
}

/* ============================================================
   GRID BACKGROUND
   ============================================================ */
.bg-grid-slate-200 {
  background-image:
    linear-gradient(0deg, #e2e8f0 1px, transparent 1px),
    linear-gradient(90deg, #e2e8f0 1px, transparent 1px);
}

.bg-grid-16 {
  background-size: 16px 16px;
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.sr-only:not(.focus-visible):focus,
.focus\:not-sr-only:focus {
  position: static;
  width: auto;
  height: auto;
  padding: inherit;
  margin: inherit;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* ============================================================
   HEADER STICKY EFFECTS
   ============================================================ */
#siteHeader.shadow-lg {
  box-shadow: 0 10px 30px -10px rgba(45, 20, 5, 0.45);
}

/* ============================================================
   FORM STYLES (if needed later)
   ============================================================ */
input,
textarea,
select {
  font-family: inherit;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shadow-soft {
  box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.08);
}

/* ============================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================ */
@media (max-width: 768px) {
  body {
    font-size: 0.95rem;
  }

  h1 {
    font-size: 1.875rem;
  }

  h2 {
    font-size: 1.5rem;
  }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  body {
    background: white;
  }

  .no-print {
    display: none !important;
  }
}
