/* ==========================================================
   Westchester Pro Electric — Demo Site Styles
   Direction B: Nocturne. The idea: electricity is invisible,
   what people see is the light. Cinematic night scenes for the
   hero, gallery and contact, bright warm-white chapters between
   them, and brass reserved for actions and emphasis.
   ========================================================== */

:root {
  /* Color */
  --night: #0e0d0b;        /* hero, gallery, footer */
  --umber: #1b1814;        /* raised dark sections */
  --umber-2: #26221c;      /* hover on dark */
  --ivory: #fbf8f3;        /* main light ground */
  --white: #ffffff;
  --ink: #1a1612;          /* text on light, 16:1 */
  --muted: #625a50;        /* secondary text on light, 6.4:1 */
  --line: #e6dfd3;         /* hairlines on light */
  --line-dark: rgba(255, 244, 228, 0.14);
  --on-dark: #f7f2ea;
  --on-dark-muted: #b9ae9f; /* 8.5:1 on night */
  --brass: #c9a46c;        /* buttons, details on dark */
  --brass-hover: #d9b77f;
  --bronze: #8a6431;       /* brass-toned text on light, 4.9:1 */
  --glow: #f3d9a4;         /* italic emphasis on dark */
  --error: #b42318;
  --error-bg: #fdecea;
  --success: #146c43;
  --success-bg: #e6f4ec;

  /* Type */
  --font-serif: "Instrument Serif", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-sans: "Hanken Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;

  --step-0: 1rem;
  --step-1: 1.125rem;
  --h2: clamp(2.6rem, 1.5rem + 3.8vw, 4.9rem);
  --hero: clamp(4.2rem, 1.2rem + 9.4vw, 11rem);

  /* Layout */
  --container: 1280px;
  --gutter: clamp(1rem, 4vw, 2.75rem);
  --section: clamp(5rem, 10vw, 9rem);
  --banner-h: 30px;
  --header-h: 76px;
  --radius: 6px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--step-0);
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h1, h2 { font-family: var(--font-serif); font-weight: 400; line-height: .98; letter-spacing: -0.015em; }
h2 { font-size: var(--h2); }
h2 em, h1 em { font-style: italic; color: var(--bronze); }
h3 { font-size: var(--step-1); font-weight: 600; line-height: 1.3; letter-spacing: -0.005em; }
p { margin: 0 0 1em; }
ol, ul { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.section { padding-block: var(--section); }

.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;
}

:focus-visible { outline: 3px solid var(--bronze); outline-offset: 3px; }
.hero :focus-visible, .site-header :focus-visible, .gallery-section :focus-visible, .area :focus-visible,
.contact .contact-info :focus-visible, .site-footer :focus-visible, .lightbox :focus-visible { outline-color: var(--glow); }
main:focus { outline: none; }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 200;
  background: var(--brass); color: var(--night);
  padding: .75rem 1rem; font-weight: 700; text-decoration: none; border-radius: 999px;
}
.skip-link:focus { top: 1rem; }

/* Small uppercase label above headings */
.eyebrow {
  display: flex; align-items: center; gap: .85rem; margin: 0 0 1.5rem;
  font-size: .75rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: var(--brass);
}
.eyebrow::before { content: ""; width: 2rem; height: 1px; background: currentColor; opacity: .7; }
.eyebrow-dark { color: var(--bronze); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .65rem;
  min-height: 50px; padding: 0 1.5rem; border-radius: 999px; border: 1px solid transparent;
  font: 600 .98rem/1 var(--font-sans); letter-spacing: .01em; text-decoration: none; cursor: pointer;
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease), transform .35s var(--ease);
}
.btn-sm { min-height: 44px; padding: 0 1.2rem; font-size: .9rem; }
.btn-lg { min-height: 58px; padding: 0 1.9rem; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn-brass { background: var(--brass); color: var(--night); }
.btn-brass:hover { background: var(--brass-hover); box-shadow: 0 12px 34px -10px rgba(217, 183, 127, .65); }
.btn-ghost { border-color: rgba(247, 242, 234, .38); color: var(--on-dark); }
.btn-ghost:hover { background: rgba(247, 242, 234, .1); border-color: rgba(247, 242, 234, .7); }
.btn-dark { background: var(--night); color: var(--on-dark); }
.btn-dark:hover { background: var(--umber-2); }
.btn-arrow { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(4px); }
.btn[disabled] { opacity: .65; cursor: progress; }

/* ---------- Photo frames ----------
   Every photo sits in a .photo frame. If the file is missing,
   the frame shows a labelled placeholder instead of a broken image. */
.photo { position: relative; margin: 0; overflow: hidden; background: var(--umber); }
.photo picture { display: block; width: 100%; height: 100%; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo.is-empty {
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(243, 217, 164, .2), transparent 60%),
    linear-gradient(170deg, var(--umber-2), var(--night));
}
.photo.is-empty::after {
  content: attr(data-label);
  position: absolute; left: 1.25rem; right: 1.25rem; bottom: 1.25rem;
  font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--on-dark-muted); line-height: 1.5;
  padding-top: .75rem; border-top: 1px solid var(--line-dark);
}
/* Warm, slightly filmic grade applied to every photo */
.services-photo img, .about-photo img, .gallery-item img { filter: sepia(.12) saturate(1.04) contrast(1.03); }
.photo-note {
  position: absolute; right: 1rem; bottom: 1rem; z-index: 2;
  padding: .35rem .7rem; border-radius: 999px;
  font-size: .66rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--on-dark); background: rgba(14, 13, 11, .55);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}

