:root {
  --text-light: #ffffff;
  --text: #B0B6B9;
  --text-h-light: var(--bg-light-gray);
  --text-h: #4F6571;
  --bg: #ffffff;
  --bg-light-gray: #E6ECEF;
  --bg-dark-gray: #d0d6d9;
  --border: #e5e4e7;
  --accent: #48B78C;
  --accent-strong: #48B78C;
  --accent-border: #123F74;
  --accent-dark: #345071;
  --accent-light: #668096;
  --social-bg: rgba(244, 243, 236, 0.5);
  --image-target-angle: 14deg;
  --image-height: clamp(380px, 55vw, 900px);
  --image-slant: min(calc(100vw * tan(var(--image-target-angle))), calc(var(--image-height) / 2));
  --image-text-angle: atan2(var(--image-slant), 100vw);
  --image-topic-overlap: 200px;
  --content-slide-height: clamp(380px, 55vw, 1000px);
  --content-slide-slant: calc(var(--content-slide-height) * 0.2);
  --content-slide-angle: atan2(var(--content-slide-slant), 100vw);
  --carousel-bottom-padding: 32px;
  --about-height: 200px;
  --about-text-angle: 0deg;
  --image-slide-bg: #E6ECEF;
  --content-slide-bg: #345071;
  --progress: 0;
  --shadow:
    rgba(0, 0, 0, 0.1) 0 10px 15px -3px, rgba(0, 0, 0, 0.05) 0 4px 6px -2px;

  --content-width: 1000px;

  --sans: "Oswald", sans-serif, Roboto, sans-serif;
  --heading: "Oswald", sans-serif, Roboto, sans-serif;

  font: 18px/145% var(--sans);
  letter-spacing: 0.18px;
  color-scheme: light dark;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body, html {
  margin: 0;
  font-family: var(--sans);
  width: 100%;
  overflow-x: clip;
  font-size: 0.8em;
}

html {
  scroll-behavior: smooth;
}

h1,
h2 {
  font-family: var(--heading);
  font-weight: 600;
  color: var(--text-h);
}

h1 {
  font-size: 56px;
  letter-spacing: -1.68px;
  margin: 32px 0;
  line-height: 100%;
}

h2 {
  font-size: 34px;
  line-height: 118%;
  letter-spacing: -0.24px;
  margin: 0 0 8px;
}

h3 {
  font-size: 20px;
  line-height: 118%;
  letter-spacing: -0.24px;
  margin: 0 0 8px;
  color: var(--text-h);
}

a {
  color: var(--accent-strong);
}

a:hover, a:focus, a:active {
  color: var(--accent-dark);
}


.subject-head {
  font-size: clamp(28px, 9vw, 38px);
  padding-bottom: 20px;
  font-weight: 600;
  padding-right: 20px;
  /*transform: rotate(-2deg);*/
}

.subject-head.left {
  transform: rotate(-2deg);
}

.subject-head.right {
  transform: rotate(2deg);
}

p {
  margin: 20px 0;
  font-size: 1.2rem;
}

button {
  padding: 10px 20px;
  border: none;
  border-radius: 100px;
  background-color: var(--accent-strong);
  color: var(--bg);
  font-size: 16px;
  cursor: pointer;
}

button.border {
  border: 4px solid var(--accent-border);
}

button:active {
  background-color: var(--accent-dark);
}

button:focus {
  outline: none;
}

button:hover {
  background-color: var(--accent-light);
}

.content {
  width: min(var(--content-width), calc(100% - 48px));
  margin: auto;
}

header {
  padding-bottom: 80px;
  max-width: 100vw;
}

header h1 {
  transform: rotate(1.5deg);
}

#nav-logo {
  position: absolute;
  left: max(
    -130px,
    calc(16px - max(0px, (100vw - var(--content-width)) / 2))
  );

  top: 100%;
  z-index: 1;
  transform: translateY(-50%);
}

#nav-logo img {
  display: block;
  width: 128px;
  height: auto;
}

