/* ==========================================================================
   Auburn WA Wallpaper Installer — styles.css
   Design system: "Graphite, Ivory & Rose Bronze"
   Type: EB Garamond (display serif, variable 400–800) + Urbanist (UI/body, variable 100–900)
   ========================================================================== */

/* ---------- Fonts (self-hosted, latin subset) ---------- */
@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/ebgaramond-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/ebgaramond-italic-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Urbanist";
  src: url("../fonts/urbanist-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --ivory: #F4EFE7;
  --porcelain: #FBF8F3;
  --bone: #E9E2D6;
  --taupe: #8C7E70;          /* decorative only */
  --rule: #D8CFC1;           /* decorative hairlines */

  --ink: #1D1B19;            /* 15.0:1 on ivory */
  --body: #3E3832;           /* 10.1:1 on ivory */
  --muted: #665A4E;          /* 5.85:1 on ivory, 5.2:1 on bone */

  --charcoal: #1F1D1B;
  --charcoal-2: #2A2724;
  --onyx: #151413;
  --rule-dark: #3A3632;
  --on-dark: #F2ECE3;        /* 14.3:1 on charcoal */
  --on-dark-muted: #B8AEA2;  /* 7.7:1 on charcoal */

  --bronze: #A77C66;         /* large numerals / decorative */
  --bronze-text: #7A5240;    /* 5.9:1 on ivory */
  --bronze-deep: #5F3F31;
  --bronze-light: #D4AE97;   /* 8.2:1 on charcoal */

  --line: #8A8176;           /* control borders, 3.6:1 */
  --error: #A32B22;

  --serif: "EB Garamond", Garamond, "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Urbanist", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --max: 1320px;
  --gutter: clamp(16px, 4vw, 56px);
  --section: clamp(72px, 10vw, 150px);
  --header-h: 76px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 8px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--body);
  font-family: var(--sans);
  font-size: clamp(16px, 0.25vw + 15.2px, 18px);
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
p { margin: 0 0 1.1em; }
h1, h2, h3 { margin: 0; color: var(--ink); font-family: var(--serif); font-weight: 400; line-height: 1.1; letter-spacing: -0.01em; }
address { font-style: normal; }
ul, ol { margin: 0; padding: 0; }
[role="list"] { list-style: none; }
figure { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--bronze-text); outline-offset: 3px; }
.section--dark :focus-visible, .hero :focus-visible, .site-footer :focus-visible, .lightbox :focus-visible { outline-color: var(--bronze-light); }
::selection { background: var(--bronze-light); color: var(--ink); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--charcoal); color: var(--on-dark); padding: 10px 16px; text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); position: relative; }
.section--tight { padding-block: clamp(56px, 7vw, 100px); }
.section--bone { background: var(--bone); }
.section--dark { background: var(--charcoal); color: var(--on-dark-muted); }

/* subtle wallpaper-lattice texture */
.texture {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cpath d='M28 4 52 28 28 52 4 28z' fill='none' stroke='%23CFC4B3' stroke-width='.6' opacity='.55'/%3E%3Ccircle cx='28' cy='28' r='1.3' fill='%23CFC4B3' opacity='.7'/%3E%3C/svg%3E");
  background-size: 56px 56px;
}

