/* =========================================================
   Parsons Smile Center — Premium enhancement layer
   Loaded AFTER the approved theme.css. Adds depth, light and
   motion without altering the established design language.
   Above-the-fold hero text is never opacity-animated, so LCP
   is unaffected. All motion respects prefers-reduced-motion.
   ========================================================= */

/* Branded text selection */
::selection { background: rgba(184,146,76,.28); color: var(--ink); }
.hero ::selection, .section.dark ::selection, .section.obsidian ::selection,
.cta-band ::selection, .site-footer ::selection { color: var(--ivory); background: rgba(217,185,122,.32); }

/* Logo-only brand: tidy spacing now that the text lockup is gone */
.brand--logo-only { gap: 0; }

/* Thin gold scroll-progress bar (set by enhance.js) */
.psc-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0; z-index: 200;
  background: var(--gold-grad-soft); box-shadow: 0 0 12px rgba(184,146,76,.55);
  pointer-events: none;
}
.admin-bar .psc-progress { top: 32px; }
@media screen and (max-width: 782px) { .admin-bar .psc-progress { top: 46px; } }

/* Living gold foil — a slow, luxurious shimmer across the gradient text */
.foil { background-size: 220% auto; }
@media (prefers-reduced-motion: no-preference) {
  .foil { animation: psc-foil 8s linear infinite; }
}
@keyframes psc-foil { to { background-position: 220% center; } }

/* Atmospheric gold light in the dark sections */
.section.obsidian::before, .section.dark::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(58% 48% at 50% 0%, rgba(217,185,122,.12), transparent 72%);
}
.section.obsidian > .wrap, .section.dark > .wrap { position: relative; z-index: 1; }

/* Hero: a slow Ken-Burns drift on the background image only (text untouched → no LCP cost) */
@media (prefers-reduced-motion: no-preference) {
  .hero .hero-bg > img { animation: psc-kenburns 20s ease-out forwards; transform-origin: 62% 42%; }
}
@keyframes psc-kenburns { from { transform: scale(1.09); } to { transform: scale(1); } }

/* Hero NYC slideshow — slow cross-fade between layered images */
.hero-slides .hero-slide {
  position: absolute; inset: 0; opacity: 0;
  transition: opacity 1.6s var(--ease);
  will-change: opacity;
}
.hero-slides .hero-slide.is-active { opacity: 1; }
.hero-slides .hero-slide img { width: 100%; height: 100%; object-fit: cover; }
@media (prefers-reduced-motion: no-preference) {
  .hero-slides .hero-slide.is-active img { animation: psc-kenburns 12s ease-out forwards; transform-origin: 60% 45%; }
}

/* Premium card interactions */
.svc-card { transition: background .45s var(--ease), transform .55s var(--ease), box-shadow .55s var(--ease); }
.svc-card:hover { transform: translateY(-6px); box-shadow: 0 34px 64px -34px rgba(42,34,26,.38); }
.svc-card .svc-icon { transition: transform .55s var(--ease), filter .55s var(--ease); }
.svc-card:hover .svc-icon { filter: drop-shadow(0 6px 16px rgba(184,146,76,.45)); }
.value-card { transition: background .45s var(--ease), transform .55s var(--ease), box-shadow .55s var(--ease); }
.value-card:hover { transform: translateY(-6px); box-shadow: 0 34px 70px -34px rgba(0,0,0,.55); }
.loc-card { transition: box-shadow .5s var(--ease), transform .5s var(--ease); }
.loc-card:hover { box-shadow: 0 44px 86px -38px rgba(20,16,13,.42); }
.quote { transition: transform .5s var(--ease), border-color .5s var(--ease), background .5s var(--ease); }
.quote:hover { transform: translateY(-5px); border-color: var(--hair-strong); background: rgba(217,185,122,.08); }

/* Gold button: light sweep on hover */
.btn-gold { position: relative; overflow: hidden; }
.btn-gold::after {
  content: ''; position: absolute; top: 0; left: -130%; width: 55%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.4), transparent);
  transform: skewX(-18deg); pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .btn-gold:hover::after { animation: psc-sheen .9s ease; }
}
@keyframes psc-sheen { from { left: -130%; } to { left: 150%; } }

