/* =========================================================
   Visual polish — Oct 26
   Loaded LAST on every page, after the page CSS. Same brand colours,
   fonts and layouts as the approved design; only finish and motion.
   Delete this file + assets/js/polish.js to return to the previous look.
   Sections: 1 tokens · 2 motion · 3 headings · 4 buttons · 5 cards
             6 forms & chips · 7 page heroes · 8 CTA band · 9 footer
   ========================================================= */

/* ---------- 1. Extra tokens ---------- */
:root {
  --section-y: clamp(3.5rem, 2.4rem + 4.4vw, 6.5rem);
  --fs-xl: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem);
  --radius-card: 18px;
  --shadow-card: 0 1px 2px rgba(14, 30, 125, .06), 0 8px 24px -6px rgba(14, 30, 125, .12);
  --shadow-card-hover: 0 2px 4px rgba(14, 30, 125, .06), 0 22px 44px -12px rgba(14, 30, 125, .28);
  --c-green-light: #B9D98A;          /* green accent on navy (contrast ≥ 7:1) */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --glow-blue: rgba(73, 90, 192, .55);
  --glow-green: rgba(120, 166, 70, .28);
}

/* ---------- 2. Motion ---------- */
/* Scroll reveal (polish.js adds .reveal, then .is-in when on screen) */
/* One-time animation (not a transition) so hover effects stay instant */
.has-reveal .reveal:not(.is-in) { opacity: 0; }
.has-reveal .reveal.is-in { animation: reveal-up .75s var(--ease-out) var(--reveal-delay, 0ms) backwards; }
@keyframes reveal-up { from { opacity: 0; transform: translateY(18px); } }

/* Home + page hero text eases in on load */
@media (prefers-reduced-motion: no-preference) {
  .hero__content > *, .page-hero__content > *, .page-head > * {
    animation: rise-in .8s var(--ease-out) backwards;
  }
  .hero__content > :nth-child(2), .page-hero__content > :nth-child(2), .page-head > :nth-child(2) { animation-delay: .1s; }
  .hero__content > :nth-child(3), .page-hero__content > :nth-child(3), .page-head > :nth-child(3) { animation-delay: .2s; }
}
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } }

/* Header: slimmer (height = --header-h in tokens.css: 64px, 68px desktop) */
.header-pill { padding-block: 6px; }
.brand { font-size: 1.2rem; }
.brand__logo { height: 34px; }
.header-pill .header-cta { min-height: 42px; padding-inline: 1.35rem; }
.nav-toggle { width: 42px; height: 42px; }
@media (max-width: 399px) { .brand { font-size: 1.05rem; } .brand__logo { height: 30px; } }
@media (max-width: 339px) { .brand { font-size: .875rem; } .brand__logo { height: 28px; } }

/* Header states (polish.js):
   .is-scrolled  = page moved → stronger shadow
   .is-over-hero = pill sits on the photo/video hero → frosted glass,
                   turns solid white again once you scroll past the hero */
.header-pill {
  transition: background-color .35s var(--ease), box-shadow .35s var(--ease),
              -webkit-backdrop-filter .35s var(--ease), backdrop-filter .35s var(--ease);
}
.site-header.is-scrolled .header-pill { box-shadow: 0 10px 30px -8px rgba(8, 18, 79, .28), 0 0 0 1px rgba(14, 30, 125, .05); }
.site-header.is-over-hero .header-pill {
  background: rgba(255, 255, 255, .95);   /* fallback: browsers without blur */
  box-shadow: 0 10px 34px -14px rgba(4, 8, 40, .55), inset 0 0 0 1px rgba(255, 255, 255, .6);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header.is-over-hero .header-pill {
    background: rgba(255, 255, 255, .76);
    -webkit-backdrop-filter: blur(18px) saturate(170%);
            backdrop-filter: blur(18px) saturate(170%);
  }
}
/* Home: the header's Get Started hides while the hero's own Get Started is on
   screen (one main action per screen), then fades in once you scroll past it.
   visibility:hidden keeps its space (menu stays centred) and takes it out of
   the Tab order. Without JS it simply stays visible. */