#nav-container {
  width: 100%;
  max-width: 100%;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#nav-container .content,
header > .content {
  position: relative;

}

#logo-container {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  z-index: 1;
  max-width: 650px;
  padding-top: 20px;
}

#logo-container img {
  display: block;
  width: min(600px, 100%);
  height: auto;
}

#contact-button {
  padding: 14px 28px;
  font-size: 24px;
  align-self: flex-end;
  margin-top: 20px;
  display: inline-block;
  text-decoration: none;
  color: var(--bg);
  background-color: var(--accent-strong);
  border: none;
  border-radius: 100px;
  cursor: pointer;
}

#contact-button:hover {
  background-color: var(--accent-light);
}

#contact-button:active {
  background-color: var(--accent-dark);
}

#contact-button:focus-visible {
  outline: 2px solid var(--accent-border);
  outline-offset: 2px;
}

#logo-float {
  position: absolute;
  top: 160px;
  left: min(var(--content-width), 75%);
  pointer-events: none;
  transform: translate(0px, 0px);
  animation: float 8s linear infinite;
  will-change: transform;
  width: 512px;
  aspect-ratio: 1;
}

#logo-float img {
  display: block;
  /*width: min(512px, 22vw);*/
  width: 100%;
  height: auto;
}

@keyframes float {
  0%   { transform: translate(0px, 0px); }
  10%  { transform: translate(4.7px, -1.15px); }
  20%  { transform: translate(7.61px, -4.15px); }
  30%  { transform: translate(7.61px, -7.85px); }
  40%  { transform: translate(4.7px, -10.85px); }
  50%  { transform: translate(0px, -12px); }
  60%  { transform: translate(-4.7px, -10.85px); }
  70%  { transform: translate(-7.61px, -7.85px); }
  80%  { transform: translate(-7.61px, -4.15px); }
  90%  { transform: translate(-4.7px, -1.15px); }
  100% { transform: translate(0px, 0px); }
}

#nav-container {
  width: 100%;
  background: var(--accent-strong);
  margin-bottom: 72px;
}

nav {
  background-color: var(--accent-strong);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 64px;
  padding: 0 16px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-toggle {
  display: none;
}

nav a {
  color: var(--text-light);
  font-size: 20px;
  text-decoration: none;
}

nav a:hover,
nav a:focus-visible,
nav a:active,
nav a:focus {
  text-decoration: underline;
  color: var(--text-light);
}

header p {
  font-size: 24px;
}

#what {
  margin-bottom: -300px;
  --what-shape-depth: calc(var(--image-topic-overlap) + 150px);
}

#what .content {
  display: flow-root;
}

#what .content::before {
  content: "";
  float: right;
  width: min(100%, calc(var(--what-shape-depth) / tan(var(--image-text-angle))));
  height: var(--what-shape-depth);
  shape-outside: polygon(100% 0, 100% 100%, 0 100%);
  pointer-events: none;
}

.content.right {

}

.section.content {
  width: 50%;
}

.image-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: var(--image-height);
  margin: -100px 0 calc(-1 * var(--image-topic-overlap)) 0;
  overflow: hidden;
  background-color: var(--image-slide-bg);
  position: relative;
}

.image-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.image-slide img,
.content-slide > img {
  display: block;
  width: min(var(--content-width), 100%);
  height: 100%;
  object-fit: cover;
}

#nav-logo > picture,
#logo-float > picture,
#float-team > picture,
.image-slide > picture {
  display: contents;
}

@keyframes image-drift-left {
  from { transform: translateX(3%) scale(1.08); }
  to { transform: translateX(-3%) scale(1.08); }
}

@keyframes image-drift-right {
  from { transform: translateX(-3%) scale(1.08); }
  to { transform: translateX(3%) scale(1.08); }
}

