/* Full-screen chapters on desktop; one continuous document on mobile.
   Native scrolling keeps wheel, touch and keyboard input in the browser. */
:root { --header-height: 88px; }
html {
  scroll-snap-type: y mandatory;
  scroll-padding-top: 0;
  scroll-behavior: smooth;
}
.site-header {
  position: fixed;
  inset: 0 0 auto;
  height: var(--header-height);
  min-height: 0;
  padding: 12px var(--gutter);
  z-index: 20;
}
.screen-panel {
  height: 100vh;
  height: 100dvh;
  padding-top: var(--header-height);
  scroll-snap-align: start;
  scroll-snap-stop: always;
  scroll-margin: 0;
  overflow: hidden;
}
.panel-scroll {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #aa825070 transparent;
  display: flex;
  flex-direction: column;
}
.panel-scroll > .section-pad {
  flex-shrink: 0;
  width: 100%;
  margin-block: auto;
  padding: clamp(28px, 5dvh, 64px) var(--gutter);
}
.panel-scroll:focus-visible { outline-offset: -4px; }
nav > a[aria-current="location"]::after { width: 100%; }
.nav-contact[aria-current="location"] { background: var(--cream); }
.screen-panel h1:focus, .screen-panel h2:focus { outline: none; }

/* The first page includes its trust strip, so the next section never peeks in. */
.hero-panel .panel-scroll { padding: 22px var(--gutter) 16px; gap: 20px; }
.hero {
  flex: 1 0 auto;
  min-height: 420px;
  padding: 0;
  gap: 36px;
  align-items: stretch;
}
.hero-copy { padding: 0; align-self: center; }
.hero h1 { margin: 22px 0 18px; }
.hero-description { margin-bottom: 20px; font-size: 14px; line-height: 1.7; }
.hero-secondary { margin-top: 14px; }
.hero-note { margin-top: 20px; }
.hero-note p { font-size: 10px; }
.hero-photo { height: 100%; min-height: 0; }
.hero-photo img {
  height: 160%;
  width: auto;
  min-width: 115%;
  left: 50%;
  top: -5%;
  transform: translateX(-50%);
}
.hero-caption { flex-shrink: 0; }
.values-strip { flex-shrink: 0; margin: 0; padding: 14px 8px; }
.services { align-items: center; }
.service[data-animating] { overflow: hidden; }
.service[data-expanded="false"] .plus::after { transform: rotate(90deg); }
.service[data-expanded="true"] .plus::after { transform: rotate(0); }

/* Scale the portfolio photographs with the viewport, keeping both cards visible. */
.work-panel { background: var(--cream); }
.work-panel .work { padding-block: 24px; }
.work .section-heading { margin-bottom: 22px; }
.work .section-heading h2 { margin-top: 14px; }
.project-photo { height: clamp(180px, 33dvh, 450px); }
.project-small { padding-top: 34px; }
.project-small .project-photo { height: clamp(146px, calc(33dvh - 34px), 416px); }
.project-info { padding: 15px 0 0; }
.work-footnote { margin-top: 16px; }

