.horizontal-page {
  --rail-y: clamp(68px, 15svh, 136px);
  --middle-y: 49svh;
  --chapter-pad: clamp(1.35rem, 5vw, 5.2rem);
  margin: 0;
  overflow: hidden;
  background: var(--paper);
}
.horizontal-scroll { width: 100%; height: 100svh; overflow: auto hidden; overscroll-behavior-x: contain; scrollbar-width: none; }
.horizontal-scroll::-webkit-scrollbar { display: none; }
.horizontal-scroll:focus-visible { outline: none; }
.horizontal-track { position: relative; display: flex; width: max-content; min-width: 100%; height: 100%; }
.horizontal-trace { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.horizontal-opening {
  flex: 0 0 100vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: clamp(1.25rem, 3.4vw, 2.5rem);
  background: #f5f0da;
  position: relative;
}
.horizontal-opening .brand { display: block; flex: none; width: min(74vw, 674px); }
.horizontal-js .horizontal-opening .brand-trace { visibility: hidden; }
.horizontal-opening .masthead-signature { opacity: 1; }
.horizontal-js .horizontal-opening:not(.is-signed) :is(.masthead-signature, .horizontal-hint) { opacity: 0; }
.horizontal-hint {
  position: absolute;
  bottom: clamp(1.5rem, 5vh, 3.5rem);
  font-size: .84rem;
  color: #435a41;
  text-decoration: none;
  transition: opacity 450ms ease;
}
.horizontal-hint:hover { text-decoration: underline; }
.chapter {
  position: relative;
  flex: 0 0 clamp(31rem, 78vw, 75rem);
  min-width: 0;
  display: flex;
  padding: calc(var(--rail-y) + clamp(1.3rem, 3.1vw, 2.8rem)) var(--chapter-pad) clamp(2.15rem, 4.5vh, 3rem);
  height: 100%;
  border-inline-end: 1px solid #435a411b;
}
.chapter-content { width: 100%; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; }
.horizontal-js .chapter-content { opacity: 0; transition: opacity 500ms ease; }
.horizontal-js .chapter:is(.is-revealed, :focus-within, :target) .chapter-content { opacity: 1; }
.chapter h1 { margin-block: .8rem 1.15rem; }
.chapter h2 { margin: .45rem 0 1.1rem; }
.chapter p + p { margin-top: 1rem; }
.chapter p:not(.eyebrow) { color: var(--muted); max-width: 63ch; }
.chapter-hero { flex-basis: clamp(29rem, 62vw, 62rem); }
.chapter-hero .hero-copy { display: block; }
.chapter-hero .hero-intro { padding-bottom: 0; }
.chapter-hero .button { margin-top: 1.1rem; }
.chapter.chapter-studio { padding-top: clamp(1.6rem, 6svh, 3.5rem); }
.chapter-studio .chapter-content { display: grid; grid-template-rows: calc(var(--middle-y) - clamp(1.6rem, 6svh, 3.5rem) - 1rem) minmax(0, 1fr); gap: 2rem; }
.chapter-studio .studio-heading { align-self: center; }
.chapter-studio .studio-copy { overflow-y: auto; }
.chapter.chapter-photo {
  flex: 0 0 calc(100svh * var(--photo-ratio, 1.4));
  padding: 0;
  border: 0;
  background: #eeece3;
}
.chapter-photo .chapter-content { overflow: hidden; }
.chapter-photo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.chapter-journey, .chapter-step { background: #e8ede2; }
.chapter-journey { flex-basis: clamp(29rem, 61vw, 62rem); }
.chapter-step { flex-basis: clamp(23rem, 39vw, 37rem); }
.chapter-step h3 { font-size: clamp(1.35rem, 2.55vw, 2.2rem); margin-bottom: .95rem; }
.horizontal-dot { position: absolute; z-index: 2; top: var(--rail-y); left: var(--chapter-pad); transform: translate(-50%, -50%); width: 14px; height: 14px; border: 2px solid #e8ede2; border-radius: 50%; background: #435a41; }
.chapter-services { background: #ede8dc; }
.chapter-services .service-list { margin-top: 1.35rem; }
.chapter-services article { padding-top: 1rem; }
.chapter-faq details { border-top: 1px solid var(--rule); padding: .8rem 0; }
.chapter-faq summary { cursor: pointer; font-weight: 700; }
.chapter-faq details p { margin-top: .55rem; }
.chapter-contact { flex-basis: 100vw; background: var(--dark); color: var(--paper); }
.chapter-contact p:not(.eyebrow) { color: #e0dfd6; }
@media (max-width: 760px) {
  .horizontal-page { --rail-y: clamp(55px, 12svh, 96px); }
  .chapter { flex-basis: 91vw; }
  .chapter-step { flex-basis: 78vw; }
  .chapter-contact { flex-basis: 100vw; }
  .chapter-services .service-list { grid-template-columns: 1fr; }
  .chapter-services .service-list article { border-inline: 0; padding: 1rem 0; }
}

@media (max-width: 600px) and (orientation: portrait) {
  .horizontal-page { --rail-y: clamp(51px, 10svh, 84px); --chapter-pad: clamp(1.25rem, 6vw, 2rem); }
  .chapter, .chapter-hero, .chapter-journey, .chapter-step, .chapter-contact { flex-basis: 100vw; }
  .chapter { padding-top: calc(var(--rail-y) + 1.65rem); padding-bottom: max(1.6rem, env(safe-area-inset-bottom)); }
  .chapter-content { font-size: .96rem; line-height: 1.55; }
  .chapter h1 { font-size: clamp(2.85rem, 12vw, 3.65rem); }
  .chapter h2 { font-size: clamp(1.95rem, 7.7vw, 2.45rem); }
  .chapter h3 { font-size: clamp(1.18rem, 5.3vw, 1.52rem); }
  .chapter :is(h1, h2, h3, p, address) { overflow-wrap: anywhere; }
  .chapter .eyebrow { font-size: .78rem; }
  .chapter .lede { max-width: 100%; }
  .chapter.chapter-studio { padding-top: calc(var(--rail-y) + 1.65rem); }
  .chapter-studio .chapter-content { display: block; }
  .chapter-studio .studio-copy { overflow: visible; margin-top: 1.1rem; }
  .chapter.chapter-photo { flex-basis: 100vw; }
  .chapter.chapter-services { flex-basis: 300vw; padding-inline: 0; }
  .chapter-services .section-head { width: 100vw; padding-inline: var(--chapter-pad); }
  .chapter-services .service-list { grid-template-columns: repeat(3, 100vw); margin-top: 1rem; border: 0; }
  .chapter-services .service-list article {
    padding: .8rem var(--chapter-pad) 0;
    border: 0;
    scroll-snap-align: start;
  }
  .chapter-services .service-list article + article { border-inline-start: 1px solid #435a411b; }
  .chapter-contact .contact-inner { gap: 1.6rem; }
}

@media (max-width: 600px) and (orientation: portrait) and (pointer: coarse) {
  .horizontal-scroll { scroll-snap-type: x proximity; }
  .horizontal-opening, .chapter { scroll-snap-align: start; }
}

@media (max-width: 360px) and (orientation: portrait) {
  .chapter.chapter-studio { flex-basis: 200vw; padding-inline: 0; }
  .chapter-studio .chapter-content {
    display: grid;
    grid-template-columns: repeat(2, 100vw);
    grid-template-rows: max-content minmax(0, 1fr);
    gap: 0;
  }
  .chapter-studio .studio-heading { grid-column: 1; grid-row: 1; padding-inline: var(--chapter-pad); }
  .chapter-studio .studio-copy { display: contents; }
  .chapter-studio .studio-copy p {
    grid-row: 2;
    align-self: start;
    margin: 0;
    padding-inline: var(--chapter-pad);
    max-width: none;
  }
  .chapter-studio .studio-copy p:first-child { grid-column: 1; }
  .chapter-studio .studio-copy p:last-child { grid-column: 2; scroll-snap-align: start; }
  .chapter-contact .contact-inner { gap: .85rem; }
  .chapter-contact h2 { font-size: 1.8rem; margin-block: .45rem .7rem; }
  .chapter-contact h2 br { display: none; }
  .chapter-contact address { gap: .4rem; }
  .chapter-contact address .button { margin-bottom: .15rem; }
}

.opening-footage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 550ms ease;
}
.opening-footage.is-visible { opacity: 1; }
.opening-footage video,
.opening-footage::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.opening-footage video {
  object-fit: cover;
  filter: blur(4px) saturate(.72);
  transform: scale(1.035);
}
.opening-footage::after {
  content: "";
  background: radial-gradient(ellipse at 50% 49%, #f5f0dae0 0%, #f5f0dabf 45%, #f5f0da86 100%);
}
.horizontal-opening .masthead-signature { position: relative; }

.chapter-contact { --contact-end: 24px; border-inline-end: 0; padding-inline-end: var(--contact-end); }
.chapter-contact address { align-items: flex-end; justify-self: end; text-align: right; }
.chapter-contact address a { text-decoration: none; }
.chapter-contact .contact-mail {
  position: absolute;
  z-index: 3;
  right: var(--contact-end);
  bottom: calc(100% - var(--rail-y) + clamp(13px, 3svh, 27px));
  min-height: 41px;
  padding: .48rem .9rem;
  color: #242d23;
  background: #c4d2b9;
  transition: background-color 200ms ease, opacity 500ms ease;
}
.chapter-contact .contact-mail:is(:hover, :focus-visible) { background: #f5e8ae; }
.horizontal-js .chapter-contact:not(.is-revealed) .contact-mail:not(:focus-visible) { opacity: 0; pointer-events: none; }
.chapter-contact .chapter-content { scrollbar-width: none; }

.chapter:is(.chapter-services, .chapter-faq) { padding-bottom: calc(15svh + 14px); }
@media (max-width: 600px) and (orientation: portrait) {
  .chapter-contact .contact-mail { bottom: calc(100% - var(--rail-y) + 12px); min-height: 36px; }
}
