/* ============================================================================
   Avery Property Management
   Design language: "handed the keys" — Southern residential stewardship.
   Warm walnut dark / lime-plaster light / haint-blue accent (porch-ceiling
   blue: the paint that, by old Carolina custom, keeps trouble off the house).
   Fraunces (the heart) + Libre Franklin (the numbers).
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Core palette */
  --walnut:        #1B1613;   /* dark ground */
  --walnut-raised: #241E1A;   /* dark ground, lifted */
  --plaster:       #EBE7DE;   /* light ground */
  --paper:         #F7F5EF;   /* light ground, lifted */
  --ink:           #2A2320;   /* text on light */
  --ivory:         #EEEAE1;   /* text on dark */

  --haint:         #3F6E64;   /* primary accent (on light) */
  --haint-bright:  #83B6A8;   /* primary accent (on dark) */
  --brick:         #9E4B3B;   /* rare warm accent — the key, the underline */
  --gold:          #C9A15A;   /* scroll-spotlight accent — Why Avery proof stats only */

  --ink-70:  rgba(42, 35, 32, 0.70);
  --ink-55:  rgba(42, 35, 32, 0.55);
  --ivory-88: rgba(238, 234, 225, 0.88);
  --ivory-72: rgba(238, 234, 225, 0.72);
  --ivory-48: rgba(238, 234, 225, 0.48);

  --line-on-light: rgba(42, 35, 32, 0.16);
  --line-on-dark:  rgba(238, 234, 225, 0.16);

  /* Type */
  --serif: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans:  "Libre Franklin", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Fluid type scale (~1.28) */
  --step--1: clamp(0.82rem, 0.79rem + 0.15vw, 0.9rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
  --step-1:  clamp(1.2rem, 1.12rem + 0.4vw, 1.45rem);
  --step-2:  clamp(1.5rem, 1.36rem + 0.7vw, 1.95rem);
  --step-3:  clamp(1.9rem, 1.66rem + 1.2vw, 2.7rem);
  --step-4:  clamp(2.4rem, 1.95rem + 2.2vw, 3.9rem);
  --step-5:  clamp(2.9rem, 2.1rem + 4vw, 5.6rem);

  /* Space */
  --gutter: clamp(1.25rem, 5vw, 3.5rem);
  --wrap: 74rem;
  --wrap-narrow: 52rem;
  --section-y: clamp(4.5rem, 4rem + 6vw, 9rem);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 3px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 6rem; }

body {
  margin: 0;
  background: var(--walnut);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.012em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--haint-bright);
  outline-offset: 3px;
  border-radius: 2px;
}
.panel--light :focus-visible { outline-color: var(--haint); }

::selection { background: var(--haint); color: var(--paper); }

/* ---------- Layout primitives ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: var(--wrap-narrow); }

.section { padding-block: var(--section-y); }

/* Consecutive light sections read as one zone — trim the gap between them and
   mark the seam with a full-width hairline instead. */
.panel--light + .panel--light {
  padding-top: clamp(2.75rem, 5vw, 4.25rem);
  border-top: 1px solid var(--line-on-light);
}
.panel--light:has(+ .panel--light) { padding-bottom: clamp(2.75rem, 5vw, 4.25rem); }

.panel--dark  { background: var(--walnut); color: var(--ivory); }
.panel--light { background: var(--plaster); color: var(--ink); }
.panel--dark h1, .panel--dark h2, .panel--dark h3 { color: var(--ivory); }

/* section intro block */
.lede {
  font-size: var(--step-1);
  line-height: 1.5;
  max-width: 34ch;
}
.panel--dark .lede { color: var(--ivory-72); }
.panel--light .lede { color: var(--ink-70); }

