/* =====================================================================
   Polish pass: motion in the style of Emil Kowalski + Impeccable rules
   - Quick, ease-out motion (150–300ms UI, ~500ms reveals); nothing bounces
   - Things press, lift and settle; nothing scales from zero
   - Hover effects only on devices that can hover
   - Balanced headings, readable line lengths, steady rhythm
   - Everything respects "reduce motion"
   ===================================================================== */
:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --dur-fast: 160ms; --dur: 240ms; --dur-slow: 520ms;
}

/* Typography (Impeccable: balance headings, pretty paragraphs, comfortable measure) */
h1, h2, h3, .hero h1 { text-wrap: balance; }
p, li, figcaption, .lede { text-wrap: pretty; }
.section-intro p, .split p, .page-sub { max-width: 62ch; }
.num, .price-tag, .summary .line span:last-child, .stat-item b { font-variant-numeric: tabular-nums; }

/* Buttons and pressable things: quick press, gentle lift */
.btn, .slot, .cal-day, .toggle button, .ctab, .chip-grid label, .play-btn, .sound-btn, .menu-btn, .nav-drop-btn {
  transition: transform var(--dur-fast) var(--ease-out), background-color var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), opacity var(--dur) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.btn:active, .slot:active, .cal-day:active:not(:disabled), .toggle button:active, .ctab:active, .play-btn:active, .sound-btn:active, .chip-grid label:active { transform: scale(0.97); }
.btn:disabled { transform: none; }

.num-card, .guide-photo-card, .other-card, .contact-card, .photo, .reel, .area, .service-card {
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .num-card:hover, .other-card:hover, .guide-photo-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(46,46,46,.08); }
  .photo:hover img { transform: scale(1.025); }
  .nav-links a:hover, .nav-drop-btn:hover { color: var(--ink); }
}
@media (hover: none) { a.num-card:hover, .other-card:hover { transform: none; } }
.photo img { transition: transform 700ms var(--ease-out), opacity var(--dur-slow) var(--ease-out); }

/* Images settle in instead of popping */
.photo img[data-loading] { opacity: 0; }

/* Scroll reveal: soft rise with a touch of blur, staggered, once */
[data-reveal] { opacity: 0; transform: translateY(10px); filter: blur(4px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out), filter var(--dur-slow) var(--ease-out);
  transition-delay: calc(var(--i, 0) * 60ms); }
[data-reveal].is-in { opacity: 1; transform: none; filter: none; }

/* Page changes fade in */
[data-page]:not(.hidden) { animation: page-in 300ms var(--ease-out); }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Booking steps cross-fade */
#step-1:not(.hidden), #step-2:not(.hidden), #step-3:not(.hidden), #step-4:not(.hidden) { animation: step-in 260ms var(--ease-out); }
@keyframes step-in { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }
.steps li { transition: color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out); }

