/* Radius system: interactive = pill, cards/media = 24px, inputs = 14px, small chips = 16px */
:root {
  --bg: #f5f4ee; /* warm soft white: homier than cool grey, not cream */
  --surface: #fdfcf8;
  --surface-2: #eae9e1;
  --ink: #121a16;
  --muted: #585e56;
  --line: rgba(18, 26, 22, .1);
  --forest: #163325;
  --forest-2: #1f4533;
  --accent: #e2a336;
  --accent-ink: #1c1405;
  --primary-bg: var(--forest);
  --primary-ink: #f3f5f1;
  --primary-hover: var(--forest-2);
  --focus: #163325;
  --tab-active: var(--forest);
  --water: #9cc0cf;
  --water-ink: #3f6f82;
  --error: #b42318;
  --shadow: 0 1px 2px rgba(22, 51, 37, .06), 0 24px 48px -28px rgba(22, 51, 37, .35);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-sine: cubic-bezier(0.37, 0, 0.63, 1); /* easeInOutSine (easings.net): even, unhurried line drawing */
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  /* easeOutQuart (easings.net): softer than --ease-out, so scroll-scrubbed motion spreads evenly instead of snapping early */
  --ease-scroll: cubic-bezier(0.25, 1, 0.5, 1);
  --r-card: 24px;
  --accent-hover: #ecb24b;
  --on-dark: #f3f5f1; /* text on forest and photo surfaces, same in both themes */
  --on-dark-muted: rgba(243, 245, 241, .8);
  --r-input: 14px;
  --chip: 48px;
  --max: 1200px;
  --gutter: 16px;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Figtree", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1411;
    --surface: #151d19;
    --surface-2: #1c2621;
    --ink: #eaf0eb;
    --muted: #a2afa6;
    --line: rgba(234, 240, 235, .1);
    --forest: #1b3b2b;
    --forest-2: #24503a;
    --primary-bg: #e2a336;
    --primary-ink: #1c1405;
    --primary-hover: #ecb24b;
    --focus: #e2a336;
    --tab-active: #2a5a41;
    --water: #2f5868;
    --water-ink: #8fb9ca;
    --error: #ff8a7a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 24px 48px -28px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1411;
  --surface: #151d19;
  --surface-2: #1c2621;
  --ink: #eaf0eb;
  --muted: #a2afa6;
  --line: rgba(234, 240, 235, .1);
  --forest: #1b3b2b;
  --forest-2: #24503a;
  --primary-bg: #e2a336;
  --primary-ink: #1c1405;
  --primary-hover: #ecb24b;
  --focus: #e2a336;
  --tab-active: #2a5a41;
  --water: #2f5868;
  --water-ink: #8fb9ca;
  --error: #ff8a7a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 24px 48px -28px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
html.lenis, html.lenis body { height: auto; }
html.lenis { scroll-behavior: auto; }
.lenis.lenis-stopped { overflow: hidden; }
body { margin: 0; font: 400 1.0625rem/1.65 var(--body); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
body.menu-open { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: .2em; }
a, button, [role="tab"] { touch-action: manipulation; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.025em; line-height: 1.05; margin: 0 0 .45em; }
h2 { font-size: clamp(2rem, 4.2vw, 3.25rem); text-wrap: balance; }
h3 { font-size: 1.45rem; letter-spacing: -.015em; line-height: 1.15; }
.wrap { width: min(100% - 2 * var(--gutter) - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px), var(--max)); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; padding: 10px 16px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.hero :focus-visible, .band :focus-visible, .cell-forest :focus-visible, .site-nav:not(.is-solid) :focus-visible, .tablist [aria-selected="true"]:focus-visible, .panel-media-feature :focus-visible { outline-color: var(--accent); }
[class^="ph-"], [class*=" ph-"] { line-height: 1; }
.btn, .tablist button, .menu a, .dot, .hero-pause, .pin { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

::selection { background: var(--accent); color: var(--accent-ink); }
html { scrollbar-color: color-mix(in srgb, var(--ink) 35%, transparent) var(--bg); accent-color: var(--forest); }
input, select, textarea { caret-color: var(--accent); }
.section-sub { color: var(--muted); max-width: 60ch; font-size: 1.1rem; }


/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 12px; min-height: 54px; padding: 8px 8px 8px 24px; border: 0; border-radius: 999px; font: 600 1rem/1.15 var(--body); text-decoration: none; white-space: nowrap; cursor: pointer; background: var(--primary-bg); color: var(--primary-ink); transition: transform 160ms var(--ease-out), background-color 200ms ease, color 200ms ease; }
.btn:active { transform: scale(.97); }
.btn .ic { display: grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .16); font-size: 1.05rem; transition: transform 220ms var(--ease-out); }
.btn-sm { min-height: 44px; padding: 12px 20px; font-size: .95rem; }
.btn-sm:has(.ic) { padding: 8px 8px 8px 20px; }
.btn-sm .ic { width: 32px; height: 32px; }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent > span, .btn-accent > .ic { color: var(--accent-ink); }
.btn-accent .ic { background: rgba(28, 20, 5, .1); }
.btn-primary { background: var(--primary-bg); color: var(--primary-ink); }
.btn-primary > span, .btn-primary > .ic { color: var(--primary-ink); }
.btn-glass { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn-quiet { background: transparent; color: inherit; box-shadow: inset 0 0 0 1px currentColor; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover .ic { transform: translateX(3px); }
  .btn:hover .ph-arrow-up-right { transform: translate(2px, -2px); }
  .btn:hover .ph-arrow-down { transform: translateY(2px); }
  .btn-accent:hover { background: var(--accent-hover); }
  .btn-glass:hover { background: rgba(255, 255, 255, .2); }
  .btn-primary:hover { background: var(--primary-hover); }
}

/* ---------- logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.logo-mark { width: 40px; height: 40px; flex-shrink: 0; }
.logo-mark rect { fill: var(--accent); }
.logo-mark path { fill: none; stroke: #122019; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.logo-text { display: grid; line-height: 1.05; }
.logo-text strong { font-family: var(--display); font-size: 1.3rem; font-weight: 700; letter-spacing: -.02em; }
.logo-text small { font-size: .82rem; font-weight: 500; letter-spacing: .05em; }

/* ---------- nav ---------- */
.site-nav { position: fixed; inset: 0 0 auto; z-index: 40; padding-top: env(safe-area-inset-top, 0px); color: #fff; transition: background-color 300ms ease, color 300ms ease, box-shadow 300ms ease; }
.nav-row { display: flex; align-items: center; gap: 32px; height: 76px; }
.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a { text-decoration: none; font-weight: 500; font-size: .98rem; opacity: .88; transition: opacity 200ms ease; }
.nav-actions { display: flex; gap: 10px; }
.site-nav.is-solid { background: color-mix(in srgb, var(--surface) 82%, transparent); color: var(--ink); box-shadow: 0 1px 0 var(--line); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); }
.menu-toggle { display: none; position: relative; width: 46px; height: 46px; margin-left: auto; border: 0; border-radius: 50%; background: var(--accent); cursor: pointer; }
.menu-toggle span { position: absolute; left: 14px; right: 14px; height: 2px; border-radius: 2px; background: var(--accent-ink); transition: transform 300ms var(--ease-out); }
.menu-toggle span:first-child { top: 18px; }
.menu-toggle span:last-child { top: 26px; }
body.menu-open .menu-toggle span:first-child { transform: translateY(4px) rotate(45deg); }
body.menu-open .menu-toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }
@media (hover: hover) and (pointer: fine) { .nav-links a:hover { opacity: 1; } }

.menu { position: fixed; inset: 0; z-index: 35; display: grid; place-items: center; background: var(--bg); opacity: 0; visibility: hidden; transition: opacity 250ms ease, visibility 0s 250ms; }
body.menu-open .menu { opacity: 1; visibility: visible; transition: opacity 300ms var(--ease-out); }
.menu nav { display: grid; gap: 8px; text-align: center; }
.menu a { font: 600 clamp(2rem, 9vw, 2.8rem)/1.2 var(--display); letter-spacing: -.02em; text-decoration: none; color: var(--ink); opacity: 0; transform: translateY(24px); transition: opacity 200ms ease, transform 200ms ease; }
body.menu-open .menu a { opacity: 1; transform: none; transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out); transition-delay: calc(var(--i) * 50ms + 80ms); }
body.menu-open .menu a:active { opacity: .6; transition-delay: 0ms; }
body.menu-open .site-nav { color: var(--ink); }
body.menu-open .nav-actions { visibility: hidden; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: min(100svh, 940px); display: flex; color: #fff; overflow: hidden; background: #0d1712; isolation: isolate; }
.hero-slides { position: absolute; inset: 0; z-index: -2; }
.slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 1200ms ease; }
.slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); }
/* One shared grade so the owner's phone photos read as a set */
.slide img, .panel-media img, .cell-photo img { filter: saturate(.88) contrast(1.06) brightness(1.02); }
.slide-1 img { object-position: 60% 30%; }
.slide-3 img { object-position: 50% 40%; }
.slide.is-active { opacity: 1; }
/* the outgoing slide keeps drifting while it fades, so it never snaps back mid-crossfade */
.slide.is-active img, .slide.is-leaving img { animation: drift 9s linear forwards; }
.hero.is-paused .slide img { animation-play-state: paused; }
@keyframes drift { from { transform: scale(1.12); } to { transform: scale(1.02); } }
.hero-scrim { position: absolute; inset: 0; z-index: -1; pointer-events: none; background:
  linear-gradient(90deg, rgba(9, 17, 13, .82) 0%, rgba(9, 17, 13, .55) 42%, rgba(9, 17, 13, .12) 100%),
  linear-gradient(0deg, rgba(9, 17, 13, .65) 0%, rgba(9, 17, 13, 0) 45%),
  linear-gradient(180deg, rgba(9, 17, 13, .45) 0%, rgba(9, 17, 13, 0) 22%); }
