/* EA Custom Millwork. Layers: reset, tokens, core, components, utilities. */
@layer reset, tokens, core, components, utilities;

/* Fonts: self-hosted Google Latin subsets of Lato and Quattrocento (OFL), cut further by scripts/subset-fonts.py.
   font-display: optional + metric-matched fallbacks, so the swap can't shift layout. Rename a file if it changes
   (/assets/ caches 30 days). */
@font-face { font-family: "Lato"; src: url("/assets/fonts/lato-400-v1.woff2") format("woff2"); font-weight: 400; font-display: optional; }
@font-face { font-family: "Lato"; src: url("/assets/fonts/lato-700-v1.woff2") format("woff2"); font-weight: 700; font-display: optional; }
@font-face { font-family: "Quattrocento"; src: url("/assets/fonts/quattrocento-400-v1.woff2") format("woff2"); font-weight: 400; font-display: optional; }
@font-face { font-family: "Quattrocento"; src: url("/assets/fonts/quattrocento-700-v1.woff2") format("woff2"); font-weight: 700; font-display: optional; }
@font-face { font-family: "Lato Fallback"; src: local("Arial"); size-adjust: 97.4%; ascent-override: 101.3%; descent-override: 21.9%; line-gap-override: 0%; }
@font-face { font-family: "Quattrocento Fallback"; src: local("Times New Roman"); size-adjust: 104%; ascent-override: 90%; descent-override: 28%; line-gap-override: 0%; }

@layer tokens {
  /* EA brand tokens, read from the live site 11/19/2026: the Elementor kit's globals (colors, Quattrocento + Lato)
     and computed styles at 1440 and 390 px. Gate 2 proposal. Names are ours; the kit name is noted where it differs. */
  :root {
    /* Color: the kit's six globals, plus the band and footer colors set on individual containers */
    --color-copper: #a67356;          /* kit "Primary": brand accent, share bar, button family */
    --color-copper-strong: #9a6b50;   /* button fill: white text on it is 4.57:1 (cream on #a67356 was 3.24) */
    --color-walnut: #59362e;          /* kit "Secondary": button hover, accent text on cream (8.47:1) */
    --color-ink: #261717;             /* kit "Text": body copy, headings, footer band */
    --color-cream: #f2e4d8;           /* kit "Accent": page background, text on dark */
    --color-gold: #f2ae30;            /* kit "Golden": nav links over the hero only (1.55:1 on cream, never there) */
    --color-white: #fff;
    --color-sand: #d8cbc0;            /* home intro band */
    --color-black: #121212;           /* copyright bar */
    --color-gray: #8a8a8a;            /* copyright text, 5.43:1 on black (the MP credit was #666, 3.26) */
    --overlay: rgb(0 0 0 / .5);       /* image and video hero scrim */

    /* Purpose */
    --bg: var(--color-cream);  --text: var(--color-ink);  --accent: var(--color-copper);
    --link: var(--color-ink);  --link-hover: var(--color-walnut);   /* underlined, as the kit sets them */
    --nav-link: var(--color-gold);  --nav-link-current: var(--color-cream);

    /* Type: Quattrocento headings, Lato everything else. Both ship 400 and 700 only. The live site asks for 600 and
       has been rendering 700, so 700 is the honest token. */
    --font-heading: "Quattrocento", "Quattrocento Fallback", Georgia, serif;
    --font-body: "Lato", "Lato Fallback", system-ui, sans-serif;
    --weight-heading: 700;            /* H1, H2 "Our Services", card titles. Section H2s and page-title H1s use 400 */
    --text-s:  0.875rem;              /* 14px: excerpts, copyright */
    --text-m:  1rem;                  /* 16px body, line-height 1.4 */
    --text-l:  1.2rem;                /* 19.2px: lead copy, hero subtitle, desktop nav, footer links */
    --text-btn: 1.125rem;             /* 18px, uppercase, tracking 1px */
    --h4: 1.25rem;
    --h3: clamp(1.4rem, 0.56vw + 1.275rem, 1.75rem);      /* 22.4 → 28px */
    --h2: clamp(1.625rem, 0.6vw + 1.49rem, 2rem);         /* 26 → 32px */
    --h1: clamp(2.25rem, 1.19vw + 1.98rem, 3rem);         /* 36 → 48px; live holds 48px on phones */
    --leading-body: 1.4;  --leading-heading: 1.15;
    --eyebrow-tracking: .5em;         /* "CRAFTSMANSHIP DEFINED": Lato 16px, 8px tracking on the hero, 4px on About */
    --heading-tracking: 2px;          /* hero H1 only */

    /* Space (fluid, 360 → 1366 px). The live site runs on Elementor's 20px widget gap and per-container padding,
       so this is a proposed scale, not a copy. */
    --space-xs: 0.5rem;
    --space-s:  clamp(0.75rem, 0.25vw + 0.69rem, 1rem);
    --space-m:  clamp(1.25rem, 0.5vw + 1.14rem, 1.5rem);
    --space-l:  clamp(2rem, 1vw + 1.78rem, 2.5rem);
    --space-xl: clamp(2.5rem, 2vw + 2.05rem, 4rem);
    --section: clamp(3rem, 3.98vw + 2.1rem, 5.5rem);
    --gutter: clamp(1.5rem, 2.5vw + 0.94rem, 3rem);       /* 24px minimum keeps phone copy off the edge */
    --width-content: 71.25rem;        /* 1140px, the kit's container width */
    --width-narrow: 57.5rem;          /* 920px: the home intro band */
    --width-prose: 40rem;

    /* Shape and buttons */
    --radius: 0;                      /* buttons, gallery thumbnails: square, as the kit sets them */
    --radius-image: 1rem;             /* home door photo (eyeballed from the capture) */
    --radius-panel: 2.5rem;           /* home services panel, rounded on its left side only (eyeballed) */
    --btn-pad: .75rem 1.5rem;  --btn-weight: 700;  --btn-tracking: 1px;
    --btn-bg: var(--color-copper-strong);  --btn-text: var(--color-white);
    --btn-bg-hover: var(--color-walnut);   --btn-text-hover: var(--color-cream);
    --btn-light-bg: var(--color-cream);    --btn-light-text: var(--color-ink);   /* hero buttons over video */
  }
}

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  body, h1, h2, h3, h4, p, figure, dl, dd, ul, ol, blockquote { margin: 0; }
  ul[role="list"], ul[class] { list-style: none; padding: 0; }
  img, picture, video, svg { max-width: 100%; display: block; }
  img { height: auto; }
  button { font: inherit; color: inherit; }
}