@supports (animation-timeline: view()) {
  .image-slide img {
    animation-duration: 1ms;
    animation-timing-function: linear;
    animation-fill-mode: both;
    animation-timeline: view(block);
    /*animation-range: ;*/
    animation-range-start: 0;
    animation-range-end: 100%;

    will-change: transform;
  }

  .image-slide.left img {
    animation-name: image-drift-left;
  }

  .image-slide.right img {
    animation-name: image-drift-right;
  }
}

@media (prefers-reduced-motion: reduce) {
  .image-slide img {
    animation: none;
    transform: none;
    will-change: auto;
  }
}

.image-slide .image-header {
  position: absolute;
  /*left: ;*/
  bottom: 25%;
  width: min(var(--content-width), 100%);
  z-index: 2;
  pointer-events: none;
}

.image-slide .image-header h2 {
  font-family: var(--heading);
  color: var(--text-light);
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
  position: relative;
  z-index: 2;
}

.image-slide.left h2 {
  transform: skewY(calc(-1 * var(--image-text-angle)));
  text-align: right;
  margin: 0 20px 0 0;
}

.image-slide.right h2 {
  transform: skewY(var(--image-text-angle));
  text-align: left;
  margin: 0 0 0 20px;
}

.slide {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  /*overflow: hidden;*/
  /*height: 600px;*/
  /*background-color: var(--bg-dark-gray);*/
  /*background-color: #48B78C;*/
}

.content-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: var(--content-slide-height);
  margin-top: -200px;
  overflow: hidden;
  background-color: var(--content-slide-bg);
}

.content-slide img {
  z-index: -10;
  position: absolute;
}

.image-slide.left {
  clip-path: polygon(0 var(--image-slant), 100% 0, 100% calc(100% - var(--image-slant)), 0 100%);
}

.content-slide.left {
  clip-path: polygon(0 var(--content-slide-slant), 100% 0, 100% 100%, 0 calc(100% - var(--content-slide-slant)));
}

.image-slide.right {
  clip-path: polygon(0 0, 100% var(--image-slant), 100% 100%, 0 calc(100% - var(--image-slant)));
}

.content-slide.right {
  clip-path: polygon(0 0, 100% var(--content-slide-slant), 100% calc(100% - var(--content-slide-slant)), 0 100%);
  margin: 0;
}

.slide.left {
  position: relative;
  clip-path: polygon(0 20%, 100% 0, 100% 100%, 0 100%);
  margin: 0;
}

.content-slide h3 {
  color: var(--text-h-light);
  font-size: 32px;
}

.content.columns {
  display: flex;
  flex-direction: row;
  gap: 10px;
  height: 80%;
  justify-content: space-around;
  align-items: flex-start;
}

.content.columns div {
  /*width: 50%;*/
  padding: 10%;
}

.content.columns p {
  margin: 20px 0;
}


.rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 450px;
  justify-content: end;
}

.topic {
  margin: 0;
  padding: 30px 24px;
}

.topic.right {
  text-align: right;
}

.topic.left {
  text-align: left;
}

.image-slide + .topic:is(.left, .right) {
  --topic-shape-angle: var(--image-text-angle);
  --topic-shape-depth: min(var(--image-topic-overlap), var(--image-slant));
}

.image-slide + .topic.left {
  --topic-shape-side: right;
}

.image-slide + .topic.right {
  --topic-shape-side: left;
}

.topic.center {
  margin: 0;
  text-align: center;
}

.topic .content {
  display: flex;
  flex-direction: column;
  width: min(var(--content-width), 100%);
  margin: 0 auto;
}

/* shape-outside only affects inline flow around a float, not flex items. */
.image-slide + .topic:is(.left, .right) .content {
  display: flow-root;
}

.image-slide + .topic:is(.left, .right) .content::before {
  content: "";
  float: var(--topic-shape-side);
  width: min(72%, calc(var(--topic-shape-depth) / tan(var(--topic-shape-angle))));
  height: var(--topic-shape-depth);
  pointer-events: none;
}

.image-slide + .topic.left .content::before {
  shape-outside: polygon(0 0, 100% 0, 100% var(--topic-shape-depth));
}