/* Stats: stable, tabular figures while the count-up runs */
.stat .num { font-variant-numeric: tabular-nums; }

/* Reviews: balance varying Google review lengths — pin the author to the
   bottom so cards read evenly, and quiet very short quotes. */
.quote { display: flex; flex-direction: column; }
.quote p { margin-bottom: 24px; }
.quote .who { margin-top: auto; }

/* Google rating aggregate line (replaces the old "go to Google" button) */
.reviews-aggregate { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 8px; margin-top: 48px; color: rgba(242,235,219,.85); font-size: 14px; letter-spacing: .02em; }
.reviews-aggregate .stars { display: inline-flex; gap: 3px; color: var(--gold-light); vertical-align: middle; margin-right: 8px; }
.reviews-aggregate .stars svg { width: 17px; height: 17px; }
.reviews-aggregate .agg-text strong { color: var(--gold-light); font-size: 17px; font-family: var(--font-display); }
.reviews-aggregate .agg-link { color: var(--gold-light); text-decoration: underline; text-underline-offset: 3px; margin-left: 6px; }
.reviews-aggregate .agg-link:hover { color: var(--gold-hi); }

/* Refined reveal motion — blur-to-sharp entrance (keeps site.js's stagger) */
.reveal { transition: opacity 1s var(--ease), transform 1.05s var(--ease), filter 1s var(--ease); }
@media (prefers-reduced-motion: no-preference) {
  .reveal:not(.in) { filter: blur(7px); }
  .hero .reveal:not(.in) { filter: none; } /* never blur above-the-fold (protects LCP) */
}

/* Kill horizontal scroll site-wide (safety net) + bring the off-frame
   decorative elements (badge, big number) inside the viewport on mobile. */
html, body { overflow-x: hidden; max-width: 100%; }
@media (max-width: 980px) {
  .split-media .badge.br { right: 12px; bottom: 12px; }
  .svc-media .big-num { left: 6px; bottom: -8px; font-size: 64px; }
}

/* Mobile hero fix: theme.css's responsive `.wrap{padding:0 22px}` zeroes the
   hero-inner top padding (same specificity, later rule), so the centered hero
   content rises behind the fixed header and the eyebrow overlaps the logo.
   Restore clearance with a higher-specificity rule and top-align on mobile. */
@media (max-width: 980px) {
  .hero { align-items: flex-start; }
  .hero .hero-inner { padding-top: 118px; padding-bottom: 64px; }
}