.section-head { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head h2 { font-size: var(--step-4); max-width: 16ch; }
.section-head .lede { margin-top: 1.25rem; }

/* A quiet marker used only where content is genuinely a place or a step. */
.marker {
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.14em;
  font-feature-settings: "smcp" 1, "c2sc" 1;
  text-transform: lowercase;
  color: var(--haint);
  display: inline-block;
  margin-bottom: 1rem;
}
.panel--dark .marker { color: var(--haint-bright); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.9em 1.6em;
  font-family: var(--sans);
  font-weight: 500;
  font-size: var(--step--1);
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: background-color 0.25s var(--ease-out), border-color 0.25s var(--ease-out), color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.btn--primary { background: var(--haint); color: var(--paper); }
.btn--primary:hover { background: #355c53; transform: translateY(-2px); }
.panel--dark .btn--primary { background: var(--haint-bright); color: var(--walnut); }
.panel--dark .btn--primary:hover { background: #9cc9bd; }

.btn--ghost { border-color: currentColor; color: inherit; opacity: 0.9; }
.btn--ghost:hover { opacity: 1; background: rgba(127,127,127,0.08); transform: translateY(-2px); }

.btn--wide { width: 100%; justify-content: center; padding-block: 1.05em; }

/* Text link with a drawn underline */
.link {
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  transition: color 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}
.link:hover { color: var(--haint); border-color: var(--haint); }
.panel--dark .link:hover { color: var(--haint-bright); border-color: var(--haint-bright); }

/* ============================================================================
   Site header / nav
   ========================================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding-block: 1.1rem;
  color: var(--ivory);
  transition: padding 0.3s var(--ease-out), color 0.4s var(--ease-out);
}
/* Background/blur live on a ::before, not on .site-header itself — backdrop-filter
   (like transform) creates a new containing block for any position:fixed
   descendant, and .nav (the mobile off-canvas menu) is one. With it on
   .site-header directly, .nav started sizing itself relative to the header's
   own small box instead of the real viewport as soon as the page scrolled
   (.is-scrolled, and its blur, applies after just 40px) — squeezing the open
   menu into a sliver and pushing some links off-screen. Moving the effect to
   a ::before keeps the exact same look without .nav ever being a descendant
   of the element that has it. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  /* soft scrim so nav stays legible over a bright hero photo */
  background: linear-gradient(180deg, rgba(18,14,12,0.6) 0%, rgba(18,14,12,0.24) 60%, rgba(18,14,12,0) 100%);
  transition: background-color 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.site-header .nav a { text-shadow: 0 1px 8px rgba(0,0,0,0.8); }
.site-header.is-scrolled .nav a { text-shadow: none; }
.site-header.is-scrolled { padding-block: 0.7rem; }
.site-header.is-scrolled::before {
  background: rgba(27, 22, 19, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line-on-dark);
}
/* top, not transform: a transform here would create a new containing block
   for the mobile nav's position:fixed panel (it's a descendant of .site-header),
   making that panel position itself relative to this shrunken, translated
   header instead of the real viewport once scrolled — squeezing it into a
   sliver and pushing some links off-screen. -200px comfortably clears the
   header's tallest possible height, no exact measurement needed. */
.site-header.is-hidden { top: -200px; }
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; color: inherit; }
.brand__mark { height: 38px; width: auto; color: currentColor; transition: height 0.3s var(--ease-out); }
.brand__name {
  display: block;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.4rem;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-bottom: 1.5px solid currentColor;
  padding-bottom: 3px;
}
.brand__sub {
  display: block;
  margin-top: 4px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.55rem;
  line-height: 1;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.72;
}
.site-header.is-scrolled .brand__mark { height: 32px; }
@media (max-width: 480px) {
  .brand__name { font-size: 1.15rem; letter-spacing: 0.12em; }
  .brand__sub { letter-spacing: 0.22em; }
}

.nav { display: flex; align-items: center; gap: clamp(1rem, 2.1vw, 1.85rem); }
.nav a {
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  color: var(--ivory-88);
  white-space: nowrap;
  transition: color 0.2s var(--ease-out);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ivory); }
.nav .btn { color: var(--walnut); font-size: 0.78rem; padding: 0.7em 1.3em; }

.nav-toggle { display: none; }

@media (max-width: 960px) {
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 0;
    padding: 10px;
    position: relative;
    z-index: 95;
  }
  .nav-toggle span { width: 26px; height: 2px; background: currentColor; transition: transform 0.3s var(--ease-out), opacity 0.2s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 90;
    width: min(86vw, 340px);
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 0.5rem;
    padding: 6rem var(--gutter) var(--gutter);
    background: var(--walnut-raised);
    box-shadow: -30px 0 60px rgba(0,0,0,0.4);
    transform: translateX(100%);
    transition: transform 0.4s var(--ease-out);
  }
  .nav.is-open { transform: translateX(0); }
  .nav a {
    font-size: var(--step-2);
    font-family: var(--serif);
    color: var(--ivory);
    white-space: normal;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--line-on-dark);
  }
  .nav a:last-of-type { border-bottom: 0; }
  .nav .btn {
    font-family: var(--sans);
    font-size: var(--step--1);
    justify-content: center;
    margin-top: 1.25rem;
  }
}

/* ============================================================================
   Keyhole loader — page loads, you look through a keyhole, then fly through it
   into the site. Modelled on tref.digitaldesignnyc.co.
   Pure CSS / inline JS so it never waits on GSAP or fonts to start.
   ========================================================================== */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: hidden;
  background: var(--walnut);
  opacity: 1;
  transition: opacity 0.4s var(--ease-out);
}
.no-js .loader { display: none; }

/* The scene glimpsed through the keyhole — starts zoomed in, settles to 1:1
   so the last frame matches the hero behind it. */
.loader__scene {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(180deg, rgba(20,16,14,0.18) 0%, rgba(20,16,14,0.3) 60%, rgba(20,16,14,0.5) 100%),
    url("img/hero-home.jpg");
  background-size: cover;
  background-position: 50% 46%;
  transform: scale(1.5);
  transition: transform 1.9s cubic-bezier(0.55, 0, 0.85, 0); /* ease-in: creeps, then rushes */
}