.header-pill .header-cta {
  transition: opacity .3s var(--ease), transform .3s var(--ease-out), visibility 0s,
              background-color var(--dur) var(--ease), box-shadow .25s var(--ease);
}
.site-header.cta-in-hero .header-pill .header-cta {
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(-4px) scale(.96);
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s linear .25s;
}

/* Windows "reduce transparency" / high contrast: always solid */
@media (prefers-reduced-transparency: reduce), (forced-colors: active) {
  .site-header.is-over-hero .header-pill { background: var(--c-white); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.nav-link { transition: color var(--dur) var(--ease); }
.nav-link:hover { color: var(--c-green-700); }

/* ---------- 3. Section headings ---------- */
h1, h2 { letter-spacing: -0.015em; }
.section__head { margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.25rem); }
.section__head p { font-size: var(--fs-md); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  margin: 0 0 var(--sp-3);
  font-family: var(--font-heading); font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--c-green-700);
}
.eyebrow::before {
  content: ""; width: 28px; height: 2px; border-radius: 2px;
  background: currentColor;
}
.section__head .eyebrow { justify-content: center; }
.section--navy .eyebrow, .clients .eyebrow { color: var(--c-green-light); }
.clients .container { text-align: center; }
.eyebrow-group { min-width: 0; }
.gallery-head { align-items: flex-end; }
.eyebrow-group .eyebrow { display: flex; }
/* Titles that sit left (Services list, Gallery grid, Review form): eyebrow stays left */
.services-top .eyebrow, .gallery-head .eyebrow, .story .eyebrow { justify-content: flex-start; }

/* ---------- 4. Buttons (pill shape, like the header's Get Started) ---------- */
.btn {
  border-radius: var(--radius-pill);
  padding-inline: 1.5rem;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
}
.btn--primary { box-shadow: 0 6px 16px -6px rgba(92, 134, 8, .55); }
@media (hover: hover) {
  .btn:hover { transform: translateY(-1px); }
  .btn--primary:hover { box-shadow: 0 10px 22px -8px rgba(92, 134, 8, .7); }
}
.btn:active { transform: translateY(0); box-shadow: none; }
.btn--outline-light { backdrop-filter: blur(4px); background: rgba(255, 255, 255, .06); }

.link-arrow::after { content: "\2192"; display: inline-block; margin-left: .35em; transition: transform .25s var(--ease-out); }
.link-arrow:hover::after { transform: translateX(4px); }
.link-arrow:hover { text-decoration: none; }

/* ---------- 5. Cards ---------- */
.card, .service-row, .package-card, .process__step, .mv-card, .map-card,
.side-card, .booking-form, .acc, .job-card {
  border-radius: var(--radius-card);
}
.card, .service-row, .package-card, .process__step, .mv-card, .map-card {
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(14, 30, 125, .06);
}
.card__media { border-radius: var(--radius-card) var(--radius-card) 0 0; }
.card, .package-card, .process__step, .mv-card, .service-row {
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out);
}
/* Photo zoom inside cards */
.card__media img, .card__media .ph, .service-row__media img, .service-row__media .ph {
  transition: transform .6s var(--ease-out);
}
.service-row__media { overflow: hidden; }
@media (hover: hover) {
  .card:hover, .package-card:hover, .process__step:hover, .mv-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
  }
  .service-row:hover { box-shadow: var(--shadow-card-hover); }
  .card:hover .card__media img, .card:hover .card__media .ph,
  .service-row:hover .service-row__media img, .service-row:hover .service-row__media .ph { transform: scale(1.05); }
}
.card__body { padding: var(--sp-5) var(--sp-5) var(--sp-6); }
.card__title { font-size: var(--fs-lg); }