.image-slide + .topic.right .content::before {
  shape-outside: polygon(0 0, 100% 0, 0 var(--topic-shape-depth));
}

.topic.center .content {
  align-items: center;
}

.topic.left .content {
  align-items: flex-start;
  padding-left: 5%;
}

.topic.right .content {
  align-items: flex-end;
  padding-right: 5%;
}

.image-slide + .topic.left .content > :is(h3, p) {
  margin-right: auto;
}

.image-slide + .topic.right .content > :is(h3, p) {
  margin-left: auto;
}

.topic .content h3 {
  max-width: 30ch;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 600;
  line-height: 110%;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  color: var(--text-h);
}

.topic.left .content h3 {
  transform: rotate(0deg);
}

.topic.right .content h3 {
  transform: rotate(0deg);
  transition: transform 150ms ease-in-out;
}

.topic p {
  margin: 0;
  max-width: 70ch;
  color: var(--text);
}

#float-team {
  position: absolute;
  /*left: 0;*/
  /*top:0;*/
  top: 50%;
  left: max(16px, calc((100% - var(--content-width)) / 2));
  transform: translate(-35%, -50%);
}

#float-team img {
  width: 350px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 16px solid var(--accent);
}

#about {
  position: relative;
  scroll-margin-top: 100px;
  padding: 0 0 100px 0;
  height: 600px;
  text-align: right;
  width: var(--content-width);
}

#about .content {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: end;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
}

#about .content > div {
  width: 100%;
  display: flex;
  padding-right: 30px;
  flex-direction: column;
  align-items: end;
  max-width: calc(var(--content-width) - 300px);
}

.project-carousel {
  position: relative;
}

.carousel-slides {
  display: none;
}

.carousel-media {
  position: absolute;
  inset: 0 auto;
  left: 50%;
  width: min(var(--content-width), 100%);
  height: 100%;
  transform: translateX(-50%);
  overflow: hidden;
  z-index: 0;
}

.carousel-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(22, 39, 56, 0.72), rgba(22, 39, 56, 0.72) 100%);
  pointer-events: none;
}

.project-carousel.is-copy-right .carousel-media::after {
  background: linear-gradient(270deg, rgba(22, 39, 56, 0.72), rgba(22, 39, 56, 0.72) 100%);
}

.carousel-bg {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.82;
  z-index: 0;
  transition: transform 650ms cubic-bezier(0.65, 0, 0.35, 1);
  will-change: transform;
}

.carousel-bg--current {
  transform: translateX(0);
}

.carousel-bg--next {
  transform: translateX(100%);
}

.project-carousel.is-changing-slide .carousel-bg--current {
  transform: translateX(-100%);
}

.project-carousel.is-changing-slide .carousel-bg--next {
  transform: translateX(0);
}

.project-carousel.is-resetting .carousel-bg {
  transition: none;
}

.carousel-content {
  position: relative;
  width: min(var(--content-width), calc(100% - 48px));
  max-width: none;
  height: 100%;
  z-index: 2;
}

.carousel-copy {
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  transform: translateY(-50%);
  opacity: 1;
  transition: opacity 280ms ease;
  will-change: opacity;
}

.project-carousel.is-copy-right .carousel-copy {
  align-items: flex-end;
  text-align: right;
}

.project-carousel.is-fading-text .carousel-copy {
  opacity: 0;
}

.carousel-interaction {
  --carousel-content-inset: max(24px, calc((100vw - var(--content-width)) / 2));

  position: absolute;
  right: 0;
  bottom: calc(
    var(--carousel-bottom-padding) +
    tan(var(--content-slide-angle)) * var(--carousel-content-inset)
  );
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 7px 5px 10px;
  transform-origin: bottom right;
  rotate: var(--content-slide-angle);
}