/* Solid brand-colour field with the keyhole punched out of it. */
.loader__aperture {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.loader__aperture svg { width: 100%; height: 100%; display: block; }
.loader__fill { fill: var(--walnut); }
.loader__kh {
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(1);
  transition: transform 1.9s cubic-bezier(0.55, 0, 0.85, 0);
}

/* Title + key, sitting just below the keyhole. */
.loader__caption {
  position: absolute;
  left: 0;
  right: 0;
  top: 67%;
  z-index: 3;
  text-align: center;
  padding-inline: 1.5rem;
  opacity: 0;
  animation: loader-cap-in 0.9s var(--ease-out) 0.35s forwards;
}
@media (min-width: 700px) { .loader__caption { top: 64%; } }
.loader__caption p {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(0.62rem, 2.6vw, 0.78rem);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(238, 234, 225, 0.78);
  margin-bottom: 1.1rem;
}
.loader__key { width: 58px; height: auto; margin: 0 auto; color: var(--haint-bright); }
@keyframes loader-cap-in { to { opacity: 1; } }

/* Fly through */
.loader.is-zooming .loader__kh { transform: scale(90); }
.loader.is-zooming .loader__scene { transform: scale(1); }
.loader.is-zooming .loader__caption { opacity: 0; transition: opacity 0.5s var(--ease-out); }

.loader.is-fading { opacity: 0; }
.loader.is-done { display: none; }

/* No-JS / reduced-motion safety: never trap the visitor behind the overlay. */
@media (prefers-reduced-motion: reduce) {
  .loader { animation: loader-out 0.01s linear 0.4s forwards; transition: none; }
  .loader__scene, .loader__kh { transition: none; }
  .loader__caption { opacity: 1; animation: none; }
}
@keyframes loader-out { to { opacity: 0; visibility: hidden; } }

/* ============================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  /* Fallback dusk if the photo fails to load. */
  background: linear-gradient(178deg, #22262e 0%, #2a2320 55%, var(--walnut) 100%);
  color: var(--ivory);
}
.hero__layer {
  position: absolute;
  inset: -7% 0 -3% 0;
  background-size: cover;
  background-position: center;
  will-change: transform;
}
.hero__layer--house {
  inset: -7% 0 -3% 0;
  background-image: url("img/hero-home.jpg");
  background-position: 50% 38%;
}
/* Tall/narrow screens: same symmetric street photo, cropped to the centre
   (the converging street + canopy) rather than the full width. */
@media (max-width: 700px) {
  .hero__layer--house { background-position: 50% 30%; }
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    /* vertical: light touch through the middle, sink the sub/CTA area at the bottom */
    linear-gradient(180deg, rgba(18,14,12,0.20) 0%, rgba(18,14,12,0.16) 34%, rgba(18,14,12,0.6) 72%, rgba(18,14,12,0.94) 100%),
    /* diagonal: anchor the headline against the lower-left */
    linear-gradient(70deg, rgba(18,14,12,0.78) 0%, rgba(18,14,12,0.38) 38%, rgba(18,14,12,0) 64%);
}
.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: clamp(7rem, 16vh, 11rem);
  /* +1.25rem clears the .hero__portals stack (Owner + Tenant, bottom-right) —
     that corner group is 2 lines tall now, so the trust list needs a bit more
     room above it than a single button used to need. Kept deliberately small:
     the hero has zero vertical slack at min-height, so any bigger an addition
     pushes the whole section past one screen on short mobile viewports. */
  padding-bottom: calc(clamp(4rem, 11vh, 7.5rem) + 1.25rem);
}
.hero h1 {
  font-size: var(--step-5);
  max-width: 15ch;
  letter-spacing: -0.02em;
  color: var(--ivory);
  text-shadow: 0 2px 40px rgba(0,0,0,0.45);
}
.hero h1 .ln { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.hero h1 .ln > span { display: block; will-change: transform; }

/* Hero entrance — pure CSS, triggered when JS adds .hero.is-in after the loader.
   No animation-frame dependency, so it can't stall. */
.js-anim .hero h1 .ln > span { transform: translateY(112%); }
.js-anim .hero .hero__sub,
.js-anim .hero .hero__cta > *,
.js-anim .hero .hero__trust,
.js-anim .hero .hero__scroll,
.js-anim .hero .hero__portal { opacity: 0; }

.js-anim .hero.is-in h1 .ln > span {
  transform: translateY(0);
  transition: transform 0.9s var(--ease-out);
}
.js-anim .hero.is-in h1 .ln:nth-child(2) > span { transition-delay: 0.08s; }
.js-anim .hero.is-in h1 .ln:nth-child(3) > span { transition-delay: 0.16s; }
.js-anim .hero.is-in .hero__sub { opacity: 1; transition: opacity 0.7s var(--ease-out) 0.4s; }
.js-anim .hero.is-in .hero__cta > * { opacity: 1; transition: opacity 0.6s var(--ease-out) 0.5s; }
.js-anim .hero.is-in .hero__cta > *:nth-child(2) { transition-delay: 0.6s; }
.js-anim .hero.is-in .hero__trust { opacity: 1; transition: opacity 0.6s var(--ease-out) 0.72s; }
.js-anim .hero.is-in .hero__scroll,
.js-anim .hero.is-in .hero__portal { opacity: 1; transition: opacity 0.6s var(--ease-out) 0.85s; }

@media (prefers-reduced-motion: reduce) {
  .js-anim .hero h1 .ln > span { transform: none; }
  .js-anim .hero .hero__sub,
  .js-anim .hero .hero__cta > *,
  .js-anim .hero .hero__trust,
  .js-anim .hero .hero__scroll,
  .js-anim .hero .hero__portal { opacity: 1; }
}
.hero__sub {
  margin-top: 1.75rem;
  max-width: 44ch;
  font-size: var(--step-1);
  line-height: 1.5;
  color: rgba(238, 234, 225, 0.86);
  text-shadow: 0 1px 18px rgba(0,0,0,0.4);
}
.hero__cta { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 0.9rem; }

.hero__trust {
  list-style: none;
  margin: 1.9rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 1.5rem;
  row-gap: 0.5rem;
  font-size: var(--step--1);
  color: rgba(238, 234, 225, 0.82);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55);
}
.hero__trust li { padding-left: 1.5rem; border-left: 1px solid rgba(238, 234, 225, 0.28); }
.hero__trust li:first-child { padding-left: 0; border-left: 0; }
.hero__trust b { font-family: var(--serif); font-weight: 500; color: var(--ivory); }
@media (max-width: 560px) {
  .hero__trust li { padding-left: 0; border-left: 0; width: 100%; }
  .hero__trust { row-gap: 0.35rem; }
}