/* ---------- Header ---------- */
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; color: var(--on-dark); }
.demo-banner {
  margin: 0; min-height: var(--banner-h); padding: .4rem var(--gutter);
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: .72rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  color: var(--on-dark); background: rgba(14, 13, 11, .72);
  border-bottom: 1px solid var(--line-dark);
}
.nav-wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  height: var(--header-h); position: relative;
}
.nav-wrap::before {
  content: ""; position: absolute; inset: 0 calc(50% - 50vw); z-index: -1;
  background: rgba(14, 13, 11, .86); border-bottom: 1px solid var(--line-dark);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  opacity: 0; transition: opacity .45s var(--ease);
}
.site-header.scrolled .nav-wrap::before, .site-header.menu-open .nav-wrap::before { opacity: 1; }

.logo { display: inline-flex; align-items: center; gap: .8rem; text-decoration: none; min-height: 44px; }
.logo-mark {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(201, 164, 108, .7); color: var(--glow);
  font: italic 400 1.35rem/1 var(--font-serif);
}
.logo-text { font-weight: 600; font-size: 1.02rem; letter-spacing: .005em; }
.logo-text em { font: italic 400 1.15rem var(--font-serif); color: var(--glow); }

.main-nav { display: flex; align-items: center; gap: 2.5rem; }
.main-nav ul { display: flex; gap: 2rem; }
.main-nav ul a {
  position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px;
  text-decoration: none; font-size: .95rem; font-weight: 500; color: rgba(247, 242, 234, .82);
  transition: color .3s;
}
.main-nav ul a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 1px; background: var(--brass);
  transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease);
}
.main-nav ul a:hover, .main-nav ul a[aria-current="true"] { color: var(--on-dark); }
.main-nav ul a:hover::after, .main-nav ul a[aria-current="true"]::after { transform: scaleX(1); }
.nav-actions { display: flex; align-items: center; gap: 1.25rem; }
.nav-phone { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-size: .92rem; font-weight: 500; color: rgba(247, 242, 234, .82); font-variant-numeric: tabular-nums; }
.nav-phone:hover { color: var(--on-dark); }

.nav-toggle {
  display: none; position: relative; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line-dark); background: rgba(14, 13, 11, .35); cursor: pointer;
}
.nav-toggle span { position: absolute; left: 13px; right: 13px; height: 1.5px; background: var(--on-dark); transition: transform .3s var(--ease), top .3s var(--ease); }
.nav-toggle span:nth-child(1) { top: 18px; }
.nav-toggle span:nth-child(2) { top: 26px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { top: 22px; transform: rotate(-45deg); }

/* ---------- Hero: the lights come on ----------
   Layers, back to front: photo, shade (used by the load sequence and
   the light switch), warm glow, film grain, legibility gradient. */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: max(680px, min(100svh, 1040px));
  display: flex; flex-direction: column; justify-content: flex-end;
  background: var(--night); color: var(--on-dark);
}
.hero-photo { position: absolute; inset: 0; z-index: -5; background: var(--night); }
.hero-photo img {
  object-position: 58% 55%; transform: scale(1.03);
  filter: sepia(.32) saturate(1.1) brightness(1.04) contrast(1.08);
  transition: filter 1.1s cubic-bezier(.3, .1, .2, 1);
}
.hero-shade { position: absolute; inset: 0; z-index: -4; background: var(--night); opacity: 0; pointer-events: none; transition: opacity 1.1s cubic-bezier(.3, .1, .2, 1); }
.hero-glow {
  position: absolute; inset: 0; z-index: -3; pointer-events: none;
  background:
    radial-gradient(60% 45% at 62% 12%, rgba(243, 217, 164, .26), transparent 70%),
    radial-gradient(40% 40% at 90% 60%, rgba(201, 164, 108, .12), transparent 70%);
  mix-blend-mode: screen; transition: opacity 1.1s cubic-bezier(.3, .1, .2, 1);
}
/* Static film grain: adds a cinematic texture and hides upscaling softness */
.hero-grain {
  position: absolute; inset: 0; z-index: -2; pointer-events: none; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to top, rgba(14, 13, 11, .97) 0%, rgba(14, 13, 11, .74) 26%, rgba(14, 13, 11, .08) 60%, rgba(14, 13, 11, .55) 100%),
    linear-gradient(100deg, rgba(14, 13, 11, .72) 0%, rgba(14, 13, 11, .25) 45%, transparent 70%),
    radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(14, 13, 11, .55) 100%);
}
.hero-photo.is-empty::after { left: auto; right: var(--gutter); top: calc(var(--banner-h) + var(--header-h) + 2rem); bottom: auto; max-width: 280px; text-align: right; }
.hero-photo .photo-note { top: calc(var(--banner-h) + var(--header-h) + 1rem); bottom: auto; right: var(--gutter); }