.project-carousel .carousel-title {
  width: 100%;
  margin: 0;
  color: var(--text-h-light);
  font-size: clamp(38px, 6vw, 76px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.carousel-body {
  max-width: 42ch;
  margin: 22px 20px 0 20px;
  color: var(--text-light);
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.45;
}

.carousel-next {
  flex: 0 0 auto;
  margin: 0;
  padding: 8px 14px;
  background-color: var(--accent-strong);
  color: var(--bg);
  border: none;
}

.carousel-next:hover {
  background-color: var(--accent-dark);
}

.carousel-dots {
  display: flex;
  gap: 2px;
  align-items: center;
}

.carousel-dot {
  position: relative;
  width: 32px;
  height: 32px;
  aspect-ratio: 1;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.carousel-dot::before,
.carousel-dot::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-sizing: border-box;
}

.carousel-dot::after {
  border: 2px solid var(--text-light);
  background: transparent;
  transition: border-color 200ms ease, background-color 200ms ease;
}

.carousel-dot::before {
  background: conic-gradient(var(--accent) calc(var(--progress, 0) * 360deg), transparent 0deg);
  opacity: 0;
  transition: opacity 200ms ease;
}

.carousel-dot.is-active::after {
  border-color: var(--accent);
}

.carousel-dot.is-active::before {
  opacity: 1;
}

.carousel-dot:hover::after {
  border-color: var(--accent-light);
}

.carousel-dot.is-active:hover::after {
  border-color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  .carousel-copy {
    transition-duration: 1ms;
  }

}

#contact {
  scroll-margin-top: 150px;
}

#contact h2 {
  text-align: center;
}

#contact h3 {
  text-align: center;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

#contact-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: stretch;
  background: var(--bg-light-gray);
  padding: 50px;
  border-radius: 20px;
  margin-top: 24px;
  box-shadow: var(--shadow);
}

.form-status {
  margin: 0;
  padding: 14px 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 1rem;
  line-height: 1.4;
}

.form-status--success {
  color: #123f3a;
  background: #dff5eb;
  border-color: var(--accent);
}

.form-status--error {
  color: #7a2020;
  background: #fff0f0;
  border-color: #d93a3a;
}

.form-status--warning {
  color: #6a4d0f;
  background: #fff6dc;
  border-color: #d7a62a;
}

.turnstile-container {
  display: flex;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
}

#contact-form .form-actions button {
  margin-left: auto;
}

.form-line {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  width: 100%;
}

.form-field {
  display: flex;
  flex-direction: column;
  width: 100%;
}

#contact-form input,
#contact-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 18px;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.4;
  color: var(--text-h);
  background: var(--text-light);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#contact-form input {
  min-height: 56px;
}

#contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

#contact-form input::placeholder,
#contact-form textarea::placeholder {
  color: var(--text-h);
  opacity: 0.55;
}

#contact-form input:focus,
#contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(72, 183, 140, 0.25);
}

#contact-form input:invalid:not(:placeholder-shown),
#contact-form textarea:invalid:not(:placeholder-shown) {
  border-color: #D93A3A;
}

#contact-form input:invalid:not(:placeholder-shown):focus,
#contact-form textarea:invalid:not(:placeholder-shown):focus {
  box-shadow: 0 0 0 3px rgba(217, 58, 58, 0.2);
}

.field-error {
  display: none;
  margin-top: 6px;
  color: #D93A3A;
  font-size: 0.875rem;
  line-height: 1.3;
}

#contact-form input:invalid:not(:placeholder-shown) ~ .field-error,
#contact-form textarea:invalid:not(:placeholder-shown) ~ .field-error {
  display: block;
}

#contact-form button {
  align-self: center;
  width: 100%;
  max-width: 320px;
  min-width: auto;
  padding: 14px 28px;
  font-size: 1.05rem;
}

#contact-form button:hover {
  background-color: var(--accent-dark);
}

#contact-form button:focus-visible {
  outline: 2px solid var(--accent-border);
  outline-offset: 2px;
}

footer {
  display: flex;
  flex-direction: column;
  margin-top: 100px;
  background: var(--bg-light-gray);
  color: var(--text-h);
  height: 400px;
  clip-path: polygon(0 0, 100% 50%, 100% 100%, 0 100%);
  overflow: hidden;
}