/* Testimonials: soft quote mark */
.testimonial-card { position: relative; padding: var(--sp-6) var(--sp-5) var(--sp-5); }
.testimonial-card::before {
  content: "\201C";
  position: absolute; top: .25rem; right: 1.1rem;
  font-family: Georgia, "Times New Roman", serif; font-size: 5rem; line-height: 1;
  color: var(--c-green); opacity: .14; pointer-events: none;
}
.testimonial-card__text p { font-size: var(--fs-md); line-height: 1.55; }

/* Gallery tiles: zoom + soft shade on hover */
.gallery-card img, .gallery-card .ph { transition: transform .6s var(--ease-out), filter .3s var(--ease); }
.gallery-card__btn, .gallery-card > img, .gallery-card > .ph { overflow: hidden; border-radius: var(--radius); }
.gallery-card img, .gallery-card .ph { border-radius: var(--radius); }
.gallery-card__btn { display: block; overflow: hidden; }
@media (hover: hover) {
  .gallery-card__btn:hover img, .gallery-card__btn:hover .ph { transform: scale(1.04); filter: brightness(1.04); }
}

/* Stats: thin dividers on wider screens */
.stat__value { letter-spacing: -0.02em; }
@media (min-width: 768px) {
  .stats:not(.stats--2) .stat + .stat { border-left: 1px solid var(--c-border); }
}

/* Client logos: soft ring */
.client-logo { box-shadow: 0 0 0 4px rgba(255, 255, 255, .12), 0 8px 20px -8px rgba(0, 0, 0, .4); }

/* Services page rows + packages */
.service-row__body h3 { font-size: clamp(1.35rem, 1.1rem + .8vw, 1.75rem); }
.service-row__tags li { background: var(--c-green-050); color: var(--c-green-700); }
.package-card { position: relative; overflow: hidden; border-top: 1px solid rgba(14, 30, 125, .06); padding-top: calc(var(--sp-5) + 4px); }
.package-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, var(--c-navy), var(--c-brand-blueberry));
}
.package-card__quote {
  align-self: flex-start;
  background: var(--c-green-050); padding: 2px 12px; border-radius: var(--radius-pill);
}

/* Careers: numbered steps + jobs */
.process__num { background: linear-gradient(135deg, var(--c-navy), var(--c-brand-blueberry)); box-shadow: 0 6px 14px -6px rgba(14, 30, 125, .6); }
.job-card { border-top-width: 4px; }

/* About: mission / vision */
.mv-card { border-left: 0; position: relative; overflow: hidden; }
.mv-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
  background: linear-gradient(180deg, var(--c-green), var(--c-brand-eleven));
}
.stats--2 { background: linear-gradient(135deg, var(--c-navy-050), #E8EBF8); }

/* Accordions */
.acc { transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.acc__q { border-radius: var(--radius-card); transition: color var(--dur) var(--ease); }
.acc__q:hover { color: var(--c-green-700); }
.acc[open] { box-shadow: var(--shadow-card); border-color: rgba(14, 30, 125, .14); }

/* Side cards + booking form */
.side-card { box-shadow: var(--shadow-sm); }
.booking-form { box-shadow: var(--shadow-card); }

/* ---------- 6. Forms & chips ---------- */
.input, .select, .textarea { border-radius: 10px; }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { border-radius: 10px; }
.chip { transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease); }
.chip:hover { background: var(--c-navy-050); }
.chip[aria-pressed="true"] { box-shadow: 0 6px 14px -8px rgba(14, 30, 125, .7); }
.chip[aria-pressed="true"]:hover { background: var(--c-navy); }

/* ---------- 7. Page heroes (Services, Gallery, About, Careers) ---------- */
.page-hero__overlay {
  background:
    radial-gradient(60% 90% at 88% 10%, var(--glow-blue), transparent 70%),
    radial-gradient(45% 70% at 0% 100%, var(--glow-green), transparent 70%),
    linear-gradient(180deg, rgba(8, 18, 79, .30) 0%, rgba(8, 18, 79, .88) 100%);
}
/* Faint dot texture over the placeholder/video */
.page-hero__overlay::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%);
          mask-image: linear-gradient(180deg, #000, transparent 85%);
}
.page-hero h1 { position: relative; padding-bottom: var(--sp-4); margin-bottom: var(--sp-4); }
.page-hero h1::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 64px; height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--c-green), var(--c-brand-eleven));
}
.hero__title { text-shadow: 0 2px 24px rgba(8, 18, 79, .4); }