.hero-inner {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 3rem; align-items: end;
  padding-top: calc(var(--banner-h) + var(--header-h) + 5rem); padding-bottom: clamp(2.5rem, 5vw, 4rem);
}
.hero-inner > .eyebrow, .hero-title { grid-column: 1; }
.hero-foot { grid-column: 1 / -1; }
.hero-title {
  font-size: clamp(4.4rem, 1rem + 10.6vw, 12.75rem); line-height: .84; letter-spacing: -0.03em;
  margin: 0 0 clamp(2rem, 4vw, 3rem); text-shadow: 0 2px 40px rgba(0, 0, 0, .35);
}
.hero-title .ht-1, .hero-title .ht-2 { display: block; }
.hero-title .ht-2 { padding-left: .55em; color: var(--glow); padding-right: .05em; transition: color 1.1s, text-shadow 1.1s; text-shadow: 0 0 60px rgba(243, 217, 164, .32); }
.hero-foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 2rem 4rem; padding-top: clamp(1.5rem, 3vw, 2.25rem); border-top: 1px solid var(--line-dark); }
.hero-lead { max-width: 46ch; margin: 0; font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); color: rgba(247, 242, 234, .88); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; }

/* Lighting panel beside the headline */
.hero-aside {
  grid-column: 2; grid-row: 2; align-self: end; margin-bottom: clamp(2.5rem, 5vw, 4rem);
  width: 15rem; padding: 1.15rem 1.25rem 1.2rem; border-radius: calc(var(--radius) + 4px);
  background: rgba(14, 13, 11, .42); border: 1px solid var(--line-dark);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.ha-label { margin: 0 0 .85rem; font-size: .7rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--brass); }
.ha-hint { margin: .85rem 0 0; font-size: .82rem; line-height: 1.45; color: var(--on-dark-muted); }