.hero-inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; padding: 140px 0 132px; }
.hero-copy { max-width: 940px; }
.hero-title { font-size: clamp(2.2rem, 6vw + 1rem, 4.75rem); line-height: 1; letter-spacing: -.035em; margin-bottom: .35em; overflow-wrap: anywhere; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-title .line > span { display: inline-block; }
.js .hero-title .line > span { transform: translateY(105%); transition: transform 1000ms var(--ease-out); }
.js .hero-title .line:nth-child(2) > span { transition-delay: 90ms; }
.js .hero-title .line:nth-child(2) > span + span { transition-delay: 160ms; }
/* quiet third path under the two hero buttons */
.hero-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px; color: var(--on-dark); font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.hero-link i { transition: transform 220ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .hero-link:hover i { transform: translateY(2px); } }
.js .hero.is-ready .hero-title .line > span { transform: none; }
.hero-sub { font-size: clamp(1.1rem, 1.6vw, 1.3rem); max-width: 34ch; color: rgba(255, 255, 255, .86); margin-bottom: 1.8em; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.js .hero-sub, .js .hero-ctas, .js .hero-controls { opacity: 0; transform: translateY(16px); transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out); }
.js .hero.is-ready .hero-sub { opacity: 1; transform: none; transition-delay: 300ms; }
.js .hero.is-ready .hero-ctas { opacity: 1; transform: none; transition-delay: 400ms; }
.js .hero.is-ready .hero-controls { opacity: 1; transform: none; transition-delay: 550ms; }

.hero-controls { display: grid; justify-items: end; gap: 12px; flex-shrink: 0; }
.hero-caption { margin: 0; font-size: .92rem; font-weight: 500; color: rgba(255, 255, 255, .9); }
.hero-dots { display: flex; align-items: center; gap: 8px; }
.dot { position: relative; width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; }
.dot::before { content: ""; position: absolute; left: 0; right: 0; top: 21px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .3); }
.dot span { position: absolute; left: 0; right: 0; top: 21px; height: 3px; border-radius: 3px; background: #fff; transform: scaleX(0); transform-origin: left; }
.dot.is-done span { transform: scaleX(1); }
.dot.is-active span { animation: progress var(--slide-ms, 6000ms) linear forwards; }
.hero.is-paused .dot.is-active span { animation-play-state: paused; }
@keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hero-pause { display: grid; place-items: center; width: 44px; height: 44px; margin-left: 4px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font-size: 1.1rem; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); transition: background-color 200ms ease, transform 140ms var(--ease-out); }
.hero-pause:active { transform: scale(.94); }
@media (hover: hover) and (pointer: fine) { .hero-pause:hover { background: rgba(255, 255, 255, .24); } }

