/* The selected Soft Brutalism design and its finishing details. */
.final-site {
  --corner: 16px;
  --control-corner: 8px;
  --button-radius: var(--control-corner);
  --image-radius: var(--control-corner);
  --gallery-gap: 8px;
  --site-header-height: 100px;
  isolation: isolate;
}

.home-page {
  --gutter: clamp(20px, max(4vw, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px)), 64px);
  --hero-image-right: clamp(12px, 2vw, 36px);
  --hero-image-bottom: clamp(8px, 1.2vw, 20px);
}

.home-page .site-header {
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 0;
}

.final-site .studio-nav {
  min-height: var(--site-header-height);
  gap: clamp(12px, 2vw, 28px);
}

.final-site .studio-brand {
  gap: clamp(10px, 1.1vw, 16px);
  color: #000;
}

.final-site .studio-brand img {
  width: 46px;
  height: 68px;
}

.final-site .studio-brand img,
.final-site .footer-logo img { filter: brightness(0); }

.final-site .studio-wordmark {
  font: var(--weight) clamp(1.6rem, 2.65vw, 2.8rem)/.96 var(--display);
  letter-spacing: -.065em;
  text-transform: none;
}

.final-site .studio-wordmark span {
  display: block;
  margin-top: .25em;
  font-size: .56em;
  line-height: 1;
  letter-spacing: -.035em;
  white-space: nowrap;
}

.final-site .main-nav a,
.final-site .menu-toggle {
  color: #000;
}

.final-site .main-nav a:focus-visible,
.final-site .menu-toggle:focus-visible {
  outline-color: currentColor;
  outline-offset: 2px;
}

.twig-parallax {
  --twig-period: clamp(1300px, 160vw, 2300px);
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  opacity: .34;
  mask-image: linear-gradient(
    90deg, #000 0%, #000 10%, #0008 26%, transparent 42%,
    transparent 58%, #0008 74%, #000 90%, #000 100%
  );
}

.twig-parallax-track {
  position: absolute;
  inset: 0 0 auto;
  height: calc(100% + var(--twig-period));
  background: var(--paper) url("images/background-desktop.webp")
    center top / 100% var(--twig-period) repeat-y;
  background-blend-mode: multiply;
  transform: translate3d(0, var(--twig-offset, 0px), 0);
}

.final-site .hero-message h1 { letter-spacing: -.065em; }

.home-page .design-hero { isolation: auto; }

.home-page .feature-image {
  top: calc(0px - var(--site-header-height) - env(safe-area-inset-top, 0px));
  right: var(--hero-image-right);
  bottom: var(--hero-image-bottom);
  overflow: hidden;
  border-radius: 0 0 var(--corner) var(--corner);
}

.home-page .floating-estimate {
  position: absolute;
  right: calc(var(--hero-image-right) + 16px);
  bottom: calc(var(--hero-image-bottom) + 16px);
  z-index: 4;
  box-shadow: 0 4px 16px #211b1640;
  white-space: nowrap;
}

.home-page .floating-estimate.is-floating {
  position: fixed;
  right: calc(max(var(--estimate-edge-right, 0px), env(safe-area-inset-right, 0px)) + 16px);
  bottom: calc(max(var(--estimate-edge-bottom, 0px), env(safe-area-inset-bottom, 0px)) + 16px);
  transition: transform .28s ease, visibility 0s;
}

.home-page .floating-estimate.is-hidden {
  transform: translateX(calc(100% + var(--estimate-edge-right, 0px) + env(safe-area-inset-right, 0px) + 24px));
  visibility: hidden;
  pointer-events: none;
  transition: transform .28s ease, visibility 0s .28s;
}

.final-site .room-card img,
.final-site .video-preview,
.final-site .article-card img,
.final-site .article-hero,
.final-site .walkthrough,
.final-site .estimate,
.final-site .contact,
.final-site .service-strip,
.final-site .testimonial,
.final-site .homes-intro,
.final-site .lightbox {
  border-radius: var(--corner);
}

.final-site .service-strip {
  padding: 7px;
  gap: 6px;
}

.home-page .room-card { text-align: center; }
.home-page .room-card p { margin-inline: auto; line-height: 1.5; }

.final-site .service-strip > img,
.final-site .mini-gallery img,
.final-site .filter,
.final-site .menu-toggle,
.final-site .testimonial-controls button,
.final-site .lightbox button,
.final-site .enquiry-result pre {
  border-radius: var(--control-corner);
}

.final-site .design-steps {
  overflow: hidden;
  border-radius: var(--corner);
}

.home-page .estimate,
.home-page .contact,
.home-page .testimonial {
  border-top: 0;
}

