@font-face {
  font-family: "Outfit";
  src: url("fonts/Outfit-VariableFont_wght.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/SourceSans3-VariableFont_wght.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/SourceSans3-Italic-VariableFont_wght.woff2") format("woff2");
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --primary: #005F63;
  --secondary: #EDE1CF;
  --fg: #10292C;
  --bg: #F8F5EF;
  --accent: #86A6A3;
  --surface: #fffdf8;
  --fg-soft: color-mix(in srgb, var(--fg) 64%, var(--bg));
  --line: color-mix(in srgb, var(--accent) 42%, var(--bg));
  --link-box: color-mix(in srgb, var(--secondary) 76%, var(--bg));
  --font-text: "Source Sans 3", system-ui, sans-serif;
  --font-headline: "Outfit", system-ui, sans-serif;

  --content-width: 58rem;

  --space-1: 0.55rem;
  --space-2: 0.9rem;
  --space-3: 1.4rem;
  --space-4: 2.25rem;
  --space-5: 3.25rem;
  --space-6: 4.5rem;

  --type-size: 1.125rem;
  --type-h1: 1.95rem;
  --type-h2: 1.32rem;
  --type-card-title: 2rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--secondary) 28%, transparent), transparent 22rem),
    var(--bg);
  color: var(--fg);
  font-family: var(--font-text);
  font-weight: 350;
  font-optical-sizing: none;
  font-feature-settings: "liga" 1, "calt" 1, "cv02" 1, "cv04" 1;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--secondary);
  color: var(--fg);
}

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

a {
  color: inherit;
  font-weight: 650;
  text-decoration: none;
}

.main a {
  color: var(--primary);
  background-color: var(--link-box);
  padding: 0.06em 0.34em;
  border-radius: 0.28em;
  overflow-wrap: anywhere;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.main a:hover,
.main a:focus-visible {
  color: var(--bg);
  background-color: var(--primary);
}

.site {
  width: min(100% - clamp(1.25rem, 5vw, 4rem), var(--content-width));
  margin: 0 auto;
}

/* HEADER */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  padding: clamp(1.8rem, 5vw, 3.6rem) 0 var(--space-3);
  border-bottom: 1px solid var(--line);
}

.logo {
  display: block;
  flex: 0 1 33.333%;
  max-width: 33.333%;
}

.logo img {
  width: 100%;
  height: auto;
}

.header-nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: var(--space-2);
  color: var(--fg-soft);
  font-size: 0.98rem;
}

.header-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-weight: 450;
}

.header-nav a:hover,
.header-nav a:focus-visible {
  color: var(--primary);
}

/* LAYOUT */
.main {
  min-width: 0;
  overflow-wrap: anywhere;
  padding-top: clamp(2rem, 5vw, 4rem);
  padding-bottom: var(--space-6);
}

/* CONTENT TEXT */
p,
li {
  max-width: none;
  font-size: var(--type-size);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  max-width: none;
  margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--primary);
  font: inherit;
  line-height: inherit;
}

h1 {
  margin-bottom: var(--space-3);
  text-align: left;
  font-size: var(--type-h1);
  line-height: 1.15;
}

h2 {
  margin: var(--space-4) 0 0.6rem;
  font-size: var(--type-h2);
  font-weight: 540;
  line-height: 1.3;
}

h3,
h4,
h5,
h6 {
  margin: var(--space-3) 0 0.5rem;
  font-size: var(--type-size);
  font-weight: 650;
  line-height: 1.35;
}

.handwritten {
  font-family: var(--font-headline);
  font-style: normal;
  font-weight: 430;
}

.bold {
  color: var(--fg);
  font-family: var(--font-text);
  font-weight: 650;
}

p {
  margin: 0 0 var(--space-2);
  color: var(--fg-soft);
}

p.bold,
.bold p {
  color: var(--fg);
}

p:last-child,
ul:last-child,
ol:last-child {
  margin-bottom: 0;
}

.page-meta {
  margin-top: calc(var(--space-2) * -0.6);
  margin-bottom: var(--space-3);
  color: var(--fg-soft);
  font-size: 0.96rem;
  line-height: 1.4;
}

.page-meta + h2 {
  margin-top: 0;
}

p + ul,
p + ol {
  margin-top: calc(var(--space-2) * -0.25);
}

.intro {
  max-width: none;
  margin: 0 auto var(--space-4);
}

.intro p {
  max-width: none;
  margin-right: auto;
  margin-bottom: 1rem;
  margin-left: auto;
}

.intro > p:first-child {
  margin-bottom: var(--space-4);
}

.intro p:last-child {
  margin-top: var(--space-3);
}

ul,
ol {
  max-width: none;
  margin: 0 0 var(--space-3);
  padding-left: 1.4rem;
  color: var(--fg-soft);
}