/* ---------- Type helpers ---------- */
.eyebrow {
  display: flex; align-items: center; gap: 14px;
  margin: 0 0 22px;
  font-family: var(--sans);
  font-size: 12px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: var(--bronze-text);
}
.eyebrow::before { content: ""; width: 34px; height: 1px; background: currentColor; flex: none; }
.eyebrow--light { color: var(--bronze-light); }
.section-title {
  font-size: clamp(34px, 4.4vw, 62px);
  line-height: 1.04;
  margin-bottom: 28px;
  max-width: 18ch;
  text-wrap: balance;
}
.section-title--light { color: var(--on-dark); }
.section-title--sm { font-size: clamp(30px, 3.2vw, 46px); }
.lede { font-family: var(--serif); font-size: clamp(22px, 1.8vw, 27px); line-height: 1.4; color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 14px 28px;
  font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none; text-align: center; line-height: 1.3;
  border: 1px solid transparent; border-radius: 0; cursor: pointer;
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), transform .35s var(--ease);
}
.btn--solid { background: var(--bronze-text); color: var(--porcelain); border-color: var(--bronze-text); }
.btn--solid:hover { background: var(--bronze-deep); border-color: var(--bronze-deep); }
.btn--outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--outline:hover { background: var(--ink); color: var(--porcelain); }
.btn--light { background: var(--porcelain); color: var(--ink); border-color: var(--porcelain); }
.btn--light:hover { background: var(--bronze-light); border-color: var(--bronze-light); }
.btn--ghost-light { color: var(--porcelain); border-color: rgba(251, 248, 243, .7); background: rgba(21, 20, 19, .15); }
.btn--ghost-light:hover { background: var(--porcelain); color: var(--ink); }
.section--dark .btn--solid { background: var(--bronze-light); color: var(--ink); border-color: var(--bronze-light); }
.section--dark .btn--solid:hover { background: var(--porcelain); border-color: var(--porcelain); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--bronze-text); text-decoration: none; padding-block: 8px;
}
.link-arrow::after { content: ""; width: 36px; height: 1px; background: currentColor; transition: width .35s var(--ease); }
.link-arrow:hover::after { width: 56px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  color: var(--porcelain);
  transition: background-color .4s var(--ease), color .4s var(--ease), box-shadow .4s var(--ease);
}
.site-header__inner {
  max-width: 1440px; margin-inline: auto; padding-inline: var(--gutter);
  height: var(--header-h);
  display: flex; align-items: center; gap: 28px;
}
.site-header.is-scrolled, .site-header.is-open {
  background: rgba(244, 239, 231, .97);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--rule);
}
@supports ((-webkit-backdrop-filter: blur(8px)) or (backdrop-filter: blur(8px))) {
  .site-header.is-scrolled { background: rgba(244, 239, 231, .9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; min-width: 0; }
.brand__mark { width: 38px; height: 38px; flex: none; }
.brand__diamond { fill: var(--bronze-light); }
.is-scrolled .brand__diamond, .is-open .brand__diamond { fill: var(--bronze); }
.brand__text { display: flex; flex-direction: column; line-height: 1; min-width: 0; }
.brand__top { font-size: 10.5px; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; margin-bottom: 5px; }
.brand__name { font-family: var(--serif); font-size: 22px; letter-spacing: .01em; white-space: nowrap; }

.nav__list { display: flex; gap: clamp(18px, 2vw, 32px); list-style: none; }
.nav__list a {
  position: relative; display: inline-block; padding-block: 8px;
  font-size: 13px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
}
.nav__list a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease);
}
.nav__list a:hover::after, .nav__list a[aria-current="true"]::after { transform: scaleX(1); transform-origin: left; }
.nav__toggle, .nav__panel-foot { display: none; }

.btn--header { min-height: 44px; padding: 11px 20px; font-size: 12px; border-color: currentColor; color: inherit; background: transparent; }
.btn--header:hover { background: var(--bronze-text); border-color: var(--bronze-text); color: var(--porcelain); }