.hero__scroll {
  position: absolute;
  left: var(--gutter);
  bottom: 1.5rem;
  z-index: 2;
  font-size: var(--step--1);
  letter-spacing: 0.12em;
  color: var(--ivory-48);
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.hero__scroll::before {
  content: "";
  width: 34px; height: 1px;
  background: currentColor;
  transform-origin: left;
  animation: scroll-tick 2.4s var(--ease-out) infinite;
}
@keyframes scroll-tick { 0%,100% { transform: scaleX(0.4); opacity: 0.4; } 50% { transform: scaleX(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .hero__scroll::before { animation: none; } }

/* Mirrors .hero__scroll on the opposite corner — same quiet pill language the
   header's portal link used to use. Owner portal stacks above Tenant portal;
   the wrapper carries the corner position, each pill just sizes itself. */
.hero__portals {
  position: absolute;
  right: var(--gutter);
  bottom: 1.5rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
}
.hero__portal {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ivory-72);
  border: 1px solid rgba(238, 234, 225, 0.3);
  border-radius: 999px;
  padding: 0.55em 1.1em;
  transition: color 0.2s var(--ease-out), border-color 0.2s var(--ease-out), background-color 0.2s var(--ease-out);
}
.hero__portal:hover { color: var(--ivory); border-color: rgba(238, 234, 225, 0.5); background: rgba(238, 234, 225, 0.07); }
/* Still fits comfortably beside .hero__scroll down to narrow phones — just
   trims a little so the pills don't crowd it. */
@media (max-width: 480px) {
  .hero__portals { gap: 0.5rem; }
  .hero__portal { font-size: 0.62rem; padding: 0.5em 0.85em; }
}

/* ============================================================================
   Value strip — the pivot from dark to light
   ========================================================================== */
.strip {
  background: var(--walnut);
  color: var(--ivory);
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
  border-top: 1px solid var(--line-on-dark);
}
.strip p {
  font-family: var(--serif);
  font-size: var(--step-3);
  line-height: 1.28;
  max-width: 24ch;
  color: var(--ivory);
}
.strip .link { color: var(--haint-bright); border-color: var(--haint-bright); font-family: var(--sans); font-size: var(--step-0); display: inline-block; margin-top: 1.75rem; }

/* ============================================================================
   Steps — a real sequence, so it earns its numbers and its spine
   ========================================================================== */
.steps { position: relative; }
/* Eases in from the dark strip above instead of cutting straight to plaster. */
.steps::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: clamp(70px, 10vw, 130px);
  background: linear-gradient(180deg, var(--walnut) 0%, rgba(27,22,19,0) 100%);
  z-index: 0;
  pointer-events: none;
}
.steps > .wrap { position: relative; z-index: 1; }
.steps__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
}
@media (min-width: 860px) {
  .steps__list { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
}
.step { position: relative; padding-top: 2.5rem; }
.step__rule {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: var(--line-on-light);
  overflow: hidden;
}
.step__rule::after {
  content: "";
  position: absolute; inset: 0;
  background: var(--haint);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s var(--ease-out);
}
.step.is-visible .step__rule::after { transform: scaleX(1); }
.step:nth-child(2).is-visible .step__rule::after { transition-delay: 0.12s; }
.step:nth-child(3).is-visible .step__rule::after { transition-delay: 0.24s; }

.step__n {
  font-family: var(--serif);
  font-size: var(--step-1);
  color: var(--haint);
  display: block;
  margin-bottom: 0.75rem;
}
.step h3 { font-size: var(--step-2); margin-bottom: 0.6rem; }
.step p { color: var(--ink-70); max-width: 32ch; }

/* ============================================================================
   Services
   ========================================================================== */
/* Homepage: three grouped buckets with line icons */
.svc-groups { display: grid; gap: clamp(2.75rem, 5vw, 3.5rem); }
@media (min-width: 880px) {
  .svc-groups { grid-template-columns: repeat(3, 1fr); gap: clamp(1.75rem, 4vw, 3.25rem); }
}
.svc-group__title {
  font-family: var(--sans);
  font-weight: 500;
  font-size: var(--step--1);
  letter-spacing: 0.06em;
  font-feature-settings: "smcp" 1;
  text-transform: lowercase;
  color: var(--haint);
  margin: 0 0 1.4rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line-on-light);
}
.svc-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.7rem; }
.svc-group li { display: grid; grid-template-columns: 24px 1fr; gap: 0.95rem; align-items: start; }
.svc-ico { width: 24px; height: 24px; color: var(--haint); margin-top: 0.2rem; }
.svc-group .svc-name {
  display: block;
  font-family: var(--serif);
  font-size: var(--step-1);
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 0.3rem;
}
.svc-group .svc-desc { display: block; font-size: var(--step--1); line-height: 1.55; color: var(--ink-70); }
.svc-more {
  margin-top: clamp(2.75rem, 5vw, 3.75rem);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.1rem;
  font-size: var(--step--1);
}
.svc-more__sep { color: var(--line-on-light); }
@media (max-width: 620px) {
  .svc-more { flex-direction: column; gap: 0.7rem; }
  .svc-more__sep { display: none; }
}

