/* RuLee visual system upgrade - shared across every public page */
:root {
  --upgrade-gold: #d4a84f;
  --upgrade-gold-soft: rgba(212, 168, 79, .18);
  --upgrade-glass: rgba(14, 18, 23, .72);
  --upgrade-ease: cubic-bezier(.22, 1, .36, 1);
}

html { scroll-behavior: smooth; }
body { isolation: isolate; }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at var(--pointer-x, 78%) var(--pointer-y, 12%), rgba(212,168,79,.075), transparent 28rem),
    linear-gradient(135deg, rgba(255,255,255,.018), transparent 42%);
}

.site-progress {
  position: fixed;
  inset: 0 auto auto 0;
  width: var(--scroll-progress, 0%);
  height: 3px;
  z-index: 9999;
  pointer-events: none;
  background: linear-gradient(90deg, #a97a27, #f0cf82, #d4a84f);
  box-shadow: 0 0 18px rgba(212,168,79,.55);
}

header {
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  background: var(--upgrade-glass) !important;
  border-bottom-color: rgba(255,255,255,.08) !important;
}

.hero { position: relative; overflow: clip; }
.hero::before {
  content: "";
  position: absolute;
  width: min(46vw, 640px);
  aspect-ratio: 1;
  right: -12%;
  top: -32%;
  border: 1px solid rgba(212,168,79,.14);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(212,168,79,.025), 0 0 0 140px rgba(212,168,79,.018);
  pointer-events: none;
  animation: rulee-orbit 18s linear infinite;
}

.h-display em, .h-section em {
  text-shadow: 0 0 38px rgba(212,168,79,.12);
}

.btn, .cta {
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
  transition: transform .35s var(--upgrade-ease), border-color .35s ease, color .35s ease, box-shadow .35s ease !important;
}
.btn::before, .cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 25%, rgba(255,255,255,.18), transparent 70%);
  transform: translateX(-130%);
  transition: transform .65s var(--upgrade-ease);
  pointer-events: none;
}
.btn:hover::before, .cta:hover::before { transform: translateX(130%); }
.btn:hover, .cta:hover { transform: translateY(-3px); box-shadow: 0 14px 38px rgba(0,0,0,.22); }

.svc, .project-card, figure {
  transform: translateZ(0);
  transition: transform .5s var(--upgrade-ease), border-color .4s ease, box-shadow .5s ease, background-color .4s ease !important;
}
.svc { position: relative; overflow: hidden; }
.svc::after {
  content: "";
  position: absolute;
  inset: auto -20% -70% 20%;
  height: 150%;
  background: radial-gradient(circle, var(--upgrade-gold-soft), transparent 68%);
  opacity: 0;
  transition: opacity .45s ease;
  pointer-events: none;
}
.svc:hover { transform: translateY(-8px); border-color: rgba(212,168,79,.42) !important; box-shadow: 0 28px 60px rgba(0,0,0,.25); }
.svc:hover::after { opacity: 1; }
.svc:hover .arrow, .svc:hover .svc-link { letter-spacing: .025em; }
figure:hover { transform: scale(1.012); }

.motion-ready [data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .8s var(--upgrade-ease), transform .8s var(--upgrade-ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.motion-ready [data-reveal].is-visible { opacity: 1; transform: none; }

.location-directory { padding-top: clamp(64px, 8vw, 108px); }
.directory-intro { max-width: 760px; margin-bottom: 42px; }
.county-directory { border-top: 1px solid rgba(255,255,255,.1); padding: 34px 0 14px; }
.county-directory summary {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  cursor: pointer;
  list-style: none;
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 38px);
  color: var(--text);
}
.county-directory summary::-webkit-details-marker { display: none; }
.county-directory summary::after { content: "+"; color: var(--upgrade-gold); font-family: var(--sans); font-weight: 300; }
.county-directory[open] summary::after { content: "−"; }
.county-count { font: 600 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--text-soft); }
.town-directory-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; padding: 28px 0 20px; }
.town-directory-card { padding: 19px; border: 1px solid rgba(255,255,255,.09); background: rgba(255,255,255,.022); }
.town-directory-card strong { display: block; color: var(--text); margin-bottom: 12px; }
.town-services { display: flex; flex-wrap: wrap; gap: 7px; }
.town-services a { color: var(--text-soft); font-size: 12px; border-bottom: 1px solid transparent; }
.town-services a:hover { color: var(--upgrade-gold); border-color: currentColor; }

.mobile-quote-bar { display: none; }
:focus-visible { outline: 2px solid var(--upgrade-gold) !important; outline-offset: 4px; }

@keyframes rulee-orbit { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .town-directory-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px) {
  body { padding-bottom: 68px; }
  /* Mobile-only hero order: show completed work immediately after the headline. */
  .hero .hero-grid {
    display: flex;
    flex-direction: column;
    gap: 28px;
  }
  .hero .hero-grid > div:first-child { display: contents; }
  .hero .hero-eyebrow { order: 1; margin-bottom: 0; }
  .hero .hero-grid > div:first-child h1 { order: 2; margin-bottom: 0; }
  .hero .hero-visual {
    order: 3;
    width: 100%;
    max-width: none;
    margin: 0;
    aspect-ratio: 4 / 3;
  }
  .hero .hero-pic:nth-of-type(1) { animation-delay: -1.4s; }
  .hero .hero-grid > div:first-child .lede { order: 4; margin-bottom: 0; }
  .hero .hero-ctas { order: 5; margin-bottom: 0; }
  .hero .hero-meta { order: 6; margin-top: 0; }
  .town-directory-grid { grid-template-columns: 1fr; }
  .mobile-quote-bar {
    position: fixed;
    z-index: 9000;
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    inset: auto 0 0;
    padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
    background: rgba(8,10,13,.94);
    border-top: 1px solid rgba(212,168,79,.28);
    backdrop-filter: blur(16px);
  }
  .mobile-quote-bar a { min-height: 44px; display: grid; place-items: center; font-size: 13px; font-weight: 700; letter-spacing: .04em; }
  .mobile-quote-bar .mobile-call { color: var(--text); }
  .mobile-quote-bar .mobile-quote { color: #0a0a0a; background: var(--upgrade-gold); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .motion-ready [data-reveal] { opacity: 1; transform: none; }
}