@media (max-width: 1120px) {
  .btn--header { display: none; }
}
@media (max-width: 980px) {
  :root { --header-h: 68px; }
  .nav { order: 3; }
  .nav__toggle {
    display: inline-flex; align-items: center; gap: 10px;
    min-height: 44px; padding: 8px 4px 8px 10px; background: none; border: 0; cursor: pointer;
    font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  }
  .nav__toggle-bars { position: relative; width: 26px; height: 12px; display: block; }
  .nav__toggle-bars span {
    position: absolute; left: 0; width: 100%; height: 1.5px; background: currentColor;
    transition: transform .35s var(--ease), top .35s var(--ease);
  }
  .nav__toggle-bars span:first-child { top: 0; }
  .nav__toggle-bars span:last-child { top: 10px; }
  .nav__toggle[aria-expanded="true"] .nav__toggle-bars span:first-child { top: 5px; transform: rotate(45deg); }
  .nav__toggle[aria-expanded="true"] .nav__toggle-bars span:last-child { top: 5px; transform: rotate(-45deg); }

  .nav__panel {
    display: none;
    position: fixed; left: 0; right: 0; top: var(--header-h);
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    background: var(--ivory); color: var(--ink);
    padding: 28px var(--gutter) 40px;
    border-top: 1px solid var(--rule);
  }
  .nav__panel.is-open { display: flex; flex-direction: column; }
  @media (prefers-reduced-motion: no-preference) {
    .nav__panel.is-open { animation: panelIn .45s var(--ease); }
  }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__list li { border-bottom: 1px solid var(--rule); }
  .nav__list a { display: block; padding: 16px 0; font-family: var(--serif); font-size: 30px; letter-spacing: 0; text-transform: none; }
  .nav__list a::after { display: none; }
  .nav__panel-foot { display: flex; flex-direction: column; gap: 18px; margin-top: 32px; align-items: flex-start; }
  .nav__phone { font-family: var(--serif); font-size: 24px; text-decoration: none; color: var(--bronze-text); }
}
@media (max-width: 420px) {
  .brand__name { font-size: 19px; }
  .brand__top { font-size: 9.5px; letter-spacing: .24em; }
  .brand__mark { width: 32px; height: 32px; }
  .nav__toggle-label { display: none; }
}
@keyframes panelIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  color: var(--porcelain);
  overflow: hidden;
  background: var(--charcoal);
}
.hero__media, .hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__media { z-index: -2; }
.hero__media img { object-fit: cover; object-position: 62% 50%; }
.hero__scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(21, 20, 19, .82) 0%, rgba(21, 20, 19, .62) 34%, rgba(21, 20, 19, .18) 68%, rgba(21, 20, 19, .08) 100%),
    linear-gradient(0deg, rgba(21, 20, 19, .55) 0%, rgba(21, 20, 19, 0) 38%),
    linear-gradient(180deg, rgba(21, 20, 19, .45) 0%, rgba(21, 20, 19, 0) 22%);
}
.hero__inner { width: 100%; max-width: 1440px; margin-inline: auto; padding: calc(var(--header-h) + 64px) var(--gutter) clamp(120px, 14vh, 170px); }
.hero__content { max-width: 640px; border-left: 1px solid rgba(212, 174, 151, .55); padding-left: clamp(20px, 3vw, 40px); }
.hero__title {
  color: var(--porcelain);
  font-size: clamp(46px, 7.2vw, 104px);
  line-height: .98; letter-spacing: -0.02em;
  margin-bottom: 28px;
}
.hero__title em { font-style: italic; color: var(--bronze-light); font-weight: 400; }
.hero__eyebrow::before { align-self: flex-start; margin-top: .75em; }
.hero__lead { font-size: clamp(16px, 1.25vw, 19px); color: #EFE8DE; max-width: 50ch; margin-bottom: 36px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.hero__phone { display: inline-flex; align-items: baseline; gap: 12px; font-family: var(--serif); font-size: 24px; text-decoration: none; color: var(--porcelain); }
.hero__phone-label { font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--bronze-light); }
.hero__phone:hover { color: var(--bronze-light); }
.hero__rail {
  position: absolute; right: clamp(16px, 3vw, 44px); top: 50%;
  transform: translateY(-50%) rotate(90deg); transform-origin: center;
  font-size: 11px; letter-spacing: .4em; text-transform: uppercase; color: rgba(251, 248, 243, .82);
  display: flex; align-items: center; gap: 18px; white-space: nowrap;
}
.hero__rail::before, .hero__rail::after { content: ""; width: 60px; height: 1px; background: rgba(251, 248, 243, .5); }
.hero__notes {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-width: 1440px; margin-inline: auto; padding: 0 var(--gutter);
  display: flex; list-style: none;
}
.hero__notes li {
  flex: 1; padding: 20px 0 24px; border-top: 1px solid rgba(251, 248, 243, .28);
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: rgba(251, 248, 243, .88);
}
.hero__notes li + li { padding-left: 24px; }
@media (max-width: 760px) {
  .hero__rail { display: none; }
  .hero__notes { display: none; }
  .hero__inner { padding-bottom: 64px; }
  .hero__media img { object-position: 70% 50%; }
  .hero__scrim { background: linear-gradient(0deg, rgba(21, 20, 19, .86) 0%, rgba(21, 20, 19, .62) 55%, rgba(21, 20, 19, .35) 100%); }
  .hero__actions .btn { flex: 1 1 100%; }
}

/* entrance animation (progressive) */
@media (prefers-reduced-motion: no-preference) {
  .js .hero__content > * { opacity: 0; transform: translateY(18px); animation: rise 1s var(--ease) forwards; }
  .js .hero__content > :nth-child(2) { animation-delay: .12s; }
  .js .hero__content > :nth-child(3) { animation-delay: .24s; }
  .js .hero__content > :nth-child(4) { animation-delay: .36s; }
  .js .hero__content > :nth-child(5) { animation-delay: .48s; }
  .hero__media img { animation: settle 2.4s var(--ease) both; }
}
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes settle { from { transform: scale(1.06); } to { transform: scale(1); } }