/* ---------- Light switch ---------- */
.light-switch {
  display: inline-flex; align-items: center; gap: .85rem; min-height: 44px; min-width: 44px; padding: 0;
  border: 0; background: none; color: var(--on-dark); font: 600 1rem var(--font-sans); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ls-track {
  position: relative; flex: none; width: 64px; height: 34px; border-radius: 999px;
  background: linear-gradient(180deg, #2b261f, #1a1712); border: 1px solid rgba(201, 164, 108, .55);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .6), 0 0 22px -4px rgba(243, 217, 164, .55);
  transition: box-shadow .6s var(--ease), border-color .6s var(--ease);
}
.ls-thumb {
  position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6e2, var(--glow) 45%, var(--brass) 100%);
  box-shadow: 0 0 14px 2px rgba(243, 217, 164, .75), 0 1px 2px rgba(0, 0, 0, .4);
  transform: translateX(30px);
  transition: transform .45s cubic-bezier(.3, .7, .2, 1), background .45s, box-shadow .6s;
}
.ls-state { min-width: 2.2em; font: italic 400 1.6rem/1 var(--font-serif); color: var(--glow); transition: color .6s; }
.light-switch[aria-checked="false"] .ls-track { border-color: rgba(247, 242, 234, .22); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .6); }
.light-switch[aria-checked="false"] .ls-thumb { transform: translateX(0); background: radial-gradient(circle at 35% 30%, #8d8478, #4a443c); box-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.light-switch[aria-checked="false"] .ls-state { color: var(--on-dark-muted); }
.light-switch:hover .ls-track { border-color: var(--brass-hover); }
.light-switch:focus-visible { outline: none; }
.light-switch:focus-visible .ls-track { outline: 3px solid var(--glow); outline-offset: 3px; }
.ls-compact .ls-track { width: 52px; height: 28px; }
.ls-compact .ls-thumb { width: 20px; height: 20px; transform: translateX(24px); }
.nav-end { display: flex; align-items: center; gap: 1rem; }

/* ---------- Lights off: the scene drops to night ---------- */
:root[data-lights="off"] .hero-photo img { filter: sepia(.45) saturate(.45) brightness(.42) contrast(1.1); }
:root[data-lights="off"] .hero-shade { opacity: .38; }
:root[data-lights="off"] .hero-glow { opacity: 0; }
:root[data-lights="off"] .hero-title .ht-2 { color: #cdb791; text-shadow: none; }
:root[data-lights="off"] .services-photo img,
:root[data-lights="off"] .about-photo img,
:root[data-lights="off"] .gallery-section .gallery-item img { filter: sepia(.5) saturate(.45) brightness(.3) contrast(1.1); }
:root[data-lights="off"] .gallery-item::before { opacity: 0; }
.services-photo img, .about-photo img { transition: filter 1.1s cubic-bezier(.3, .1, .2, 1); }

.hero-bar { position: relative; border-top: 1px solid var(--line-dark); background: rgba(14, 13, 11, .5); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.hero-bar-inner { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hero-bar-item {
  display: flex; flex-direction: column; gap: .2rem; padding: 1.3rem 1.5rem 1.4rem 0; min-height: 44px;
  text-decoration: none; color: rgba(247, 242, 234, .86); font-size: .95rem; transition: color .3s;
}
.hero-bar-item + .hero-bar-item { padding-left: 1.5rem; border-left: 1px solid var(--line-dark); }
.hb-label { font-size: .7rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--brass); }
.hero-bar-item:hover { color: var(--on-dark); }

/* Load sequence: the scene starts almost dark and switches on.
   Only opacity and transform animate, so it stays light on phones. */
@keyframes shade-out { from { opacity: .9; } }
@keyframes settle { from { transform: scale(1.09); } }
@keyframes glow-in { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } }
.js .hero-shade { animation: shade-out 2.4s cubic-bezier(.3, .1, .2, 1) .15s backwards; }
.js .hero-photo img { animation: settle 3.2s cubic-bezier(.2, .7, .2, 1) backwards; }
.js .hero-glow { animation: glow-in 2.2s 1s var(--ease) backwards; }
.js .hero-anim { animation: rise 1.1s var(--ease) both; animation-delay: calc(var(--d, 0) * .14s + .5s); }

/* ---------- Intro statement ---------- */
.intro { padding-block: clamp(5rem, 10vw, 9rem); border-bottom: 1px solid var(--line); }
.intro-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.5rem; align-items: start; }
.intro .eyebrow { grid-column: 1 / span 3; margin-top: .9rem; }
.intro-text {
  grid-column: 4 / -1; margin: 0;
  font: 400 clamp(1.9rem, 1rem + 2.7vw, 3.5rem)/1.14 var(--font-serif); letter-spacing: -0.01em; text-wrap: pretty;
}
.intro-text em { color: var(--bronze); }

/* ---------- Section heads ---------- */
.split-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 2rem 4rem; align-items: end; margin-bottom: clamp(3rem, 6vw, 5rem); }
.split-head h2 { max-width: 14ch; }
.split-head-side p { color: var(--muted); max-width: 42ch; font-size: 1.05rem; }
.split-head-dark h2 { color: var(--on-dark); }
.split-head-dark h2 em { color: var(--glow); }
.split-head-dark .split-head-side p { color: var(--on-dark-muted); }

/* ---------- Services ---------- */
.services { background: var(--ivory); }
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); margin-top: .5rem; }
.seg-btn {
  min-height: 44px; padding: 0 1.4rem; border: 0; border-radius: 999px; cursor: pointer;
  font: 600 .95rem var(--font-sans); color: var(--muted); background: transparent;
  transition: background .35s var(--ease), color .35s var(--ease);
}
.seg-btn:hover { color: var(--ink); }
.seg-btn.active { background: var(--night); color: var(--on-dark); }