.home-page .design-steps {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.home-page .design-step {
  padding: clamp(14px, 2.2vw, 32px);
}

.home-page .design-step h3 {
  font-size: clamp(.95rem, 1.8vw, 1.75rem);
}

.home-page .stage-turnaround,
.home-page .book-statement {
  text-align: center;
  margin-inline: auto;
  font-weight: 550;
  line-height: 1.55;
}

.home-page .stage-turnaround {
  max-width: 67ch;
  margin-top: clamp(24px, 3vw, 44px);
  font-size: clamp(1rem, 1.35vw, 1.2rem);
}

.home-page .book-statement {
  max-width: 62ch;
  margin-block: 12px 0;
  font-size: clamp(1.05rem, 1.55vw, 1.4rem);
}

.home-page .affordable-title,
.home-page .affordable-copy {
  margin-inline: auto;
  text-align: center;
}

.final-site .field input,
.final-site .field select,
.final-site .field textarea {
  background: #f4efe6;
}

.final-site .lightbox-media img {
  border-radius: var(--control-corner);
}

.final-site .article-page,
.final-site .privacy-page {
  width: min(860px, 100% - var(--gutter) * 2);
  padding-block: clamp(30px, 5vw, 66px) var(--space);
}

.final-site .article-page h1,
.final-site .privacy-page h1 {
  font-size: clamp(2.3rem, 5.6vw, 4.5rem);
  letter-spacing: -.055em;
  margin-bottom: clamp(24px, 4vw, 45px);
  text-wrap: balance;
}

.final-site .article-hero {
  margin-bottom: clamp(24px, 4vw, 45px);
  max-height: 540px;
  object-fit: cover;
}

.final-site .article-page h2,
.final-site .privacy-page h2 {
  font-size: clamp(1.4rem, 2.8vw, 2.25rem);
  letter-spacing: -.035em;
  margin: 1.7em 0 .6em;
  line-height: 1.15;
}

.final-site .article-page p,
.final-site .privacy-page p { margin-block: .8em; }
.final-site .article-page .button { margin-top: 20px; }
.final-site .privacy-page a { text-decoration: underline; text-underline-offset: 4px; }
.final-site .privacy-label { color: var(--muted); font-size: .85rem; }

@media (min-width: 768px) and (max-width: 1050px) {
  .final-site .main-nav { column-gap: clamp(8px, 1.2vw, 14px); }
}

@media (max-width: 1023px) {
  .home-page .design-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .home-page .step-5 { grid-column: 1 / -1; }
  .home-page .step-5 br { display: none; }
}

@media (max-width: 767px) {
  .final-site { --corner: 12px; --control-corner: 7px; --site-header-height: 124px; }
  .final-site main,
  .final-site .main-nav,
  .home-page .site-footer { text-align: center; }

  .home-page .process-intro,
  .home-page .homes-intro p,
  .home-page .faq-list p { margin-inline: auto; }

  .home-page .room-card { align-items: center; gap: 15px; text-align: left; }
  .home-page .room-card img { grid-row: 1; }
  .home-page .room-card figcaption { display: flex; gap: 5px; padding: 0; }
  .home-page .room-card :is(h2, p) { padding: 0; }
  .home-page .room-card p { margin-inline: 0 auto; }
  .home-page .room-card.image-right {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    text-align: right;
  }
  .home-page .room-card.image-right img { grid-column: 2; }
  .home-page .room-card.image-right figcaption { grid-area: 1 / 1; }
  .home-page .room-card.image-right p { margin-inline: auto 0; }

  .home-page .article-more { align-self: center; }
  .home-page .gallery-filters { justify-content: center; }
  .home-page .faq-list summary { list-style-position: inside; }

  .home-page .footer-main { grid-template-columns: minmax(0, 1fr); }
  .home-page .footer-logo { width: 72px; justify-self: center; }
  .home-page .footer-copy { max-width: 59ch; justify-self: center; }

  .home-page {
    --hero-image-right: 0px;
    --hero-image-bottom: 0px;
  }
  .final-site .studio-nav { flex-flow: column nowrap; justify-content: center; gap: 0; }
  .final-site .studio-brand { flex-direction: column; gap: 6px; text-align: center; }
  .final-site .studio-brand img { width: 36px; height: 54px; }
  .final-site .studio-wordmark { font-size: clamp(1.55rem, 5vw, 1.9rem); }
  .final-site .menu-toggle {
    position: absolute;
    inset-inline-end: var(--gutter);
    top: 50%;
    transform: translateY(-50%);
  }
  .final-site .main-nav { justify-content: center; }
  .home-page .main-nav.js-nav { border-bottom: 0; }
  .home-page .design-hero {
    display: grid;
    grid-template-rows: minmax(min-content, 1fr) minmax(clamp(390px, 78vw, 580px), 2fr);
  }
  .home-page .hero-message {
    align-self: start;
    padding: clamp(12px, 4vw, 30px) var(--gutter) 24px;
  }
  .home-page .hero-message h1 { margin-inline: 0; }
  .home-page .hero-subtitle {
    max-width: 24ch;
    margin: 12px auto 0;
    font-size: clamp(1.2rem, 4.25vw, 2rem);
  }
  .home-page .studio-label {
    max-width: 100%;
    margin-top: 10px;
    font-size: clamp(.72rem, 2.7vw, .83rem);
    line-height: 1.32;
    letter-spacing: .07em;
    text-wrap: balance;
  }
  .home-page .feature-image {
    position: absolute;
    left: 0;
    height: auto;
    margin: 0;
    border-radius: 0;
  }
  .home-page .feature-image img { object-position: center top; }
  .home-page .design-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .final-site .article-page ul,
  .final-site .article-page ol { text-align: start; }
  .twig-parallax { --twig-period: 1850px; opacity: .26; }
  .twig-parallax-track {
    background-image: url("images/background-mobile.webp");
  }
}

@media (prefers-reduced-motion: reduce), print {
  .twig-parallax-track { transform: none; }
}

@media print {
  .twig-parallax { display: none; }
}

.home-page .project-005 {
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(12px, 1.5vw, 22px);
  padding-block: clamp(20px, 3vw, 42px);
}

.project-005-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  align-items: end;
  gap: 16px;
}