footer .content {
  justify-self: end;
  align-self: end;
  margin-top: 40px;
}

footer p {
  margin: 0;
  font-size: 16px;
}

footer .footer-info {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  align-items: center;
  height: calc(92% - 40px);
  padding-bottom: 40px;
}

#contact-info {
  /*height: 100%;*/
  align-self: end;
  justify-self: end;
}

#map {
  display: inline-block;
  background-color: var(--accent); /* Border color */
  padding: 8px;            /* Border width */
  height: 60%;
  align-self: end;
  justify-self: end;
}

#map iframe {
  display: block;
  width: 100%;
  height: 100%;
}

#policies {
  /*height: 100%;*/
  align-self: end;
  justify-self: end;
}

#copyright {
  position: relative;
  width: 100%;
  /*height: 8%;*/
  height: 30px;
  font-size: 16px;
  text-align: center;
  background: var(--bg-dark-gray);
}

#copyright-name {
  height: 100%;
  padding: 0;
  margin: 0;
}

#credit {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  padding: 3px 4px;
  border-radius: 3px;
  /*background: rgba(255, 255, 255, 0.92);*/
  color: var(--text-h);
  text-align: right;
  font-size: 12px;
  line-height: 1;
}

#credit a {
  color: var(--text-h);
  text-decoration: none;
}

#credit a:hover,
#credit a:focus-visible {
  text-decoration: underline;
}

/* Responsive layouts
   Start relaxing the fixed desktop composition before it reaches the
   1000px content edge. This keeps the diagonal rhythm without a hard jump. */
@media (max-width: 1100px) {
  :root {
    --image-height: clamp(340px, 58vw, 620px);
    --image-topic-overlap: clamp(110px, calc(30.36vw - 134px), 200px);
    --content-slide-height: clamp(460px, 62vw, 680px);
  }

  #nav-logo {
    left: 16px;
  }

  #logo-container {
    max-width: min(650px, 66vw);
  }

  #logo-float {
    left: 76%;
    width: clamp(330px, 45vw, 470px);
  }

  #what {
    margin-bottom: calc(-1 * var(--what-shape-depth) + 100px);
    padding-bottom: calc(var(--what-shape-depth) - 80px);
  }

  #what .content::before {
    content: none;
  }

  .content-slide {
    margin-top: clamp(-200px, calc(311px - 46.4vw), -70px);
  }

  .image-slide {
    margin-top: clamp(-100px, calc(34px - 12.2vw), -44px);
    margin-bottom: clamp(-200px, calc(159px - 32.6vw), -50px);
  }

  .topic:not(#what) {
    padding-top: clamp(70px, calc(32.6vw - 139px), 220px);
    padding-bottom: clamp(80px, calc(8.7vw + 24px), 120px);
  }

  .image-slide + .topic:is(.left, .right) .content::before {
    content: none;
  }

  .topic.left .content {
    padding-left: 2%;
  }

  .topic.right .content {
    padding-right: 2%;
  }

  #about {
    margin-top: -200px;
    width: min(var(--content-width), calc(100% - 48px));
  }

  #about .content > div {
    max-width: calc(100% - 300px);
  }

  #float-team {
    left: 16px;
    transform: translate(-28%, -50%);
  }

  #float-team img {
    width: clamp(250px, 32vw, 350px);
  }

  footer .footer-info {
    gap: 28px;
    padding-inline: 24px;
    box-sizing: border-box;
  }
}

@media (max-width: 1024px) {
  h1 {
    font-size: 36px;
    margin: 20px 0;
  }

  h2 {
    font-size: 20px;
  }

  h3 {
    font-size: 16px;
  }
}

