/* ==========================================================================
   TRS RESIDENTIAL — DESIGN SYSTEM
   Direction: Navy authority + warm residential neutrals.
   Anchored to TRS Residential Brand Guidelines v1.0 (navy #0C4D93),
   extended with a warm sand/clay family so the site reads as a HOME,
   not a clinic.

   Motion: 100% CSS + inline SVG. No libraries, no video, no WebGL.
   Every animation uses transform/opacity only (compositor-friendly),
   and every animation is disabled under prefers-reduced-motion.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS
   -------------------------------------------------------------------------- */

:root {
  /* --- Navy (brand authority) --- */
  --navy-900: #08294B;
  --navy-800: #0A3566;
  --navy-700: #0A3E76;
  --navy:     #0C4D93;   /* BRAND PRIMARY — do not alter */
  --navy-500: #2E6AAC;
  --navy-400: #5B8CC4;
  --navy-200: #B9CDE4;
  --navy-100: #DCE6F2;
  --navy-050: #EDF2F9;

  /* --- Warm neutrals (the "home" side of the palette) --- */
  --cream:      #FBF8F3;
  --sand:       #F4EDE2;
  --sand-deep:  #E7DCC9;
  --sand-line:  #DED2BE;

  /* --- Clay accent (human warmth, CTAs, emphasis) --- */
  --clay:         #A85438;  /* 4.92:1 on cream, 5.21:1 under white text */
  --clay-600:     #944A31;
  --clay-soft:    #C9805C;
  --clay-on-dark: #F0C9A8;  /* 5.49:1 on navy — safe for text on dark */
  --clay-wash:    #F7EBE3;

  /* --- Ink --- */
  --ink:        #241F1B;  /* warm near-black, ~15:1 on cream */
  --ink-muted:  #5C544C;  /* 7.2:1 on cream */
  --ink-faint:  #6F675F;  /* 5.25:1 on cream — WCAG AA at body size */
  --white:      #FFFFFF;

  /* --- Semantic --- */
  --bg:          var(--cream);
  --bg-alt:      var(--sand);
  --surface:     var(--white);
  --border:      var(--sand-line);
  --border-soft: #EBE3D6;
  --focus:       var(--clay);
  --success:     #2F6B4F;
  --error:       #A3271F;

  /* --- Type --- */
  --font-display: 'Fraunces', Georgia, 'Iowan Old Style', 'Palatino Linotype', serif;
  --font-body: 'Source Sans 3', Calibri, 'Segoe UI', system-ui, -apple-system, sans-serif;

  /* Fluid scale — clamp(min, preferred, max) */
  --fs-xs:   0.8125rem;
  --fs-sm:   0.9375rem;
  --fs-base: 1.0625rem;
  --fs-md:   clamp(1.125rem, 0.4vw + 1.05rem, 1.25rem);
  --fs-lg:   clamp(1.3rem, 0.8vw + 1.15rem, 1.625rem);
  --fs-xl:   clamp(1.7rem, 1.6vw + 1.35rem, 2.35rem);
  --fs-2xl:  clamp(2.1rem, 2.8vw + 1.5rem, 3.15rem);
  --fs-3xl:  clamp(2.5rem, 4.4vw + 1.4rem, 4.25rem);

  /* --- Spacing (4px base) --- */
  --sp-1: 0.25rem;  --sp-2: 0.5rem;   --sp-3: 0.75rem;
  --sp-4: 1rem;     --sp-5: 1.5rem;   --sp-6: 2rem;
  --sp-7: 3rem;     --sp-8: 4rem;     --sp-9: 6rem;
  --sp-10: 8rem;

  /* Section rhythm — generous, marketing-page density */
  --section-y: clamp(3.5rem, 7vw, 7rem);

  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  --shadow-sm:   0 1px 2px rgba(36, 31, 27, .05), 0 6px 16px -10px rgba(8, 41, 75, .22);
  --shadow-md:   0 2px 4px rgba(36, 31, 27, .05), 0 18px 36px -20px rgba(8, 41, 75, .28);
  --shadow-lift: 0 4px 8px rgba(36, 31, 27, .06), 0 32px 60px -28px rgba(8, 41, 75, .36);

  --ease:     cubic-bezier(.22, 1, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --container: 1180px;
  --container-narrow: 780px;

  --header-h: 74px;
}

/* --------------------------------------------------------------------------
   2. RESET / BASE
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body, h1, h2, h3, h4, h5, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select, button { font-family: inherit; font-size: inherit; color: inherit; }

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;           /* belt-and-braces: never scroll sideways */
  text-rendering: optimizeLegibility;
}