.services__grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4.5rem);
}
@media (min-width: 900px) {
  .services__grid { grid-template-columns: 3fr 2fr; align-items: start; }
}

.leaseup {
  background: var(--paper);
  border: 1px solid var(--line-on-light);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.25rem);
}
.leaseup h3 { font-size: var(--step-2); margin-bottom: 0.5rem; }
.leaseup p { color: var(--ink-70); font-size: var(--step--1); }
.leaseup ol {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: lu;
  display: grid;
  gap: 0.7rem;
}
.leaseup li {
  counter-increment: lu;
  padding-left: 2rem;
  position: relative;
  font-size: var(--step-0);
}
.leaseup li::before {
  content: counter(lu);
  position: absolute; left: 0; top: 0.05em;
  font-family: var(--serif);
  color: var(--haint);
  font-size: var(--step--1);
}
.leaseup .note { margin-top: 1.25rem; font-style: italic; color: var(--ink-55); }

/* ============================================================================
   Why Avery — the numbers and the heart
   Drone footage of the neighborhood plays behind the content, dimmed the same
   way the Meet Nate porch photo is (see .nate::before) so the proof list stays
   easy to read. Plays at every viewport width now (matching desktop); only
   reduced-motion visitors get the still poster frame instead — see
   initBgVideo() in main.js.
   ========================================================================== */
.why { position: relative; overflow: hidden; background: var(--walnut) url("img/why-avery-poster.jpg") center/cover no-repeat; }
.why::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  /* Eases in from the light section above instead of cutting straight to the
     scrim. The first stop is a fully opaque walnut, not the translucent scrim
     colour — fading a translucent colour directly over the video let the
     footage bleed through as a muddy haze; going opaque-to-opaque first, then
     handing off to the existing translucent scrim, keeps the blend clean. */
  background: linear-gradient(180deg, var(--plaster) 0%, var(--walnut) clamp(70px, 10vw, 130px), rgba(27,22,19,0.8) 45%, rgba(27,22,19,0.92) 100%);
}
.why__bg { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; }
.why > .wrap { position: relative; z-index: 2; }

.why__grid { display: grid; gap: clamp(2.5rem, 6vw, 4rem); }
@media (min-width: 900px) { .why__grid { grid-template-columns: 1.1fr 0.9fr; } }
.why__body p + p { margin-top: 1.25rem; }
.why__body p { color: var(--ivory-72); max-width: 42ch; }
.why__body .faith { color: var(--ivory); font-family: var(--serif); font-size: var(--step-1); line-height: 1.4; }

/* Centered, stacked by default (mobile: the list stands alone with nothing
   beside it to left-align against) — a short rule above each stat stands in
   for the left border used once there's a text column to line up with. */
.proof { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.75rem; justify-items: center; text-align: center; align-content: start; }
.proof li { padding-top: 1.1rem; }
.proof li::before { content: ""; display: block; width: 34px; height: 2px; margin: 0 auto 1rem; background: var(--haint-bright); }
.proof .proof__fig { font-family: var(--serif); font-size: var(--step-3); display: block; line-height: 1; }
.proof .proof__label { font-size: var(--step--1); color: var(--ivory-48); }

@media (min-width: 900px) {
  /* Back to left-aligned once it's sitting beside the (left-aligned) body copy. */
  .proof { justify-items: start; text-align: left; }
  .proof li { padding-top: 0; padding-left: 1.1rem; border-left: 2px solid var(--haint-bright); }
  .proof li::before { display: none; }
}
/* ============================================================================
   Service area
   ========================================================================== */
.area { position: relative; padding-block: clamp(3rem, 4vw, 5.5rem); }
/* Eases in from the dark Why Avery video above instead of cutting straight to plaster. */
.area::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: clamp(70px, 10vw, 130px);
  background: linear-gradient(180deg, var(--walnut) 0%, rgba(27,22,19,0) 100%);
  z-index: 0;
  pointer-events: none;
}
.area > .wrap { position: relative; z-index: 1; }
/* Mobile: natural document order — intro, then the map, then the town list
   and the "ask" line. Desktop: the same three pieces rearranged into the old
   two-column look via named areas (text stacked on the left, map filling the
   right, spanning both text rows) without changing that reading order. */