@media (max-width: 820px) {
  :root {
    --image-height: clamp(300px, 68vw, 500px);
    --image-slant: clamp(52px, 11vw, 90px);
    --image-topic-overlap: clamp(80px, 13vw, 115px);
    --content-slide-height: clamp(500px, 78vw, 640px);
    --content-slide-slant: clamp(70px, 13vw, 105px);
  }

  #nav-container {
    margin-bottom: 52px;
  }

  #nav-logo img {
    width: 104px;
  }

  #logo-container {
    max-width: 68%;
  }

  #logo-float {
    top: 135px;
    left: 78%;
    width: clamp(270px, 43vw, 350px);
  }

  header {
    padding-bottom: 56px;
  }

  header p {
    font-size: 20px;
  }

  .content-slide {
    margin-top: -70px;
  }

  .topic {
    padding-inline: 32px;
  }

  .topic .content h3 {
    max-width: 24ch;
  }

  #about {
    margin-top: -100px;
    height: 520px;
    padding-bottom: 70px;
  }

  .section-head {
    font-size: 44px;
  }

  #about .content > div {
    max-width: calc(100% - 250px);
  }

  #float-team img {
    width: 260px;
    border-width: 12px;
  }

  .project-carousel .carousel-title {
    white-space: normal;
    max-width: 12ch;
  }

  footer {
    height: auto;
    /*min-height: 20px;*/
    clip-path: polygon(0 0, 100% 18%, 100% 100%, 0 100%);
  }

  footer .footer-info {
    flex-wrap: wrap;
    align-content: flex-end;
    padding-top: 100px;
  }

  #map {
    width: min(280px, 44vw);
    height: 180px;
  }
}