/* Visible, high-contrast focus for keyboard users only */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}
.on-navy :focus-visible,
.site-footer :focus-visible { outline-color: var(--clay-on-dark); }

::selection { background: var(--navy-100); color: var(--navy-900); }

.skip-link {
  position: absolute; left: var(--sp-4); top: -100px; z-index: 200;
  background: var(--navy); color: var(--white);
  padding: var(--sp-3) var(--sp-5); border-radius: var(--radius-sm);
  font-weight: 600; transition: top .2s var(--ease);
}
.skip-link:focus { top: var(--sp-4); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   3. TYPOGRAPHY
   -------------------------------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  font-variation-settings: 'SOFT' 20, 'WONK' 0;
  color: var(--navy-900);
  text-wrap: balance;
}

h1 { font-size: var(--fs-3xl); line-height: 1.05; }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-lg); line-height: 1.25; }
h4 { font-size: var(--fs-md); line-height: 1.3; }

p { text-wrap: pretty; }

.lead {
  font-size: var(--fs-md);
  line-height: 1.6;
  color: var(--ink-muted);
  max-width: 62ch;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--sp-3);
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: var(--sp-4);
}
.eyebrow::before {
  content: ''; width: 26px; height: 2px; flex: none;
  background: currentColor; border-radius: 2px;
}
.eyebrow.center { justify-content: center; }

/* On any dark ground, the eyebrow must switch to the light clay tint.
   #A85438 on navy is only 2.79:1; --clay-on-dark is 5.49:1. */
.section-navy .eyebrow,
.hero .eyebrow,
.page-hero .eyebrow,
.cta-band .eyebrow,
.site-footer .eyebrow { color: var(--clay-on-dark); }

.section-head { max-width: 720px; margin-bottom: var(--sp-7); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { margin-top: var(--sp-4); }

/* --------------------------------------------------------------------------
   4. LAYOUT
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}
.container-narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--section-y); }
.section-tight { padding-block: clamp(2.5rem, 5vw, 4.5rem); }

.section-sand  { background: var(--sand); }
.section-cream { background: var(--cream); }
.section-white { background: var(--white); }

.section-navy {
  background: var(--navy-900);
  color: var(--sand);
  position: relative;
  overflow: hidden;
}
.section-navy h1, .section-navy h2, .section-navy h3, .section-navy h4 { color: var(--white); }
.section-navy .lead, .section-navy p { color: var(--navy-200); }

.grid { display: grid; gap: var(--sp-5); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
}

.stack > * + * { margin-top: var(--sp-4); }
.center-text { text-align: center; }

/* --------------------------------------------------------------------------
   5. BUTTONS
   -------------------------------------------------------------------------- */

.btn {
  --btn-bg: var(--navy);
  --btn-fg: var(--white);
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--sp-3);
  min-height: 50px;                       /* > 44px touch target */
  padding: var(--sp-3) var(--sp-6);
  background: var(--btn-bg); color: var(--btn-fg);
  border-radius: var(--radius-pill);
  font-weight: 600; font-size: var(--fs-base);
  letter-spacing: .005em;
  text-align: center;
  border: 2px solid transparent;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease),
              background-color .2s var(--ease), border-color .2s var(--ease);
  will-change: transform;
}
.btn svg { flex: none; transition: transform .3s var(--ease); }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:hover svg { transform: translateX(4px); }
.btn:active { transform: translateY(0); transition-duration: .08s; }