.services-body { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.services-photo img { object-position: 52% 50%; }
.services-photo { position: sticky; top: calc(var(--header-h) + 2rem); aspect-ratio: 4 / 5; border-radius: var(--radius); }
.photo-tag {
  position: absolute; left: 1rem; bottom: 1rem; padding: .45rem .85rem; border-radius: 999px;
  font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--on-dark); background: rgba(14, 13, 11, .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.service-list { border-top: 1px solid var(--line); }
.service-list:focus-visible { outline-offset: 8px; }
.service-row {
  position: relative; display: grid; grid-template-columns: 3.75rem minmax(0, 1fr) auto; column-gap: 1rem;
  padding: 1.75rem 0; border-bottom: 1px solid var(--line); text-decoration: none;
}
.sr-num { grid-row: 1 / span 3; font: italic 400 1.5rem/1.2 var(--font-serif); color: var(--bronze); }
.sr-title { grid-column: 2; font-size: clamp(1.2rem, 1.05rem + .5vw, 1.45rem); font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; transition: transform .45s var(--ease); }
.sr-desc { grid-column: 2; color: var(--muted); margin-top: .35rem; max-width: 52ch; transition: transform .45s var(--ease); }
.sr-spec { grid-column: 2; margin-top: .75rem; font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--bronze); }
.sr-arrow {
  grid-column: 3; grid-row: 1 / span 3; align-self: center;
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line);
  transition: background .35s var(--ease), border-color .35s var(--ease), color .35s var(--ease);
}
.sr-arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s var(--ease); }
.service-row:hover .sr-title, .service-row:hover .sr-desc { transform: translateX(6px); }
.service-row:hover .sr-arrow { background: var(--night); border-color: var(--night); color: var(--glow); }
.service-row:hover .sr-arrow svg { transform: translateX(2px); }

/* ---------- Projects gallery ---------- */
.gallery-section { background: var(--night); color: var(--on-dark); position: relative; isolation: isolate; }
.gallery-section::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 40% at 80% 0%, rgba(243, 217, 164, .09), transparent 70%);
}
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: clamp(150px, 14vw, 215px); gap: clamp(.75rem, 1.4vw, 1.25rem); }
.bento > li { min-width: 0; }
.bento-a { grid-column: 1 / span 7; grid-row: span 4; }
.bento-b { grid-column: 8 / span 5; grid-row: span 2; }
.bento-c { grid-column: 8 / span 2; grid-row: span 2; }
.bento-d { grid-column: 10 / span 3; grid-row: span 2; }
.bento-e { grid-column: 1 / span 8; grid-row: span 3; }
.bento-f { grid-column: 9 / span 4; grid-row: span 3; }
.bento-c img { object-position: 50% 60%; }
.bento-f img { object-position: 30% 50%; }
.gallery-item {
  display: block; width: 100%; height: 100%; padding: 0; border: 0; border-radius: var(--radius);
  cursor: zoom-in; color: var(--on-dark); text-align: left; font: inherit;
}
.gallery-item img { transition: transform 1.4s var(--ease), filter 1.8s cubic-bezier(.3, .1, .2, 1); }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0;
  background: radial-gradient(80% 60% at 50% 0%, rgba(243, 217, 164, .35), transparent 70%);
  mix-blend-mode: screen;
}
/* The signature effect: photos start dim and switch on as they arrive */
.js .gallery-item.dim img { filter: brightness(.16) saturate(.15) sepia(.4); }
.js .gallery-item.dim.lit img { filter: sepia(.12) saturate(1.04) contrast(1.03); }
@keyframes flare { 0% { opacity: 0; } 35% { opacity: 1; } 100% { opacity: .25; } }
.gallery-item.dim.lit::before { animation: flare 2.2s cubic-bezier(.3, .1, .2, 1) both; }
.gallery-cap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; flex-direction: column; gap: .3rem; padding: 4rem 1.5rem 1.35rem;
  background: linear-gradient(transparent, rgba(14, 13, 11, .88));
}
.gc-label { font-size: .68rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--glow); }
.gallery-cap strong { font: 400 clamp(1.4rem, 1.1rem + .9vw, 2rem)/1.1 var(--font-serif); letter-spacing: -0.005em; }
.gallery-item.is-empty .gallery-cap { background: none; bottom: auto; top: 0; padding-top: 1.25rem; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10, 9, 8, .95);
  display: flex; align-items: center; justify-content: center;
  padding: 4.5rem var(--gutter) 2rem;
  animation: fade .3s var(--ease);
}
@keyframes fade { from { opacity: 0; } }
.lightbox-figure { margin: 0; max-width: min(1200px, 100%); color: var(--on-dark); }
.lightbox-figure img { max-height: 78vh; width: auto; margin: 0 auto; border-radius: var(--radius); }
.lightbox-figure figcaption { margin-top: 1.1rem; font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark-muted); text-align: center; }
.lightbox-placeholder {
  width: min(900px, 86vw); aspect-ratio: 4 / 3; max-width: 100%;
  display: grid; place-items: center; padding: 2rem; text-align: center; border-radius: var(--radius);
  background: linear-gradient(170deg, var(--umber-2), var(--night));
  font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark-muted);
}
.lightbox-close {
  position: absolute; top: calc(env(safe-area-inset-top, 0px) + 1rem); right: 1rem;
  width: 48px; height: 48px; border-radius: 50%;
  background: transparent; border: 1px solid var(--line-dark); color: var(--on-dark);
  font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.lightbox-close:hover { border-color: var(--brass); color: var(--glow); }

/* ---------- Process ---------- */
.process { background: var(--white); }
.process-head { margin-bottom: clamp(3rem, 6vw, 4.5rem); }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.5rem clamp(1.5rem, 3vw, 3rem); }
.step { position: relative; padding-top: 2rem; border-top: 1px solid var(--line); }
.step::before {
  content: ""; position: absolute; left: 0; top: -1px; width: 100%; height: 1px; background: var(--brass);
  transform: scaleX(1); transform-origin: left; transition: transform 1.2s var(--ease) .2s;
}
.js .step.pending::before { transform: scaleX(0); }
.step-num { display: block; margin-bottom: 1.4rem; font: italic 400 clamp(2.6rem, 2rem + 1.6vw, 3.6rem)/1 var(--font-serif); color: var(--bronze); }
.step h3 { margin-bottom: .6rem; font-size: 1.2rem; }
.step p { color: var(--muted); margin: 0; }

