/* Rowe's Masonry Backyard and Creations — public site styles */
:root{
  --ink:#0E120F; --forest:#14301F; --moss:#1F4D33; --sage:#8FAE85;
  --gold:#C9A24A; --gold-deep:#8C6B24; --sand:#EDE3D4; --cream:#FAF7F2;
}
html{ -webkit-text-size-adjust:100%; scroll-padding-top:40px; }
body{
  font-family:'Inter',system-ui,sans-serif;
  background:var(--cream);
  color:#1A211C;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
}
.font-display{ font-family:'Fraunces',Georgia,serif; font-variation-settings:'SOFT' 0,'WONK' 0; letter-spacing:-.02em; }

/* ---------- Reveal on scroll ---------- */
.reveal{ opacity:0; transform:translateY(26px); transition:opacity .9s cubic-bezier(.16,1,.3,1), transform .9s cubic-bezier(.16,1,.3,1); }
.reveal.in{ opacity:1; transform:none; }
@media (prefers-reduced-motion: reduce){
  .reveal{ opacity:1; transform:none; transition:none; }
}

/* ---------- Nav ---------- */
.nav-shell{ transition:background-color .45s ease, box-shadow .45s ease, backdrop-filter .45s ease; }
.nav-link{ color:rgba(255,255,255,.82); position:relative; white-space:nowrap; }
.nav-link::after{
  content:''; position:absolute; left:0; bottom:-6px; height:1px; width:0;
  background:currentColor; transition:width .35s cubic-bezier(.16,1,.3,1);
}
.nav-link:hover::after{ width:100%; }
.nav-link:hover{ color:#fff; }
.nav-scrolled{ background:rgba(250,247,242,.86); backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px); box-shadow:0 1px 0 rgba(14,18,15,.08), 0 12px 40px -24px rgba(14,18,15,.35); }
.nav-scrolled .nav-link{ color:rgba(14,18,15,.70); }
.nav-scrolled .nav-link:hover{ color:var(--forest); }
.nav-scrolled .brand-name{ color:var(--ink); }
.nav-scrolled .brand-mark{ color:var(--moss); }
.nav-scrolled .nav-phone{ color:var(--ink); }
.brand-name{ color:#fff; transition:color .4s ease; }
.brand-mark{ color:var(--sand); transition:color .4s ease; }
.nav-phone{ color:#fff; transition:color .4s ease; white-space:nowrap; }

/* ---------- Mobile menu ---------- */
/* visibility (not just the transform) so a closed menu is never focusable.
   Opening flips it instantly (so the first link can take focus straight away);
   closing delays it until the slide-out has finished. */
#mobileMenu{
  transform:translateX(100%); visibility:hidden;
  transition:transform .55s cubic-bezier(.16,1,.3,1), visibility 0s linear .55s;
}
#mobileMenu.open{
  transform:translateX(0); visibility:visible;
  transition:transform .55s cubic-bezier(.16,1,.3,1), visibility 0s;
}
body.no-scroll{ overflow:hidden; }

/* ---------- Hero slider ---------- */
.hero-slide{ position:absolute; inset:0; margin:0; overflow:hidden; opacity:0; transition:opacity 1.2s ease; }
.hero-slide.is-active{ opacity:1; z-index:1; }
.hero-slide.is-leaving{ z-index:0; }
.hero-slide img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; will-change:transform; }
.hero-slide.is-active img, .hero-slide.is-leaving img{ animation:heroZoom 9s ease-out forwards; }
.hero-slide.is-leaving img{ animation-play-state:paused; }
#top.is-paused .hero-slide img{ animation-play-state:paused; }
@keyframes heroZoom{ from{ transform:scale(1.12); } to{ transform:scale(1); } }

.hero-bar{ position:relative; flex:1; height:24px; cursor:pointer; }
.hero-bar::before{ content:''; position:absolute; inset:auto 0; top:50%; height:3px; margin-top:-1.5px; border-radius:9999px; background:rgba(255,255,255,.22); transition:background-color .3s ease; }
.hero-bar:hover::before{ background:rgba(255,255,255,.4); }
.hero-bar i{ position:absolute; left:0; top:50%; height:3px; margin-top:-1.5px; width:0; border-radius:9999px; background:var(--gold); }
.hero-bar.is-active i{ animation:heroFill var(--hero-dur,6.5s) linear forwards; }
#top.is-paused .hero-bar.is-active i{ animation-play-state:paused; }
@keyframes heroFill{ from{ width:0; } to{ width:100%; } }

@media (prefers-reduced-motion: reduce){
  .hero-slide{ transition-duration:.4s; }
  .hero-slide.is-active img, .hero-slide.is-leaving img{ animation:none; }
}

/* ---------- Before / After ---------- */
.ba-top{ clip-path: inset(0 calc(100% - var(--pos,50%)) 0 0); }
.ba-handle{ left: var(--pos,50%); }
.ba-wrap{ cursor:ew-resize; touch-action:none; }

/* ---------- Hide scrollbar ---------- */
.no-sb{ -ms-overflow-style:none; scrollbar-width:none; }
.no-sb::-webkit-scrollbar{ display:none; }

/* ---------- Gallery tiles ---------- */
.tile img{ transition:transform 1.1s cubic-bezier(.16,1,.3,1); }
.tile:hover img{ transform:scale(1.07); }
.tile .veil{ transition:opacity .5s ease; }
.tile:hover .veil{ opacity:1; }