/* ---------- Frames ---------- */
.frame { position: relative; }
.frame::before {
  content: ""; position: absolute; inset: 22px -22px -22px 22px;
  border: 1px solid var(--bronze); z-index: 0; pointer-events: none;
}
.frame picture, .frame img { position: relative; z-index: 1; }

/* ---------- Intro ---------- */
.intro__grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(40px, 7vw, 120px); align-items: center; }
.intro__text p:not(.eyebrow):not(.lede):not(.signature) { max-width: 60ch; }
.intro__figure { padding-right: 22px; }
.intro__figure img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.intro__figure figcaption { margin-top: 40px; font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--muted); }
.intro__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 40px 0 36px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.intro__facts div { padding: 20px 16px 20px 0; }
.intro__facts div + div { padding-left: 16px; border-left: 1px solid var(--rule); }
.intro__facts dt { font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--bronze-text); margin-bottom: 6px; }
.intro__facts dd { margin: 0; font-family: var(--serif); font-size: 19px; line-height: 1.25; color: var(--ink); }
.signature { display: flex; flex-direction: column; gap: 2px; margin: 0; }
.signature__name { font-family: var(--serif); font-style: italic; font-size: 26px; color: var(--ink); }
.signature__role { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

/* ---------- Services ---------- */
.services__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(40px, 7vw, 110px); align-items: start; }
.services__sticky { position: sticky; top: calc(var(--header-h) + 32px); }
.services__sticky > p { max-width: 44ch; }
.services__figure { margin: 34px 0 26px; }
.services__figure img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; object-position: 50% 62%; }
.service-index { counter-reset: none; border-top: 1px solid var(--ink); }
.service {
  display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 20px;
  padding: 34px 0 30px; border-bottom: 1px solid var(--rule);
  position: relative;
}
.service::after {
  content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%;
  background: var(--bronze-text); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease);
}
.service:hover::after { transform: scaleX(1); }
.service__num { font-family: var(--serif); font-size: 40px; line-height: 1; color: var(--bronze); font-style: italic; }
.service__title { font-size: clamp(24px, 2.1vw, 30px); margin-bottom: 10px; transition: color .3s; }
.service:hover .service__title { color: var(--bronze-text); }
.service__body p { margin: 0; max-width: 56ch; }

/* ---------- Precision (dark) ---------- */
.precision__grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(40px, 7vw, 110px); align-items: start; }
.precision__head > p:not(.eyebrow) { max-width: 46ch; color: var(--on-dark-muted); }
.precision__figure { margin-top: 36px; max-width: 420px; }
.precision__figure img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.precision__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--rule-dark); }
.precision__list li { padding: 30px 28px 30px 0; border-bottom: 1px solid var(--rule-dark); position: relative; }
.precision__list li:nth-child(even) { padding-left: 28px; padding-right: 0; border-left: 1px solid var(--rule-dark); }
.precision__list h3 {
  display: flex; align-items: center; gap: 12px;
  color: var(--on-dark); font-size: 24px; margin-bottom: 10px;
}
.precision__list h3::before { content: ""; width: 7px; height: 7px; background: var(--bronze-light); transform: rotate(45deg); flex: none; }
.precision__list p { margin: 0; font-size: 15.5px; color: var(--on-dark-muted); }

/* ---------- Approach ---------- */
.approach__grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(40px, 7vw, 110px); align-items: center; }
.approach__figure img { width: 100%; aspect-ratio: 3 / 4.2; object-fit: cover; }
.approach__intro { max-width: 48ch; margin-bottom: 44px; }
.steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px clamp(28px, 4vw, 56px); margin-bottom: 48px; }
.step { position: relative; padding-top: 18px; border-top: 1px solid var(--rule); }
.step__num {
  display: block; font-family: var(--serif); font-size: clamp(64px, 6.4vw, 96px); line-height: .9; margin-bottom: 14px;
  color: var(--bronze);
}
@supports (-webkit-text-stroke: 1px black) {
  .step__num { color: transparent; -webkit-text-stroke: 1.2px var(--bronze); }
}
.step__title { font-size: 26px; margin-bottom: 10px; }
.step p { margin: 0; }

