/* ============================================================
   GLOBAL — Serenity Outdoors design system
   Tokens + shared elements (nav, footer, buttons, eyebrows, arrow
   links) ported 1:1 from the Claude design export. Page-section
   layout CSS lives in each page template's <style> block.
   ============================================================ */

:root {
  --cream:      #F5F3EF;
  --cream-2:    #ECE8E2;
  --ink:        #1D1D1B;
  --ink-soft:   #3a3b36;
  --gray:       #5a5b54;
  --dark:       #16170f;
  --dark-2:     #1A1B15;
  --green:      #2C3A2E;
  --bronze:     #A8865D;
  --tan:        #E3D2B8;
  --gold:       #C9A877;
  --line:       #E2DCD3;
  --line-2:     #E0DBD3;

  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans:  'Archivo', -apple-system, BlinkMacSystemFont, sans-serif;

  --pad-x: clamp(24px, 5vw, 80px);
  --maxw: 1240px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--cream);
  font-family: var(--sans);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--bronze); color: #fff; }
img { max-width: 100%; }
a { color: inherit; }

.wrap { max-width: var(--maxw); margin: 0 auto; }

/* ---------- Eyebrow ---------- */
.eyebrow {
  font-size: 13px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--bronze);
  font-weight: 600;
}
.eyebrow--tan  { color: var(--tan); }   /* on dark photo sections */
.eyebrow--gold { color: var(--gold); }  /* on the green section */

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 13px 24px;
  border-radius: 2px;
  white-space: nowrap;
}
.btn--lg { font-size: 13px; padding: 18px 32px; transition: background .3s, color .3s, transform .3s; }
.btn--light { background: var(--cream); color: var(--dark); transition: background .3s, color .3s; }
.btn--light:hover { background: var(--bronze); color: #fff; }
.btn--light.btn--lg:hover { transform: translateY(-2px); }
.btn--ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.55);
  transition: background .3s, border-color .3s;
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }

/* ---------- Arrow link (underlined section link) ---------- */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--green);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--green);
  white-space: nowrap;
  transition: color .3s, border-color .3s;
}
.link-arrow:hover { color: var(--bronze); border-color: var(--bronze); }
.link-arrow--light { color: var(--cream); border-color: rgba(245, 243, 239, 0.5); }
.link-arrow--light:hover { color: var(--gold); border-color: var(--gold); }

/* Arrow nudge on any link hover */
[data-arrow] { display: inline-block; transition: transform .32s cubic-bezier(.22,.7,.2,1); }
a:hover [data-arrow] { transform: translateX(5px); }

/* ---------- Site header (overlays each page's hero) ---------- */
.site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px var(--pad-x);
  transition: padding .3s ease, background-color .3s ease, box-shadow .3s ease;
}
/* Sticky state — interactions.js adds .is-stuck once the page scrolls past 8px.
   Fixed dark bar so the white nav stays readable over light sections. */
.site-header.is-stuck {
  position: fixed;
  padding-top: 16px;
  padding-bottom: 16px;
  background: var(--dark);
  box-shadow: 0 12px 30px -18px rgba(0, 0, 0, 0.65);
}
/* Plain (non-hero) pages — e.g. Beaver Builder pages reusing the shared nav.
   functions.php adds body.acb-chrome; the header sits in normal flow as a
   solid dark bar instead of overlaying a hero, so it stays readable and
   doesn't cover page content. */
body.acb-chrome .site-header,
body.acb-chrome .site-header.is-stuck {
  position: sticky;
  top: 0;
  padding-top: 16px;
  padding-bottom: 16px;
  background: var(--dark);
  box-shadow: 0 10px 30px -20px rgba(0, 0, 0, 0.6);
}
/* Beaver Builder Page template — unconstrain the parent theme's content
   container so BB rows (including full-width) span edge to edge. Fixed-width
   rows still center via Beaver Builder's own row max-width. */
body.acb-bb-page #content.site-content {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
}
.site-header__logo img { height: 44px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: clamp(20px, 2.6vw, 40px); }
.nav-links a {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.04em;
  font-weight: 500;
  opacity: 0.92;
}
.nav-links a:not(.btn) { position: relative; }
.nav-links a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -5px;
  height: 2px; width: 100%;
  background: var(--tan);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .38s cubic-bezier(.22,.7,.2,1);
}
.nav-links a:not(.btn):hover { opacity: 1; color: var(--tan); }
.nav-links a:not(.btn):hover::after { transform: scaleX(1); }
.nav-links .btn { margin-left: 8px; opacity: 1; font-size: 12px; }

/* Dropdown (e.g. Services ▸ Hardscaping). Top-level items with children render
   as .nav-dropdown > toggle + .nav-dropdown__menu panel (see Acb_Nav_Walker). */
.nav-dropdown { position: relative; display: inline-flex; align-items: center; }
.nav-dropdown__toggle { display: inline-flex; align-items: center; gap: 7px; }
.nav-dropdown__caret {
  width: 6px; height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform .3s ease;
  opacity: .85;
}
.nav-dropdown__menu {
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%) translateY(10px);
  min-width: 210px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
  background: var(--dark);
  border: 1px solid rgba(245, 243, 239, 0.12);
  border-radius: 12px;
  box-shadow: 0 22px 44px -24px rgba(0, 0, 0, 0.75);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