.about-panel { background: var(--navy); }
.detail-photo { height: clamp(270px, 50dvh, 550px); }
.process .section-heading { margin-bottom: 34px; }
.contact-panel { background: #eae7dd; }
.contact-panel .contact { flex-grow: 1; align-items: center; padding-block: 18px; }
.contact .field { margin-bottom: 14px; }
.contact .field label { margin-bottom: 5px; }
.contact .field input, .contact .field select { min-height: 33px; padding-bottom: 7px; }
.contact .field textarea { min-height: 62px; height: 62px; padding-bottom: 7px; }
.contact .form-notice { margin: 0 0 12px; }
.contact .form-submit { min-height: 48px; }
.contact .form-privacy { margin-top: 8px; }
.contact-panel .site-footer { flex-shrink: 0; padding: 18px var(--gutter) 12px; }
.contact-panel .footer-top { padding-bottom: 16px; }
.contact-panel .footer-bottom { padding-top: 10px; }
.contact-panel .footer-brand .brand-type { font-size: 26px; }
.contact-panel .footer-top > p { font-size: 18px; }

/* Keep native dialog scrolling separate from page snapping. */
html:has(dialog[open]) { overflow: hidden; scroll-snap-type: none; }
dialog { overscroll-behavior: contain; }

@media (max-width: 1050px) {
  .hero { gap: 28px; }
  .hero-panel .panel-scroll { padding-inline: 30px; }
}
@media (max-width: 800px) {
  :root { --header-height: 78px; }
  /* A single scroll container lets touch gestures continue between sections,
     including after following a menu anchor. Long sections grow with content. */
  html { scroll-snap-type: none; }
  .screen-panel {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
    scroll-snap-align: none;
    scroll-snap-stop: normal;
  }
  .panel-scroll {
    height: auto;
    min-height: calc(100vh - var(--header-height));
    min-height: calc(100dvh - var(--header-height));
    overflow: visible;
  }
  .site-header { padding: 10px 24px; }
  .hero-panel .panel-scroll { padding: 20px 24px 14px; }
  .panel-scroll > .section-pad { padding-inline: 30px; }
  .hero-copy { padding: 15px 0; }
  .hero-photo { min-height: 380px; }
  .hero-note { margin-top: 20px; }
  .contact-panel .site-footer { padding-inline: 30px; }
  .contact-panel .contact { align-items: start; }
}
@media (max-width: 580px) {
  :root { --header-height: 76px; }
  .panel-scroll > .section-pad { padding: 28px 24px; }
  .hero-panel .panel-scroll { gap: 18px; padding: 20px 24px 12px; }
  .hero { flex: 1 0 auto; grid-template-columns: 1fr; min-height: 0; gap: 22px; }
  .hero-copy { padding: 0; }
  .hero h1 { margin: 18px 0 16px; }
  .hero-description { margin-bottom: 16px; }
  .hero-secondary { margin-top: 14px; }
  .hero-note { margin-top: 17px; }
  .hero-visual { margin-left: 14px; }
  .hero-photo {
    height: clamp(180px, 28dvh, 320px);
    min-height: clamp(180px, 28dvh, 320px);
    max-height: none;
  }
  .values-strip { padding: 11px 0; }
  .values-strip p { font-size: 8px; }
  .services { gap: 28px; }
  .section-intro > .text-link { margin-top: 18px; }
  .service summary { padding-block: 20px; }
  .service-content { padding-bottom: 22px; }
  .work .section-heading { margin-bottom: 25px; }
  .project-grid { gap: 26px; }
  .project-small { padding-top: 0; }
  .project-photo, .project-small .project-photo { height: clamp(210px, 34dvh, 340px); }
  .project-info { padding-top: 15px; }
  .work-footnote { margin-top: 28px; }
  .about { gap: 28px; }
  .detail-photo { height: clamp(230px, 35dvh, 340px); }
  .process .section-heading { margin-bottom: 28px; }
  .process-steps { gap: 28px 22px; }
  .contact-panel .contact { gap: 28px; padding-block: 28px; }
  .contact-intro h2 { margin-top: 18px; margin-bottom: 20px; }
  .contact .field { margin-bottom: 18px; }
  .contact .field input, .contact .field select { min-height: 42px; }
  .contact .field textarea { min-height: 90px; }
  .contact .form-submit { min-height: 52px; }
  .contact-panel .site-footer { padding: 28px 24px 18px; }
  .contact-panel .footer-top { gap: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
@media (prefers-reduced-motion: reduce) and (min-width: 801px) {
  html { scroll-snap-type: y proximity; }
}
@media print {
  html { scroll-snap-type: none; }
  .site-header { position: static; }
  .screen-panel { height: auto; min-height: 0; padding: 0; overflow: visible; break-inside: avoid; }
  .panel-scroll { height: auto; min-height: 0; overflow: visible; display: block; }
}