@media (max-width: 640px) {
  /* Mobile tokens and page frame */
  :root {
    --image-height: clamp(260px, 82vw, 340px);
    --image-slant: clamp(42px, 14vw, 62px);
    --image-topic-overlap: 54px;
    --content-slide-height: clamp(540px, 145vw, 680px);
    --content-slide-slant: clamp(52px, 18vw, 78px);
    --carousel-bottom-padding: 24px;
  }

  .image-slide + .topic:is(.left, .right) .content::before,
  .content-slide.left .sticky-left::before,
  #what .content::before {
    content: none;
  }

  /* Navigation */
  body,
  html {
    font-size: 0.78em;
  }

  .content {
    width: calc(100% - 32px);
  }

  #nav-container {
    margin-bottom: 38px;
  }

  #nav-container .content {
    width: 100%;
  }

  #nav-logo {
    left: 10px;
  }

  #nav-logo img {
    width: 72px;
  }

  nav {
    position: relative;
    min-height: 48px;
    padding: 0 12px;
  }

  .nav-links {
    margin-left: auto;
    gap: 14px;
  }

  .nav-links a {
    font-size: 16px;
  }

  html.js .nav-toggle {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 40px;
    height: 40px;
    margin-left: auto;
    padding: 8px;
    border-radius: 8px;
    background: transparent;
  }

  .nav-toggle:focus-visible {
    outline: 2px solid var(--text-light);
    outline-offset: 1px;
  }

  .nav-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    border-radius: 3px;
    background: var(--text-light);
    transition: transform 180ms ease, opacity 180ms ease;
  }

  nav.is-open .nav-toggle span:first-child {
    transform: translateY(7px) rotate(45deg);
  }

  nav.is-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  nav.is-open .nav-toggle span:last-child {
    transform: translateY(-7px) rotate(-45deg);
  }

  html.js .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: grid;
    gap: 0;
    padding: 8px 16px 14px 76px;
    background: var(--accent-strong);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.14);
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  html.js nav.is-open .nav-links {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  html.js .nav-links a {
    padding: 9px 0;
    font-size: 18px;
    text-align: right;
  }

  /* Hero */
  header {
    min-height: 330px;
    padding-bottom: 24px;
  }

  #logo-container {
    max-width: 74%;
    padding-top: 0;
  }

  #logo-container img {
    width: 94%;
  }

  header h1 {
    margin: 18px 0 14px;
    font-size: clamp(28px, 9vw, 38px);
  }

  header p {
    margin: 0;
    font-size: 16px;
    line-height: 1.42;
  }

  #contact-button {
    align-self: center;
    margin: 22px 0 0 18%;
    padding: 10px 24px;
    font-size: 18px;
  }

  #logo-float {
    top: 84px;
    left: calc(100% - 54px);
    width: 180px;
  }

  /* Service sections and diagonal imagery */
  #what {
    margin-bottom: 0;
    padding-top: 44px;
    padding-bottom: 84px;
  }

  .topic {
    padding: 78px 22px 82px;
  }

  .topic .content,
  .topic.left .content,
  .topic.right .content {
    width: 100%;
    padding: 0;
  }

  .topic .content h3 {
    max-width: 22ch;
    margin-bottom: 14px;
    font-size: clamp(25px, 8vw, 34px);
  }

  .topic p {
    max-width: 34ch;
    font-size: 17px;
    line-height: 1.45;
  }

  .image-slide {
    margin: -36px 0 -54px;
  }

  .image-slide img {
    width: 100%;
  }

  .image-slide .image-header {
    width: calc(100% - 32px);
    bottom: 24%;
  }

  .image-slide .image-header h2 {
    font-size: clamp(30px, 11vw, 44px);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  }

  .image-slide.left h2 {
    margin-right: 4px;
  }

  .image-slide.right h2 {
    margin-left: 4px;
  }

  .slide.left {
    clip-path: polygon(0 11%, 100% 0, 100% 100%, 0 100%);
  }

  /* About */
  #about {
    width: 100%;
    /*height: auto;*/
    /*min-height: 520px;*/
    padding: 112px 0 86px;
  }

  #about .content {
    justify-content: flex-end;
  }

  #about h2 {
    max-width: 75%;
    padding-bottom: 18px;
    font-size: 38px;
  }

  #about .content > div {
    max-width: 70%;
  }

  #about .content h3 {
    font-size: 27px;
  }

  #float-team {
    top: 28%;
    left: 0;
    transform: translate(-38%, -50%);
  }

  #float-team img {
    width: 210px;
    border-width: 10px;
  }

  /* Project carousel */
  .project-carousel.content-slide {
    height: clamp(540px, 145vw, 680px);
    min-height: 0;
    margin-top: -28px;
  }

  .carousel-content {
    width: calc(100% - 36px);
  }

  .carousel-media {
    width: 100%;
  }

  .carousel-copy {
    top: 46%;
    padding: 0 4px;
  }

  .project-carousel .carousel-title {
    max-width: 8ch;
    font-size: clamp(38px, 13vw, 54px);
    line-height: 1;
    white-space: normal;
  }

  .carousel-body {
    max-width: 27ch;
    margin: 16px 0 0;
    font-size: 16px;
  }

  .carousel-interaction {
    --carousel-content-inset: 18px;

    right: -4px;
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: calc(100% - 24px);
  }

  /* Contact form */
  #contact {
    padding: 82px 0 10px;
  }

  /*#contact h2 {*/
  /*  font-size: 40px;*/
  /*}*/

  #contact-form {
    margin-top: 20px;
    padding: 24px 18px;
    border-radius: 14px;
    gap: 20px;
  }

  #contact-form input,
  #contact-form textarea {
    font-size: 16px;
  }

  .form-line {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .turnstile-container {
    justify-content: center;
  }

  #contact-form button {
    max-width: none;
    align-self: stretch;
  }

  #contact-form .form-actions button {
    margin-left: 0;
  }

  /* Footer */
  footer {
    /*min-height: 640px;*/
    margin-top: 70px;
    clip-path: polygon(0 0, 100% 7%, 100% 100%, 0 100%);
  }

  footer .content {
    margin-top: 0;
  }

  footer .footer-info {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-end;
    gap: 24px;
    padding: 82px 16px 30px;
  }

  #map {
    width: min(280px, 88%);
    height: 180px;
    align-self: flex-start;
  }

  #contact-info,
  #policies {
    align-self: stretch;
  }

}

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