/* ===================================================================
   Sandbox Basics Property Management — shared stylesheet
   Buildless static site. Mobile-first; max-width media queries at the
   end. Brand: forest green + metallic gold + warm cream.
   ===================================================================

   INLINE HEADER LOCKUP SNIPPET (single source of truth — paste this
   identical block into every page's <header> so its <text> inherits the
   page's loaded Google Fonts; see design.md §7). assets/logo.svg is a
   SEPARATE mark-only, text-free file — never use it where the wordmark
   text is required.

   <a class="nav-logo" href="index.html" aria-label="Sandbox Basics Property Management — home">
     <svg class="logo-lockup" viewBox="0 0 300 72" role="img"
          xmlns="http://www.w3.org/2000/svg">
       <title>Sandbox Basics Property Management</title>
       <desc>House-roof mark with a window above the wordmark Sandbox Basics, Property Management.</desc>
       <defs>
         <linearGradient id="goldGradLockup" x1="0" y1="0" x2="1" y2="1">
           <stop offset="0" stop-color="#BF953F"/>
           <stop offset="0.25" stop-color="#FCF6BA"/>
           <stop offset="0.5" stop-color="#B38728"/>
           <stop offset="0.7" stop-color="#FBF5B7"/>
           <stop offset="1" stop-color="#AA771C"/>
         </linearGradient>
       </defs>
       <g class="logo-mark" transform="translate(2,6)">
         <path d="M30 4 L56 26 L4 26 Z" fill="#1F3A2B"/>
         <path d="M30 2 L58 26 M30 2 L2 26" fill="none" stroke="url(#goldGradLockup)"
               stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"/>
         <rect x="25" y="12" width="10" height="10" rx="1.5" fill="none"
               stroke="#B38728" stroke-width="2"/>
       </g>
       <text class="logo-word" x="72" y="34" fill="#F6F0DC"
             font-family="'Cinzel', Georgia, 'Times New Roman', serif"
             font-weight="700" font-size="22" letter-spacing="1.5">SANDBOX BASICS</text>
       <text class="logo-sub" x="73" y="54" fill="#C9A24B"
             font-family="'Montserrat', Arial, sans-serif"
             font-weight="600" font-size="10" letter-spacing="4">PROPERTY MANAGEMENT</text>
     </svg>
   </a>

   At <=768px the .logo-word / .logo-sub <text> are hidden (CSS below) so
   only the mark shows on mobile.
   =================================================================== */

/* ---- 3.1 Tokens --------------------------------------------------- */
:root {
  /* color */
  --green: #1F3A2B;
  --green-deep: #16281D;
  --green-ink: #243B2E;
  --cream: #F6F0DC;
  --cream-soft: #FBF7EA;
  --white: #FFFFFF;
  --text-on-green: #F6F0DC;
  --text-on-green-muted: #CFE0D4;
  --gold-1: #BF953F;
  --gold-2: #FCF6BA;
  --gold-3: #B38728;
  --gold-4: #FBF5B7;
  --gold-5: #AA771C;
  --gold-solid: #B38728;
  --gold-heading: #C9A24B;
  --focus: #D4AF37;
  --link: #1C5B37;
  --danger: #B42318;
  --shadow: 0 10px 40px rgba(22, 40, 29, .14);
  --radius: 6px;
  --transition: all .5s cubic-bezier(.25, .8, .25, 1);
  --nav-h: 88px;
  --nav-h-mobile: 64px;
  --call-bar-h: 64px;
  --cookie-banner-h: 120px;
  --gold-grad: linear-gradient(100deg, #BF953F 0%, #FCF6BA 25%, #B38728 50%, #FBF5B7 70%, #AA771C 100%);

  /* type */
  --font-display: 'Cinzel', Georgia, 'Times New Roman', serif;
  --font-script: 'Pinyon Script', 'Snell Roundhand', cursive;
  --font-body: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;

  /* spacing scale */
  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 40px;
  --sp-5: 64px;
  --sp-6: 96px;
}

/* ---- 3.2/3.4 base + reset ---------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--green-ink);
  background: var(--white);
  overflow-x: hidden;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--link);
  text-decoration-color: rgba(28, 91, 55, .4);
}

/* ---- 3.3 type scale ---------------------------------------------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  color: var(--green);
}

.hero-h1,
h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: .02em;
}

.script-tagline {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.1;
  color: var(--gold-heading);
}

.section-title,
h2 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 600;
}

.card-title,
h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

p {
  max-width: 68ch;
}

small,
.text-small {
  font-size: .9rem;
}

.section-label {
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
}

/* ---- layout utilities -------------------------------------------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--sp-6) 0;
}

.section--cream {
  background: var(--cream);
  color: var(--green-ink);
}

.section--cream-soft {
  background: var(--cream-soft);
  color: var(--green-ink);
}

.section--green {
  background: var(--green);
  color: var(--text-on-green);
}

.section--green h1,
.section--green h2,
.section--green h3,
.section--green .section-label {
  color: var(--text-on-green);
}

.section-subtitle {
  color: inherit;
  opacity: .9;
}

.center {
  text-align: center;
}

/* global visible focus ring */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- 4.10 skip link ---------------------------------------------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1300;
  background: var(--gold-solid);
  color: var(--green-deep);
  padding: 12px 20px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
}

