/* Superior Painters & Decorators - shared styles */
:root { --brand: #1A8CEF; --navy: #0B1220; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--navy); }
::selection { background: #1A8CEF; color: #fff; }

.font-display { font-family: Outfit, ui-sans-serif, system-ui, sans-serif; }

/* Nav */
.nav-pill {
  background: rgba(11, 18, 32, 0.55);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 10px 40px -10px rgba(0,0,0,0.5);
  transition: background .3s ease, box-shadow .3s ease, transform .4s ease;
}
.nav-scrolled .nav-pill { background: rgba(11, 18, 32, 0.85); }
.nav-hidden #site-nav .nav-pill { transform: translateY(-140%); }
.nav-link { padding: .55rem .85rem; border-radius: 999px; color: rgba(255,255,255,.82); transition: color .2s, background .2s; }
.nav-link:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-dropdown {
  position: absolute; top: calc(100% + 12px); left: 0; min-width: 15rem; padding: .5rem;
  background: rgba(16, 26, 46, 0.96); border: 1px solid rgba(255,255,255,.1); border-radius: 1rem;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,.6);
  opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .2s, transform .2s;
}
.nav-dropdown::before { content: ""; position: absolute; left: 0; right: 0; top: -18px; height: 18px; }
.group:hover .nav-dropdown, .group:focus-within .nav-dropdown { opacity: 1; transform: translateY(0); pointer-events: auto; }
.nav-dropdown a { display: block; padding: .6rem .85rem; border-radius: .65rem; color: rgba(255,255,255,.85); font-size: .95rem; }
.nav-dropdown a:hover { background: rgba(255,255,255,.08); color: #fff; }
.mobile-link { padding: .6rem 0; border-bottom: 1px solid rgba(255,255,255,.08); }

/* Buttons */
.btn-primary, .btn-light, .btn-ghost, .btn-outline-light, .btn-dark {
  display: inline-flex; align-items: center; gap: .6rem; font-weight: 600; border-radius: 999px;
  padding: .8rem 1.4rem; min-height: 44px; cursor: pointer; transition: background .2s, color .2s, border-color .2s, box-shadow .2s;
  white-space: nowrap;
}
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 24px -8px rgba(26,140,239,.7); }
.btn-primary:hover { background: #157ad4; }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: #e9f3fd; }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: #172540; }
.btn-ghost { background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.18); }
.btn-ghost:hover { background: rgba(255,255,255,.14); }
.btn-outline-light { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.55); }
.btn-outline-light:hover { background: rgba(255,255,255,.12); }
.footer-link { transition: color .2s; }
.footer-link:hover { color: #fff; }

/* Glass */
.glass {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.18);
}
.glass input, .glass select, .glass textarea {
  width: 100%; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); color: #fff;
  border-radius: .85rem; padding: .85rem 1rem; font-size: 16px; min-height: 48px; transition: border-color .2s, background .2s;
}
.glass input::placeholder, .glass textarea::placeholder { color: rgba(255,255,255,.5); }
.glass input:focus, .glass select:focus, .glass textarea:focus { outline: none; border-color: #4BA6F5; background: rgba(255,255,255,.12); box-shadow: 0 0 0 3px rgba(26,140,239,.35); }
.glass select option { color: #0B1220; }
.glass label { font-size: .8rem; font-weight: 600; letter-spacing: .02em; color: rgba(255,255,255,.75); }

/* Light form variant */
.form-light input, .form-light select, .form-light textarea {
  width: 100%; background: #fff; border: 1px solid #d9d6cf; color: #0F172A;
  border-radius: .85rem; padding: .85rem 1rem; font-size: 16px; min-height: 48px; transition: border-color .2s, box-shadow .2s;
}
.form-light input:focus, .form-light select:focus, .form-light textarea:focus { outline: none; border-color: #1A8CEF; box-shadow: 0 0 0 3px rgba(26,140,239,.25); }
.form-light label { font-size: .8rem; font-weight: 600; color: #475569; }

/* Focus */
a:focus-visible, button:focus-visible { outline: 2px solid #4BA6F5; outline-offset: 3px; border-radius: 999px; }

/* Hero */
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-wash { background: radial-gradient(120% 90% at 30% 40%, rgba(11,18,32,.25) 0%, rgba(11,18,32,.7) 60%, rgba(11,18,32,.95) 100%); }
.grain::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .08; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Reveal defaults (GSAP sets final state; keep content visible if JS fails) */
.reveal { opacity: 1; }
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* Hero intro (CSS keyframes so it never depends on JS timers) */
.js [data-hero-line], .js [data-hero-sub], .js [data-hero-form] { opacity: 0; }
.js.hero-ready [data-hero-line] { animation: heroUp 1.1s cubic-bezier(.2,.7,.2,1) .15s both; }
.js.hero-ready [data-hero-sub] { animation: heroUp .9s cubic-bezier(.2,.7,.2,1) .55s both; }
.js.hero-ready [data-hero-sub] + [data-hero-sub] { animation-delay: .7s; }
.js.hero-ready [data-hero-form] { animation: heroUp 1.1s cubic-bezier(.2,.7,.2,1) .45s both; }
@keyframes heroUp { from { opacity: 0; transform: translateY(34px); } to { opacity: 1; transform: none; } }

/* Marquee */
.marquee { display: flex; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; flex-shrink: 0; gap: 0; animation: marquee var(--speed, 40s) linear infinite; will-change: transform; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* Horizontal accordion */
.h-accordion { display: flex; gap: .5rem; }
.h-accordion .slice { flex: 1 1 0; min-width: 0; transition: flex .6s cubic-bezier(.2,.8,.2,1); cursor: pointer; position: relative; overflow: hidden; border-radius: 1.25rem; }
.h-accordion .slice.active { flex: 4 1 0; }
.h-accordion .slice img { transition: transform .9s ease-out; }
.h-accordion .slice.active img, .h-accordion .slice:hover img { transform: scale(1.05); }
.h-accordion .slice .body { opacity: 0; transform: translateY(12px); transition: opacity .4s .15s, transform .4s .15s; }
.h-accordion .slice.active .body { opacity: 1; transform: none; }
.h-accordion .slice .vtitle { transition: opacity .3s; }
.h-accordion .slice.active .vtitle { opacity: 0; }
@media (max-width: 767px) {
  .h-accordion { flex-direction: column; }
  .h-accordion .slice { flex: none !important; min-height: 15rem; }
  .h-accordion .slice .body { opacity: 1; transform: none; }
  .h-accordion .slice .vtitle { display: none; }
}

/* Review rail */
.review-rail { scrollbar-width: none; }
.review-rail::-webkit-scrollbar { display: none; }

/* Stack cards */
.stack-card { position: sticky; top: 7rem; }

/* Scrub text */
.scrub-text .word { opacity: .12; transition: none; }

/* Accent rules */
.rule { width: 4rem; height: 3px; background: var(--brand); border-radius: 2px; }

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .js .reveal { opacity: 1; transform: none; }
  .scrub-text .word { opacity: 1; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