.project-005-heading h2:first-child {
  max-width: 27ch;
  font-size: clamp(1.3rem, 2.8vw, 2.7rem);
  text-wrap: balance;
}

.project-005-heading h2:last-child {
  justify-self: end;
  text-align: right;
  font-size: clamp(.95rem, 1.7vw, 1.7rem);
  line-height: 1.13;
}

.project-005-stage {
  width: 100%;
  min-height: 390px;
  aspect-ratio: 2 / 1;
}

.project-005-view {
  position: relative;
  height: 100%;
  isolation: isolate;
  overflow: hidden;
  background: #30271f;
  border-radius: var(--corner);
}

.project-005-cover, .project-005-frame, .project-005-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.project-005-cover { object-fit: cover; object-position: 50% 53%; }
.project-005-frame { display: block; border: 0; }

.project-005-overlay {
  display: flex;
  flex-wrap: wrap;
  align-content: end;
  align-items: end;
  justify-content: space-between;
  gap: 10px 18px;
  padding: clamp(13px, 2.2vw, 30px);
  background: linear-gradient(0deg, #211a15db 0%, #211a1500 49%);
  color: #fff7ea;
}

.project-005-overlay strong, .project-005-overlay span { display: block; }
.project-005-overlay strong { font-size: clamp(1.05rem, 2.2vw, 1.65rem); line-height: 1.16; }
.project-005-overlay span { margin-top: 4px; font-size: clamp(.74rem, 1.25vw, .95rem); }

.project-005-start, .project-005-fullscreen {
  min-height: 44px;
  padding: 8px 13px;
  border: 1px solid #f7ecdb93;
  border-radius: var(--control-corner);
  font-size: clamp(.82rem, 1.25vw, .95rem);
  font-weight: 800;
  line-height: 1.25;
}

.project-005-start {
  background: #f5ebdd;
  color: #25201a;
}

.project-005-start::before {
  display: inline-block;
  margin-right: .55em;
  border-block: .32em solid transparent;
  border-left: .5em solid currentColor;
  content: "";
}

.project-005-fullscreen {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  background: #24211de3;
  color: #fff7ea;
}

.project-005-view button:focus-visible { outline-color: #fff7ea; }

.project-005-photos {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: clamp(7px, 1vw, 14px);
}

.project-005-photos button {
  border: 0;
  display: block;
  min-width: 0;
  padding: 0;
  background: #30271f;
  border-radius: var(--control-corner);
  overflow: hidden;
}

.project-005-photos img { aspect-ratio: 1.65; object-fit: cover; }
.project-005-photos button[aria-pressed="true"] {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}
.project-005-photos button:focus-visible { outline-offset: 2px; }

.project-005-view.project-005-window {
  position: fixed;
  inset: 0;
  z-index: 1000;
  width: 100%;
  height: 100%;
  height: 100dvh;
  border-radius: 0;
}

body.project-005-window-open { overflow: hidden; }

@media (max-width: 767px) {
  .project-005-stage {
    min-height: 0;
    height: clamp(450px, 76svh, 680px);
  }
  .project-005-photos { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 767px), (max-width: 950px) and (orientation: landscape) and (pointer: coarse) {
  .home-page .project-005 { background: transparent; padding: 0; }
  .project-005-heading { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 10px; text-align: center; }
  .project-005-heading h2:last-child { justify-self: center; text-align: center; }
  .project-005-overlay {
    flex-flow: column nowrap;
    align-items: center;
    justify-content: flex-end;
    text-align: center;
  }
}

@media (max-width: 767px) and (orientation: landscape),
       (max-width: 950px) and (orientation: landscape) and (pointer: coarse) {
  .project-005-stage {
    min-height: 0;
    height: clamp(300px, 88svh, 540px);
  }
}