/* Touch screens: hero photos become a native swipeable strip (momentum + interruptible) */
@media (pointer: coarse) {
  .hero-slides { display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
  .hero-slides::-webkit-scrollbar { display: none; }
  .slide { position: relative; flex: 0 0 100%; opacity: 1; scroll-snap-align: start; scroll-snap-stop: always; transition: none; }
  .slide img, .slide.is-active img, .slide.is-leaving img { animation: none; transform: none; }
  .hero-inner { pointer-events: none; }
  .hero-ctas, .hero-controls { pointer-events: auto; }
}

/* ---------- quick bar ---------- */
.quick { position: relative; z-index: 2; margin-top: -64px; }
.quick-bar { display: grid; grid-template-columns: repeat(2, 1fr); background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow), 0 0 0 1px var(--line); overflow: hidden; }
.quick-bar a { outline-offset: -4px; display: flex; gap: 14px; align-items: center; padding: 26px 24px; text-decoration: none; border-left: 1px solid var(--line); transition: background-color 200ms ease; }
.quick-bar a:first-child { border-left: 0; }
.quick-bar i { display: grid; place-items: center; flex-shrink: 0; width: var(--chip); height: var(--chip); border-radius: 50%; background: var(--surface-2); font-size: 1.4rem; color: var(--ink); transition: background-color 200ms ease, transform 140ms var(--ease-out); }
.quick-bar strong { display: block; font-weight: 600; }
.quick-bar small { color: var(--muted); font-size: .9rem; }
.quick-bar a:active i { transform: scale(.94); }
@media (hover: hover) and (pointer: fine) {
  .quick-bar a:hover { background: var(--surface-2); }
  .quick-bar a:hover i { background: var(--accent); color: var(--accent-ink); }
}

/* ---------- intro ---------- */
.intro { padding: clamp(72px, 8vw, 112px) 0 clamp(16px, 3vw, 32px); }
.intro-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.statement { font: 500 clamp(1.7rem, 3.2vw, 2.6rem)/1.2 var(--display); letter-spacing: -.02em; max-width: 24ch; text-wrap: balance; margin-bottom: .7em; }