.btn-primary { --btn-bg: var(--clay); }
.btn-primary:hover { --btn-bg: var(--clay-600); }

.btn-navy { --btn-bg: var(--navy); }
.btn-navy:hover { --btn-bg: var(--navy-700); }

.btn-outline {
  --btn-bg: transparent; --btn-fg: var(--navy-900);
  border-color: var(--navy-200);
}
.btn-outline:hover { --btn-bg: var(--white); border-color: var(--navy); }

.btn-light { --btn-bg: var(--white); --btn-fg: var(--navy-900); }
.btn-light:hover { --btn-bg: var(--sand); }

.btn-outline-light {
  --btn-bg: transparent; --btn-fg: var(--white);
  border-color: rgba(255,255,255,.42);
}
.btn-outline-light:hover { --btn-bg: rgba(255,255,255,.12); border-color: var(--white); }

.btn-sm { min-height: 44px; padding: var(--sp-2) var(--sp-5); font-size: var(--fs-sm); }
.btn-block { width: 100%; }

.btn-row {
  display: flex; flex-wrap: wrap; gap: var(--sp-4);
  margin-top: var(--sp-6);
}
.btn-row.center { justify-content: center; }

/* Text link with animated underline */
.link-arrow {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-weight: 600; color: var(--clay);
  position: relative; padding-block: 2px;
}
.link-arrow::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 2px; background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.link-arrow:hover::after, .link-arrow:focus-visible::after { transform: scaleX(1); }
.link-arrow svg { transition: transform .3s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   6. ANNOUNCEMENT BAR + HEADER
   -------------------------------------------------------------------------- */

.announce {
  background: var(--navy-900);
  color: var(--sand);
  font-size: var(--fs-sm);
  position: relative; overflow: hidden;
}
.announce .container {
  display: flex; align-items: center; justify-content: center;
  gap: var(--sp-4); flex-wrap: wrap;
  padding-block: var(--sp-3);
  text-align: center;
}
.announce strong { color: var(--white); font-weight: 700; }
.announce a {
  color: var(--clay-on-dark); font-weight: 700;
  text-decoration: underline; text-underline-offset: 3px;
}
.announce a:hover { color: var(--white); }

/* Slow shimmer sweep — pure transform, GPU-composited */
.announce::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(240,201,168,.13) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: sweep 9s var(--ease) infinite;
  pointer-events: none;
}
@keyframes sweep { 0%,55% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251, 248, 243, .88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease),
              background-color .3s var(--ease);
}
.site-header.is-stuck {
  border-bottom-color: var(--border-soft);
  box-shadow: 0 4px 24px -18px rgba(8, 41, 75, .5);
}
.site-header > .container {
  display: flex; align-items: center; gap: var(--sp-5);
  min-height: var(--header-h);
}

.brand { flex: none; display: flex; align-items: center; min-height: 44px; }
.brand img { height: 42px; width: auto; }

.nav-links {
  display: flex; align-items: center; gap: var(--sp-2);
  margin-left: auto;
}
.nav-links a {
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--fs-sm); font-weight: 600;
  color: var(--ink-muted);
  border-radius: var(--radius-sm);
  position: relative;
  transition: color .2s var(--ease);
  white-space: nowrap;
}
.nav-links a::after {
  content: ''; position: absolute;
  left: var(--sp-3); right: var(--sp-3); bottom: 2px; height: 2px;
  background: var(--clay); border-radius: 2px;
  transform: scaleX(0); transform-origin: center;
  transition: transform .3s var(--ease);
}
.nav-links a:hover { color: var(--navy-900); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a[aria-current="page"] { color: var(--navy-900); }
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: var(--sp-3); flex: none; }