.area__grid { display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
@media (min-width: 900px) {
  .area__grid {
    grid-template-columns: 0.82fr 1.18fr;
    grid-template-areas: "intro map" "more map";
  }
  .area__intro { grid-area: intro; }
  .area__more  { grid-area: more; }
  .area__map   { grid-area: map; }
}
.area__text h2 { font-size: var(--step-3); max-width: 20ch; margin: 0.4rem 0 1.1rem; text-wrap: balance; }
.area__text p { color: var(--ink-70); max-width: 44ch; }
.area__text p + p { margin-top: 1rem; }
.area__towns { font-family: var(--serif); color: var(--ink); font-size: var(--step-0); line-height: 1.6; }
.area__ask { font-size: var(--step--1); }
/* The map PNG is transparent with its own drop shadow baked in, so it sits
   directly on the section background rather than in a framed card. */
.area__map { margin: 0; }
.area__map img { display: block; width: 100%; height: auto; }
@media (max-width: 899px) { .area__map { margin-top: 0.5rem; } }
@media (min-width: 900px) { .area__map { max-width: 460px; margin-inline: auto; } }

/* ============================================================================
   Testimonials
   ========================================================================== */
.quotes { display: grid; gap: clamp(2rem, 5vw, 3.5rem); }
.quotes__lead blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: var(--step-3);
  line-height: 1.32;
  max-width: 20ch;
}
.quotes__rest { display: grid; gap: 2.25rem; align-content: start; }
@media (min-width: 860px) {
  .quotes { grid-template-columns: 1.2fr 1fr; align-items: start; }
}
.quotes__rest blockquote { margin: 0; font-size: var(--step-1); line-height: 1.5; color: var(--ink-70); }
.quotes cite {
  display: block;
  margin-top: 1rem;
  font-style: normal;
  font-size: var(--step--1);
  color: var(--ink-55);
  letter-spacing: 0.02em;
}
.quotes cite b { color: var(--brick); font-weight: 500; }

/* ============================================================================
   Meet Nate — a direct line
   ========================================================================== */
.nate { position: relative; background: var(--walnut); color: var(--ivory); overflow: hidden; }
.nate::before {
  content: "";
  position: absolute;
  inset: 0;
  /* Eases in from the light section above instead of cutting straight to the
     scrim. Opaque-to-opaque first (plaster to a solid near-black), then
     handing off to the existing translucent scrim, so the porch photo can't
     bleed through as a muddy haze partway through the blend. */
  background:
    linear-gradient(180deg, var(--plaster) 0%, rgb(20,16,14) clamp(70px, 10vw, 130px), rgba(20,16,14,0.9) 45%, rgba(20,16,14,0.96) 100%),
    url("img/hero-portrait.jpg") center 20% / cover no-repeat;
  z-index: 0;
}
.nate > .wrap { position: relative; z-index: 1; }
.nate__grid { display: grid; gap: clamp(1.75rem, 4vw, 3rem); align-items: start; }

/* A compact, deliberately "framed" portrait — arched top like a doorway or
   window, rather than a full-bleed photo. */
.nate__portrait {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  width: min(100%, 240px);
  margin-inline: auto;
  background: var(--walnut-raised);
  border-radius: 50% 50% 6px 6px / 26% 26% 6px 6px;
  box-shadow: 0 22px 44px -22px rgba(0, 0, 0, 0.6);
}
.nate__portrait img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.15) contrast(1.02); }
.nate__portrait::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(27,22,19,0.4) 100%);
}

/* Rules below must come after the base .nate__portrait rule above so they
   actually win the cascade at this breakpoint (equal specificity, source
   order decides). */
@media (min-width: 900px) {
  .nate__grid { grid-template-columns: minmax(200px, 260px) 1fr; }
  .nate__portrait { position: sticky; top: 6rem; margin-inline: 0; }
}

.nate__letter { max-width: 46ch; }
.nate__letter h2 { font-size: var(--step-4); margin-bottom: 1.15rem; }
.nate__letter p { color: var(--ivory-72); }
.nate__letter p + p { margin-top: 0.85rem; }
.nate__sign { margin-top: 1.5rem; }
.nate__sign .sig {
  display: block;
  height: clamp(3.1rem, 7.2vw, 4.2rem);
  width: auto;
}
.nate__sign .who { display: block; font-size: var(--step--1); color: var(--ivory-48); margin-top: 0.5rem; }

.nate__card {
  margin-top: 1.75rem;
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius);
  padding: clamp(1.15rem, 3vw, 1.6rem);
  display: grid;
  gap: 0.9rem;
  background: linear-gradient(180deg, rgba(131,182,168,0.06), rgba(131,182,168,0));
}
.nate__row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.nate__row .k { font-size: var(--step--1); color: var(--ivory-48); }
.nate__row .v { font-family: var(--serif); font-size: var(--step-1); }
.nate__row .v a { text-decoration: none; border-bottom: 1px solid var(--haint-bright); }
.nate__promise { font-size: var(--step--1); color: var(--ivory-72); border-top: 1px solid var(--line-on-dark); padding-top: 1rem; }
.nate__card .btn { margin-top: 0.25rem; }