/* "Where we are" map: town positions are projected from real latitude/longitude (x = lon offset * cos 47deg, y = lat offset) */
.map { padding: 16px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.map-title { font: 600 1rem/1.3 var(--body); letter-spacing: 0; color: var(--muted); margin: 4px 4px 12px; }
.map-canvas { position: relative; aspect-ratio: 1; max-width: 100%; border-radius: 16px; background: color-mix(in srgb, var(--forest) 7%, var(--surface)); container-type: inline-size; }
.map-svg { position: absolute; inset: 0; width: 100%; height: 100%; clip-path: inset(0 round 16px); }
.map-state { font: 600 16px var(--body); letter-spacing: .22em; fill: var(--ink); opacity: .62; }
.map-river { fill: none; stroke: var(--water); stroke-width: 5; stroke-linecap: round; }
.map-river-label { font: italic 500 16px var(--body); fill: var(--water-ink); }
.map-road { fill: none; stroke: color-mix(in srgb, var(--ink) 18%, transparent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.map-draw { stroke-dasharray: 1; stroke-dashoffset: 0; }
.map-city { fill: var(--muted); }
.map-city-label { font: 500 16px var(--body); fill: var(--muted); }
.pin { position: absolute; left: var(--x); top: var(--y); z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; margin: -22px 0 0 -22px; text-decoration: none; color: var(--ink); }
.pin-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--surface), 0 3px 8px rgba(22, 51, 37, .35); transition: transform 220ms var(--ease-out); }
.pin-dot-2 { width: 22px; height: 22px; }
.pin-label { position: absolute; display: grid; padding: 8px 12px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow), 0 0 0 1px var(--line); white-space: nowrap; line-height: 1.25; transition: background-color 200ms ease, color 200ms ease; }
.pin-label strong { font: 600 .95rem/1.2 var(--display); letter-spacing: -.01em; }
.pin-label small { font-size: .85rem; color: var(--muted); transition: color 200ms ease; }
.pin-above .pin-label { bottom: calc(100% - 2px); left: 50%; transform: translateX(-50%); }
.pin-below .pin-label { top: calc(100% - 2px); left: 50%; transform: translateX(-50%); }
.pin-below-end .pin-label { top: calc(100% - 2px); right: 4px; text-align: right; }
.pin:active .pin-dot { transform: scale(.88); }
@media (hover: hover) and (pointer: fine) {
  .pin:hover .pin-dot { transform: scale(1.2); }
  .pin:hover .pin-label { background: var(--tab-active); color: var(--on-dark); }
  .pin:hover .pin-label small { color: var(--on-dark-muted); }
}
@container (max-width: 300px) { .pin-label small { display: none; } }
/* Detroit Lakes holds two communities: each name is its own link (24px targets) */
.pin-multi { cursor: default; }
.pin-multi .pin-label { z-index: 2; }
.pin-multi small { display: grid; justify-items: center; }
.pin-multi small a { display: inline-flex; align-items: center; min-height: 44px; color: inherit; font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
@container (max-width: 300px) { .pin-multi .pin-label small { display: grid; } }
.map-river-glow { fill: none; stroke: color-mix(in srgb, var(--water) 25%, #fff); stroke-width: 8; stroke-linecap: round; stroke-dasharray: .07 2; stroke-dashoffset: .07; opacity: 0; filter: blur(1.5px); }
.map-city { transform-box: fill-box; transform-origin: center; }
/* dot grid: a surveyor's sheet the map is drawn onto */
.map-canvas::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(circle, color-mix(in srgb, var(--ink) 14%, transparent) 1px, transparent 1.5px) 0 0 / 22px 22px; -webkit-mask: radial-gradient(closest-side, #000 40%, transparent); mask: radial-gradient(closest-side, #000 40%, transparent); }
.pin-dot { position: relative; }
.pin-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 2px var(--accent); opacity: 0; pointer-events: none; }

/* map draw-on: one choreographed sequence (~2.6s) the first time the map is well in view.
   Time-based rather than scroll-scrubbed so the line flows at an even pace instead of following finger jitter.
   grid -> states -> river (with a glowing head) -> roads out of Grand Forks -> pins drop in north to south, each with one ripple */
@media (prefers-reduced-motion: no-preference) {
  .js .map-canvas::before, .js .map-state, .js .map-city-label, .js .map-river-label { opacity: 0; }
  .js .map-state { translate: 0 8px; }
  .js .map .map-draw { stroke-dashoffset: 1; }
  .js .map-city { scale: 0; }
  .js .map .pin-dot { opacity: 0; }
  .js .map .pin-label { opacity: 0; }

  .map.is-drawn .map-canvas::before { animation: map-fade 900ms ease both; }
  .map.is-drawn .map-state { animation: map-rise 800ms var(--ease-out) both; animation-delay: 150ms; }
  .map.is-drawn .map-state + .map-state { animation-delay: 260ms; }
  .map.is-drawn .map-river { animation: map-draw 1500ms var(--ease-sine) 250ms both; }
  .map.is-drawn .map-river-glow { animation: map-comet 1500ms var(--ease-sine) 250ms both, map-glow 1500ms linear 250ms both; }
  .map.is-drawn .map-river-label { animation: map-fade 700ms ease 1300ms both; }
  .map.is-drawn .map-city { animation: map-pop 500ms var(--ease-out) 600ms both; }
  .map.is-drawn .map-city-label { animation: map-fade 600ms ease 750ms both; }
  .map.is-drawn .map-road { animation: map-draw 1000ms var(--ease-sine) both; animation-delay: 750ms; }
  .map.is-drawn .map-road:nth-of-type(4) { animation-delay: 900ms; }
  .map.is-drawn .map-road:nth-of-type(5) { animation-delay: 1250ms; }
  .map.is-drawn .pin-dot { animation: pin-drop 600ms var(--ease-out) both; animation-delay: calc(1500ms + var(--i, 0) * 160ms); }
  .map.is-drawn .pin-dot::after { animation: pin-ripple 1100ms var(--ease-out) both; animation-delay: calc(1750ms + var(--i, 0) * 160ms); }
  .map.is-drawn .pin-label { animation: label-in 500ms var(--ease-out) both; animation-delay: calc(1750ms + var(--i, 0) * 160ms); }

  @keyframes map-fade { from { opacity: 0; } to { opacity: 1; } }
  @keyframes map-rise { from { opacity: 0; translate: 0 8px; } to { opacity: .62; translate: 0 0; } }
  @keyframes map-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
  /* the bright dash rides exactly on the drawing head: offset = dash length - progress */
  @keyframes map-comet { from { stroke-dashoffset: .07; } to { stroke-dashoffset: -.93; } }
  @keyframes map-glow { 0% { opacity: 0; } 8%, 80% { opacity: .95; } 100% { opacity: 0; } }
  @keyframes map-pop { from { scale: 0; } to { scale: 1; } }
  @keyframes pin-drop { from { opacity: 0; translate: 0 -18px; scale: .6; } 60% { opacity: 1; } to { opacity: 1; translate: 0 0; scale: 1; } }
  @keyframes pin-ripple { from { opacity: .7; scale: 1; } to { opacity: 0; scale: 2.8; } }
  @keyframes label-in { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }
}

/* ---------- communities explorer ---------- */
.communities { padding: clamp(56px, 7vw, 96px) 0 clamp(64px, 9vw, 120px); }
.explorer { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 28px; margin-top: 48px; align-items: start; }
.tablist { position: relative; display: grid; gap: 8px; }
/* one shared highlight that glides between tabs */
/* sized once to the whole tab list; only its clip-path moves, so the glide never triggers layout */
.tab-indicator { position: absolute; top: 0; left: 0; z-index: 0; background: var(--tab-active); pointer-events: none; transition: clip-path 320ms var(--ease-in-out); }
.tablist.no-anim .tab-indicator { transition: none; }
.tablist button { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name num" "meta num"; text-align: left; gap: 2px 16px; padding: 18px 20px; border: 0; border-radius: 18px; background: transparent; color: var(--ink); font: inherit; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); transition: background-color 200ms ease, box-shadow 200ms ease, color 320ms var(--ease-in-out), transform 160ms var(--ease-out); }
.tablist button:active { transform: scale(.98); }
.t-name { grid-area: name; font: 600 1.15rem/1.2 var(--display); letter-spacing: -.01em; overflow-wrap: anywhere; }
.t-meta { grid-area: meta; font-size: .9rem; letter-spacing: .01em; color: var(--muted); transition: color 320ms var(--ease-in-out); }
.t-num { grid-area: num; align-self: center; font: 600 1.05rem/1 var(--display); padding: 8px 12px; border-radius: 999px; background: var(--surface-2); font-variant-numeric: tabular-nums; transition: background-color 320ms var(--ease-in-out), color 320ms var(--ease-in-out); }
.tablist button[aria-selected="true"] { color: var(--on-dark); box-shadow: none; }
.tablist button[aria-selected="true"] .t-meta { color: var(--on-dark-muted); }
.tablist button[aria-selected="true"] .t-num { background: var(--accent); color: var(--accent-ink); }
.tablist:not(.has-indicator) button[aria-selected="true"] { background: var(--tab-active); }
@media (hover: hover) and (pointer: fine) {
  .tablist button[aria-selected="false"]:hover { background: var(--surface); }
}
.panels { position: relative; }
.panel { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow), 0 0 0 1px var(--line); overflow: clip; }
.panel + .panel { margin-top: 24px; }
.js .panels { display: grid; }
.js .panel { grid-area: 1 / 1; margin: 0; opacity: 0; visibility: hidden; transition: opacity 180ms ease, visibility 0s 180ms; }
.js .panel.is-active { opacity: 1; visibility: visible; transition: opacity 240ms var(--ease-out); }
.panel-media { position: relative; min-height: 100%; background: var(--surface-2); }
.panel-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.js .panel .panel-media img { filter: saturate(.88) contrast(1.06) brightness(1.02) blur(8px); transform: scale(1.04); transition: filter 280ms var(--ease-out), transform 400ms var(--ease-out); }
.js .panel.is-active .panel-media img { filter: saturate(.88) contrast(1.06) brightness(1.02) blur(0); transform: none; }
.panel-media-feature { display: flex; flex-direction: column; justify-content: flex-end; min-height: 320px; padding: clamp(24px, 3vw, 40px); color: var(--on-dark); background: radial-gradient(90% 70% at 85% 10%, rgba(226, 163, 54, .28), transparent 60%), var(--tab-active); }
.panel-media-feature p { margin: 0; }
.feature-num { font: 700 clamp(4.5rem, 8vw, 6rem)/.9 var(--display); letter-spacing: -.04em; color: var(--accent); font-variant-numeric: tabular-nums; }
.feature-label { font: 600 clamp(1.2rem, 2vw, 1.5rem)/1.2 var(--display); margin-top: 10px !important; }
.panel-body { padding: clamp(28px, 3.5vw, 44px); }
.js .panel .panel-body > * { opacity: 0; transform: translateY(8px); transition: opacity 220ms ease, transform 240ms var(--ease-out); }
.js .panel.is-active .panel-body > * { opacity: 1; transform: none; }
.js .panel.is-active .panel-body > *:nth-child(2) { transition-delay: 30ms; }
.js .panel.is-active .panel-body > *:nth-child(3) { transition-delay: 60ms; }
.js .panel.is-active .panel-body > *:nth-child(4) { transition-delay: 90ms; }
.js .panel.is-active .panel-body > *:nth-child(5) { transition-delay: 120ms; }
.panel-body h3 { font-size: clamp(1.7rem, 2.6vw, 2.2rem); margin-bottom: .2em; }
.panel-addr { color: var(--muted); font-size: .95rem; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 24px 0 28px; }
.facts div { padding: 14px 16px; border-radius: 16px; background: var(--surface-2); }
.facts > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.facts dt { font-size: .9rem; font-weight: 600; letter-spacing: .01em; color: var(--muted); margin-bottom: 2px; }
.facts dd { margin: 0; font-weight: 500; line-height: 1.35; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; hyphens: auto; }
.panel-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.text-link { position: relative; display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; text-decoration: none; transition: opacity 140ms ease; }
.text-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 9px; height: 2px; border-radius: 2px; background: var(--accent); transform-origin: right center; transition: transform 250ms var(--ease-out); }
.text-link:active { opacity: .6; }
@media (hover: hover) and (pointer: fine) { .text-link:hover::after { transform: scaleX(0); } }

/* ---------- values bento ---------- */
.values { padding: clamp(64px, 9vw, 120px) 0; }
.bento { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: minmax(220px, auto); gap: 16px; margin-top: 40px; }
.cell { position: relative; overflow: clip; display: flex; flex-direction: column; justify-content: flex-end; padding: 28px; border-radius: var(--r-card); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.cell i { font-size: 2rem; margin-bottom: auto; padding-bottom: 24px; }
.cell h3 { margin-bottom: .3em; }
.cell p { margin: 0; color: var(--muted); max-width: 40ch; }
.cell-a { grid-column: span 7; grid-row: span 2; }
.cell-b { grid-column: span 5; }
.cell-c { grid-column: span 5; }
.cell-d { grid-column: span 4; }
.cell-e { grid-column: span 3; }
.cell-f { grid-column: span 5; }
/* type-led tiles: a large heading carries the card */
.cell-type { background: var(--surface-2); box-shadow: none; }
.cell-type h3 { font-size: clamp(1.8rem, 3vw, 2.6rem); letter-spacing: -.03em; margin-bottom: .35em; }
.cell-photo { color: #fff; box-shadow: none; background: #0d1712; }
.cell-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cell-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(9, 17, 13, .85) 0%, rgba(9, 17, 13, .2) 55%, rgba(9, 17, 13, 0) 100%); }
.cell-copy { position: relative; z-index: 1; }
.cell-photo p { color: rgba(255, 255, 255, .85); }
.cell-a h3 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.cell-forest { background: var(--forest); color: var(--on-dark); box-shadow: none; }
.cell-forest p { color: var(--on-dark-muted); letter-spacing: .005em; line-height: 1.7; }
.cell-forest i { color: var(--accent); }
.cell-amber { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.cell-amber h3, .cell-amber i { color: var(--accent-ink); }
.cell-copy i { display: block; width: max-content; padding-bottom: 14px; color: var(--accent); }
.cell-type i { color: var(--accent); }
.cell-amber p { color: rgba(28, 20, 5, .78); }

/* hover reaction (mouse only): photos push in, a soft light follows the cursor, icons nudge */
.cell { --glow: color-mix(in srgb, var(--accent) 22%, transparent); }
.cell-forest { --glow: color-mix(in srgb, var(--accent) 26%, transparent); }
.cell-amber { --glow: rgba(255, 255, 255, .38); }
.cell:not(.cell-photo)::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), var(--glow), transparent 70%); transition: opacity 400ms ease; }
.cell:not(.cell-photo) > * { position: relative; z-index: 1; }
.cell i { transition: translate 300ms var(--ease-out), rotate 300ms var(--ease-out); }
.cell-photo img { transition: scale 900ms var(--ease-out); }
.cell-photo::after { transition: opacity 400ms ease; }
.cell-copy, .cell-type h3 { transition: translate 400ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .cell:hover::before { opacity: 1; }
  .cell:hover i { translate: 0 -3px; rotate: -8deg; }
  .cell-photo:hover img { scale: 1.06; }
  .cell-photo:hover .cell-copy, .cell-type:hover h3 { translate: 0 -4px; }
}
@media (prefers-reduced-motion: reduce) {
  .cell i, .cell-photo img, .cell-copy, .cell-type h3 { transition: none; }
  .cell:hover i, .cell-photo:hover img, .cell-photo:hover .cell-copy, .cell-type:hover h3 { translate: none; rotate: none; scale: none; }
}