.phone-link {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-weight: 700; color: var(--navy-900); font-size: var(--fs-sm);
  padding: var(--sp-2);
  min-height: 44px;              /* full touch target */
  white-space: nowrap;
}
.phone-link svg { color: var(--clay); }
.phone-link:hover { color: var(--clay); }

.nav-toggle {
  display: none;
  width: 46px; height: 46px;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
  border-radius: var(--radius-sm);
}
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--navy-900); border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.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); }

.mobile-panel {
  display: none;
  position: sticky; top: var(--header-h); z-index: 99;
  background: var(--cream);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  max-height: 0;
  transition: max-height .38s var(--ease);
}
/* 80vh + scroll so the menu can never clip its own links,
   even at large user font sizes or on short screens. */
.mobile-panel.is-open { max-height: 80vh; overflow-y: auto; }
.mobile-panel .container { padding-block: var(--sp-4); }
.mobile-panel a {
  display: block; padding: var(--sp-4) var(--sp-2);
  font-weight: 600; font-size: var(--fs-md);
  border-bottom: 1px solid var(--border-soft);
  color: var(--navy-900);
}
.mobile-panel a:last-child { border-bottom: 0; }
.mobile-panel .btn { margin-top: var(--sp-4); }

/* --------------------------------------------------------------------------
   7. HERO
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  background: var(--navy-900);
  color: var(--white);
  overflow: hidden;
  isolation: isolate;
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; }
/* Scrim is heavy on the left where the headline sits, and opens up on the
   right so the photo of the home is actually visible. Keep the left stops
   dark — the hero h1/lead sit over them and need white text to stay legible. */
.hero-media::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(8,41,75,.92) 0%, rgba(8,41,75,.85) 36%, rgba(8,41,75,.45) 70%, rgba(8,41,75,.22) 100%),
    linear-gradient(180deg, rgba(8,41,75,.34) 0%, rgba(8,41,75,.16) 45%, rgba(8,41,75,.58) 100%);
}

/* Slow "breathing" warm glow — scale+opacity only */
.hero-glow {
  position: absolute; z-index: -1;
  width: 60vw; height: 60vw; max-width: 760px; max-height: 760px;
  right: -12vw; top: -14vw;
  background: radial-gradient(circle, rgba(240,201,168,.24) 0%, rgba(240,201,168,0) 68%);
  border-radius: 50%;
  animation: breathe 14s ease-in-out infinite;
  pointer-events: none;
}
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: .85; }
  50%      { transform: scale(1.14); opacity: 1; }
}

.hero-inner {
  position: relative;
  padding-block: clamp(4.5rem, 12vw, 9rem);
  max-width: 780px;
}
.hero h1 { color: var(--white); }
.hero .eyebrow { color: var(--clay-on-dark); }
.hero .lead {
  color: rgba(255,255,255,.9);
  margin-top: var(--sp-5);
  font-size: clamp(1.125rem, .6vw + 1.05rem, 1.35rem);
  max-width: 56ch;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-5) var(--sp-2) var(--sp-3);
  background: rgba(255,255,255,.11);
  border: 1px solid rgba(255,255,255,.24);
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm); font-weight: 600;
  color: var(--white);
  margin-bottom: var(--sp-5);
  backdrop-filter: blur(6px);
}
.hero-badge .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--clay-on-dark); flex: none;
  position: relative;
}
.hero-badge .dot::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: var(--clay-on-dark);
  animation: ping 2.6s var(--ease-out) infinite;
}
@keyframes ping {
  0%   { transform: scale(1); opacity: .8; }
  70%, 100% { transform: scale(3.2); opacity: 0; }
}

/* Page hero (inner pages) */
.page-hero {
  background: var(--navy-900);
  color: var(--white);
  padding-block: clamp(3rem, 7vw, 5.5rem);
  position: relative; overflow: hidden;
}
.page-hero h1 { color: var(--white); }
.page-hero .lead { color: var(--navy-200); margin-top: var(--sp-4); }
.page-hero .eyebrow { color: var(--clay-on-dark); }
.page-hero .hero-glow { width: 44vw; height: 44vw; opacity: .7; }