/* Dropdown grows from its button, never from nothing */
.nav-drop-menu { transform-origin: top left; }
.nav-drop.open .nav-drop-menu { animation: pop-in 160ms var(--ease-out); }
@keyframes pop-in { from { opacity: 0; transform: scale(0.96) translateY(-4px); } to { opacity: 1; transform: none; } }
.nav-links.open { animation: menu-in 220ms var(--ease-out); }
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* Dialogs and drawers */
dialog[open] { animation: dialog-in 240ms var(--ease-out); }
dialog[open]::backdrop { animation: fade-in 240ms var(--ease-out); }
dialog.is-closing { animation: dialog-out 160ms var(--ease-in-out) forwards; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes dialog-out { to { opacity: 0; transform: translateY(6px) scale(0.98); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Form fields: calm focus */
.field input, .field select, .field textarea, .pc-row input { transition: border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out); }

/* Details/FAQ: smooth open */
details[open] > *:not(summary) { animation: fade-in 260ms var(--ease-out); }
details > summary::after { transition: transform var(--dur) var(--ease-out); }

/* Price updates: brief highlight */
.flash { animation: flash 600ms var(--ease-out); }
@keyframes flash { from { color: var(--blue); } to { color: inherit; } }

/* Tap targets (Impeccable: at least 44px) */
.nav-links a, .nav-drop-btn { min-height: 44px; display: inline-flex; align-items: center; }
.nav-links { align-items: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; filter: none; }
}

/* =====================================================================
   Taste Skill (redesign audit) fixes, within the CSC brand guide
   ===================================================================== */
/* Tinted shadows instead of grey; one light direction */
:root { --shadow-sm: 0 1px 2px rgba(23,52,105,.06), 0 4px 14px rgba(23,52,105,.05); --shadow-md: 0 2px 6px rgba(23,52,105,.06), 0 16px 40px rgba(23,52,105,.09); }
@media (hover: hover) and (pointer: fine) {
  .num-card:hover, .other-card:hover, .guide-photo-card:hover { box-shadow: var(--shadow-md); }
}
.reel, .map-frame, .panel { box-shadow: var(--shadow-sm); }

/* Subtle grain so flat sections don't feel sterile */
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 200; opacity: .035; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* Mobile-safe full-height hero; optical padding (a little more below than above) */
.hero { min-height: min(88dvh, 780px); }
.section { padding: 96px 0 112px; }
@media (max-width: 640px) { .section { padding: 64px 0 76px; } }

/* What we do: asymmetric bento instead of three equal cards */
.bento { display: grid; grid-template-columns: 1.35fr 1fr; grid-template-rows: auto auto; gap: 16px; }
.bento-main { grid-row: span 2; padding: 0; overflow: hidden; }
.bento-main .bento-photo { border-radius: 0; aspect-ratio: 16 / 9; }
.bento-body { padding: 26px 28px 28px; display: flex; flex-direction: column; flex: 1; }
.bento-body p { flex: 1; }
@media (max-width: 820px) { .bento { grid-template-columns: 1fr; } .bento-main { grid-row: auto; } }

/* Vetted cleaners: brand-tinted light section instead of a lone dark block */
.section--tint { background: linear-gradient(180deg, #EEF5FF 0%, #F2FAF6 100%); }
.section--tint .eyebrow { color: var(--ink-soft); }
.checklist--card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 6px 22px; box-shadow: var(--shadow-sm); }
.checklist--card li { border-color: var(--line); }

/* Varied radius: tighter inside, softer outside */
.num-card .photo, .guide-photo-card .photo { border-radius: 0; }
.chip-grid label, .slot { border-radius: 12px; }

/* Skip link for keyboard users */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 300; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 12px; }

/* =====================================================================
   AnimatedWebs-inspired hero (directions from the AnimatedWebs generator,
   rebuilt cleanly for CSC): word-by-word headline, one shine pass,
   soft soap-bubble layer over the video, shine on the main button
   ===================================================================== */
.hero-bubbles { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; opacity: .9; }
.hero h1 { position: relative; }
.hero h1 .w { display: inline-block; opacity: 0; transform: translateY(14px); filter: blur(5px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out), filter 600ms var(--ease-out); transition-delay: calc(var(--wi) * 70ms + 150ms); }
.hero h1.words-in .w { opacity: 1; transform: none; filter: none; }
.hero h1::after { content: ""; position: absolute; inset: -6% -4%; pointer-events: none; opacity: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.28) 50%, transparent 65%); background-size: 250% 100%; background-position: 120% 0; mix-blend-mode: soft-light; }
.hero h1.shine::after { opacity: 1; animation: h1-shine 1400ms var(--ease-out) forwards; }
@keyframes h1-shine { from { background-position: 120% 0; } to { background-position: -40% 0; opacity: 0; } }
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform: translateX(-120%); }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover::after { transform: translateX(120%); transition: transform 700ms var(--ease-out); }
}
@media (prefers-reduced-motion: reduce) {
  .hero h1 .w { opacity: 1; transform: none; filter: none; }
  .hero h1::after, .btn-primary::after, .hero-bubbles { display: none; }
}

/* =====================================================================
   Home page motion pass (ideas from the AnimatedWebs generator, rebuilt for CSC)
   ===================================================================== */