/* ---------- residents band ---------- */
.residents { padding: 0 0 clamp(64px, 9vw, 120px); }
.band { display: grid; grid-template-columns: 1fr 1fr; padding: 12px; border-radius: var(--r-card); background: var(--forest); color: var(--on-dark); overflow: clip; position: relative; isolation: isolate; }
.band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 90% at 100% 0%, rgba(226, 163, 54, .22), transparent 60%), radial-gradient(50% 80% at 0% 100%, rgba(255, 255, 255, .06), transparent 60%); }
.band-col { padding: clamp(36px, 5vw, 64px); }
.band-col + .band-col { border-left: 1px solid rgba(255, 255, 255, .12); }
.band-col > i { font-size: 2.2rem; color: var(--accent); }
.band-col h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin: 18px 0 .4em; }
.band-col p { color: var(--on-dark-muted); max-width: 42ch; margin-bottom: 1.6em; letter-spacing: .005em; line-height: 1.7; }

/* ---------- about ---------- */
.about { padding: clamp(40px, 6vw, 80px) 0 clamp(80px, 10vw, 136px); }
.about-lede { max-width: 26ch; font-size: clamp(1.9rem, 3.8vw, 3rem); font-weight: 500; line-height: 1.15; letter-spacing: -.025em; }
.about-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; max-width: 980px; margin-top: 32px; color: var(--muted); font-size: 1.08rem; }

