.hero-slide img,
.about-photo img,
.gallery img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.hero-slide > span {
  position: absolute;
  left: 22px;
  bottom: 22px;
  z-index: 1;
  padding: 7px 10px;
  background: rgba(245, 241, 233, .75);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.gallery figure { position: relative; margin: 0; overflow: hidden; }
.gallery figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 6px 8px;
  background: rgba(245, 241, 233, .78);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.about-photo { overflow: hidden; }

/* Refined two-color layout */
:root {
  --paper: #f1f1f1;
  --blue: #f1f1f1;
  --olive: #fff;
}

body { padding-top: 92px; background: #f1f1f1; }
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 15;
  background: rgba(241, 241, 241, .96);
  backdrop-filter: blur(12px);
}
.manifesto, .process, .guarantees { background: #fff; }
.about, .contact, .services, .portfolio { background: #f1f1f1; }
.placeholder { background: #d8d8d8; }

.hero {
  display: block;
  min-height: calc(100vh - 92px);
  overflow: hidden;
  background: #f1f1f1;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,.48) 0%, rgba(0,0,0,.2) 43%, rgba(0,0,0,0) 72%);
}
.hero-copy {
  position: absolute;
  z-index: 3;
  left: 0;
  top: 0;
  width: min(760px, 60vw);
  padding: clamp(34px, 6vh, 70px) 4vw 40px;
  color: #fff;
}
.hero-copy .eyebrow { margin: 0 0 15px; }
.hero h1 { margin: 12px 0 24px; line-height: 1.05; }
.hero h1, .hero em { font-style: normal; color: #fff; }
.hero-carousel { position: absolute; inset: 0; min-height: 0; }
.hero-note { z-index: 3; color: #fff; }
.carousel-controls { color: #fff; background: transparent; backdrop-filter: none; }
.carousel-controls button { color: #fff; }
.button {
  color: #fff;
  background: #647c78;
  border-color: #647c78;
}
.button:hover { color: #fff; background: #526965; border-color: #526965; }

.portfolio { overflow: hidden; }
.portfolio .gallery {
  display: flex;
  width: 100vw;
  height: 78vh;
  margin-left: -6vw;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.portfolio .gallery .photo {
  flex: 0 0 72vw;
  width: 72vw;
  height: 78vh;
  grid-row: auto;
  grid-column: auto;
  scroll-snap-align: start;
}
.portfolio .gallery .photo img { object-position: center; }
.portfolio .gallery figcaption { color: #fff; background: transparent; }

.socials a {
  padding-bottom: 4px;
  border-bottom: 1px solid currentColor;
  font-weight: 400;
}
.socials a:hover { opacity: .65; text-decoration: none; }

@media (max-width: 800px) {
  body { padding-top: 74px; }
  .hero { min-height: calc(100svh - 74px); }
  .hero::after { background: linear-gradient(180deg, rgba(0,0,0,.5), rgba(0,0,0,.05) 72%); }
  .hero-copy { width: 100%; padding: 28px 6vw 30px; }
  .hero-copy .lead { max-width: 90%; }
  .hero-carousel { min-height: 0; order: initial; }
  .hero-slide img { object-position: center; }
  .portfolio .gallery {
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: auto;
    overflow: visible;
  }
  .portfolio .gallery .photo {
    flex: none;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
  }
}

@media (min-width: 801px) {
  .service-card { grid-template-columns: 1.15fr 1.55fr 1fr; }
}
@media (max-width: 800px) {
  .service-card { grid-template-columns: 1fr; }
  .service-card > h3,
  .service-card > p,
  .service-card > div { grid-column: 1; }
}

/* Stable service pricing layout */
@media (min-width: 801px) {
  .service-card {
    display: grid;
    grid-template-columns: minmax(180px, 1.05fr) minmax(260px, 1.55fr) minmax(170px, .9fr);
    align-items: center;
    gap: clamp(24px, 4vw, 64px);
    text-align: center;
  }
  .service-card > h3,
  .service-card > p,
  .service-card > div {
    grid-column: auto;
    width: 100%;
    margin: 0;
    text-align: center;
  }
  .service-card > div { align-items: center; }
}
@media (max-width: 800px) {
  .service-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
  }
  .service-card > h3,
  .service-card > p,
  .service-card > div { width: 100%; margin: 0; text-align: center; align-items: center; }
}

/* Contact cards below the form */
.contact-links {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  padding-top: 8px;
}
.contact-links a {
  display: flex;
  min-height: 86px;
  padding: 18px 20px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--ink);
  background: transparent;
  font-family: var(--serif);
  font-size: 18px;
  transition: background .25s ease, color .25s ease;
}
.contact-links a span {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .65;
}
.contact-links a:hover { color: #fff; background: #647c78; border-color: #647c78; }

footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
}
footer .brand, footer p { margin: 0; text-align: center; }

@media (max-width: 800px) {
  .contact-links { grid-template-columns: 1fr 1fr; }
  footer { align-items: center; gap: 14px; }
}
@media (max-width: 480px) {
  .contact-links { grid-template-columns: 1fr; }
}

/* Safari-safe carousel positioning and centered controls */
.hero-slides {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.hero-slide {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  visibility: hidden;
}
.hero-slide.active { visibility: visible; }
.carousel-controls {
  left: 50%;
  right: auto;
  bottom: 20px;
  transform: translateX(-50%);
  -webkit-transform: translateX(-50%);
  justify-content: center;
}

@media (min-width: 801px) {
  .hero h1 { font-size: clamp(38px, 4vw, 60px); }
}

@media (max-width: 800px) {
  .hero h1 { font-size: clamp(34px, 9.5vw, 46px); }
  .carousel-controls { left: 50%; right: auto; bottom: 14px; }
}

/* Desktop hero: copy left, portrait carousel right */
@media (min-width: 801px) {
  .hero {
    display: grid;
    grid-template-columns: 44% 56%;
    min-height: calc(100vh - 92px);
    align-items: stretch;
  }
  .hero-carousel {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    height: calc(100vh - 92px);
    min-height: 620px;
  }
  .hero-copy {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    width: 100%;
    padding: 32px 4vw;
  }
  .hero h1 { font-size: clamp(44px, 4.7vw, 76px); }
  .hero-slide { background: #fff; }
  .hero-slide img {
    object-fit: cover;
    object-position: var(--focus-x, 50%) var(--focus-y, 50%);
  }
}

.gallery figure img,
.about-photo img { object-position: var(--focus-x, 50%) var(--focus-y, 50%); }

/* Tighter vertical rhythm */
.section { padding-top: 64px; padding-bottom: 64px; }
.section-heading { margin-bottom: 38px; }
.manifesto { padding-top: 68px; padding-bottom: 68px; }
.about-copy h2 { margin-top: 14px; margin-bottom: 24px; }
.about blockquote { margin-top: 28px; }
.included { margin-top: 34px; }
.service-card { padding-top: 26px; padding-bottom: 26px; }
.guarantees { padding-top: 28px; padding-bottom: 28px; }

@media (max-width: 800px) {
  .section { padding-top: 52px; padding-bottom: 52px; }
  .manifesto { padding-top: 56px; padding-bottom: 56px; }
  .hero-copy { padding-top: 30px; padding-bottom: 30px; }
}

/* Configurable carousel motion */
.hero-slide {
  opacity: 0;
  transition-property: opacity, transform;
  transition-duration: var(--carousel-transition, 1.8s);
  transition-timing-function: cubic-bezier(.22, .61, .36, 1);
}
.hero-slide.active { opacity: 1; }
.hero-carousel[data-effect="fade"] .hero-slide { transform: none; }
.hero-carousel[data-effect="zoom"] .hero-slide { transform: scale(1.035); }
.hero-carousel[data-effect="zoom"] .hero-slide.active { transform: scale(1); }
.hero-carousel[data-effect="slide"] .hero-slide { transform: translateX(4%); }
.hero-carousel[data-effect="slide"] .hero-slide.active { transform: translateX(0); }

.hero h1 span:last-child { color: #647c78; }
.about-photo-mobile { display: none; }

/* Burger icon */
.menu-button {
  width: 38px;
  height: 38px;
  padding: 8px 5px;
  cursor: pointer;
}
.menu-button span {
  display: block;
  width: 100%;
  height: 1px;
  margin: 5px 0;
  background: currentColor;
  transition: transform .3s ease, opacity .3s ease;
}
.menu-button[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-button[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-button[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Final compact rhythm and alignment */
.section { padding-top: 56px; padding-bottom: 56px; }
.section-heading { margin-bottom: 32px; }
.manifesto { padding-top: 58px; padding-bottom: 58px; }
.process li > span { padding-top: 7px; }
.contact h2 { font-size: clamp(38px, 4vw, 60px); line-height: 1.08; }

@media (max-width: 800px) {
  .about-photo-desktop { display: none; }
  .about-photo-mobile {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    margin: 18px 0 28px;
  }
  .section { padding-top: 44px; padding-bottom: 44px; }
  .manifesto { padding-top: 48px; padding-bottom: 48px; }
  .hero-copy { padding-top: 26px; padding-bottom: 26px; }
  .contact h2 { font-size: clamp(34px, 9.5vw, 46px); }
}

/* Consistent heading and process alignment */
.section-heading {
  display: block;
  text-align: left;
}
.section-heading .eyebrow { margin: 0 0 14px; }
.section-heading h2,
.about-copy h2,
.contact h2 { text-align: left; }
.process li { align-items: center; }
.process li > span {
  align-self: center;
  padding-top: 0;
  line-height: 1;
}
.process li p { max-width: none; }
@media (min-width: 801px) {
  .process li:first-child p { white-space: nowrap; }
}

/* Seamless crossfade: keep the previous frame underneath until transition ends */
.hero-slide {
  visibility: visible;
  z-index: 1;
  pointer-events: none;
}
.hero-slide.active {
  visibility: visible;
  z-index: 2;
  pointer-events: auto;
}
.carousel-controls { z-index: 4; }

@media (max-width: 800px) {
  .service-card .service-number {
    grid-column: 1;
    grid-row: 1 / 4;
    align-self: center;
    justify-self: center;
  }
}

@media (min-width: 801px) {
  .service-card {
    grid-template-columns: 60px 1.15fr 1.55fr 1fr;
    align-items: center;
    text-align: center;
  }
  .service-card h3,
  .service-card p,
  .service-card div { text-align: center; }
  .service-card div { align-items: center; }
}

.faq { background: #fff; }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 20px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary b {
  flex: 0 0 auto;
  font-family: var(--sans);
  font-size: 24px;
  font-weight: 400;
  transition: transform .3s ease;
}
.faq-item[open] summary b { transform: rotate(45deg); }
.faq-answer { max-width: 760px; padding: 0 0 24px; line-height: 1.75; }
.faq-answer p { margin: 0 0 10px; }

@media (max-width: 800px) {
  .faq-item summary { padding: 20px 0; font-size: 17px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: clamp(38px, 11vw, 52px); }
  .hero-copy .lead { font-size: 13px; }
  .carousel-controls { right: 10px; bottom: 10px; }
}

/* Hero: gallery first, copy immediately after */
.hero {
  min-height: 0;
  overflow: visible;
  background: #f1f1f1;
}
.hero::after { display: none; }
.hero-carousel {
  position: relative;
  inset: auto;
  width: 100%;
  height: min(76vh, 820px);
  min-height: 560px;
}
.hero-copy {
  position: relative;
  inset: auto;
  width: 100%;
  padding: 48px 6vw;
  color: var(--ink);
  text-align: left;
}
.hero-copy .eyebrow { margin: 0 0 18px; }
.hero h1 {
  max-width: 980px;
  margin: 0 0 24px;
  color: var(--ink);
}
.hero h1 span { display: block; }
.hero-copy .lead { margin: 0 0 30px; }
.hero-note { display: none; }

/* Desktop portfolio returns to a composed grid */
.portfolio .gallery {
  display: grid;
  width: auto;
  height: auto;
  margin-left: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: min(28vw, 420px);
  gap: 14px;
  overflow: visible;
}
.portfolio .gallery .photo {
  width: auto;
  height: auto;
  min-height: 0;
  grid-column: auto;
  grid-row: auto;
}
.portfolio .gallery .photo.tall { grid-row: span 2; }
.portfolio .gallery .photo.wide { grid-column: span 2; }

.process li { align-items: start; }
.process li > span { padding-top: 3px; line-height: 1.2; }
.process h3 { line-height: 1.2; }
.lead-form textarea[data-autogrow] {
  min-height: 44px;
  height: 44px;
  overflow: hidden;
}

.keep-together { white-space: nowrap; }
.mobile-service-break { display: none; }

/* Desktop-only alignment for the three service columns. */
@media (min-width: 801px) {
  .services .service-card {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.7fr) minmax(150px, .8fr);
    column-gap: clamp(28px, 3.5vw, 58px);
    align-items: center;
  }
  .services .service-card > h3,
  .services .service-card > p,
  .services .service-card > div {
    grid-column: auto;
    min-width: 0;
    width: auto;
    margin: 0;
  }
  .services .service-card > h3 { text-align: left; }
  .services .service-card > p { text-align: left; }
  .services .service-card > div {
    align-items: flex-end;
    text-align: right;
  }
}

@media (max-width: 800px) {
  .mobile-service-break { display: block; }
  .hero { min-height: 0; }
  .hero-carousel {
    position: relative;
    height: calc(100svh - 74px);
    min-height: 540px;
  }
  .hero-copy { width: 100%; padding: 36px 6vw; color: var(--ink); }
  .hero h1 { color: var(--ink); }
  .portfolio .gallery {
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    width: auto;
    margin-left: 0;
    gap: 14px;
  }
  .portfolio .gallery .photo,
  .portfolio .gallery .photo.tall,
  .portfolio .gallery .photo.wide {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    grid-row: auto;
    grid-column: auto;
  }
}