/* Service cards: gentle 3D tilt + a soft spotlight that follows the mouse */
@media (hover: hover) and (pointer: fine) {
  .num-card { position: relative; transform-style: preserve-3d; will-change: transform; }
  .num-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
    background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(58,134,255,.12), transparent 70%);
    transition: opacity 240ms var(--ease-out); }
  .num-card:hover::before { opacity: 1; }
  .gallery .photo img, .photo-pair .photo img { transition: transform 700ms var(--ease-out); }
}
/* Checklist ticks draw in one after another */
.checklist li svg path { stroke-dasharray: 24; stroke-dashoffset: 0; }
[data-reveal]:not(.is-in) .checklist li svg path, .checklist[data-reveal]:not(.is-in) li svg path, li[data-reveal]:not(.is-in) svg path { stroke-dashoffset: 24; }
.checklist li svg path { transition: stroke-dashoffset 500ms var(--ease-out) calc(var(--i, 0) * 70ms + 200ms); }
/* FAQ answers slide open */
.faq details > p { overflow: hidden; }
.faq details.anim-open > p { animation: faq-open 300ms var(--ease-out); }
@keyframes faq-open { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
/* Call-to-action band: slow blue-to-green drift */
.cta-band { background: linear-gradient(120deg, #3A86FF, #2FA6D8, #45C48C, #3A86FF); background-size: 300% 300%; animation: cta-drift 18s ease-in-out infinite; }
@keyframes cta-drift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@media (prefers-reduced-motion: reduce) { .cta-band { animation: none; background: #3A86FF; } .checklist li svg path { stroke-dashoffset: 0 !important; } }
/* Header button must never shrink (its shine effect clips overflow) */
.btn.header-cta { flex-shrink: 0; white-space: nowrap; }
.site-header .container { gap: 18px; }
@media (max-width: 1500px) { .header-slogan { display: none !important; } }
/* Phones: keep the Booking button visible next to Menu */
@media (max-width: 1120px) { .btn.header-cta { display: inline-flex !important; } }
@media (max-width: 520px) {
  .btn.header-cta { padding: 8px 14px; min-height: 40px; font-size: 14px; }
  .site-header .container { gap: 10px; }
  .brand .logo { height: 36px; }
  .menu-btn { padding: 8px 10px; }
}
.site-header .container > .menu-btn { order: 3; }
.site-header .container > .header-cta { order: 2; }
.site-header .container > .nav-links { order: 1; }
@media (min-width: 1121px) { .site-header .container > .header-cta { order: 4; } }
@media (max-width: 380px) { .site-header .container { padding-left: 14px; padding-right: 14px; gap: 8px; } .btn.header-cta { padding: 8px 12px; } }
.split > *, .faq-grid > *, .biz-grid > * { min-width: 0; }
@media (max-width: 340px) { .btn.header-cta { display: none !important; } }
.stat-row > * { min-width: 0; } @media (max-width: 380px) { .stat-item { gap: 10px; padding: 16px 10px !important; } .stat-item b { font-size: 22px; } .stat-item span { font-size: 13.5px; } .stat-item small { font-size: 12px; } }
.hero-subslogan { margin: 0 0 16px !important; }
/* Real map */
.real-map { width: 100%; height: 520px; border-radius: 16px; overflow: hidden; background: #E9EEF3; }
.real-map .town-label { background: rgba(255,255,255,.9); border: 0; box-shadow: none; font: 600 11px Montserrat, Arial, sans-serif; color: #2E2E2E; padding: 1px 5px; border-radius: 6px; }
.real-map .leaflet-tooltip-left, .real-map .leaflet-tooltip-right { }
@media (max-width: 640px) { .real-map { height: 380px; } }

.map-note { position: absolute; left: 12px; right: 12px; top: 12px; z-index: 500; background: #fff; border-radius: 12px; padding: 10px 14px; font-size: 14px; font-weight: 600; box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.real-map { position: relative; }

.map-img { margin: 0; }
.map-img img { display: block; width: 100%; height: auto; border-radius: 16px; }
.map-img figcaption { font-size: 12px; color: #5B6169; margin-top: 8px; }
.map-img figcaption a { color: inherit; }

.split--map { grid-template-columns: 1fr; max-width: 720px; }