@layer core {
  html { font-size: 100%; -webkit-text-size-adjust: 100%; scroll-padding-top: 2rem; }
  body { font-family: var(--font-body); font-size: var(--text-m); line-height: var(--leading-body); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
  h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 400; line-height: var(--leading-heading); text-wrap: balance; }
  h1 { font-size: var(--h1); }
  h2 { font-size: var(--h2); }
  h3 { font-size: var(--h3); }
  h4 { font-size: var(--h4); }
  p { text-wrap: pretty; }
  * + p, p + * { margin-block-start: var(--space-s); }
  a { color: var(--link); text-underline-offset: .15em; }
  a:hover { color: var(--link-hover); text-decoration: none; }
  :focus-visible { outline: 2px solid var(--color-walnut); outline-offset: 3px; }
  address { font-style: normal; }
  .lead { font-size: var(--text-l); line-height: 1.5; }
  .eyebrow { font-family: var(--font-body); font-size: var(--text-m); text-transform: uppercase; letter-spacing: var(--eyebrow-tracking); }
  @media (max-width: 39.99em) { .eyebrow { letter-spacing: .3em; } }   /* 8px tracking wraps "CRAFTSMANSHIP DEFINED" at 390 */
  .visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .skip-link { position: absolute; left: var(--space-s); top: -10rem; z-index: 100; padding: .5em 1em; background: var(--color-cream); color: var(--color-ink); }
  .skip-link:focus { top: var(--space-s); }
  .container { width: min(100% - 2 * var(--gutter), var(--width-content)); margin-inline: auto; }
  .container--narrow { max-width: var(--width-narrow); }
  .section { padding-block: var(--section); }
  .section-heading { text-align: center; }
  .prose { max-width: var(--width-prose); }

  /* Buttons: square, uppercase Lato. Default = copper fill; --light = cream fill for dark backgrounds. */
  .button { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: var(--btn-pad);
    border: 0; border-radius: var(--radius); background: var(--btn-bg); color: var(--btn-text);
    font-family: var(--font-body); font-size: var(--text-btn); font-weight: var(--btn-weight); letter-spacing: var(--btn-tracking);
    line-height: 1.4; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s; }
  .button:hover { background: var(--btn-bg-hover); color: var(--btn-text-hover); }
  .button--light { background: var(--btn-light-bg); color: var(--btn-light-text); }
  .button--light:hover { background: var(--color-walnut); color: var(--color-cream); }
}

