:root {
  --charcoal: #3A3A3C;
  --lime: #98C93C;
  --lime-press: #86B52F;
  --concrete: #E4E5E1;
  --slab: #CBCDC6;
  --white: #FFFFFF;

  --font: "Archivo", system-ui, sans-serif;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --measure: 34rem;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--concrete);
  color: var(--charcoal);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2 {
  margin: 0;
  font-stretch: 125%;
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

a { color: inherit; }

:focus-visible { outline: 3px solid var(--charcoal); outline-offset: 3px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0 1.5rem;
  font-weight: 700;
  font-stretch: 112%;
  text-decoration: none;
  border-radius: 2px;
}
.btn--primary { background: var(--lime); color: var(--charcoal); }
.btn--primary:active { background: var(--lime-press); }
.btn--ghost { color: var(--white); box-shadow: inset 0 0 0 2px rgb(255 255 255 / 0.7); }
.btn--ghost:hover { box-shadow: inset 0 0 0 2px var(--white); }

/* Hero: the finished Wainui house, full bleed */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  color: var(--white);
  background: var(--charcoal);
  isolation: isolate;
}
.hero__photo, .hero__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgb(58 58 60 / 0.97) 0%, rgb(58 58 60 / 0.9) 50%, rgb(58 58 60 / 0.5) 64%, rgb(58 58 60 / 0) 80%),
              linear-gradient(to bottom, rgb(58 58 60 / 0.55) 0%, rgb(58 58 60 / 0) 22%);
}
@media (min-width: 900px) {
  .hero::after {
    background: linear-gradient(to right, rgb(58 58 60 / 0.9) 0%, rgb(58 58 60 / 0.7) 38%, rgb(58 58 60 / 0) 62%),
                linear-gradient(to top, rgb(58 58 60 / 0.7) 0%, rgb(58 58 60 / 0) 40%),
                linear-gradient(to bottom, rgb(58 58 60 / 0.5) 0%, rgb(58 58 60 / 0) 22%);
  }
}
.hero__inner {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1.5rem;
  padding: calc(env(safe-area-inset-top) + 1.25rem) var(--gutter) 1.25rem;
}
.hero__logo { width: clamp(9rem, 30vw, 13rem); }
.hero__copy { align-self: end; max-width: 40rem; }
.hero h1 { font-size: clamp(2.35rem, 4.6vw + 1rem, 4.5rem); }
.hero__copy p { max-width: var(--measure); margin: 1.1rem 0 1.75rem; font-size: 1.125rem; color: rgb(255 255 255 / 0.88); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero :focus-visible { outline-color: var(--lime); }
.hero__caption { margin: 0; font-size: 0.8125rem; color: rgb(255 255 255 / 0.62); }

@media (max-width: 559px) {
  .actions .btn { flex: 1 1 100%; }
}

/* Featured projects: one big photo and two smaller ones each */
.projects { padding: clamp(4rem, 10vw, 7rem) var(--gutter) 0; }
.projects__list { display: grid; gap: 2.75rem; }
.project { margin: 0; }
.project__photos { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.project__shot { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--slab); }
.project__shot--main { grid-column: 1 / -1; }
.project__shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) {
  .project__photos { grid-template-columns: 2fr 1fr; }
  .project__shot--main { grid-column: 1; grid-row: span 2; }
  .project__shot:not(.project__shot--main) { aspect-ratio: auto; }
}

/* Before and after */
.work { padding: clamp(4rem, 10vw, 7rem) var(--gutter); }
.work__head { margin-bottom: 2.25rem; }
.work h2, .projects h2, .contact h2 { font-size: clamp(2rem, 6vw, 3.5rem); }
.work__head p { max-width: var(--measure); margin: 0.75rem 0 0; }
.work__grid { display: grid; gap: 2.75rem 2rem; }
@media (min-width: 900px) {
  .work__grid { grid-template-columns: 1fr 1fr; }
}