/* ---- 3.5 buttons ------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 16px 32px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .85rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.btn-gold {
  background: var(--gold-solid);
  background: var(--gold-grad);
  color: var(--green-deep);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(179, 135, 40, .35);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--gold-solid);
  color: var(--green);
}

.section--green .btn-outline {
  color: var(--text-on-green);
}

.btn-outline:hover {
  background: var(--gold-grad);
  color: var(--green-deep);
}

.btn-block {
  display: flex;
  width: 100%;
}

/* ---- 3.5 cards --------------------------------------------------- */
.card {
  background: var(--white);
  border: 1px solid rgba(31, 58, 43, .08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--sp-3);
}

/* ---- 3.5 gold circular icons ------------------------------------- */
.icon-circle {
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--gold-solid);
  border-radius: 50%;
}

.icon-circle svg {
  width: 30px;
  height: 30px;
  stroke: var(--gold-solid);
  fill: none;
  stroke-width: 2;
}

/* ---- 3.5 divider ------------------------------------------------- */
.divider-gold {
  width: 72px;
  height: 2px;
  margin: var(--sp-2) auto;
  border: 0;
  background: var(--gold-grad);
}

/* ---- 3.5 gold-underline hover (motion-gated) --------------------- */
.gold-underline {
  position: relative;
  text-decoration: none;
  background-image: var(--gold-grad);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 2px;
  transition: background-size .35s ease;
}

.gold-underline:hover,
.gold-underline:focus-visible {
  background-size: 100% 2px;
}

/* ---- section heading cluster ------------------------------------- */
/* On light bands the label uses an AA-passing green solid (gold-heading
   #C9A24B is only ~2.1:1 on cream — gold body text is prohibited). The
   .section--green override above restores the light-on-green label. */
.section-label {
  color: var(--green-ink);
}

.section-head {
  text-align: center;
  margin-bottom: var(--sp-4);
}

/* ---- 3.6 decorative: leaf overlay, ribbons, collage -------------- */
.leaf-overlay {
  position: absolute;
  opacity: .08;
  pointer-events: none;
  width: 220px;
  height: auto;
}

.ribbon-cream {
  background: var(--cream);
  color: var(--green-ink);
  text-align: center;
  padding: var(--sp-4) 0;
}

.ribbon-gold {
  background: var(--gold-grad);
  color: var(--green-deep);
  text-align: center;
  padding: var(--sp-4) 0;
}

.ribbon-gold h2 {
  color: var(--green-deep);
}

.collage {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-2);
  overflow: hidden;
}

.collage__panel {
  transform: skewX(-6deg);
  overflow: hidden;
  border-radius: var(--radius);
}

.collage__panel > * {
  transform: skewX(6deg);
  transform-origin: center;
}

/* ---- 9 image placeholder ----------------------------------------- */
.img-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--sp-3);
  aspect-ratio: 16 / 9;
  background: var(--cream-soft);
  border: 2px dashed var(--gold-solid);
  border-radius: var(--radius);
  color: var(--green-ink);
  font-size: .85rem;
  line-height: 1.4;
}