/* ---------- Service Area ---------- */
.area { background: var(--umber); color: var(--on-dark); position: relative; isolation: isolate; }
.area::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(50% 70% at 0% 100%, rgba(243, 217, 164, .1), transparent 70%);
}
.area-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 3rem clamp(3rem, 7vw, 7rem); align-items: start; }
.area h2 em { color: var(--glow); }
.area-intro p { color: var(--on-dark-muted); max-width: 42ch; margin-top: 1.75rem; font-size: 1.05rem; }
.link-arrow {
  display: inline-flex; align-items: center; gap: .6rem; min-height: 44px; margin-top: .5rem;
  font-weight: 600; text-decoration: none; color: var(--glow);
  border-bottom: 1px solid rgba(243, 217, 164, .45); transition: border-color .3s;
}
.link-arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s var(--ease); }
.link-arrow:hover { border-color: var(--glow); }
.link-arrow:hover svg { transform: translateX(4px); }
.towns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 2rem; border-top: 1px solid var(--line-dark); }
.towns li { padding: 1.05rem 0; border-bottom: 1px solid var(--line-dark); font: 400 1.4rem/1.2 var(--font-serif); color: var(--on-dark); }
.fineprint { margin-top: 1.25rem; font-size: .85rem; color: var(--on-dark-muted); }

/* ---------- About ---------- */
.about { background: var(--ivory); }
.about-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2.5rem, 7vw, 7rem); align-items: center; }
.about-photo { aspect-ratio: 4 / 5; border-radius: var(--radius); }
.about-copy h2 { margin-bottom: 2rem; max-width: 13ch; }
.about-lead { font-size: 1.2rem; color: var(--ink); max-width: 46ch; }
.about-copy > p:not(.eyebrow):not(.about-lead) { color: var(--muted); max-width: 54ch; }
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; margin: 2.5rem 0 0; }
.principles > div { padding-top: 1.1rem; border-top: 1px solid var(--brass); }
.principles dt { font: italic 400 1.45rem/1.15 var(--font-serif); margin-bottom: .4rem; }
.principles dd { margin: 0; color: var(--muted); font-size: .95rem; }

/* ---------- Contact ---------- */
.contact { position: relative; isolation: isolate; background: var(--night); color: var(--on-dark); }
.contact::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(55% 60% at 15% 10%, rgba(243, 217, 164, .12), transparent 70%),
    linear-gradient(180deg, var(--umber), var(--night) 60%);
}
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 3rem clamp(3rem, 7vw, 6rem); align-items: start; }
.contact h2 em { color: var(--glow); }
.contact-lead { margin-top: 1.75rem; font-size: 1.1rem; color: rgba(247, 242, 234, .86); max-width: 38ch; }
.contact-list { margin-top: 2.5rem; border-top: 1px solid var(--line-dark); }
.contact-list li { display: flex; flex-direction: column; gap: .3rem; padding: 1.15rem 0; border-bottom: 1px solid var(--line-dark); }
.cl-label { display: flex; align-items: center; gap: .6rem; font-size: .7rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--on-dark-muted); }
.ci-flag { padding: .1rem .45rem; border: 1px solid rgba(243, 217, 164, .5); border-radius: 999px; color: var(--glow); font-size: .62rem; letter-spacing: .14em; }
.contact-list a { display: inline-flex; align-items: center; min-height: 44px; font: 400 1.65rem/1.2 var(--font-serif); text-decoration: none; color: var(--on-dark); }
.contact-list a:hover { color: var(--glow); }
.fineprint-light { color: var(--on-dark-muted); }