/* --------------------------------------------------------------------------
   8. VITALS LINE — the signature "care" motion element
   An ECG/heartbeat trace that draws itself once on scroll, with a
   traveling pulse dot. Pure SVG stroke-dashoffset + translate.
   -------------------------------------------------------------------------- */

.vitals {
  display: block; width: 100%; height: 56px;
  overflow: visible;
}
.vitals .track {
  fill: none;
  stroke: var(--navy-200);
  stroke-width: 1.5;
  opacity: .5;
}
.vitals .trace {
  fill: none;
  stroke: var(--clay);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Only hide the trace for drawing when motion is active (see .js-motion note) */
.js-motion .vitals .trace {
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  transition: stroke-dashoffset 2.4s cubic-bezier(.5, 0, .2, 1);
}
.js-motion .vitals.is-drawn .trace { stroke-dashoffset: 0; }

.vitals .pulse-dot { fill: var(--clay); }
.js-motion .vitals .pulse-dot { opacity: 0; }
.js-motion .vitals.is-drawn .pulse-dot {
  animation: dot-in .5s var(--ease) 2.1s forwards;
}
@keyframes dot-in { to { opacity: 1; } }

.section-navy .vitals .track { stroke: var(--navy-500); opacity: .55; }
.section-navy .vitals .trace { stroke: var(--clay-on-dark); }
.section-navy .vitals .pulse-dot { fill: var(--clay-on-dark); }

.vitals-band { padding-block: var(--sp-6); }

/* --------------------------------------------------------------------------
   9. STAT BAND (the floating card from the reference designs)
   -------------------------------------------------------------------------- */

.stat-band-wrap { position: relative; z-index: 5; margin-top: calc(var(--sp-8) * -1); }

.stat-band {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  border: 1px solid var(--border-soft);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  overflow: hidden;
}
.stat {
  padding: clamp(1.5rem, 3vw, 2.25rem) var(--sp-5);
  text-align: center;
  border-right: 1px solid var(--border-soft);
  position: relative;
}
.stat:last-child { border-right: 0; }
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.2vw, 2.85rem);
  font-weight: 600;
  line-height: 1;
  color: var(--navy);
  letter-spacing: -.02em;
  display: block;
}
.stat-label {
  display: block;
  margin-top: var(--sp-3);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: .01em;
}
.stat::after {
  content: ''; position: absolute; left: 50%; bottom: 0;
  width: 46px; height: 3px; background: var(--clay);
  border-radius: 3px 3px 0 0;
  transform: translateX(-50%) scaleX(1);
  transition: transform .6s var(--ease);
}
.js-motion .stat::after { transform: translateX(-50%) scaleX(0); }
.js-motion .stat-band.is-visible .stat::after { transform: translateX(-50%) scaleX(1); }
.stat-band.is-visible .stat:nth-child(2)::after { transition-delay: .1s; }
.stat-band.is-visible .stat:nth-child(3)::after { transition-delay: .2s; }
.stat-band.is-visible .stat:nth-child(4)::after { transition-delay: .3s; }

/* --------------------------------------------------------------------------
   10. CARDS
   -------------------------------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: clamp(1.5rem, 2.5vw, 2rem);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease),
              border-color .35s var(--ease);
  height: 100%;
}
.card h3 { margin-bottom: var(--sp-3); }
.card p { color: var(--ink-muted); font-size: var(--fs-sm); line-height: 1.6; }

a.card, .card-interactive { display: block; }
a.card:hover, .card-interactive:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lift);
  border-color: var(--navy-200);
}

/* Service card — icon + label, the 10 "what we provide" items */
.service-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: var(--sp-6) var(--sp-5);
  display: flex; flex-direction: column; gap: var(--sp-4);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease),
              border-color .35s var(--ease);
  height: 100%;
}
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--navy-200);
}
.service-icon {
  width: 52px; height: 52px; flex: none;
  display: grid; place-items: center;
  border-radius: var(--radius-md);
  background: var(--navy-050);
  color: var(--navy);
  transition: background-color .35s var(--ease), color .35s var(--ease),
              transform .35s var(--ease);
}
.service-card:hover .service-icon {
  background: var(--clay-wash);
  color: var(--clay);
  transform: scale(1.06) rotate(-3deg);
}
.service-card h3 { font-size: var(--fs-md); margin: 0; }
.service-card p { color: var(--ink-muted); font-size: var(--fs-sm); margin: 0; }