.img-ph--portrait {
  aspect-ratio: 3 / 4;
}

.img-ph--wide {
  aspect-ratio: 21 / 9;
}

/* Real hero image (flyer-derived) */
.hero-portrait {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  object-fit: cover;
}

/* ---- 4.8 / 13 forms ---------------------------------------------- */
.form-field {
  margin-bottom: var(--sp-3);
}

.form-field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: .9rem;
}

.form-field .req {
  color: var(--danger);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--green-ink);
  background: var(--white);
  border: 1px solid rgba(31, 58, 43, .3);
  border-radius: var(--radius);
}

.form-field textarea {
  min-height: 140px;
  resize: vertical;
}

.form-field [aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 1px var(--danger);
}

.form-error {
  display: block;
  margin-top: 6px;
  min-height: 1em;
  color: var(--danger);
  font-size: .85rem;
}

.form-confirmation {
  margin-top: var(--sp-2);
  padding: var(--sp-2);
  background: var(--cream);
  border-left: 4px solid var(--gold-solid);
  border-radius: var(--radius);
  color: var(--green-ink);
}

/* honeypot — visually hidden but reachable by bots */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---- 5.4 emergency box ------------------------------------------- */
.emergency-box {
  border: 2px solid var(--danger);
  border-radius: var(--radius);
  padding: var(--sp-3);
  background: #fff6f5;
}

.emergency-box .btn-emergency {
  background: var(--danger);
  color: var(--white);
}

/* ---- 4.6 accordion ----------------------------------------------- */
.accordion__item {
  border-bottom: 1px solid rgba(31, 58, 43, .14);
}

.accordion__item h3 {
  margin: 0;
}

.accordion__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  padding: var(--sp-2) 0;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--green);
}

.accordion__trigger::after {
  content: "+";
  font-family: var(--font-body);
  font-size: 1.4rem;
  color: var(--gold-solid);
}

.accordion__trigger[aria-expanded="true"]::after {
  content: "\2212"; /* minus */
}

.accordion__panel {
  padding: 0 0 var(--sp-2);
}

/* ---- 4.7 listing filter + card grid ------------------------------ */
.filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}

.filter-results-count {
  margin-bottom: var(--sp-2);
  font-weight: 600;
}

.listing-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--sp-3);
}

.listing-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.listing-card .badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.badge--available { background: #e2efe6; color: var(--link); }
.badge--under-offer { background: #fdf0d8; color: #7A5310; }
.badge--rented { background: #f0e6e5; color: var(--danger); }

.listing-empty {
  padding: var(--sp-3);
  text-align: center;
  color: var(--green-ink);
}

/* ---- generic card grid ------------------------------------------- */
.grid-3,
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--sp-3);
}

/* ---- pillar strip ------------------------------------------------ */
.pillars {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2) var(--sp-3);
}

.pillars li {
  list-style: none;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  letter-spacing: 2px;
  text-transform: uppercase;
  /* AA-passing green on the cream band; the gold accent stays on the
     aria-hidden '•' separators only (no gold body/label text). */
  color: var(--green);
}

/* ---- 5 reveal ---------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .8s ease, transform .8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===================================================================
   FIXED UI LAYERING (§4.1/§4.2/§4.5)
   z-index lives ONLY on these fixed elements. NEVER put z-index on
   scrollable list items / wrappers (workspace stacking rule).
   nav 1000  <  call-bar 1100  <  cookie-banner 1200  <  skip-link 1300
   =================================================================== */

/* ---- 4.1 fixed nav ----------------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: var(--green);
  border-bottom: 1px solid rgba(201, 162, 75, .25);
}

.nav-inner {
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.logo-lockup {
  height: 48px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-left: auto;
  list-style: none;
}

.nav-links a {
  color: var(--text-on-green);
  text-decoration: none;
  font-size: .85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.nav-links a[aria-current="page"] {
  background-image: var(--gold-grad);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 2px;
  color: var(--gold-heading);
}

.nav-phone {
  color: var(--text-on-green);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.nav-phone small {
  display: block;
  font-size: .62rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-on-green-muted);
}

.nav-cta {
  flex: 0 0 auto;
}

.nav-toggle {
  display: none;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  background: none;
  border: 1px solid rgba(201, 162, 75, .4);
  border-radius: var(--radius);
  color: var(--text-on-green);
  font-size: 1.4rem;
  cursor: pointer;
}

/* offset page content below the fixed nav */
.page-body {
  padding-top: var(--nav-h);
}