/* ---------- contact ---------- */
.contact { padding: clamp(72px, 9vw, 120px) 0; background: var(--surface-2); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.contact-info > p { color: var(--muted); font-size: 1.1rem; max-width: 40ch; margin-bottom: 2em; }
.contact-line { display: flex; align-items: center; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); text-decoration: none; font: 600 clamp(1.15rem, 2vw, 1.4rem)/1.25 var(--display); letter-spacing: -.01em; overflow-wrap: anywhere; }
.contact-line > span { min-width: 0; }
.contact-line i { display: grid; place-items: center; flex-shrink: 0; width: var(--chip); height: var(--chip); border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 1.35rem; transition: transform 140ms var(--ease-out); }
.contact-line small { display: block; font: 500 .9rem/1.4 var(--body); color: var(--muted); letter-spacing: 0; }
.contact-line:active i { transform: scale(.94); }
@media (hover: hover) and (pointer: fine) { .contact-line:hover i { transform: scale(1.06); } }
.form { display: grid; gap: 18px; padding: clamp(24px, 3.5vw, 40px); border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.field { display: grid; gap: 8px; }
.field label { font-weight: 600; font-size: .95rem; }
.field input, .field select, .field textarea { width: 100%; padding: 14px 16px; border: 0; border-radius: var(--r-input); font: inherit; color: var(--ink); background: var(--bg); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 48%, transparent); transition: box-shadow 160ms ease; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--focus); }
.field [aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--error); }
.field textarea { resize: vertical; min-height: 120px; }
.form .btn { justify-self: start; }
.form-note { margin: 0; min-height: 1.4em; font-size: .95rem; color: var(--muted); }
.form-privacy { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.form-alt { margin: 4px 0 0; color: var(--muted); font-size: .95rem; }
.form-note.is-error { color: var(--error); animation: note-in 200ms var(--ease-out); }
@keyframes note-in { from { opacity: 0; translate: 0 4px; } to { opacity: 1; translate: 0 0; } }
.optional { font-weight: 400; color: var(--muted); }

/* ---------- footer ---------- */
.footer { padding: 48px 0 calc(48px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }

/* phones: Call and Pay rent stay within thumb reach once the hero is behind you */
.action-bar { display: none; }
@media (max-width: 860px) {
  .action-bar { position: fixed; inset: auto 0 0; z-index: 30; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom, 0px)); background: color-mix(in srgb, var(--surface) 88%, transparent); box-shadow: 0 -1px 0 var(--line); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); translate: 0 110%; visibility: hidden; transition: translate 320ms var(--ease-out), visibility 0s 320ms; }
  body.past-hero .action-bar { translate: 0 0; visibility: visible; transition: translate 320ms var(--ease-out); }
  /* step aside while someone is typing in the contact form (the keyboard would push it over the fields) */
  body:has(.contact :focus) .action-bar { translate: 0 110%; visibility: hidden; transition: translate 320ms var(--ease-out), visibility 0s 320ms; }
  body.menu-open .action-bar { translate: 0 110%; visibility: hidden; transition: translate 320ms var(--ease-out), visibility 0s 320ms; }
  .action-bar a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; border-radius: 999px; font-weight: 600; text-decoration: none; background: var(--primary-bg); color: var(--primary-ink); transition: transform 140ms var(--ease-out); }
  .action-bar a:first-child { background: var(--accent); color: var(--accent-ink); }
  .action-bar a:active { transform: scale(.97); }
  .action-bar i { font-size: 1.3rem; }
  .footer { padding-bottom: calc(48px + 70px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) { .action-bar, body.past-hero .action-bar, body:has(.contact :focus) .action-bar { transition: none; } }
.footer-grid { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px 40px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 24px; justify-content: center; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--muted); font-weight: 500; transition: color 200ms ease, opacity 140ms ease; }
.footer-links a:active { opacity: .6; }
@media (hover: hover) and (pointer: fine) { .footer-links a:hover { color: var(--ink); } }
.footer-legal { margin: 0; color: var(--muted); font-size: .9rem; }
.footer-legal a { color: inherit; text-decoration: none; font-weight: 600; }
/* Equal Housing Opportunity: full-width row under the footer */
.footer-eho { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); }
.eho-mark { flex: 0 0 auto; width: 40px; height: 37px; color: var(--ink); }
.footer-eho p { margin: 0; max-width: 68ch; font-size: .9rem; line-height: 1.55; }
.footer-eho strong { color: var(--ink); font-weight: 600; }