/* Door card — big photo entry points */
.door-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
  height: 100%;
}
.door-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.door-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--sand-deep); }
.door-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .7s var(--ease);
}
.door-card:hover .door-media img { transform: scale(1.06); }
.door-body { padding: var(--sp-5); }
.door-body h3 { margin-bottom: var(--sp-3); }
.door-body p { color: var(--ink-muted); font-size: var(--fs-sm); margin-bottom: var(--sp-4); }

/* Value chip */
.value-chip {
  border: 1px solid var(--border);
  border-left: 3px solid var(--clay);
  border-radius: var(--radius-sm);
  padding: var(--sp-5);
  background: var(--surface);
  height: 100%;
  transition: transform .3s var(--ease), border-left-color .3s var(--ease);
}
.value-chip:hover { transform: translateX(4px); }
.value-chip h3 { font-size: var(--fs-md); margin-bottom: var(--sp-2); }
.value-chip p { color: var(--ink-muted); font-size: var(--fs-sm); }
.section-navy .value-chip {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.14);
  border-left-color: var(--clay-on-dark);
}
.section-navy .value-chip p { color: var(--navy-200); }

/* Pill list — payment options, partner services */
.pill-list { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.pill {
  display: inline-flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-weight: 600; font-size: var(--fs-sm);
  color: var(--navy-900);
  transition: transform .25s var(--ease), border-color .25s var(--ease),
              background-color .25s var(--ease);
}
.pill:hover { transform: translateY(-2px); border-color: var(--clay); }
.pill svg { color: var(--clay); flex: none; }
.section-navy .pill {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.16);
  color: var(--white);
}
.section-navy .pill svg { color: var(--clay-on-dark); }

/* Check list */
.check-list { display: grid; gap: var(--sp-4); }
.check-list li {
  display: flex; align-items: flex-start; gap: var(--sp-4);
  font-size: var(--fs-base);
}
.check-list svg { flex: none; margin-top: 4px; color: var(--clay); }
.section-navy .check-list svg { color: var(--clay-on-dark); }

/* Framed photo with the "gable" roofline nod to the logo */
.frame {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--sand-deep);
  box-shadow: var(--shadow-md);
}
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame-tall { aspect-ratio: 4 / 5; }
.frame-wide { aspect-ratio: 3 / 2; }

/* Price callout */
.price-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 4px solid var(--clay);
  border-radius: var(--radius-md);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  box-shadow: var(--shadow-sm);
}
.price-amount {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 5vw, 3.85rem);
  font-weight: 600; line-height: 1;
  color: var(--navy);
  letter-spacing: -.02em;
}
.price-amount .from {
  display: block;
  font-family: var(--font-body);
  font-size: var(--fs-sm); font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--clay);
  margin-bottom: var(--sp-3);
}
.price-amount .per {
  font-family: var(--font-body);
  font-size: var(--fs-md); font-weight: 600;
  color: var(--ink-muted); letter-spacing: 0;
}