/* Pages without a photo hero (Booking, Inquiry, FAQs, Reviews, Job): soft brand glow at the top */
body:not([data-hero="overlay"]) main {
  background:
    radial-gradient(900px 340px at 85% -80px, rgba(73, 90, 192, .12), transparent 70%),
    radial-gradient(700px 300px at -5% -60px, rgba(120, 166, 70, .10), transparent 70%);
  background-repeat: no-repeat;
}

/* ---------- 8. Final call-to-action band ---------- */
.final-cta {
  position: relative; isolation: isolate; overflow: hidden;
  background:
    radial-gradient(55% 120% at 100% 0%, var(--glow-blue), transparent 70%),
    radial-gradient(40% 90% at 0% 100%, var(--glow-green), transparent 70%),
    var(--c-navy);
}
.final-cta::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(70% 90% at 50% 50%, #000, transparent);
          mask-image: radial-gradient(70% 90% at 50% 50%, #000, transparent);
}
.final-cta h2 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem); max-width: 22ch; margin-inline: auto; }
.final-cta p { font-size: var(--fs-md); }
.final-cta .btn { min-height: 52px; padding-inline: 2rem; font-size: var(--fs-base); }

/* ---------- 9. Footer (navy) ---------- */
.site-footer {
  background: var(--c-navy-900);
  border-top: 0;
  color: rgba(255, 255, 255, .72);
  padding-block: clamp(3rem, 2.4rem + 2vw, 4.5rem) var(--sp-5);
}
.footer-title {
  color: var(--c-white); font-family: var(--font-heading);
  font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase;
}
.site-footer strong, .footer-branch-link strong { color: var(--c-white); }
.site-footer a { color: rgba(255, 255, 255, .88); }
.site-footer a:hover { color: var(--c-green-light); }
.footer-branch-link .footer-branch__addr,
.footer-entry__value a, .footer-hours li { color: rgba(255, 255, 255, .72); }
.footer-entry__value a:hover { color: var(--c-green-light); }
.footer-branch-link:hover strong, .footer-branch-link:hover .footer-branch__addr { color: var(--c-green-light); }
.footer-icon { color: var(--c-green-light); }
.social-link { border-color: rgba(255, 255, 255, .22); color: var(--c-white) !important; transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.social-link:hover { background: rgba(255, 255, 255, .08); border-color: var(--c-green-light); }
.footer-bottom { border-top-color: rgba(255, 255, 255, .12); }
.footer-copy { color: rgba(255, 255, 255, .55); }
.site-footer .muted { color: rgba(255, 255, 255, .55); }
.site-footer :focus-visible { box-shadow: 0 0 0 3px var(--c-navy-900), 0 0 0 5px var(--c-green-light); }

/* ---------- Hero pause / play (moving photos; WCAG 2.2.2) ---------- */
.hero-pause {
  position: absolute; right: var(--gutter); bottom: var(--sp-5); z-index: 2;
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, .35); border-radius: 50%;
  background: rgba(8, 18, 79, .45); color: var(--c-white);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: .75; transition: opacity var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.hero-pause:hover, .hero-pause:focus-visible { opacity: 1; background: rgba(8, 18, 79, .7); }
.hero-pause svg { width: 18px; height: 18px; }
.hero-pause span {          /* label is for screen readers; the icon is the visual */
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
/* Device set to reduce motion: photos are already still, so no button needed */
@media (prefers-reduced-motion: reduce) { .hero-pause { display: none; } }