/* ============================================================================
   Contact
   ========================================================================== */
.contact__grid { display: grid; gap: clamp(2.5rem, 6vw, 4rem); }
@media (min-width: 900px) { .contact__grid { grid-template-columns: 0.8fr 1.2fr; } }
.contact__aside p { color: var(--ivory-72); margin-top: 1rem; max-width: 32ch; }
.contact__aside .direct { margin-top: 2rem; display: grid; gap: 0.5rem; font-size: var(--step-0); }
.contact__aside .direct a { text-decoration: none; border-bottom: 1px solid var(--haint-bright); }

.form { display: grid; gap: 1.4rem; }
.form__row { display: grid; gap: 1.4rem; }
@media (min-width: 620px) { .form__row--2 { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 0.45rem; }
.field label { font-size: var(--step--1); color: var(--ivory-72); }
.field .req { color: var(--haint-bright); }
.field input, .field select, .field textarea {
  font: inherit;
  font-size: var(--step-0);
  color: var(--ivory);
  background: var(--walnut-raised);
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius);
  padding: 0.85em 0.9em;
  width: 100%;
  transition: border-color 0.2s var(--ease-out), background-color 0.2s var(--ease-out);
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--haint-bright);
  background: #2b2420;
  outline: none;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ivory-48) 50%), linear-gradient(135deg, var(--ivory-48) 50%, transparent 50%); background-position: right 1.1em center, right 0.85em center; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; }

.form__status { font-size: var(--step--1); min-height: 1.2em; }
.form__status[data-state="error"] { color: #e8a99b; }
.form__status[data-state="ok"] { color: var(--haint-bright); }
.form__consent { font-size: 0.78rem; color: var(--ivory-48); line-height: 1.5; }

/* ============================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--walnut); color: var(--ivory-72); border-top: 1px solid var(--line-on-dark); padding-block: clamp(3.5rem, 7vw, 5.5rem); }
.site-footer__top { display: grid; gap: 2.5rem; }
@media (min-width: 780px) { .site-footer__top { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer .brand { margin-bottom: 1.25rem; color: var(--ivory); }
.site-footer .brand__mark { height: 36px; }
.site-footer h4 { font-family: var(--sans); font-size: var(--step--1); letter-spacing: 0.1em; font-feature-settings: "smcp" 1; text-transform: lowercase; color: var(--ivory-48); margin-bottom: 1rem; font-weight: 500; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ivory); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; font-size: var(--step--1); }
.site-footer address { font-style: normal; font-size: var(--step--1); line-height: 1.7; }
.site-footer__legal {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-on-dark);
  font-size: 0.78rem;
  color: var(--ivory-48);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  column-gap: 1.5rem;
  row-gap: 0.5rem;
  flex-wrap: wrap;
}
.site-footer__legal__right { display: flex; flex-wrap: wrap; column-gap: 1.5rem; row-gap: 0.5rem; }

/* ============================================================================
   Interior page header offset + hero
   ========================================================================== */
.page-hero { background: var(--walnut); color: var(--ivory); padding-top: clamp(8rem, 18vh, 12rem); padding-bottom: clamp(3rem, 7vw, 5rem); }
.page-hero h1 { font-size: var(--step-5); max-width: 16ch; }
.page-hero .lede { margin-top: 1.5rem; color: var(--ivory-72); max-width: 44ch; }
.page-hero .back { display: block; margin-bottom: 1.75rem; font-size: var(--step--1); color: var(--ivory-48); text-decoration: none; }
.page-hero .back:hover { color: var(--ivory); }

/* Photo variant — same street photo + dark scrim recipe as the homepage
   hero, so a page opens on the same visual signature instead of a flat
   panel. Scoped to an added modifier so plain .page-hero pages are untouched. */
.page-hero--photo {
  background:
    linear-gradient(180deg, rgba(18,14,12,0.5) 0%, rgba(18,14,12,0.7) 55%, rgba(18,14,12,0.88) 100%),
    linear-gradient(70deg, rgba(18,14,12,0.72) 0%, rgba(18,14,12,0.3) 42%, rgba(18,14,12,0) 68%),
    url("img/services-hero.jpg") center 42% / cover no-repeat;
}
.page-hero--photo h1,
.page-hero--photo .lede,
.page-hero--photo .marker,
.page-hero--photo .back { text-shadow: 0 1px 18px rgba(0,0,0,0.4); }

/* Standalone full-bleed photo band below a page-hero — no text sits on top of
   this one, so no scrim, just the photo itself. Top and bottom edges fade into
   whatever's actually above/below it (walnut page-hero, plaster panel) so the
   photo settles into the page instead of having hard-cut edges. */
.page-photo { margin: 0; line-height: 0; position: relative; }
.page-photo img {
  /* No object-fit/cover here on purpose — a fixed height cropped a growing
     share of the photo as the viewport got wider (roughly half of it, top
     and bottom, on a typical desktop width). Sizing to the photo's own
     aspect ratio instead always shows the whole image, at every width. */
  display: block;
  width: 100%;
  height: auto;
}
.page-photo::before,
.page-photo::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: clamp(40px, 8vw, 90px);
  pointer-events: none;
}
.page-photo::before {
  top: 0;
  background: linear-gradient(180deg, var(--walnut) 0%, rgba(27, 22, 19, 0) 100%);
}
.page-photo::after {
  bottom: 0;
  background: linear-gradient(180deg, rgba(235, 231, 222, 0) 0%, var(--plaster) 100%);
}

