:root {
  --gutter: 3vw;
  --section-bottom: 2vw;
  --body-size: 1rem;
  --accent-size: 1.5625rem;
  --section-title-size: 1.5625rem;
  --page-title-size: 5rem;
  --display-size: 12vw;
  --tile-height: 980px;
  color-scheme: dark;
}

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

body {
  margin: 0;
  background: #000;
  color: #fff;
  font: 400 var(--body-size)/1.3 Arial, Helvetica, sans-serif;
}

h1, h2, p, ul { margin: 0; }

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

a { color: inherit; }

button, input, textarea { font: inherit; }

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link:focus {
  z-index: 10;
  top: .5rem;
  left: var(--gutter);
  width: auto;
  height: auto;
  padding: .75rem 1rem;
  clip-path: none;
  background: #000;
  color: #fff;
}

/* Header and menu */

.site-header {
  position: absolute;
  z-index: 5;
  inset: 0 0 auto;
  display: flex;
  min-height: 80px;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--gutter);
}

.header-logo img {
  width: 110px;
  height: 58px;
  object-fit: contain;
}

.menu-toggle { display: none; }

.site-nav ul {
  display: flex;
  gap: 30px;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: block;
  padding-block: 2px;
  font-size: 1.125rem;
  line-height: 1;
  letter-spacing: -.2px;
  text-decoration: none;
  text-transform: uppercase;
}

.site-nav a:hover, .site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: .23em;
}

/* Full-bleed images and typography */

.photo-panel {
  position: relative;
  isolation: isolate;
}

.panel-image, .footer-slides, .footer-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  object-fit: cover;
}

.panel-image img, .footer-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-panel::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: rgb(0 0 0 / var(--shade, 0));
  content: "";
}

.display-title, .page-title {
  font-weight: 400;
  letter-spacing: -.3px;
}

.display-title {
  font-size: var(--display-size);
  line-height: .8;
}

.page-title {
  font-size: var(--page-title-size);
  line-height: .9;
}

.down-link, .arrow-link {
  color: inherit;
  text-decoration: none;
  transition: transform 160ms ease;
}

.down-link {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border: 1px solid;
  border-radius: 50%;
}

.down-link::before, .arrow-link::before {
  display: block;
  flex: none;
  background: currentColor;
  content: "";
}

.down-link::before {
  width: 20px;
  height: 20px;
  mask: url("/assets/images/arrow-down.svg") center / contain no-repeat;
}

.down-link:hover { transform: scale(.93); }

.arrow-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 10px;
  font-size: var(--accent-size);
  line-height: 1.26;
  text-transform: uppercase;
}

.arrow-link::before {
  width: var(--arrow-size, 1em);
  height: var(--arrow-size, 1em);
  mask: url("/assets/images/arrow-up-right.svg") center / contain no-repeat;
}

.arrow-link:hover { transform: translateY(-3px); }

/* Home and 404 */

.home-panel {
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  grid-template-columns: minmax(0, 64.24fr) minmax(0, 35.76fr);
  gap: 20px;
  align-items: end;
  padding: 90px var(--gutter) var(--section-bottom);
}

.home-hero {
  --shade: .12;
  grid-template-columns: minmax(0, 63.15fr) minmax(0, 36.85fr);
}

.home-panel--shade { --shade: .1; }
.home-title .down-link { margin-bottom: 26.5px; }

.home-summary {
  display: grid;
  justify-items: start;
  gap: 30px;
}

.home-summary p { margin-bottom: -1rem; }
.home-hero .home-summary { padding-right: 20px; }
.home-panel--with-next .home-summary { padding-bottom: 30px; }
.home-panel #next { position: absolute; inset: 0 auto auto 0; }