/* Transparent bridge so the cursor can cross the gap without closing the menu. */
.nav-dropdown__menu::before {
  content: "";
  position: absolute;
  top: -12px; left: 0; right: 0; height: 12px;
}
.nav-dropdown:hover .nav-dropdown__menu,
.nav-dropdown:focus-within .nav-dropdown__menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(6px);
}
.nav-dropdown:hover .nav-dropdown__caret,
.nav-dropdown:focus-within .nav-dropdown__caret { transform: rotate(225deg); }
.nav-links .nav-dropdown__menu a {
  white-space: nowrap;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  opacity: 0.9;
}
.nav-links .nav-dropdown__menu a::after { display: none; }
.nav-links .nav-dropdown__menu a:hover { background: rgba(245, 243, 239, 0.08); opacity: 1; color: var(--tan); }

/* Burger (mobile only) */
#burger {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
#burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
}

/* Mobile menu panel (interactions.js toggles .open) */
#mobileMenu {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(320px, 85vw);
  background: var(--dark);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 92px 32px 32px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
#mobileMenu.open { transform: translateX(0); }
#mobileMenu a:not(.btn) {
  color: #fff;
  text-decoration: none;
  font-size: 17px;
  letter-spacing: 0.04em;
  font-weight: 500;
  padding: 12px 0;
  border-bottom: 1px solid rgba(245, 243, 239, 0.12);
}
#mobileMenu .btn { margin-top: 18px; justify-content: center; font-size: 13px; }
/* Close button (top-right X) — interactions.js binds it to closeMenu */
#menuClose {
  position: absolute;
  top: 22px;
  right: 24px;
  width: 40px;
  height: 40px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}
#menuClose::before,
#menuClose::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 2px;
  background: #fff;
}
#menuClose::before { transform: translate(-50%, -50%) rotate(45deg); }
#menuClose::after  { transform: translate(-50%, -50%) rotate(-45deg); }
#menuBackdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 12, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 99;
}
#menuBackdrop.open { opacity: 1; pointer-events: auto; }

@media (max-width: 920px) {
  .nav-links { display: none; }
  #burger { display: block; }
  /* In the off-canvas panel the dropdown is a tap-to-expand accordion.
     interactions.js toggles .is-open on the .nav-dropdown when its toggle
     is tapped (<=920px); the submenu is collapsed until then. */
  #mobileMenu .nav-dropdown { display: block; }
  #mobileMenu .nav-dropdown__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
  #mobileMenu .nav-dropdown__caret {
    display: inline-block;
    margin-left: 12px;
    transform: rotate(45deg);
    transition: transform .3s ease;
  }
  #mobileMenu .nav-dropdown.is-open .nav-dropdown__caret { transform: rotate(225deg); }
  #mobileMenu .nav-dropdown__menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    display: none;
    min-width: 0;
    padding: 0 0 0 16px;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  #mobileMenu .nav-dropdown.is-open .nav-dropdown__menu { display: block; }
  #mobileMenu .nav-dropdown__menu::before { display: none; }
  #mobileMenu .nav-dropdown__menu a { font-size: 15px; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--dark-2);
  color: var(--cream);
  padding: clamp(64px, 7vw, 96px) var(--pad-x) 36px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: clamp(32px, 5vw, 64px);
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(245, 243, 239, 0.14);
}
.footer-brand__logo { height: 52px; width: auto; margin-bottom: 22px; display: block; }
.footer-brand p {
  font-size: 15px;
  line-height: 1.7;
  color: rgba(245, 243, 239, 0.62);
  max-width: 30ch;
}
.footer-col__title {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bronze);
  font-weight: 600;
  margin-bottom: 22px;
}
.footer-col__links { display: flex; flex-direction: column; gap: 13px; }
.footer-col__links a {
  color: rgba(245, 243, 239, 0.78);
  text-decoration: none;
  font-size: 15px;
}
.footer-col__links a:hover { color: #fff; }
.footer-contact { display: flex; flex-direction: column; gap: 14px; }
.footer-phone {
  color: var(--cream);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
}
.footer-phone:hover { color: var(--bronze); }
.footer-email { color: rgba(245, 243, 239, 0.78); text-decoration: none; font-size: 15px; }
.footer-email:hover { color: #fff; }
.footer-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.footer-pills span {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 243, 239, 0.7);
  border: 1px solid rgba(245, 243, 239, 0.22);
  border-radius: 2px;
  padding: 7px 12px;
  white-space: nowrap;
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 28px;
}
.footer-bottom p { font-size: 13px; color: rgba(245, 243, 239, 0.5); }
.footer-bottom a {
  color: rgba(245, 243, 239, 0.8);
  text-decoration: none;
  font-weight: 600;
  transition: color .3s;
}
.footer-bottom a:hover { color: var(--bronze); }
.footer-col__links a, .footer-email, .footer-phone { transition: color .3s; }

/* ---------- Entrance animations (from the design) ---------- */
@keyframes heroUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(7px); } }

/* Scroll reveals: interactions.js adds .has-reveal to <body>, then .reveal-in
   per element. Without JS nothing is ever hidden. */
.has-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .9s cubic-bezier(.22,.7,.2,1), transform .9s cubic-bezier(.22,.7,.2,1);
  will-change: opacity, transform;
}
.has-reveal [data-reveal].reveal-in { opacity: 1; transform: none; }

/* ---------- Responsive grid utilities (ported from the design) ---------- */
@media (max-width: 980px) {
  .so-grid-3 { grid-template-columns: repeat(2, 1fr) !important; }
  .so-grid-4 { grid-template-columns: repeat(2, 1fr) !important; }
  .so-2col { grid-template-columns: 1fr !important; }
  .so-areas { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 620px) {
  .so-grid-3, .so-grid-4 { grid-template-columns: 1fr !important; }
  .so-steps { grid-template-columns: 1fr !important; }
}

@media (prefers-reduced-motion: reduce) {
  .has-reveal [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  * { animation: none !important; }
}