.contact-form {
  background: var(--ivory); color: var(--ink); border-radius: calc(var(--radius) + 4px);
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .7), 0 0 0 1px rgba(243, 217, 164, .12);
}
.form-note { font-size: .88rem; color: var(--muted); margin-bottom: 1.5rem; }
.req { color: var(--error); }
.optional { color: var(--muted); font-weight: 400; }
.field { margin-bottom: 1.25rem; min-width: 0; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.25rem; }
.field label { display: block; margin-bottom: .45rem; font-size: .92rem; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: .8rem 1rem;
  font: 400 1rem var(--font-sans); color: var(--ink);
  background: var(--white); border: 1px solid #d9cfbf; border-radius: var(--radius);
  transition: border-color .25s, box-shadow .25s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 2.75rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a6431' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; background-size: 18px;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: #bfb19b; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--bronze); box-shadow: 0 0 0 3px rgba(138, 100, 49, .22); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--error); }
.field-hint { margin: .4rem 0 0; font-size: .85rem; color: var(--muted); }
.field-error { margin: .35rem 0 0; font-size: .86rem; font-weight: 600; color: var(--error); }
.field-error:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form .btn-block { margin-top: .5rem; }
.form-status { margin-top: 1.25rem; padding: .9rem 1rem; border-left: 3px solid; border-radius: 0 var(--radius) var(--radius) 0; font-size: .95rem; }
.form-status.is-sending { background: #f1ebe1; border-color: var(--bronze); color: var(--ink); }
.form-status.is-success { background: var(--success-bg); border-color: var(--success); color: var(--success); }
.form-status.is-error { background: var(--error-bg); border-color: var(--error); color: var(--error); }
.form-status a { font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer { background: var(--night); color: var(--on-dark); padding-top: clamp(4rem, 8vw, 7rem); border-top: 1px solid var(--line-dark); }
.footer-top { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 3rem; align-items: end; padding-bottom: clamp(3rem, 6vw, 5rem); }
.footer-statement { margin: 0; font: 400 clamp(3.4rem, 1.5rem + 6.5vw, 8rem)/.9 var(--font-serif); letter-spacing: -0.02em; }
.footer-statement em { color: var(--glow); }
.footer-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
.footer-label { font-size: .7rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--brass); margin-bottom: .75rem; }
.footer-links li a, .footer-links li span { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; text-decoration: none; color: rgba(247, 242, 234, .86); }
.footer-links li a:hover { color: var(--glow); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; padding-block: 1.75rem 2.25rem; border-top: 1px solid var(--line-dark); font-size: .88rem; color: var(--on-dark-muted); }
.footer-bottom p { margin: 0; max-width: 70ch; }
.to-top { display: inline-flex; align-items: center; min-height: 44px; white-space: nowrap; text-decoration: none; font-weight: 600; color: var(--on-dark); }
.to-top:hover { color: var(--glow); }

/* ---------- Scroll reveal ---------- */
.js .reveal { transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.pending { opacity: 0; transform: translateY(30px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .js .reveal.pending { opacity: 1; transform: none; }
  .js .step.pending::before { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .main-nav { gap: 1.75rem; }
  .main-nav ul { gap: 1.35rem; }
  .nav-phone { display: none; }
}

@media (max-width: 960px) {
  .hero-photo img { object-position: 36% 50%; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); }
  .hero-aside {
    grid-column: 1; grid-row: auto; width: auto; margin: 0 0 1.75rem;
    display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: .7rem .8rem .7rem 1.1rem;
    justify-self: start; min-width: 20rem;
  }
  .ha-label { margin: 0; }
  .ha-hint { display: none; }
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed; left: 0; right: 0; bottom: 0;
    top: var(--nav-top, 106px);
    flex-direction: column; align-items: stretch; justify-content: space-between; gap: 2rem;
    padding: 1.5rem var(--gutter) calc(2rem + env(safe-area-inset-bottom, 0px));
    background: var(--night); overflow-y: auto;
  }
  .main-nav:not(.open) { display: none; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav ul a {
    display: flex; width: 100%; min-height: 66px; border-bottom: 1px solid var(--line-dark);
    font: 400 2.2rem/1 var(--font-serif); color: var(--on-dark);
  }
  .main-nav ul a::after { display: none; }
  .main-nav ul a[aria-current="true"] { color: var(--glow); font-style: italic; }
  .main-nav.open ul li { animation: rise .5s var(--ease) both; }
  .main-nav.open ul li:nth-child(2) { animation-delay: .04s; }
  .main-nav.open ul li:nth-child(3) { animation-delay: .08s; }
  .main-nav.open ul li:nth-child(4) { animation-delay: .12s; }
  .main-nav.open ul li:nth-child(5) { animation-delay: .16s; }
  .nav-actions { flex-direction: column; align-items: stretch; gap: .75rem; }
  .nav-phone { display: flex; justify-content: center; border: 1px solid var(--line-dark); border-radius: 999px; min-height: 54px; font-size: 1rem; }
  .nav-actions .btn { min-height: 54px; font-size: 1rem; }

  .hero-foot { grid-template-columns: 1fr; }
  .split-head, .services-body, .area-grid, .about-grid, .contact-grid, .footer-top { grid-template-columns: 1fr; }
  .split-head h2, .about-copy h2 { max-width: 18ch; }
  .services-photo { position: relative; top: 0; aspect-ratio: 16 / 10; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 3rem; }
  .about-photo { aspect-ratio: 16 / 11; }
  .intro .eyebrow { grid-column: 1 / -1; margin-top: 0; }
  .intro-text { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .hero-title .ht-2 { padding-left: .28em; }
  .hero-aside { justify-self: stretch; min-width: 0; }
  .nav-end { gap: .6rem; }
  :root { --header-h: 66px; }
  /* Phones: the photo sits at its natural scale in the top of the screen,
     so it stays sharp, and the text continues below on the night ground */
  .hero { min-height: 0; }
  .hero-photo { inset: 0 0 auto 0; height: 60svh; min-height: 400px; }
  .hero-photo img { object-position: 34% 50%; }
  .bento-c img { object-position: 50% 60%; }
  .hero::after { background: linear-gradient(to bottom, rgba(14, 13, 11, .6) 0, rgba(14, 13, 11, 0) 150px, rgba(14, 13, 11, .05) 26svh, rgba(14, 13, 11, .78) 44svh, var(--night) 60svh); }
  .hero-inner { padding-top: max(calc(var(--banner-h) + var(--header-h) + 10rem), 41svh); padding-bottom: 2.25rem; }
  .hero-eyebrow { text-shadow: 0 1px 12px rgba(0, 0, 0, .8); color: var(--glow); }
  .hero-title { line-height: .9; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-bar { background: var(--night); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .hero-bar-inner { grid-template-columns: 1fr; }
  .hero-bar-item { flex-direction: row; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 1.05rem 0; }
  .hero-bar-item + .hero-bar-item { padding-left: 0; border-left: 0; border-top: 1px solid var(--line-dark); }
  .hero-bar-item > span:last-child { text-align: right; }
  .hero-photo .photo-note { top: calc(var(--banner-h) + var(--header-h) + .75rem); }

  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 44vw; gap: .75rem; }
  .bento-a { grid-column: 1 / -1; grid-row: span 2; }
  .bento-b { grid-column: 1 / -1; grid-row: span 1; }
  .bento-c, .bento-d { grid-column: span 1; grid-row: span 1; }
  .bento-e { grid-column: 1 / -1; grid-row: span 1; }
  .bento-f { grid-column: 1 / -1; grid-row: span 1; }
  .bento-c { grid-row: span 2; }
  .bento-d { grid-row: span 2; }
  .gallery-cap { padding: 3rem 1rem 1rem; }
  .photo.is-empty::after { left: .9rem; right: .9rem; bottom: .9rem; font-size: .62rem; }
  .gallery-item.is-empty::after { display: none; }
  .towns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .towns li { font-size: 1.25rem; }
  .principles { grid-template-columns: 1fr; gap: 1.25rem; }
  .service-row { grid-template-columns: 2.75rem minmax(0, 1fr) auto; padding: 1.5rem 0; }
  .sr-arrow { width: 44px; height: 44px; }
}

@media (max-width: 560px) {
  :root { --banner-h: 28px; }
  .demo-more { display: none; }
  .hero-eyebrow .eb-sep { display: none; }
  .hero-eyebrow .eb-place { display: block; }
  .hero-eyebrow { align-items: flex-start; }
  .hero-eyebrow::before { margin-top: .55em; }
  .demo-banner { font-size: .64rem; }
  .logo-text { font-size: .95rem; }
  .logo-mark { width: 36px; height: 36px; font-size: 1.2rem; }
  .field-row { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; row-gap: 2.5rem; }
  .footer-cols { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .seg { display: flex; }
  .seg-btn { flex: 1; }
}

/* Lights off wins over the gallery switch-on effect */
:root[data-lights="off"] .gallery-section .gallery-item.dim.lit img,
:root[data-lights="off"] .gallery-section .gallery-item img { filter: sepia(.5) saturate(.45) brightness(.3) contrast(1.1); }