ul {
  list-style-type: none;
}

li {
  position: relative;
  padding-left: 0.55rem;
}

li + li {
  margin-top: 0.35rem;
}

li::before {
  content: "";
  position: absolute;
  top: 0.78em;
  left: -0.7rem;
  width: 0.36rem;
  height: 0.36rem;
  border-radius: 50%;
  background: var(--accent);
}

.team-grid {
  display: grid;
  gap: clamp(1rem, 3vw, var(--space-4));
  margin: 0 0 var(--space-5);
}

.person-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 34%, var(--bg));
}

.person-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.person-card-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(1.1rem, 3vw, 1.65rem);
}

.person-card h2 {
  margin: 0 0 0.35rem;
  font-size: var(--type-card-title);
  line-height: 1.2;
}

.person-card p {
  color: color-mix(in srgb, var(--fg) 76%, var(--primary));
}

.person-card .person-brand {
  margin-bottom: 0.65rem;
  color: var(--primary);
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.35;
}

.person-card p.bold {
  margin-bottom: 0.75rem;
}

.person-card .button {
  margin-top: auto;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  margin-top: var(--space-3);
  padding: 0.65rem 1rem;
  border-radius: 8px;
  background: var(--primary);
  color: var(--bg);
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.main a.button {
  color: var(--bg);
  background-color: var(--primary);
  padding: 0.65rem 1rem;
}

.button:hover,
.button:focus-visible,
.main a.button:hover,
.main a.button:focus-visible {
  color: var(--fg);
  background: var(--accent);
}

.contact {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-5);
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 76%, var(--secondary));
}

.contact h2 {
  margin: 0 0 var(--space-2);
  font-size: var(--type-h1);
  line-height: 1.15;
}

.contact p {
  margin-bottom: 0.75rem;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  color: var(--fg-soft);
  font-size: 0.9rem;
  padding: var(--space-3) 0 var(--space-4);
  border-top: 1px solid var(--line);
}

.footer a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-weight: 400;
}

.footer a:hover,
.footer a:focus-visible {
  color: var(--primary);
}

/* GALLERY */
.gallery {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 0.55rem;
  margin-bottom: var(--space-5);
}

.gallery-pause {
  grid-row: 2;
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  accent-color: var(--primary);
}

.gallery-pause:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
}

.gallery-pause-label {
  display: flex;
  grid-row: 2;
  align-items: center;
  min-height: 2.75rem;
  color: var(--primary);
  font-size: 0.95rem;
  cursor: pointer;
}

.gallery-slideshow {
  grid-column: 1 / -1;
  grid-row: 1;
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 3 / 2;
  margin-bottom: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--secondary);
}

.gallery-slideshow img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: gallery-fade 25s infinite;
}

.gallery-slideshow img:nth-child(1) { animation-delay: -1s; }
.gallery-slideshow img:nth-child(2) { animation-delay: 4s; }
.gallery-slideshow img:nth-child(3) { animation-delay: 9s; }
.gallery-slideshow img:nth-child(4) { animation-delay: 14s; }
.gallery-slideshow img:nth-child(5) { animation-delay: 19s; }

.gallery-pause:checked ~ .gallery-slideshow img {
  animation-play-state: paused;
}

@keyframes gallery-fade {
  0% { opacity: 0; }
  4% { opacity: 1; }
  20% { opacity: 1; }
  24% { opacity: 0; }
  100% { opacity: 0; }
}

@media (hover: hover) and (pointer: fine) {
  .gallery-slideshow:hover img {
    animation-play-state: paused;
  }
}

@media (min-width: 48rem) {
  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 64rem) {
  .main {
    padding-top: var(--space-5);
  }

  .contact {
    grid-template-columns: 1fr auto;
  }
}

@media (max-width: 40rem) {
  :root {
    --type-size: 1.0625rem;
    --type-h1: 1.75rem;
    --type-h2: 1.22rem;
    --type-card-title: 1.75rem;
  }

  .header {
    align-items: center;
    flex-direction: row;
    gap: 0.75rem;
    padding-top: var(--space-4);
  }

  .header-nav {
    width: auto;
    margin-left: auto;
    justify-content: flex-end;
    gap: 0.75rem;
  }

  h1 {
    text-align: left;
    margin-right: 0;
    margin-left: 0;
  }
}

@media (max-width: 30rem) {
  .contact {
    padding: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-pause,
  .gallery-pause-label {
    display: none;
  }

  .gallery-slideshow {
    display: grid;
    gap: var(--space-2);
    aspect-ratio: auto;
    margin-bottom: 0;
    border: 0;
    background: none;
  }

  .gallery-slideshow img {
    position: static;
    height: auto;
    border-radius: 8px;
    opacity: 1;
    animation: none;
  }
}