/* ---- Audit hardening: touch targets, button stacking, tag wrap ---- */
@media (max-width: 980px) {
  .menu-toggle { min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
}
@media (max-width: 620px) {
  .loc-actions { flex-direction: column; gap: 10px; }
  .loc-actions .btn { width: 100%; }
  .emergency-band .wrap { padding: 34px 22px; gap: 20px; }
  .emergency-band .wrap .hero-actions { justify-content: center; }
  .pill { white-space: normal; }
}

/* ---- Journal (blog) ---- */
.journal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
@media (max-width: 980px) { .journal-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .journal-grid { grid-template-columns: 1fr; } }
.article-card { background: var(--paper); border: 1px solid var(--hair); display: flex; flex-direction: column; overflow: hidden; transition: box-shadow .45s var(--ease), transform .45s var(--ease); }
.article-card:hover { box-shadow: var(--shadow); transform: translateY(-5px); }
.article-card .ac-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: radial-gradient(ellipse at 50% -10%, var(--obsidian), var(--black)); }
.article-card .ac-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.article-card:hover .ac-media img { transform: scale(1.05); }
.article-card .ac-ph { display: flex; align-items: center; justify-content: center; height: 100%; }
.article-card .ac-ph svg { width: 60px; height: 60px; color: var(--gold-light); opacity: .85; }
.article-card .ac-body { padding: 28px 30px 30px; display: flex; flex-direction: column; flex: 1; }
.article-card .ac-cat { font-family: var(--font-caps); font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--gold-deep); }
.article-card .ac-title { font-size: 24px; line-height: 1.2; margin: 12px 0; }
.article-card .ac-title a:hover { color: var(--gold-deep); }
.article-card .ac-excerpt { font-size: 14.5px; color: var(--ink-soft); margin: 0 0 22px; line-height: 1.6; }
.article-card .ac-meta { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; border-top: 1px solid var(--hair); font-size: 12.5px; color: #7a6d52; }
.article-card .ac-more { font-family: var(--font-caps); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-deep); display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.article-card .ac-more svg { width: 14px; height: 14px; transition: transform .35s; }
.article-card:hover .ac-more svg { transform: translateX(4px); }
.journal-pagination { margin-top: 56px; text-align: center; }
.journal-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 12px; margin: 0 4px; border: 1px solid var(--hair-strong); color: var(--ink-soft); font-size: 14px; transition: .3s; }
.journal-pagination .page-numbers.current, .journal-pagination .page-numbers:hover { background: var(--gold-grad-soft); color: #2a200f; border-color: transparent; }
.single .entry-content p { font-size: 17.5px; line-height: 1.78; }
.single .entry-content h2 { font-size: clamp(26px, 2.6vw, 34px); margin: 40px 0 14px; }

/* Heading-order a11y: feature/footer titles moved h4 -> h3; keep the look */
.feature-list h3 { font-family: var(--font-body); font-size: 16px; font-weight: 600; margin: 0 0 3px; }
.step h3 { font-family: var(--font-display); font-size: 24px; margin: 0 0 10px; }
.contact-aside h3 { font-family: var(--font-caps); font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 18px; }
#appt-heading { font-size: 32px; margin: 0 0 8px; } /* keep the look after h3 -> h2 (heading-order) */
.footer-col .footer-col-h { font-family: var(--font-caps); font-size: 12px; letter-spacing: .26em; text-transform: uppercase; color: var(--gold-light); margin: 0 0 22px; font-weight: 500; }

/* Footer legal links (Privacy / Accessibility) */
.footer-bottom-left { display: flex; align-items: center; gap: 10px 20px; flex-wrap: wrap; }
.footer-legal { display: flex; gap: 18px; }
.footer-legal a { color: rgba(242,235,219,.72); transition: color .3s; }
.footer-legal a:hover { color: var(--gold-light); }

/* Section pacing already generous; reduce hero padding crunch on logo-only header — none needed */

/* =========================================================
   Modern luxury layer v2 — depth, living light, pointer glow.
   GPU-driven (opacity / transform / background), motion-aware, and
   applied only to below-the-fold content so the hero LCP is untouched.
   ========================================================= */

/* Fine film grain — printed-paper depth, kept barely-there */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 3; pointer-events: none;
  opacity: .04; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%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");
  background-size: 140px 140px;
}
@media (prefers-reduced-motion: reduce) { body::after { display: none; } }
/* iOS Safari: soft-light on a fixed overlay can flicker on fast scroll — use a
   plain, lighter grain there (still adds texture, no compositing artifacts). */
@supports (-webkit-touch-callout: none) {
  body::after { mix-blend-mode: normal; opacity: .03; }
}

/* Richer frosted glass on the floating header (desktop only — on mobile the
   header uses an opaque background so the frost would be invisible and the
   blur is just wasted GPU during scroll). */
@supports (backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px)) {
  @media (min-width: 981px) {
    .site-header.scrolled, .site-header.solid {
      -webkit-backdrop-filter: blur(22px) saturate(1.7);
      backdrop-filter: blur(22px) saturate(1.7);
    }
  }
}

/* Lift the seamless services module off the flat section */
.svc-grid { box-shadow: 0 40px 90px -56px rgba(42,34,26,.5); }

/* Pointer-reactive gold light pooling inside the cards. --mx/--my are written
   by enhance.js; the glow sits behind text (z:-1, isolated) and is clipped to
   the card, so it reads as light moving under the surface. */
.svc-card, .value-card, .loc-card { isolation: isolate; }
.value-card, .loc-card { position: relative; }
.svc-card::after, .value-card::after, .loc-card::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  opacity: 0; transition: opacity .5s var(--ease);
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(217,185,122,.20), transparent 60%);
}
.svc-card:hover::after, .value-card:hover::after, .loc-card:hover::after { opacity: 1; }
.value-card:hover { border-color: var(--gold); box-shadow: 0 44px 80px -38px rgba(0,0,0,.6); }
.loc-card { box-shadow: 0 22px 50px -40px rgba(42,34,26,.4); }