/* ---- 4.2 mobile call bar (hidden on desktop) --------------------- */
.call-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1100;
  height: var(--call-bar-h);
  background: var(--green-deep);
  padding: 8px 12px;
  gap: 8px;
}

.call-bar .btn {
  flex: 1;
  min-height: 44px;
  padding: 10px;
}

/* ---- 4.5 cookie banner ------------------------------------------- */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1200;
  background: var(--green-deep);
  color: var(--text-on-green);
  padding: var(--sp-2) var(--sp-3);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
}

.cookie-banner p {
  max-width: 60ch;
  margin: 0;
  font-size: .9rem;
}

.cookie-banner .btn {
  min-height: 44px;
  padding: 10px 22px;
}

/* ---- 4.4 footer -------------------------------------------------- */
.site-footer {
  background: var(--green);
  color: var(--text-on-green);
  padding: var(--sp-5) 0 var(--sp-4);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--sp-4);
}

.site-footer a {
  color: var(--text-on-green);
}

.site-footer h3 {
  color: var(--gold-heading);
  font-size: 1rem;
  margin-bottom: var(--sp-2);
}

.footer-eho {
  width: 48px;
  height: 48px;
  margin-top: var(--sp-1);
}

.motion-toggle {
  margin-top: var(--sp-2);
  background: transparent;
  border: 1px solid var(--gold-solid);
  color: var(--text-on-green);
}

/* ===================================================================
   RESPONSIVE (max-width queries at the END, per conventions §8)
   =================================================================== */
@media (max-width: 1024px) {
  .grid-3,
  .grid-cards {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }

  .collage {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --nav-h: var(--nav-h-mobile);
  }

  /* reserve space for the fixed bottom call bar */
  body {
    padding-bottom: var(--call-bar-h);
  }

  /* first-visit: reserve room for BOTH the call bar and the cookie banner */
  .cookie-open body {
    padding-bottom: calc(var(--call-bar-h) + var(--cookie-banner-h));
  }

  .nav-links,
  .nav-phone small,
  .nav-cta {
    /* nav-phone number stays; its label hides to save room */
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-left: 0;
    padding: var(--sp-2) 24px var(--sp-3);
    background: var(--green);
    border-bottom: 1px solid rgba(201, 162, 75, .25);
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 0;
  }

  .nav-cta {
    margin-left: 0;
  }

  /* mark-only on mobile: hide the wordmark <text> */
  .logo-word,
  .logo-sub {
    display: none;
  }

  /* show the fixed bottom call bar */
  .call-bar {
    display: flex;
  }

  /* cookie banner tiles directly ABOVE the call bar */
  .cookie-banner {
    bottom: var(--call-bar-h);
  }

  /* collapse all card grids to one column */
  .grid-3,
  .grid-cards,
  .filter-bar,
  .listing-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  /* un-skew the collage into a straight 2x2 */
  .collage {
    grid-template-columns: repeat(2, 1fr);
  }

  .collage__panel,
  .collage__panel > * {
    transform: none;
  }

  .section {
    padding: 56px 0;
  }
}

/* ===================================================================
   MOTION PREFERENCES (§10)
   =================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn-gold:hover,
  .gold-underline:hover {
    transform: none;
  }

  .collage__panel,
  .collage__panel > * {
    transform: none;
  }
}

/* user-controlled "Pause motion" toggle (class on <html>) */
.motion-paused *,
.motion-paused *::before,
.motion-paused *::after {
  animation: none !important;
  transition: none !important;
}

.motion-paused .reveal {
  opacity: 1 !important;
  transform: none !important;
}

.motion-paused {
  scroll-behavior: auto;
}