@layer components {
  /* ---------- Header: over the hero photo on every page, gold links, current page in cream ---------- */
  .site-header { position: absolute; inset: 0 0 auto; z-index: 20; color: var(--color-cream); }
  .site-header__inner { display: flex; align-items: center; gap: var(--space-m); width: min(100% - 2 * var(--gutter), 90rem); margin-inline: auto; padding-block: var(--space-xs); }
  .site-header__brand { flex: none; }
  .site-header__logo { width: clamp(3.75rem, 4vw + 2.5rem, 5rem); height: auto; }
  .site-nav { display: flex; align-items: center; flex: 1; gap: var(--space-m); }
  .site-nav__list { display: flex; align-items: center; justify-content: center; flex: 1; gap: clamp(1rem, 2vw, 2.5rem); }
  .site-nav__link { display: inline-flex; align-items: center; gap: .3em; padding: .5em 0; background: none; border: 0; color: var(--nav-link);
    font-family: var(--font-body); font-size: var(--text-l); text-decoration: none; cursor: pointer; }
  .site-nav__link:hover, .site-nav__link[aria-current="page"], .site-nav__item.is-current > .site-nav__link { color: var(--nav-link-current); }
  .site-nav__chevron { width: 1em; height: 1em; transition: transform .2s; }
  .site-nav__item--group { position: relative; }
  .site-nav__sub { position: absolute; top: 100%; left: -1rem; min-width: 13rem; padding: .5rem 0; background: var(--color-ink); box-shadow: 0 .5rem 1.5rem rgb(0 0 0 / .25);
    visibility: hidden; opacity: 0; translate: 0 -.25rem; transition: opacity .15s, translate .15s, visibility 0s .15s; }
  .site-nav__group[aria-expanded="true"] + .site-nav__sub { visibility: visible; opacity: 1; translate: 0; transition-delay: 0s; }
  .site-nav__group[aria-expanded="true"] .site-nav__chevron { transform: rotate(180deg); }
  @media (hover: hover) and (min-width: 64em) {
    .site-nav__item--group:hover > .site-nav__sub { visibility: visible; opacity: 1; translate: 0; transition-delay: 0s; }
  }
  .site-nav__sublink { display: block; padding: .6rem 1rem; color: var(--color-cream); text-decoration: none; }
  .site-nav__sublink:hover, .site-nav__sublink[aria-current="page"] { color: var(--color-gold); }
  .social { display: flex; align-items: center; gap: .25rem; }
  .social__link { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; color: inherit; }
  .social__link:hover { color: var(--color-gold); }
  .social__icon { width: 1.125rem; height: 1.125rem; }
  .site-header__toggle { display: none; }

  @media (max-width: 63.99em) {
    .site-header__inner { justify-content: space-between; }
    .site-header__toggle { display: grid; place-items: center; width: 3rem; height: 3rem; padding: 0; background: none; border: 0; cursor: pointer; z-index: 2; }
    .site-header__brand { position: relative; z-index: 2; }   /* stays above the open menu */
    .site-header__toggle-bars, .site-header__toggle-bars::before, .site-header__toggle-bars::after { display: block; width: 1.75rem; height: 2px; background: currentColor; transition: transform .2s, background-color .2s; }
    .site-header__toggle-bars { position: relative; }
    .site-header__toggle-bars::before, .site-header__toggle-bars::after { content: ""; position: absolute; left: 0; }
    .site-header__toggle-bars::before { top: -.5rem; }
    .site-header__toggle-bars::after { top: .5rem; }
    .is-open .site-header__toggle-bars { background: transparent; }
    .is-open .site-header__toggle-bars::before { transform: translateY(.5rem) rotate(45deg); }
    .is-open .site-header__toggle-bars::after { transform: translateY(-.5rem) rotate(-45deg); }
    .site-nav { position: fixed; inset: 0; flex-direction: column; justify-content: center; gap: var(--space-l); padding: 5rem var(--gutter) var(--space-l);
      background: var(--color-ink); overflow-y: auto; visibility: hidden; opacity: 0; transition: opacity .2s, visibility 0s .2s; }
    .is-open .site-nav { visibility: visible; opacity: 1; transition-delay: 0s; }
    /* No JS: the menu sits in the header as a plain list. Keyed on the media feature, not .no-js, so the first paint
       already matches the scripted layout (the class version shifted the page when main.js removed it: CLS 0.3). */
    @media (scripting: none) { .site-nav { position: static; visibility: visible; opacity: 1; background: none; padding: 0; } .site-header__toggle { display: none; } }
    .site-nav__list { flex: none; flex-direction: column; gap: var(--space-xs); }
    .site-nav__link { font-weight: 700; letter-spacing: 1px; font-size: var(--text-btn); }
    .site-nav__sub { position: static; visibility: visible; opacity: 1; translate: 0; box-shadow: none; background: none; padding: 0; display: none; text-align: center; min-width: 0; }
    .site-nav__group[aria-expanded="true"] + .site-nav__sub { display: block; }
  }

  /* ---------- Hero (home): b-roll under a scrim, brand line left-aligned ---------- */
  .hero { position: relative; display: grid; align-items: center; min-height: max(60svh, 30rem); padding-block: 7rem var(--space-xl); color: var(--color-cream); background: var(--color-ink); isolation: isolate; }
  .hero__media, .hero__media > picture { position: absolute; inset: 0; z-index: -1; }
  .hero__poster, .hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .hero__video { opacity: 0; transition: opacity .8s; }
  .hero__video.is-playing { opacity: 1; }
  .hero__media::after { content: ""; position: absolute; inset: 0; background: var(--overlay); }
  .hero__title { font-weight: var(--weight-heading); letter-spacing: var(--heading-tracking); margin-block-start: .25rem; }
  .hero__subtitle { font-family: var(--font-heading); font-size: var(--text-l); margin-block-start: .25rem; }
  .hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-s); margin-block-start: var(--space-m); }

  /* ---------- Page hero (interior pages) ---------- */
  .page-hero { position: relative; display: grid; place-items: center; min-height: clamp(16rem, 25vw + 10rem, 22rem); padding-block: 6rem var(--space-l);
    color: var(--color-white); text-align: center; background: var(--color-ink); isolation: isolate; }
  .page-hero__media, .page-hero__media > picture { position: absolute; inset: 0; z-index: -1; }
  .page-hero__img { width: 100%; height: 100%; object-fit: cover; }
  .page-hero__media::after { content: ""; position: absolute; inset: 0; background: var(--overlay); }
  .page-hero__subtitle { font-family: var(--font-heading); font-size: var(--h2); margin-block-start: .25rem; }

  /* ---------- Services: intro | photo | gradient panel with both services ---------- */
  .services__inner { display: grid; gap: var(--space-l); align-items: center; }
  .services__heading { font-weight: var(--weight-heading); }
  .services__actions { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-s); margin-block-start: var(--space-m); }
  .services__img { width: 100%; border-radius: var(--radius-image); aspect-ratio: 4 / 5; object-fit: cover; }
  .services__list { position: relative; display: grid; gap: var(--space-l); padding: var(--space-l) var(--space-m); isolation: isolate; }
  .services__list::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: var(--radius-panel);
    background: linear-gradient(120deg, #e3cdbf 0%, #ecdfd6 32%, #f4ece6 52%, #f5efea 100%); }
  .services__item + .services__item { padding-block-start: var(--space-l); border-top: 1px solid rgb(38 23 23 / .15); }
  .services__title { font-weight: var(--weight-heading); }
  .services__subtitle { font-size: var(--text-m); margin-block-start: .25rem; }
  .services__item .button { margin-block-start: var(--space-m); }
  @media (min-width: 40em) {
    .services__inner { grid-template-columns: 1fr 1fr; }
    .services__list { grid-column: 1 / -1; }
  }
  @media (min-width: 64em) {
    .services__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 22rem) minmax(0, 1.15fr); gap: var(--space-xl); }
    .services__list { grid-column: auto; padding: var(--space-xl) var(--space-l) var(--space-xl) var(--space-l); }
    /* The panel runs off the right edge of the page, rounded on its left side only, as on the old site */
    .services__list::before { right: calc(-1 * (100vw - min(100vw - 2 * var(--gutter), var(--width-content))) / 2); border-radius: var(--radius-panel) 0 0 var(--radius-panel); }
  }
  .services { overflow-x: clip; }

  /* ---------- Carousel ---------- */
  .carousel { position: relative; isolation: isolate; }
  .carousel--bg { color: var(--color-cream); }
  .carousel__bg, .carousel__bg > picture { position: absolute; inset: 0; z-index: -1; }
  .carousel__bg img { width: 100%; height: 100%; object-fit: cover; }
  .carousel__bg::after { content: ""; position: absolute; inset: 0; background: rgb(38 23 23 / .72); }
  .carousel__viewport { position: relative; }
  .carousel__track { display: grid; grid-auto-flow: column; grid-auto-columns: 85%; gap: var(--space-s); overflow-x: auto; scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain; scrollbar-width: none; }
  .carousel__track::-webkit-scrollbar { display: none; }
  .carousel__slide { scroll-snap-align: start; }
  .carousel__img { width: 100%; aspect-ratio: 1; object-fit: cover; }
  @media (min-width: 40em) { .carousel__track { grid-auto-columns: calc((100% - var(--space-s)) / 2); } }
  @media (min-width: 64em) { .carousel__track { grid-auto-columns: calc((100% - 2 * var(--space-s)) / 3); } }
  .carousel__btn { position: absolute; top: 50%; translate: 0 -50%; display: grid; place-items: center; width: 3rem; height: 3rem; padding: 0;
    border: 0; border-radius: 50%; background: rgb(242 228 216 / .9); color: var(--color-ink); cursor: pointer; transition: opacity .2s; }
  .carousel__btn svg { width: 1.5rem; height: 1.5rem; }
  .carousel__btn--prev { left: .5rem; }
  .carousel__btn--next { right: .5rem; }
  .carousel__btn:disabled { opacity: 0; pointer-events: none; }
  .carousel__action { text-align: center; margin-block-start: var(--space-l); }

  /* ---------- Band ---------- */
  .band { padding-block: var(--space-xl); background: var(--color-sand); text-align: center; }

  /* ---------- Project cards ---------- */
  .project-cards__list { display: grid; gap: var(--space-l); margin-block-start: var(--space-l); }
  @media (min-width: 40em) { .project-cards__list { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); } }
  .project-card__link { display: block; color: inherit; text-decoration: none; }
  .project-card__img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: opacity .2s; }
  .project-card__title { margin-block-start: var(--space-s); font-size: var(--h3); }
  .project-card__link:hover .project-card__img { opacity: .85; }
  .project-card__link:hover .project-card__title { text-decoration: underline; text-underline-offset: .15em; }
  .project-cards__action { text-align: center; margin-block-start: var(--space-l); }

  /* ---------- About teaser ---------- */
  .about-teaser__inner { display: grid; gap: var(--space-l); align-items: center; }
  .about-teaser__copy .button { margin-block-start: var(--space-m); }
  .about-teaser__video { width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--color-ink); }
  @media (min-width: 64em) { .about-teaser__inner { grid-template-columns: 1fr 1fr; gap: var(--space-xl); } }

  /* ---------- Footer ---------- */
  .site-footer { background: var(--color-ink); color: var(--color-cream); }
  .site-footer__inner { display: grid; gap: var(--space-l); padding-block: var(--space-xl); }
  @media (min-width: 48em) { .site-footer__inner { grid-template-columns: 2fr 1fr 1.25fr; } }
  .site-footer__heading { font-size: var(--h3); margin-block-end: var(--space-s); }
  .site-footer__col p { max-width: 34rem; }
  .site-footer a { color: var(--color-cream); text-decoration: none; }
  .site-footer a:hover { color: var(--color-gold); }
  .site-footer__links { display: grid; gap: .35rem; font-size: var(--text-l); }
  .site-footer__social { margin-block-start: var(--space-s); margin-inline-start: -.75rem; }
  .site-footer__legal { padding: var(--space-m) var(--gutter); background: var(--color-black); color: var(--color-gray); font-size: var(--text-s); letter-spacing: 1.2px; text-align: center; }
  .site-footer__legal p + p { margin-block-start: .25rem; }
  .site-footer__legal a { color: var(--color-gray); text-decoration: underline; }
}