/* ---------- Gallery ---------- */
.gallery__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); gap: clamp(24px, 5vw, 80px); align-items: end; margin-bottom: clamp(40px, 5vw, 72px); }
.gallery__head .section-title { margin-bottom: 0; }
.gallery__head > p { margin: 0; max-width: 46ch; }
.masonry { columns: 3; column-gap: clamp(16px, 2vw, 28px); }
.masonry__item { break-inside: avoid; -webkit-column-break-inside: avoid; page-break-inside: avoid; margin-bottom: clamp(16px, 2vw, 28px); display: inline-block; width: 100%; }
.masonry__link { position: relative; display: block; overflow: hidden; background: var(--rule); }
.masonry__link img { width: 100%; transition: transform 1.1s var(--ease), filter .6s var(--ease); }
.masonry__link:hover img, .masonry__link:focus-visible img { transform: scale(1.04); }
.masonry__zoom {
  position: absolute; right: 14px; bottom: 14px; width: 40px; height: 40px;
  display: grid; place-items: center; font-size: 22px; line-height: 1;
  background: rgba(251, 248, 243, .92); color: var(--ink);
  opacity: 0; transform: translateY(6px); transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.masonry__link:hover .masonry__zoom, .masonry__link:focus-visible .masonry__zoom { opacity: 1; transform: none; }
.masonry__item figcaption { padding-top: 12px; font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 1100px) { .masonry { columns: 2; } }
@media (max-width: 640px) { .masonry { columns: 1; } }

/* ---------- Local ---------- */
.local__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(40px, 7vw, 110px); align-items: center; }
.local__figure { position: relative; }
.local__figure img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.local__figure::after {
  content: ""; position: absolute; left: -18px; top: -18px; width: 38%; height: 55%;
  border-left: 1px solid var(--bronze); border-top: 1px solid var(--bronze); pointer-events: none;
}
.local__text > p:not(.eyebrow) { max-width: 54ch; }
.nap { display: grid; gap: 0; margin-top: 30px; border-top: 1px solid var(--rule); }
.nap__row { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.nap__label { font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--bronze-text); padding-top: 5px; }
.nap a { text-decoration: none; color: var(--ink); overflow-wrap: anywhere; }
.nap a:hover { color: var(--bronze-text); text-decoration: underline; }

/* ---------- Service areas ---------- */
.areas { background: var(--porcelain); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.areas__inner { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 100px); align-items: end; }
.areas__primary .section-title { margin-bottom: 18px; }
.areas__city { margin: 0; font-family: var(--serif); font-size: clamp(36px, 4vw, 54px); line-height: 1; color: var(--ink); }
.areas__label { display: block; font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--bronze-text); margin-bottom: 10px; }
.areas__secondary > p { max-width: 54ch; }
.areas__list { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.areas__list li { padding: 8px 16px; border: 1px solid var(--rule); font-size: 14px; color: var(--body); background: var(--ivory); }

/* ---------- Location / map ---------- */
.location__grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 80px); align-items: stretch; }
.location__card { background: var(--porcelain); padding: clamp(28px, 4vw, 56px); border: 1px solid var(--rule); display: flex; flex-direction: column; align-items: flex-start; }
.location__address { font-family: var(--serif); font-size: 22px; line-height: 1.45; color: var(--ink); margin-bottom: 18px; }
.location__address strong { font-weight: 500; }
.location__links { margin-bottom: 28px; }
.location__links a { color: var(--bronze-text); text-decoration: none; overflow-wrap: anywhere; }
.location__links a:hover { text-decoration: underline; }
.location__card .btn { margin-top: auto; }
.location__map { position: relative; min-height: 420px; border: 1px solid var(--rule); background: var(--rule); }
.location__map::before {
  content: ""; position: absolute; inset: 14px -14px -14px 14px; border: 1px solid var(--bronze); z-index: 0; pointer-events: none;
}
.location__map iframe {
  position: relative; z-index: 1; display: block; width: 100%; height: 100%; min-height: 420px; border: 0;
  filter: grayscale(.55) sepia(.12) contrast(.98);
}

/* ---------- Contact / form ---------- */
.contact { background: var(--charcoal); }
.contact__grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(40px, 6vw, 100px); align-items: start; }
.contact__intro > p { max-width: 42ch; font-size: 18px; color: var(--on-dark-muted); }
.contact__direct { list-style: none; margin: 36px 0 28px; border-top: 1px solid var(--rule-dark); }
.contact__direct li { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--rule-dark); align-items: baseline; }
.contact__direct span { font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--bronze-light); }
.contact__direct a { color: var(--on-dark); text-decoration: none; font-family: var(--serif); font-size: 22px; overflow-wrap: anywhere; line-height: 1.3; }
.contact__direct li:last-child a { font-family: var(--sans); font-size: 16px; }
.contact__direct a:hover { color: var(--bronze-light); }
.contact__note { font-size: 15px !important; font-style: italic; }