.home-links {
  display: grid;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.home-links li { display: flex; }

.home-links .arrow-link {
  --arrow-size: .75em;
  gap: 8px;
  line-height: 1;
}

.home-links .arrow-link:hover { text-decoration: underline; }
.not-found .home-summary p { margin-bottom: 0; }

/* About, Why Us, and Our Process */

.split-hero {
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.split-hero--shade { --shade: .1; }

.split-hero-intro, .split-hero-end {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.split-hero-intro {
  z-index: 1;
  justify-content: center;
}

.split-hero-copy {
  display: grid;
  width: 435px;
  max-width: 96vw;
  gap: 20px;
  margin-right: -215px;
  text-align: center;
}

.split-hero-copy p { margin-bottom: -1rem; }

.split-hero-end {
  justify-content: flex-end;
  padding: var(--gutter) var(--gutter) calc(var(--gutter) + 6.5px);
}

.photo-section, .photo-tile {
  display: grid;
  align-items: end;
  padding: var(--gutter);
}

.photo-section {
  min-height: 100vh;
  min-height: 100svh;
}

.photo-section--centered {
  align-items: center;
  justify-items: center;
}

.photo-section--bottom-center { justify-items: center; }

.photo-section--text-center { text-align: center; }

.photo-section--bottom-center .panel-copy { max-width: 887px; }
.photo-section--tall { min-height: 1590px; }

.panel-copy {
  max-width: 375px;
  padding-top: 8px;
}

.panel-copy h2 {
  margin-bottom: 20px;
  font-size: var(--section-title-size);
  line-height: 1.1;
  text-transform: uppercase;
}

.photo-row {
  display: grid;
  min-height: var(--tile-height);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.photo-row--wide-left { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.photo-row--wide-right { grid-template-columns: minmax(0, 3fr) minmax(0, 5fr); }
.photo-row--tall { min-height: 1400px; }

.photo-stack { display: grid; }

.photo-stack .photo-tile { min-height: var(--tile-height); }

.photo-tile--inset { padding: 5%; }
.photo-tile--step-five { padding: 6%; }

.photo-tile--why-list { padding: 5vw; }

.detail-list ul { padding-inline-start: 40px; }

.detail-list--with-intro p { margin-bottom: calc(1.3em + 1.8rem); }

/* Contact form */

.contact-hero {
  --shade: .15;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  padding: 0 var(--gutter) var(--section-bottom);
  text-align: center;
}

.contact-hero .down-link {
  position: absolute;
  right: var(--gutter);
  bottom: 30.5px;
}

.contact-section {
  display: grid;
  min-height: 980px;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  background: #fff;
  color: #000;
  color-scheme: light;
}

.contact-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 80px;
  padding: var(--gutter);
}

.contact-intro p + p { margin-top: 1.3em; }

.contact-form .page-title {
  margin-bottom: 20px;
  text-transform: capitalize;
}

.contact-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 25px;
}

.form-wide { grid-column: 1 / -1; }

.contact-fields input, .contact-fields textarea {
  display: block;
  width: 100%;
  padding: 8px 16px;
  border: 0;
  border-bottom: 2px solid #000;
  border-radius: 0;
  background: transparent;
  color: inherit;
}

.contact-fields input { height: 40px; }
.contact-fields input::placeholder, .contact-fields textarea::placeholder { color: #646464; }

.contact-fields textarea {
  padding: 5px 14px;
  resize: vertical;
}

.contact-fields button {
  min-height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.contact-fields button:disabled {
  opacity: .65;
  cursor: default;
  transform: none;
}

.form-status:not(:empty) { margin-top: .75rem; }

/* Footer slideshow */

.site-footer {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  flex-direction: column;
  justify-content: flex-end;
  gap: 14px;
  padding: 0 var(--gutter) var(--section-bottom);
}

.footer-slides { overflow: hidden; }

.footer-image {
  z-index: auto;
  animation: footer-first 12s linear infinite paused;
}

.footer-image:nth-child(2) {
  opacity: 0;
  animation-name: footer-second;
}

.footer-image:nth-child(3) {
  opacity: 0;
  animation-name: footer-third;
}

.site-footer.is-visible .footer-image { animation-play-state: running; }

/* Each slide gets four seconds, including a half-second crossfade. */
@keyframes footer-first {
  0%, 91.67%, 100% { transform: scale(1); }
  37.5%, 66.67% { transform: scale(1.12); }
}

@keyframes footer-second {
  0%, 33.33% { opacity: 0; transform: scale(1); }
  37.5% { opacity: 1; }
  70.83% { opacity: 1; transform: scale(1.12); }
  70.84%, 100% { opacity: 0; transform: scale(1.12); }
}

@keyframes footer-third {
  0%, 66.67% { opacity: 0; transform: scale(1); }
  70.83% { opacity: 1; }
  95.83% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.12); }
}

.footer-branding {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.footer-logo img {
  width: 150px;
  height: 85px;
  object-fit: contain;
}

@media (max-width: 1024px) {
  :root {
    --section-bottom: 3vw;
    --body-size: .875rem;
    --accent-size: 1.125rem;
    --section-title-size: 1.25rem;
    --tile-height: 600px;
  }

  .header-logo img { width: 106px; }
  .site-nav a { font-size: .875rem; }
  .photo-row--tall, .photo-section--tall, .process-two-steps { min-height: 980px; }

  .contact-section {
    min-height: 339px;
    grid-template-columns: minmax(0, 1fr);
  }

  .contact-photo { display: none; }
}

@media (max-width: 767px) {
  :root {
    --section-bottom: 10vw;
    --accent-size: 1rem;
    --section-title-size: 1.125rem;
    --page-title-size: 3.875rem;
    --display-size: min(4.375rem, 20vw);
    --tile-height: 320px;
  }

  .site-header { min-height: 55px; }

  .header-logo img {
    width: 96px;
    height: 52px;
  }

  .menu-toggle:not([hidden]) {
    display: grid;
    width: 27px;
    height: 27px;
    place-items: center;
    padding: 0;
    border: 0;
    background: #fff;
    color: #000;
    cursor: pointer;
  }

  .menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
    display: block;
    width: 16px;
    height: 2.25px;
    border-radius: 1.5px;
    background: currentColor;
  }

  .menu-toggle span { position: relative; }

  .menu-toggle span::before, .menu-toggle span::after {
    position: absolute;
    left: 0;
    content: "";
  }

  .menu-toggle span::before { top: -4.5px; }
  .menu-toggle span::after { top: 4.5px; }

  .menu-toggle[aria-expanded="true"] span { background: transparent; }

  .menu-toggle[aria-expanded="true"] span::before {
    top: 0;
    transform: rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] span::after {
    top: 0;
    transform: rotate(-45deg);
  }

  .site-nav {
    position: absolute;
    inset: 51px 0 auto;
    background: #fff;
    color: #000;
  }

  .menu-toggle:not([hidden])[aria-expanded="false"] + .site-nav { display: none; }

  .site-nav ul { display: block; }

  .site-nav a {
    padding: 20px 10px;
    text-decoration: none;
  }

  .site-nav a:hover { background: #000; color: #fff; }
  .arrow-link { line-height: 1.5; }

  .home-panel {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
    gap: 40px;
  }

  .home-hero { padding-bottom: calc(var(--section-bottom) + 40px); }
  .home-summary { gap: 20px; }
  .home-hero .home-summary { padding-right: 0; }
  .home-panel--with-next .home-summary { padding-bottom: 20px; }

  .split-hero { display: flex; flex-direction: column; }

  .split-hero-intro, .split-hero-end { flex: 1 0 auto; }

  .split-hero-intro {
    align-items: center;
    overflow: hidden;
  }

  .split-hero-copy {
    width: 96%;
    margin-right: 0;
  }

  /* The first photo keeps its native scale in the stacked hero. */
  .split-hero-intro > .panel-image {
    inset: 50% auto auto 50%;
    width: max(1200px, 100%);
    height: max(816px, 100%);
    max-width: none;
    transform: translate(-50%, -50%);
  }

  .photo-row { grid-template-columns: minmax(0, 1fr); }

  .photo-row, .photo-row--tall, .process-two-steps { min-height: 0; }

  .photo-section, .photo-tile {
    min-height: var(--tile-height);
    align-items: end;
  }

  .panel-copy { max-width: none; }
  .photo-tile--tall { min-height: 580px; }
  .photo-section--tall { min-height: 600px; }
  .process-two-steps > :first-child { min-height: 620px; }
  .process-two-steps > :last-child { min-height: 360px; }

  .contact-fields { grid-template-columns: minmax(0, 1fr); }

  .site-footer { gap: 40px; }
  .footer-branding { align-items: center; }
  .footer-logo { width: 30%; }
  .footer-notice { padding-top: 2%; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media (prefers-reduced-motion: reduce) {
  .footer-image { animation: none; }
  .down-link, .arrow-link { transition: none; }
  .footer-image:not(:first-child) { display: none; }
}