.compare { margin: 0; }
.compare__frame {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--slab);
  touch-action: pan-y;
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
}
.compare__frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.compare__before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 4px;
  margin-left: -2px;
  background: var(--lime);
  pointer-events: none;
}
.compare__handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2.75rem;
  height: 2.75rem;
  translate: -50% -50%;
  border-radius: 50%;
  background: var(--lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233A3A3C' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l-6 6 6 6M15 6l6 6-6 6'/%3E%3C/svg%3E") center / 1.4rem no-repeat;
  box-shadow: 0 2px 10px rgb(0 0 0 / 0.3);
}
.compare__range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.compare__frame:has(.compare__range:focus-visible) { outline: 3px solid var(--charcoal); outline-offset: 3px; }
.compare__tag, .project__tag {
  position: absolute;
  top: 0.75rem;
  padding: 0.2rem 0.6rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--white);
  background: rgb(58 58 60 / 0.82);
  border-radius: 2px;
  pointer-events: none;
}
.compare__tag--before, .project__tag { left: 0.75rem; }
.compare__tag--after { right: 0.75rem; }
.compare figcaption, .project figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding-top: 0.85rem;
}
.compare figcaption strong, .project figcaption strong { font-weight: 700; font-stretch: 112%; }

/* Contact */
.contact {
  padding: clamp(4rem, 10vw, 7rem) var(--gutter);
  background: var(--charcoal);
  color: var(--white);
}
.contact > p { margin: 0.75rem 0 2.5rem; color: rgb(255 255 255 / 0.8); }
.contact__list { display: grid; gap: 1.5rem; margin: 0; }
.contact__list dt { font-size: 0.875rem; color: rgb(255 255 255 / 0.65); }
.contact__list dd { margin: 0.15rem 0 0; font-size: clamp(1.25rem, 4.5vw, 2rem); font-weight: 700; font-stretch: 112%; overflow-wrap: anywhere; }
.contact__list a { text-decoration-color: var(--lime); text-decoration-thickness: 3px; text-underline-offset: 0.3em; }
.contact :focus-visible { outline-color: var(--lime); }
.contact { display: grid; gap: 3.5rem; }
@media (min-width: 900px) {
  .contact { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 5rem; align-items: start; }
}

/* Enquiry form */
.enquiry { display: grid; gap: 1.1rem; max-width: 40rem; }
.enquiry h3 { margin: 0 0 0.25rem; font-size: 1.375rem; font-weight: 700; font-stretch: 112%; }
.enquiry__row { display: grid; gap: 1.1rem; }
@media (min-width: 560px) {
  .enquiry__row { grid-template-columns: 1fr 1fr; }
}
.enquiry label { display: grid; gap: 0.35rem; font-size: 0.9375rem; color: rgb(255 255 255 / 0.8); }
.enquiry input, .enquiry textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.85rem;
  font: inherit;
  font-size: 1rem;
  color: var(--charcoal);
  background: var(--concrete);
  border: 0;
  border-radius: 2px;
}
.enquiry textarea { resize: vertical; }
.enquiry .btn { justify-self: start; border: 0; font: inherit; font-weight: 700; font-stretch: 112%; cursor: pointer; }
.enquiry .btn:disabled { opacity: 0.6; cursor: progress; }
.enquiry__trap { position: absolute; left: -9999px; }
.enquiry__status { margin: 0; min-height: 1.5em; color: var(--white); }
@media (max-width: 559px) {
  .enquiry .btn { justify-self: stretch; }
}

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 2.5rem var(--gutter) calc(2.5rem + 4.5rem);
}
.footer__logo { width: 9rem; }
.footer__badges { display: flex; align-items: center; gap: 1.75rem; }
.footer__badges img { mix-blend-mode: multiply; }
.footer__legal { flex-basis: 100%; margin: 0; font-size: 0.875rem; }
.footer__badges img:first-child { height: 4.5rem; width: auto; }
.footer__badges img:last-child { height: 3.25rem; width: auto; }

/* Call bar: phones only, appears once the hero's call button has scrolled away */
.callbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(3.5rem + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--lime);
  color: var(--charcoal);
  font-weight: 800;
  font-stretch: 112%;
  font-size: 1.125rem;
  text-decoration: none;
  translate: 0 100%;
  transition: translate 0.25s ease;
}
.callbar.is-visible { translate: 0 0; }
@media (min-width: 700px) {
  .callbar { display: none; }
  .footer { padding-bottom: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .callbar { transition: none; }
}