/* Living aurora — the dark sections' glow breathes slowly */
@media (prefers-reduced-motion: no-preference) {
  .section.obsidian::before, .section.dark::before { animation: psc-aurora 13s ease-in-out infinite alternate; }
}
@keyframes psc-aurora { from { opacity: .6; } to { opacity: 1; } }

/* Gold button: GSAP (quickTo) owns the magnetic transform; CSS only transitions
   the non-transform props so the two never fight. will-change hints the layer. */
.btn-gold { transition: background-position .5s var(--ease), box-shadow .45s var(--ease); will-change: transform; }

/* ---------- GSAP motion system handoff ---------- */
/* Hero entrance — CSS-driven, runs at first paint via the psc-anim head guard.
   Instant + GSAP-independent → zero LCP cost (it never waits on a script). The
   h1 is excluded (instant anchor, LCP-safe). transform+opacity → CLS stays 0. */
html.psc-anim .hero-inner > *:not(.display) { opacity: 0; animation: psc-hero-in .9s var(--ease) both; }
html.psc-anim .hero-inner > .eyebrow { animation-delay: .08s; }
html.psc-anim .hero-inner > .lead { animation-delay: .2s; }
html.psc-anim .hero-inner > .hero-actions { animation-delay: .32s; }
html.psc-anim .hero-inner > .hero-locations { animation-delay: .44s; }
@keyframes psc-hero-in { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
/* When GSAP owns the reveals, silence the CSS/IO reveal transition + blur so the
   two systems never fight (GSAP drives inline opacity/transform). */
html.gsap-on .reveal { transition: none !important; filter: none !important; }
/* Clip the framed/gallery images so the clip-path unveil + scale never show an
   edge; will-change only on the elements that actually animate. */
html.gsap-on .split-media .frame,
html.gsap-on .g-item { overflow: hidden; }
html.gsap-on .split-media .frame img,
html.gsap-on .g-item img { will-change: clip-path, transform; }
/* Masked heading lines (SplitText) — hint the compositor for the rise. */
html.gsap-on .section-head .psc-l { will-change: transform; }

/* ---- Native appointment form ---- */
.psc-hp { position: absolute !important; left: -9999px !important; top: auto; width: 1px; height: 1px; overflow: hidden; }
.psc-appt-form .field label .req { color: var(--gold); font-weight: 600; }
.psc-appt-form .field.has-error input,
.psc-appt-form .field.has-error select,
.psc-appt-form .field.has-error textarea { border-color: #b3261e; box-shadow: 0 0 0 3px rgba(179,38,30,.12); }
.psc-appt-form .field-error { margin: 7px 0 0; font-size: 12.5px; line-height: 1.4; color: #9a1c15; }
.psc-appt-status:empty { display: none; }
.psc-appt-status { margin-bottom: 20px; }
.psc-appt-status .psc-appt-error { margin: 0; padding: 13px 16px; font-size: 14px; line-height: 1.5; color: #9a1c15; background: rgba(179,38,30,.06); border: 1px solid rgba(179,38,30,.28); border-radius: 2px; }
.psc-appt-status:focus { outline: none; }

/* ============================================================
   Footer — premium layout (desktop + mobile).
   Gold hairline accent · brand + socials · refined link columns ·
   location NAP blocks with pin icons · balanced bottom bar with the
   build credit. Mobile collapses to a tidy 2-column structure.
   ============================================================ */
.site-footer { position: relative; padding-top: 92px; }
.site-footer::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(184,146,76,.55), transparent); }
.footer-top { grid-template-columns: 1.6fr 1fr 1fr 1.35fr; gap: 56px; padding-bottom: 56px; }

/* Brand + socials */
.footer-brand img { height: 60px; margin-bottom: 22px; }
.footer-brand p { color: rgba(242,235,219,.6); line-height: 1.75; max-width: 300px; }
.footer-brand .socials { display: flex; gap: 12px; margin-top: 28px; }
.footer-brand .socials a { width: 42px; height: 42px; border: 1px solid var(--hair-dark); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--gold-light); transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), transform .35s var(--ease); }
.footer-brand .socials a:hover { background: var(--gold-grad-soft, var(--gold-light)); color: #2a200f; border-color: transparent; transform: translateY(-3px); }
.footer-brand .socials svg { width: 17px; height: 17px; }

/* Link columns */
.footer-col-h { font-family: var(--font-caps); font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--gold-light); margin-bottom: 24px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.footer-col a { font-size: 14px; color: rgba(242,235,219,.72); transition: color .3s var(--ease), padding-left .3s var(--ease); }
.footer-col:not(.footer-contact) a:hover { color: var(--gold-light); padding-left: 4px; }

/* Locations — NAP blocks */
.footer-contact .foot-loc { display: flex; gap: 12px; margin-bottom: 20px; }
.footer-contact .foot-loc-pin { flex: 0 0 auto; color: var(--gold-light); margin-top: 1px; }
.footer-contact .foot-loc-pin svg { width: 16px; height: 16px; }
.footer-contact .foot-loc > div { display: flex; flex-direction: column; gap: 3px; }
.footer-contact .foot-loc-name { font-size: 14px; font-weight: 600; color: var(--cream); transition: color .3s var(--ease); }
.footer-contact .foot-loc-name:hover { color: var(--gold-light); }
.footer-contact .foot-loc-addr { font-size: 13px; color: rgba(242,235,219,.6); line-height: 1.5; }
.footer-contact .foot-loc-tel { font-size: 13.5px; color: rgba(242,235,219,.72); transition: color .3s var(--ease); }
.footer-contact .foot-loc-tel:hover { color: var(--gold-light); }
.footer-contact .foot-email { display: inline-flex; align-items: center; gap: 9px; margin-top: 4px; font-size: 13.5px; color: var(--gold-light); transition: color .3s var(--ease); }
.footer-contact .foot-email svg { width: 16px; height: 16px; flex: 0 0 auto; }
.footer-contact .foot-email:hover { color: #fff; }

/* Bottom bar */
.footer-bottom { border-top: 1px solid var(--hair-dark); margin-top: 4px; padding: 28px 0 38px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-copy { font-size: 12.5px; color: rgba(242,235,219,.72); }
.footer-copy > span { font-size: 12.5px; }
.footer-credit { letter-spacing: .02em; white-space: nowrap; }
.footer-credit::before { content: "·"; margin: 0 9px; color: rgba(242,235,219,.42); }
.footer-bottom .footer-credit .credit-name { color: var(--gold-light); font-weight: 500; transition: color .3s var(--ease); }
.footer-bottom .footer-credit .credit-name:hover { color: #fff; }
.footer-legal { display: flex; flex-wrap: wrap; align-items: center; }
.footer-legal a, .footer-legal button { position: relative; padding: 2px 16px; font-size: 12.5px; line-height: 1.4; color: rgba(242,235,219,.72); background: none; border: 0; cursor: pointer; font-family: inherit; letter-spacing: inherit; transition: color .3s var(--ease); }
.footer-legal > :first-child { padding-left: 0; }
.footer-legal > :last-child { padding-right: 0; }
.footer-legal > * + *::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 1px; height: 11px; background: var(--hair-dark); }
.footer-legal a:hover, .footer-legal button:hover { color: var(--gold-light); }

/* Tablet / mobile */
@media (max-width: 980px) {
  .site-footer { padding-top: 66px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 44px 36px; }
  .footer-brand, .footer-contact { grid-column: 1 / -1; }
  .footer-brand p { max-width: 520px; }
  .footer-contact { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 36px; align-items: start; }
  .footer-contact .footer-col-h, .footer-contact .foot-email { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .footer-top { gap: 38px 28px; }
  .footer-contact { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: center; text-align: center; gap: 18px; padding-bottom: 40px; }
  .footer-copy { align-items: center; }
  /* Legal links wrap on small screens — drop the dividers and space them evenly. */
  .footer-legal { justify-content: center; gap: 4px 6px; }
  .footer-legal a, .footer-legal button { padding: 4px 12px; }
  .footer-legal > * + *::before { display: none; }
}
@media (max-width: 520px) {
  /* Too narrow for one line — stack copyright + credit cleanly (no leading dot). */
  .footer-copy { display: flex; flex-direction: column; align-items: center; gap: 5px; }
  .footer-credit { white-space: normal; }
  .footer-credit::before { display: none; }
}