.form-card { background: var(--porcelain); color: var(--body); padding: clamp(24px, 4vw, 56px); position: relative; }
.form-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--bronze); }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.field { display: flex; flex-direction: column; margin-bottom: 22px; min-width: 0; }
.field label { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink); margin-bottom: 8px; }
.field .req { color: var(--bronze-text); }
.field input, .field textarea {
  width: 100%; min-height: 50px;
  padding: 12px 14px;
  font: inherit; font-size: 16px; color: var(--ink);
  background: #FFFFFF;
  border: 1px solid var(--line); border-radius: 0;
  -webkit-appearance: none; appearance: none;
  transition: border-color .25s, box-shadow .25s;
}
.field textarea { resize: vertical; min-height: 130px; line-height: 1.55; }
.field input::placeholder, .field textarea::placeholder { color: #7B7166; opacity: 1; }
.field input:hover, .field textarea:hover { border-color: var(--ink); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--bronze-text); box-shadow: 0 0 0 3px rgba(122, 82, 64, .22); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--error) !important; }
.field--hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
/* error nodes are created by the client script (inline #ff6b6b) or by main.js; keep them readable on the light card */
.form .error-message { color: var(--error) !important; font-size: 14px; margin-top: 6px; font-weight: 500; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
.form__status { min-height: 0; margin: 0 0 12px; color: var(--error); font-weight: 500; }
.form__status:empty { display: none; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.btn--submit { min-width: 250px; }
.btn--submit[disabled] { opacity: .65; cursor: progress; }
.form__hint { margin: 0; font-size: 13px; color: var(--muted); }
.form-success { display: none; text-align: center; padding: 36px 8px; }
.form-success__icon { width: 56px; height: 56px; margin: 0 auto 18px; color: var(--bronze-text); }
.form-success h3 { font-size: 30px; margin-bottom: 10px; }
.form-success p { margin: 0; }
.form-success a { color: var(--bronze-text); }
@media (max-width: 640px) {
  .form__row { grid-template-columns: minmax(0, 1fr); }
  .btn--submit { width: 100%; min-width: 0; }
}

/* ---------- Final contact card ---------- */
.card-block {
  max-width: 980px; margin-inline: auto; text-align: center;
  padding: clamp(40px, 6vw, 84px) clamp(22px, 5vw, 72px);
  border: 1px solid var(--rule); background: var(--porcelain); position: relative;
}
.card-block::before { content: ""; position: absolute; inset: 10px; border: 1px solid var(--rule); pointer-events: none; }
.card-block .eyebrow { justify-content: center; }
.card-block .eyebrow::after { content: ""; width: 34px; height: 1px; background: currentColor; }
.card-block__title { font-size: clamp(32px, 4vw, 54px); margin-bottom: 8px; }
.card-block__owner { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--muted); margin-bottom: 36px; }
.card-block__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin-bottom: 36px; position: relative; }
.card-block__item { padding: 24px 18px; font-size: 15.5px; line-height: 1.5; color: var(--body); }
.card-block__item:nth-child(even) { border-left: 1px solid var(--rule); }
.card-block__item:nth-child(n+3) { border-top: 1px solid var(--rule); }
.card-block__label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--bronze-text); margin-bottom: 8px; }
.card-block__item a { color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.card-block__item a:hover { color: var(--bronze-text); text-decoration: underline; }
.card-block__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; position: relative; }
@media (max-width: 520px) {
  .card-block__grid { grid-template-columns: minmax(0, 1fr); }
  .card-block__item:nth-child(even) { border-left: 0; }
  .card-block__item + .card-block__item { border-top: 1px solid var(--rule); }
  .card-block__actions .btn { width: 100%; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--onyx); color: var(--on-dark-muted); padding-top: clamp(56px, 7vw, 96px); font-size: 15.5px; }