/* Numbered process steps with a line that grows on scroll */
.steps { position: relative; display: grid; gap: var(--sp-6); }
.steps::before {
  content: ''; position: absolute;
  left: 23px; top: 12px; bottom: 12px; width: 2px;
  background: var(--border);
  transform: scaleY(1); transform-origin: top;
  transition: transform 1.2s var(--ease);
}
.js-motion .steps::before { transform: scaleY(0); }
.js-motion .steps.is-visible::before { transform: scaleY(1); }
.step { display: flex; gap: var(--sp-5); align-items: flex-start; position: relative; }
.step-num {
  width: 48px; height: 48px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--navy); color: var(--white);
  font-family: var(--font-display); font-weight: 600; font-size: var(--fs-md);
  box-shadow: 0 0 0 6px var(--bg);
  position: relative; z-index: 1;
}
.section-sand .step-num { box-shadow: 0 0 0 6px var(--sand); }
.step-body h3 { font-size: var(--fs-md); margin-bottom: var(--sp-2); }
.step-body p { color: var(--ink-muted); font-size: var(--fs-sm); }

/* CTA band */
.cta-band {
  background: var(--navy-900);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 5vw, 3.5rem);
  text-align: center;
  position: relative; overflow: hidden;
}
.cta-band h2 { color: var(--white); }
.cta-band .lead { color: var(--navy-200); margin: var(--sp-4) auto 0; }
.cta-band .eyebrow { color: var(--clay-on-dark); }

/* Policy / legal block */
.policy {
  background: var(--sand);
  border: 1px solid var(--sand-line);
  border-left: 4px solid var(--navy);
  border-radius: var(--radius-md);
  padding: clamp(1.5rem, 3vw, 2.25rem);
}
.policy h3 { font-size: var(--fs-md); margin-bottom: var(--sp-3); }
.policy p { color: var(--ink-muted); font-size: var(--fs-sm); line-height: 1.7; }

.note {
  font-size: var(--fs-sm);
  color: var(--ink-faint);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   11. FORMS
   -------------------------------------------------------------------------- */

.form-card {
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3.5vw, 2.75rem);
  box-shadow: var(--shadow-md);
}

.form-grid { display: grid; gap: var(--sp-5); }
.form-grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

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

.field label {
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--navy-900);
}
.field .req { color: var(--clay); margin-left: 2px; }
.field .hint { font-size: var(--fs-xs); color: var(--ink-faint); font-weight: 400; }

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: var(--sp-3) var(--sp-4);
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease),
              background-color .2s var(--ease);
}
.field textarea { min-height: 130px; padding-top: var(--sp-3); resize: vertical; }

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none'%3E%3Cpath d='M1 1L7 7L13 1' stroke='%235C544C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--sp-4) center;
  padding-right: var(--sp-8);
  cursor: pointer;
}

.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--navy-200); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  background: var(--white);
  border-color: var(--navy);
  box-shadow: 0 0 0 4px rgba(12, 77, 147, .13);
}
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: none;   /* the ring above is the focus indicator */
}

/* Inline validation — error shown next to the field, never only at the top */
.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--error);
  background: #FDF4F3;
}
.field.has-error input:focus,
.field.has-error select:focus,
.field.has-error textarea:focus {
  box-shadow: 0 0 0 4px rgba(163, 39, 31, .13);
}
.field-error {
  display: none;
  align-items: center; gap: var(--sp-2);
  font-size: var(--fs-xs); font-weight: 600;
  color: var(--error);
}
.field.has-error .field-error { display: flex; }

/* Honeypot — hidden from humans, catches naive bots */
.hp-field {
  position: absolute; left: -9999px;
  width: 1px; height: 1px; overflow: hidden;
}

.form-status {
  display: none;
  align-items: flex-start; gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  line-height: 1.55;
}
.form-status.is-shown { display: flex; }
.form-status.is-success {
  background: #EDF6F1; border: 1px solid #BCDCCB; color: var(--success);
}
.form-status.is-error {
  background: #FDF4F3; border: 1px solid #EFC9C5; color: var(--error);
}
.form-status svg { flex: none; margin-top: 2px; }