/* ---------- Gallery hotspots ---------- */
.spots{ position:absolute; inset:0; z-index:5; pointer-events:none; transition:transform 1.1s cubic-bezier(.16,1,.3,1); }
.tile:hover .spots{ transform:scale(1.07); }
.spot{
  position:absolute; left:0; top:0; width:28px; height:28px; margin:-14px 0 0 -14px;
  border-radius:9999px; cursor:help; pointer-events:auto;
  opacity:0; transform:scale(.4);
  transition:opacity .35s ease, transform .45s cubic-bezier(.16,1,.3,1);
  transition-delay:var(--d,0s);
}
.spot::before{ content:''; position:absolute; inset:0; border-radius:9999px; background:rgba(250,247,242,.45); animation:spotPulse 2s ease-out infinite; }
.spot::after{
  content:''; position:absolute; inset:8px; border-radius:9999px; background:#fff;
  box-shadow:0 0 0 3px rgba(201,162,74,.95), 0 4px 14px rgba(0,0,0,.45);
  transition:background-color .25s ease, box-shadow .25s ease;
}
.spot:hover::after, .spot.active::after{ background:var(--gold); box-shadow:0 0 0 3px #fff, 0 4px 14px rgba(0,0,0,.45); }
.tile:hover .spot{ opacity:1; transform:scale(1); }
.spot.off{ display:none; }
@keyframes spotPulse{ 0%{ transform:scale(.55); opacity:.9; } 100%{ transform:scale(1.55); opacity:0; } }
@media (hover:none){ .tile .spot{ opacity:1; transform:scale(1); } }
@media (prefers-reduced-motion: reduce){ .spot::before{ animation:none; } }

#spotTip{ position:fixed; left:0; top:0; z-index:60; width:max-content; max-width:min(270px, calc(100vw - 24px)); pointer-events:none; opacity:0; transform:translateY(6px); transition:opacity .2s ease, transform .25s cubic-bezier(.16,1,.3,1); }
#spotTip.show{ opacity:1; transform:none; }

/* ---------- Filter chips ---------- */
.chip{ transition:all .3s ease; }
.chip.active{ background:var(--forest); color:var(--cream); border-color:var(--forest); }

/* ---------- Lightbox ---------- */
#lightbox, #videoLightbox{ display:none; }
#lightbox.open, #videoLightbox.open{ display:flex; animation:fadeIn .3s ease both; }
@keyframes fadeIn{ from{opacity:0} to{opacity:1} }

/* ---------- Modals ---------- */
.modal-overlay{ display:none; }
.modal-overlay.open{ display:flex; animation:fadeIn .25s ease both; }
.modal-panel{ transform:translateY(18px) scale(.98); opacity:0; transition:transform .35s cubic-bezier(.16,1,.3,1), opacity .35s ease; }
.modal-overlay.open .modal-panel{ transform:none; opacity:1; }
.modal-scroll{ -webkit-overflow-scrolling:touch; }

/* ---------- Marquee ---------- */
@keyframes slide{ from{ transform:translateX(0); } to{ transform:translateX(-50%); } }
.marquee-track{ display:flex; width:max-content; animation:slide 32s linear infinite; }
.marquee-wrap:hover .marquee-track{ animation-play-state:paused; }

/* ---------- misc ---------- */
section[id]{ scroll-margin-top:92px; }
.field{
  width:100%; border-radius:.85rem; border:1px solid rgba(14,18,15,.12);
  background:#fff; padding:.85rem 1rem; font-size:.95rem; color:#1A211C;
  transition:border-color .25s ease, box-shadow .25s ease;
}
.field::placeholder{ color:rgba(14,18,15,.55); }
.field:focus{ outline:none; border-color:var(--gold); box-shadow:0 0 0 4px rgba(201,162,74,.55); }
.btn-lift{ transition:transform .3s cubic-bezier(.16,1,.3,1), box-shadow .3s ease, background-color .3s ease, color .3s ease; }
.btn-lift:hover{ transform:translateY(-2px); }
.arrow-flow{ transition:transform .35s cubic-bezier(.16,1,.3,1); }
.group:hover .arrow-flow{ transform:translateX(5px); }

/* ---------- Accessibility (WCAG 2.2 AA) ---------- */

/* Keyboard-only focus ring, readable on both the light and dark sections */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible{
  outline:3px solid var(--gold-deep); outline-offset:2px; border-radius:.35rem;
}
.bg-forest :where(a, button):focus-visible,
.bg-ink :where(a, button):focus-visible,
#mobileMenu :where(a, button):focus-visible,
#lightbox :where(a, button):focus-visible,
#videoLightbox :where(a, button):focus-visible{ outline-color:var(--sand); }

.skip-link{
  position:absolute; left:1rem; top:-5rem; z-index:200;
  padding:.9rem 1.4rem; border-radius:.9rem;
  background:var(--forest); color:var(--cream); font-size:.92rem; font-weight:600;
  transition:top .2s ease;
}
.skip-link:focus{ top:1rem; }

/* Small footer controls keep a 32px target instead of a bare text baseline */
.footer-btn{
  display:inline-flex; align-items:center; min-height:32px; padding:.3rem .45rem;
  border:0; background:transparent; cursor:pointer; font:inherit;
  font-size:.78rem; color:rgba(250,247,242,.78); transition:color .3s ease;
}
.footer-btn:hover{ color:var(--sage); }

/* The sticky nav must never cover whatever currently has focus */
:focus{ scroll-margin-top:100px; scroll-margin-bottom:80px; }
.visually-hidden{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  *, *::before, *::after{
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
  }
  /* the bar fill drives the slideshow — with motion reduced, only the
     visitor moves it, via the prev/next buttons or the slide dots */
  .hero-bar.is-active i{ animation:none; width:100%; }
  .marquee-track{ animation:none; }
}
.marquee-wrap:focus-within .marquee-track{ animation-play-state:paused; }