/* Desktop-only: owner resources moves the same photo behind the page header
   (services.html's treatment) instead of as a standalone band below it.
   Mobile keeps .page-photo exactly as-is — this only fires at >=900px. */
@media (min-width: 900px) {
  .page-hero--photo-desktop {
    background:
      linear-gradient(180deg, rgba(18,14,12,0.5) 0%, rgba(18,14,12,0.7) 55%, rgba(18,14,12,0.88) 100%),
      linear-gradient(70deg, rgba(18,14,12,0.72) 0%, rgba(18,14,12,0.3) 42%, rgba(18,14,12,0) 68%),
      url("img/services-hero.jpg") center 40% / cover no-repeat;
  }
  .page-hero--photo-desktop h1,
  .page-hero--photo-desktop .lede,
  .page-hero--photo-desktop .marker,
  .page-hero--photo-desktop .back { text-shadow: 0 1px 18px rgba(0,0,0,0.4); }
  .page-hero--photo-desktop + .page-photo { display: none; }
}

/* Owner resources: the photo (behind the header on desktop, standalone band
   on mobile) already carries its own fade into this section, so the section's
   usual full --section-y top padding read as an oversized extra gap on top
   of that. Only the top is trimmed — bottom keeps the normal section rhythm. */
.owners-intro { padding-top: clamp(1.5rem, 3vw, 2.5rem); }

/* Eases the light panel below .page-hero--photo in from the photo's dark
   scrim instead of cutting straight to plaster — same recipe as .steps::before
   and .area::before on the homepage. */
.svc-intro { position: relative; }
.svc-intro::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: clamp(70px, 10vw, 130px);
  background: linear-gradient(180deg, rgb(18,14,12) 0%, rgba(18,14,12,0) 100%);
  z-index: 0;
  pointer-events: none;
}
.svc-intro > .wrap { position: relative; z-index: 1; }

.prose { max-width: 60ch; }
.prose h2 { font-size: var(--step-3); margin: clamp(2.5rem, 5vw, 3.5rem) 0 1rem; }
.prose h3 { font-size: var(--step-1); margin: 2rem 0 0.5rem; }
.prose p { color: var(--ink-70); margin-bottom: 1rem; }
.prose p:first-child { font-size: var(--step-1); color: var(--ink); }

/* A second, later heading within a .panel--light section — e.g. "Common
   questions" heading into the FAQ, below the main .prose block. */
.subsection-head { font-family: var(--serif); font-size: var(--step-3); margin: clamp(3rem, 6vw, 4.5rem) 0 1.5rem; }

/* FAQ */
.faq { border-top: 1px solid var(--line-on-light); }
.faq details { border-bottom: 1px solid var(--line-on-light); padding: 1.35rem 0; }
.faq summary {
  font-family: var(--serif);
  font-size: var(--step-1);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--sans); color: var(--haint); font-size: 1.4rem; line-height: 1; transition: transform 0.25s var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-70); margin-top: 0.85rem; max-width: 60ch; }

/* ============================================================================
   Reveal / motion states (progressive enhancement)
   Content is fully visible by default; JS opts in to animating it.
   ========================================================================== */
.js-anim .reveal { opacity: 0; transform: translateY(9px); }
.js-anim .reveal.is-visible { opacity: 1; transform: none; transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out); }

.js-anim .reveal-child > * { opacity: 0; transform: translateY(10px); }
.js-anim .reveal-child.is-visible > * { opacity: 1; transform: none; transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out); }
.js-anim .reveal-child.is-visible > *:nth-child(2) { transition-delay: 0.05s; }
.js-anim .reveal-child.is-visible > *:nth-child(3) { transition-delay: 0.10s; }
.js-anim .reveal-child.is-visible > *:nth-child(4) { transition-delay: 0.15s; }
.js-anim .reveal-child.is-visible > *:nth-child(5) { transition-delay: 0.20s; }
.js-anim .reveal-child.is-visible > *:nth-child(6) { transition-delay: 0.25s; }
.js-anim .reveal-child.is-visible > *:nth-child(7) { transition-delay: 0.30s; }
.js-anim .reveal-child.is-visible > *:nth-child(8) { transition-delay: 0.35s; }
.js-anim .reveal-child.is-visible > *:nth-child(9) { transition-delay: 0.40s; }
.js-anim .reveal-child.is-visible > *:nth-child(10) { transition-delay: 0.45s; }

@media (prefers-reduced-motion: reduce) {
  .js-anim .reveal,
  .js-anim .reveal-child > * { opacity: 1 !important; transform: none !important; }
  .step__rule::after { transition: none; }
  .hero__layer { transform: none !important; }
}

/* ---------- Utilities ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.u-mt-m { margin-top: 2rem; }