.btn[aria-busy="true"] { opacity: .75; pointer-events: none; }
.btn .spinner {
  width: 17px; height: 17px; flex: none;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: none;
}
.btn[aria-busy="true"] .spinner { display: block; }
.btn[aria-busy="true"] .btn-icon { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   12. FOOTER
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--navy-900);
  color: var(--navy-200);
  padding-top: var(--sp-8);
  font-size: var(--fs-sm);
}
.footer-top {
  display: grid;
  gap: var(--sp-7);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  padding-bottom: var(--sp-7);
}
.footer-brand { max-width: 330px; }
.footer-brand img { height: 62px; width: auto; margin-bottom: var(--sp-4); }
.footer-brand p { color: var(--navy-200); line-height: 1.65; }

.footer-col h4 {
  color: var(--white);
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: var(--sp-4);
}
.footer-col a, .footer-col p {
  display: block;
  color: var(--navy-200);
  padding-block: var(--sp-2);
  transition: color .2s var(--ease), transform .2s var(--ease);
}
.footer-col a:hover { color: var(--clay-on-dark); transform: translateX(3px); }

.footer-legal {
  border-top: 1px solid rgba(255,255,255,.13);
  padding-block: var(--sp-5);
  display: flex; flex-wrap: wrap; gap: var(--sp-4);
  align-items: center; justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--navy-200);
}
.footer-policy {
  border-top: 1px solid rgba(255,255,255,.13);
  padding-block: var(--sp-6);
}
.footer-policy h4 {
  color: var(--white);
  font-family: var(--font-body);
  font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: var(--sp-3);
}
.footer-policy p {
  color: var(--navy-200); font-size: var(--fs-xs);
  line-height: 1.7; max-width: 92ch;
}

/* --------------------------------------------------------------------------
   13. SCROLL REVEAL
   Opacity + translateY only. Staggered via --i.
   -------------------------------------------------------------------------- */

/* IMPORTANT — motion is OPT-IN, never opt-out.
   Content is visible by default. The `js-motion` class is added to <html>
   by main.js only when JS is running, IntersectionObserver exists, and the
   visitor has not asked for reduced motion. If any of those are false, the
   page simply renders normally: nothing is ever hidden behind a script. */
.js-motion .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.js-motion .reveal.is-visible { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   14. RESPONSIVE
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .mobile-panel { display: block; }
  .site-header > .container { gap: var(--sp-4); }
}

@media (max-width: 720px) {
  :root { --header-h: 66px; }
  .brand img { height: 36px; }
  .phone-link span { display: none; }   /* icon-only on small screens */
  .phone-link { padding: var(--sp-3); }
  .header-actions .btn { display: none; }
  .stat-band-wrap { margin-top: calc(var(--sp-6) * -1); }
  .stat { border-right: 0; border-bottom: 1px solid var(--border-soft); }
  .stat:last-child { border-bottom: 0; }
  .btn-row .btn { width: 100%; }
  .footer-legal { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .hero-inner { padding-block: clamp(3rem, 14vw, 5rem); }
}

/* --------------------------------------------------------------------------
   15. REDUCED MOTION — everything above degrades to instant + static
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .vitals .trace { stroke-dashoffset: 0; }
  .vitals .pulse-dot { opacity: 1; }
  .steps::before { transform: scaleY(1); }
  .stat::after { transform: translateX(-50%) scaleX(1); }
  .announce::after { display: none; }
  .hero-glow { animation: none; }
  .hero-badge .dot::after { animation: none; opacity: 0; }
}

/* --------------------------------------------------------------------------
   16. PRINT
   -------------------------------------------------------------------------- */

@media print {
  .site-header, .mobile-panel, .announce, .nav-toggle, .btn-row, .vitals { display: none !important; }
  body { background: #fff; color: #000; }
  .hero, .page-hero, .section-navy, .cta-band, .site-footer {
    background: #fff !important; color: #000 !important;
  }
  .hero h1, .page-hero h1, .section-navy h2, .cta-band h2 { color: #000 !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