/* ---------- reveal fallback (browsers without scroll timelines): plays once ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); transition-delay: var(--d, 0ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js .map[data-reveal] { opacity: 1; transform: none; }
.js [data-ink] .w { opacity: .55; transition: opacity 600ms ease; transition-delay: calc(var(--i, 0) * 35ms); }
.js [data-ink].is-in .w { opacity: 1; }

/* ---------- scroll-linked motion: three authored moments (hero, map, explorer) plus quiet block reveals ---------- */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    /* quiet reveals finish by the time a block is ~70% up the screen, at the same pace for short and tall blocks */
    .js [data-reveal] { opacity: 1; transform: none; transition: none; animation: rise both var(--ease-scroll); animation-timeline: view(); animation-range: cover calc(var(--o, 0) * 1vh) cover calc(30vh + var(--o, 0) * 1vh); }
    .js .quick-bar[data-reveal], .js .map[data-reveal] { animation: none; }
    @keyframes rise { from { opacity: 0; translate: 0 32px; } to { opacity: 1; translate: 0 0; } }
    .cell-b, .cell-d { --o: 4; }
    .cell-e { --o: 8; }
    .cell-f { --o: 12; }

    /* intro statement: words ink in, then the marker draws; per-word ranges set in script.js */
    [data-ink] { view-timeline: --ink block; }
    .js [data-ink] .w { opacity: 1; transition: none; animation: ink linear both; animation-timeline: --ink; }
    @keyframes ink { from { opacity: .55; } to { opacity: 1; } }

    /* moment 1, hero: copy lifts away, photo zooms as the hero scrolls out */
    .hero { view-timeline: --hero block; }
    .hero-inner { animation: hero-out linear both; animation-timeline: --hero; animation-range: exit 0% exit 80%; }
    @keyframes hero-out { to { opacity: 0; translate: 0 -56px; } }
    .hero-slides { animation: hero-zoom linear both; animation-timeline: --hero; animation-range: exit 0% exit 100%; }
    @keyframes hero-zoom { to { scale: 1.08; translate: 0 10%; } }

  }

  /* Phones: same finger-driven motion, linear so it tracks the finger evenly, done before content reaches eye level */
  @media (prefers-reduced-motion: no-preference) and (max-width: 860px) {
    .js [data-reveal] { animation-name: rise-touch; animation-timing-function: linear; animation-range: cover calc(var(--o, 0) * 1vh) cover calc(36vh + var(--o, 0) * 1vh); }
    @keyframes rise-touch { from { opacity: 0; translate: 0 20px; } to { opacity: 1; translate: 0 0; } }
    .hero-inner { animation-range: exit 0% exit 70%; }

    /* cards rise in under the finger, calm and straight (no tilt or shrink: readable at any scroll position); the photo settles and the copy follows a beat later */
    .js .cell[data-reveal], .js .band-col, .js .contact-line { animation: card-in linear both; animation-timeline: view(); animation-range: cover calc(var(--o, 0) * 1vh) cover calc(42vh + var(--o, 0) * 1vh); }
    .js .band[data-reveal] { animation: none; }
    @keyframes card-in {
      from { opacity: 0; translate: 0 32px; }
      70% { opacity: 1; }
      to { opacity: 1; translate: 0 0; }
    }
    .cell-b, .cell-d, .cell-f { --o: 0; }
    .cell-c, .cell-e { --o: 5; }

    /* touch only: with a mouse these would hold their end values over the hover zoom/lift */
    @media (hover: none) {
    .js .cell-photo img { animation: photo-settle linear both; animation-timeline: view(); animation-range: cover 0% cover 60%; }
    @keyframes photo-settle { from { scale: 1.1; } to { scale: 1; } }
    .js .cell-copy, .js .cell:not(.cell-photo) > h3, .js .cell:not(.cell-photo) > p { animation: copy-in linear both; animation-timeline: view(); animation-range: cover calc(4vh + var(--o, 0) * 1vh) cover calc(30vh + var(--o, 0) * 1vh); }
    @keyframes copy-in { from { opacity: .5; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
    .js .cell > i, .js .cell-copy i { animation: icon-pop linear both; animation-timeline: view(); animation-range: cover calc(14vh + var(--o, 0) * 1vh) cover calc(44vh + var(--o, 0) * 1vh); }
    @keyframes icon-pop { from { opacity: 0; scale: .8; } to { opacity: 1; scale: 1; } }
    }
  }
  /* single column: no side-by-side stagger needed */
  @media (prefers-reduced-motion: no-preference) and (max-width: 560px) {
    .cell-c, .cell-e { --o: 0; }
  }
  @media (prefers-reduced-motion: no-preference) and (pointer: coarse) {
    .hero-slides { animation: none; }
  }
}

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .nav-actions { margin-left: auto; }
  .menu-toggle { display: block; margin-left: 0; }
  .explorer { grid-template-columns: minmax(0, 1fr); }
  .tablist { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; margin-inline: calc(-1 * var(--gutter)); padding: 6px var(--gutter); scroll-padding-inline: var(--gutter); scrollbar-width: none; -webkit-mask: linear-gradient(90deg, #000 calc(100% - 48px), transparent); mask: linear-gradient(90deg, #000 calc(100% - 48px), transparent); }
  .tablist::-webkit-scrollbar { display: none; }
  .tablist button { flex: 0 0 auto; scroll-snap-align: start; min-width: 220px; max-width: min(78vw, 300px); }
}
@media (max-width: 860px) {
  .nav-actions { display: none; }
  .menu-toggle { margin-left: auto; }
  .hero-inner { flex-direction: column; align-items: flex-start; justify-content: flex-end; padding: 120px 0 104px; }
  .hero-controls { justify-items: start; }
  .panel { grid-template-columns: minmax(0, 1fr); }
  .panel-media { min-height: 0; aspect-ratio: 16 / 10; }
  .js .panel .panel-media img { filter: saturate(.88) contrast(1.06) brightness(1.02); }
  .bento { grid-template-columns: 1fr 1fr; }
  .cell-a { grid-column: span 2; grid-row: span 1; min-height: 320px; }
  .cell-b, .cell-c, .cell-d, .cell-e { grid-column: span 1; }
  .cell-f { grid-column: span 2; }
  .band { grid-template-columns: minmax(0, 1fr); }
  .band-col + .band-col { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .12); }
  .about-cols, .contact-grid, .intro-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .footer-links { justify-content: flex-start; }
}
@media (max-width: 560px) {
  .quick-bar { grid-template-columns: 1fr; }
  .quick-bar a { border-left: 0; border-top: 1px solid var(--line); padding: 20px; }
  .quick-bar a:first-child { border-top: 0; }
  .bento { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
  .cell-a, .cell-b, .cell-c, .cell-d, .cell-e, .cell-f { grid-column: span 1; }
  .cell { min-height: 0; }
  .cell i { padding-bottom: 16px; }
  .cell-a, .cell-f { min-height: 300px; }
  .facts { gap: 8px; margin: 20px 0 24px; }
  .facts div { padding: 12px; }
  .facts dd { font-size: .95rem; }
  .btn { white-space: normal; text-align: left; }
  .hero-ctas .btn { width: 100%; justify-content: space-between; }
}
@media (max-width: 380px) {
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-ink] .w { transition: opacity 300ms ease; transition-delay: 0ms; }
  .js .hero-sub, .js .hero-ctas, .js .hero-controls, .js .hero-title .line > span { opacity: 1; transform: none; transition: none; }
  .js [data-reveal] { transform: none; transition: opacity 300ms ease; }
  .slide.is-active img, .slide.is-leaving img { animation: none; transform: scale(1.02); }
  .js .panel .panel-media img { filter: saturate(.88) contrast(1.06) brightness(1.02); transform: none; transition: none; }
  .js .panel .panel-body > * { transform: none; transition: opacity 200ms ease; }
  .map-river-glow { display: none; }
  .js .map-canvas::before { opacity: 1; }
  .tab-indicator { transition: none; }
  .dot.is-active span { animation: none; transform: scaleX(1); }
  .menu a { transform: none; }
}

/* programmatic focus targets (skip link, in-page links) don't need a ring around the whole section */
[tabindex="-1"]:focus { outline: none; }

/* short phones: the hero holds headline, sub, two buttons, a link and the photo controls; keep it inside one screen */
@media (max-width: 560px) {
  .hero-inner { padding-top: 96px; padding-bottom: 28px; }
  .hero-caption { display: none; }
  .hero-sub { margin-bottom: 20px; }
  .hero-ctas { gap: 10px; }
  .quick { margin-top: 16px; } /* no overlap here: the photo controls need that space */
}
/* two service promises under the intro statement (all sizes) */
.assurances { list-style: none; margin: 4px 0 0; padding: 0; max-width: 34rem; border-top: 1px solid var(--line); }
.assurances li { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 16px; padding: 16px 2px; border-bottom: 1px solid var(--line); font: 500 1.08rem/1.45 var(--body); }
.assurances i { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--surface-2); color: var(--ink); font-size: 1.45rem; }