.footer__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, .7fr); gap: 40px; padding-bottom: 56px; }
.footer__name { font-family: var(--serif); font-size: clamp(28px, 3vw, 38px); line-height: 1.1; color: var(--on-dark); margin-bottom: 12px; }
.footer__tag { max-width: 34ch; }
.footer__heading { font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--bronze-light); margin-bottom: 18px; }
.site-footer a { text-decoration: none; color: var(--on-dark-muted); overflow-wrap: anywhere; }
.site-footer a:hover { color: var(--on-dark); text-decoration: underline; }
.footer__col ul { list-style: none; display: grid; gap: 8px; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-block: 26px; border-top: 1px solid var(--rule-dark); font-size: 13.5px; }
.footer__bottom p { margin: 0; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(21, 20, 19, .95);
  display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; align-items: center;
  padding: 56px 12px 24px;
}
.lightbox[hidden] { display: none; }
.lightbox__figure { margin: 0; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.lightbox__img { max-width: 100%; max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); width: auto; height: auto; object-fit: contain; }
.lightbox__caption { margin-top: 14px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--on-dark-muted); text-align: center; }
.lightbox__close, .lightbox__nav { background: none; border: 1px solid rgba(242, 236, 227, .35); color: var(--on-dark); cursor: pointer; width: 48px; height: 48px; font-size: 28px; line-height: 1; display: grid; place-items: center; transition: background-color .3s, border-color .3s; }
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(242, 236, 227, .12); border-color: var(--on-dark); }
.lightbox__close { position: absolute; top: 12px; right: 12px; }
.lightbox__nav--prev { justify-self: start; }
.lightbox__nav--next { justify-self: end; }
@media (max-width: 640px) {
  .lightbox { grid-template-columns: minmax(0, 1fr); padding: 64px 10px 84px; }
  .lightbox__nav { position: absolute; bottom: 20px; }
  .lightbox__nav--prev { left: calc(50% - 60px); }
  .lightbox__nav--next { right: calc(50% - 60px); }
}
body.no-scroll { overflow: hidden; }

/* ---------- Responsive layout ---------- */
@media (max-width: 1000px) {
  .intro__grid, .services__grid, .precision__grid, .approach__grid, .local__grid, .location__grid, .contact__grid, .areas__inner, .gallery__head { grid-template-columns: minmax(0, 1fr); }
  .services__sticky { position: static; }
  .intro__figure { max-width: 560px; }
  .approach__figure { max-width: 560px; }
  .approach__figure img { aspect-ratio: 4 / 3; }
  .precision__figure { max-width: 100%; }
  .precision__figure img { aspect-ratio: 16 / 10; }
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .precision__list { grid-template-columns: minmax(0, 1fr); }
  .precision__list li, .precision__list li:nth-child(even) { padding: 24px 0; border-left: 0; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .service { grid-template-columns: 52px minmax(0, 1fr); gap: 14px; padding: 26px 0 24px; }
  .service__num { font-size: 32px; }
  .intro__facts { grid-template-columns: minmax(0, 1fr); }
  .intro__facts div, .intro__facts div + div { padding: 14px 0; border-left: 0; }
  .intro__facts div + div { border-top: 1px solid var(--rule); }
  .frame::before { inset: 14px -14px -14px 14px; }
  .intro__figure { padding-right: 14px; }
  .local__figure::after { left: -8px; top: -8px; }
  .location__map::before { inset: 10px -10px -10px 10px; }
  .location__map { margin-right: 10px; }
  .footer__grid { grid-template-columns: minmax(0, 1fr); }
  .nap__row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .contact__direct li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

/* ---------- Scroll reveal (progressive enhancement) ----------
   Visible by default. main.js adds .reveal-ready to <html> only when IntersectionObserver exists. */
@media (prefers-reduced-motion: no-preference) {
  .reveal-ready .reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
  .reveal-ready .reveal--image { transform: none; clip-path: inset(0 0 12% 0); transition: opacity 1.1s var(--ease), clip-path 1.3s var(--ease); }
  .reveal-ready .reveal.is-visible { opacity: 1; transform: none; }
  .reveal-ready .reveal--image.is-visible { clip-path: inset(0 0 0 0); }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .hero__rail, .hero__notes, .lightbox, .location__map, .skip-link { display: none !important; }
  .reveal, .js .hero__content > * { opacity: 1 !important; transform: none !important; clip-path: none !important; animation: none !important; }
  .hero { min-height: 0; color: #000; background: none; }
  .hero__media, .hero__scrim { display: none; }
  .hero__title, .hero__lead, .hero__phone { color: #000; }
  .section--dark, .site-footer { background: #fff; color: #000; }
}