@layer utilities {
  /* Scroll reveals (main.js adds .is-in). Only when scripting is on, never under reduced motion. */
  @media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
    .reveal { opacity: 0; translate: 0 1.25rem; transition: opacity .6s ease-out, translate .6s ease-out; }
    .reveal.is-in { opacity: 1; translate: 0; }
  }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; }
  }
}

@layer core {
  .button--outline { background: transparent; color: var(--color-ink); box-shadow: inset 0 0 0 2px var(--color-ink); }
  .button--outline:hover { background: var(--color-ink); color: var(--color-cream); }
  .prose > * + * { margin-block-start: var(--space-s); }
  .prose ul { padding-inline-start: 1.25em; }
  .prose li + li { margin-block-start: .5em; }
  .prose--center { margin-inline: auto; text-align: center; }
  .section--intro { padding-block-end: 0; }
  .section--intro + .photo-grid { padding-block-start: var(--space-l); }
}

@layer components {
  /* ---------- Split: copy | photo ---------- */
  .split__inner { display: grid; gap: var(--space-l); align-items: start; }
  @media (min-width: 64em) { .split__inner:not(.split__inner--solo) { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--space-xl); } }
  .split__inner--solo .split__copy { max-width: var(--width-prose); }
  .split__eyebrow { margin-block-end: var(--space-xs); }
  .split__heading { font-weight: var(--weight-heading); }
  .split__subheading { font-family: var(--font-body); font-size: var(--text-m); text-transform: uppercase; letter-spacing: .25em; margin-block-start: var(--space-xs); }
  .split__body { margin-block-start: var(--space-m); }
  .split__actions { margin-block-start: var(--space-m); }
  .split__img { width: 100%; border-radius: var(--radius-image); }
  @media (min-width: 64em) { .split__figure { position: sticky; top: var(--space-l); } }

  /* ---------- Photo grid + lightbox ---------- */
  .photo-grid--sand { background: var(--color-sand); }
  .photo-grid__list { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-xs); }
  @media (min-width: 40em) { .photo-grid__list { grid-template-columns: repeat(3, 1fr); } }
  @media (min-width: 64em) { .photo-grid__list { grid-template-columns: repeat(4, 1fr); gap: var(--space-s); } }
  .photo-grid__heading + .photo-grid__list { margin-block-start: var(--space-l); }
  .photo-grid__link { display: block; overflow: hidden; }
  .photo-grid__img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .4s; }
  .photo-grid__link:hover .photo-grid__img, .photo-grid__link:focus-visible .photo-grid__img { transform: scale(1.04); }
  @media (prefers-reduced-motion: reduce) { .photo-grid__img { transition: none; } }
  .lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: var(--space-l) var(--space-xl);
    border: 0; background: rgb(18 18 18 / .94); color: var(--color-cream); }
  .lightbox::backdrop { background: rgb(0 0 0 / .6); }
  .lightbox[open] { display: grid; place-items: center; }
  .lightbox__figure { display: grid; justify-items: center; gap: var(--space-xs); max-height: 100%; }
  .lightbox__img { max-width: 100%; max-height: calc(100dvh - 2 * var(--space-l) - 2rem); width: auto; height: auto; object-fit: contain; }
  .lightbox__count { font-size: var(--text-s); color: var(--color-gray); }
  .lightbox__btn { position: absolute; display: grid; place-items: center; width: 3rem; height: 3rem; padding: 0; border: 0; border-radius: 50%;
    background: rgb(242 228 216 / .15); color: var(--color-cream); cursor: pointer; }
  .lightbox__btn svg { width: 1.5rem; height: 1.5rem; }
  .lightbox__btn:hover { background: var(--color-copper-strong); }
  .lightbox__btn--prev { left: var(--space-s); top: 50%; translate: 0 -50%; }
  .lightbox__btn--next { right: var(--space-s); top: 50%; translate: 0 -50%; }
  .lightbox__btn--close { right: var(--space-s); top: var(--space-s); }
  @media (max-width: 47.99em) { .lightbox { padding: var(--space-xl) var(--space-xs); } .lightbox__btn--prev, .lightbox__btn--next { top: auto; bottom: var(--space-s); translate: none; } }

  /* ---------- Testimonials ---------- */
  .testimonials { background: var(--color-sand); }
  .testimonials__inner { display: grid; gap: var(--space-l); align-items: start; }
  @media (min-width: 64em) { .testimonials__inner { grid-template-columns: 1.1fr 1fr; gap: var(--space-xl); } .testimonials__media { position: sticky; top: var(--space-l); } }
  .testimonials__video { width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--color-ink); }
  .testimonials__list { display: grid; gap: var(--space-l); }
  .testimonial__quote { font-family: var(--font-heading); font-size: var(--text-l); line-height: 1.5; }
  .testimonial__quote p::before { content: "“"; } .testimonial__quote p::after { content: "”"; }
  .testimonial__name { margin-block-start: var(--space-xs); font-weight: 700; }

  /* ---------- Forms ---------- */
  .form-layout { display: grid; gap: var(--space-xl); align-items: start; }
  @media (min-width: 64em) { .form-layout { grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr); } }
  .form-layout__main > * + * { margin-block-start: var(--space-s); }
  .form-layout__main .form-panel { margin-block-start: var(--space-l); }
  .form-layout__cta { margin-block-start: var(--space-l) !important; }
  .contact-info { padding: var(--space-l); background: var(--color-sand); }
  .contact-info__heading { font-size: var(--h4); }
  .contact-info__heading:not(:first-child) { margin-block-start: var(--space-m); }
  .contact-info p { margin-block-start: var(--space-xs); }
  .form__trap { position: absolute; left: -100vw; width: 1px; height: 1px; overflow: hidden; }
  .form__note { font-size: var(--text-s); margin-block-end: var(--space-s); }
  .form__grid { display: grid; gap: var(--space-m) var(--space-m); }
  @media (min-width: 40em) { .form__grid { grid-template-columns: 1fr 1fr; } .form__field--wide { grid-column: 1 / -1; } }
  .form__field { display: grid; gap: .35rem; align-content: start; min-width: 0; border: 0; margin: 0; padding: 0; }
  .form__label { font-weight: 700; padding: 0; }
  .form__req { color: var(--color-walnut); }
  .form__input { width: 100%; padding: .7rem .85rem; font: inherit; color: var(--color-ink); background: var(--color-white);
    border: 1px solid rgb(38 23 23 / .35); border-radius: var(--radius); }
  .form__input:focus { outline: 2px solid var(--color-walnut); outline-offset: 1px; border-color: transparent; }
  select.form__input { appearance: auto; }
  textarea.form__input { resize: vertical; min-height: 9rem; }
  .form__options { display: flex; flex-wrap: wrap; gap: .5rem var(--space-m); }
  .form__option { display: inline-flex; align-items: center; gap: .45rem; cursor: pointer; min-height: 2.75rem; }
  .form__option input { width: 1.15rem; height: 1.15rem; accent-color: var(--color-walnut); }
  .form [data-show-if] { display: none; }
  .form:has(input[name="has_timeline"][value="Yes"]:checked) [data-show-if="has_timeline=Yes"],
  .form:has(input[name="has_budget"][value="Yes"]:checked) [data-show-if="has_budget=Yes"] { display: grid; }
  .form.was-validated .form__input:invalid { border-color: #a0281b; box-shadow: 0 0 0 1px #a0281b; }
  .form__status { margin-block: var(--space-m) 0; padding: .75rem 1rem; background: #f8e1dc; color: #6e1b12; }
  .form__status.is-ok { background: var(--color-sand); color: var(--color-ink); }
  .form__submit { margin-block-start: var(--space-m); }
  .form__legal { margin-block-start: var(--space-s); font-size: var(--text-s); }
  .form-panel.is-sent .form { display: none; }

  /* ---------- Share bar (project pages) ---------- */
  .share { background: var(--color-copper-strong); color: var(--color-white); }
  .share__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-xs); padding-block: .5rem; }
  .share__label { font-family: var(--font-heading); font-size: var(--h4); }
  .share__list { display: flex; gap: .25rem; }
  .share__link { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; color: var(--color-white); }
  .share__link:hover { color: var(--color-ink); }
  .share__icon { width: 1.25rem; height: 1.25rem; }

  /* ---------- Project credits ---------- */
  .credits { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-xs) var(--space-l); margin-block-start: var(--space-m); }
  .credits__row { display: flex; gap: .4em; }
  .credits dt { font-weight: 700; }
  .credits dt::after { content: ":"; }
}

@layer components {
  .form__turnstile:not(:empty) { margin-block-start: var(--space-m); }   /* interaction-only: empty unless Cloudflare asks */
}