/* ---------- theme switch: top-bar button (flip) + footer choice (Auto / Light / Dark) ---------- */
.theme-toggle { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 1.3rem; cursor: pointer; box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 35%, transparent); transition: background-color 200ms ease, transform 140ms var(--ease-out); }
.theme-toggle:active { transform: scale(.94); }
@media (hover: hover) and (pointer: fine) { .theme-toggle:hover { background: color-mix(in srgb, currentColor 10%, transparent); } }
.theme-toggle i { display: block; }
@media (max-width: 860px) {
  .nav-row { gap: 10px; }
  .theme-toggle { margin-left: auto; }
  .menu-toggle { margin-left: 0; }
}
body.menu-open .theme-toggle { visibility: hidden; }

.theme-choice { grid-column: 1 / 3; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.theme-choice-label { margin-right: 6px; color: var(--muted); font-size: .9rem; }
.theme-choice button { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font: 500 .9rem/1 var(--body); cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); transition: background-color 200ms ease, color 200ms ease; }
.theme-choice button i { font-size: 1.05rem; }
.theme-choice button[aria-pressed="true"] { background: var(--primary-bg); color: var(--primary-ink); box-shadow: none; }
.theme-choice button:active { transform: scale(.97); }
.footer-copy { grid-column: 3; justify-self: end; }
@media (max-width: 860px) {
  .theme-choice, .footer-copy { grid-column: auto; justify-self: start; }
}
