:root {
  --page: #e6eced;
  --navy: #17314f;
  --ink: #181e31;
  --black: #000000;
  --accent: #1b5c94;
  --white: #ffffff;
  --footer-link: color-mix(in srgb, var(--accent) 55%, var(--page));
  --display: Outfit, ui-sans-serif, system-ui, sans-serif;
  --gutter: clamp(1.25rem, 5.2vw, 4.17rem);
  --container: 76rem;
  --inline: max(var(--gutter), (100% - var(--container)) / 2);
  --measure: 44rem;
  --heading: 52rem;
}

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

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

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

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--display);
  color: var(--black);
  background: var(--page);
  line-height: 1.5;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

.hero {
  position: relative;
  width: 100%;
  height: 80vh;
  max-height: 800px;
  min-height: 520px;
  color: var(--white);
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 42% 48%;
  display: block;
}

.hero-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 2rem var(--inline);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--white);
}

.brand-mark {
  width: 1.45rem;
  height: calc(1.45rem * 680 / 502);
  background: currentColor;
  -webkit-mask: url("./assets/brand-logo.svg") center / contain no-repeat;
  mask: url("./assets/brand-logo.svg") center / contain no-repeat;
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  height: calc(100% - 5rem);
  padding: 0 var(--inline) clamp(2.5rem, 6vh, 4rem);
}

.hero-title {
  font-size: clamp(2.75rem, 7vw, 6rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.035em;
  max-width: 12ch;
  text-wrap: balance;
  color: var(--white);
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.22);
}

.panel-content {
  background: var(--page);
  color: var(--black);
  padding: 6rem var(--inline) 5rem;
}

.panel-title {
  font-size: clamp(1.875rem, 4vw, 3.375rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.03em;
  max-width: var(--heading);
  margin-bottom: 1.5rem;
  color: var(--ink);
  text-wrap: balance;
}

.panel-copy {
  max-width: var(--measure);
  font-size: clamp(1.125rem, 1.6vw, 1.25rem);
  line-height: 1.45;
  font-weight: 400;
  color: var(--black);
}

.work {
  background: color-mix(in srgb, var(--accent) 16%, var(--page));
  color: var(--ink);
  padding: 6rem var(--inline);
  border-top: 1px solid color-mix(in srgb, var(--navy) 10%, transparent);
}

.work-title {
  font-size: clamp(1.875rem, 4vw, 3.375rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.work-intro {
  max-width: var(--measure);
  margin-bottom: 2.5rem;
  font-size: clamp(1.125rem, 1.6vw, 1.25rem);
  line-height: 1.45;
  color: color-mix(in srgb, var(--ink) 85%, transparent);
  text-wrap: pretty;
}

.work-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 32rem), 1fr));
  gap: 1.25rem;
}

.work-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 2rem;
  align-content: start;
  padding: 2.5rem 2.75rem 2.75rem;
  background: color-mix(in srgb, var(--accent) 8%, var(--white));
  border: 1px solid color-mix(in srgb, var(--navy) 12%, transparent);
  border-radius: 0.75rem;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--navy) 4%, transparent);
}

.work-row > * {
  grid-column: 1;
}

.work-meta {
  margin-bottom: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--accent);
}

.work-name {
  margin-bottom: 1rem;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.work-row > .work-desc {
  grid-column: 1 / -1;
}

.work-desc {
  font-size: clamp(1.125rem, 1.6vw, 1.25rem);
  line-height: 1.55;
  color: color-mix(in srgb, var(--ink) 76%, var(--white));
  text-wrap: pretty;
}

.work-row > .work-site {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
  justify-self: end;
}

.work-site {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0 1rem 0 1.125rem;
  border: 1px solid color-mix(in srgb, var(--navy) 12%, transparent);
  border-radius: 0.75rem;
  background: color-mix(in srgb, var(--white) 60%, transparent);
  color: var(--navy);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.work-site-icon {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s ease;
}

.work-site:hover {
  border-color: color-mix(in srgb, var(--navy) 24%, transparent);
  background: var(--white);
}

.work-site:hover .work-site-icon {
  transform: translate(1px, -1px);
}

.work-site:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

.site-footer {
  background: var(--navy);
  min-height: 22rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4rem;
  padding: 5rem var(--inline);
}

.footer-contact {
  color: var(--page);
}

.footer-contact-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  color: var(--page);
}

.footer-contact-copy {
  max-width: var(--measure);
  font-size: clamp(1.125rem, 1.6vw, 1.25rem);
  line-height: 1.45;
  color: color-mix(in srgb, var(--page) 82%, transparent);
  margin-bottom: 1rem;
}

.footer-mail {
  display: inline-flex;
  position: relative;
  font-size: clamp(1.125rem, 1.6vw, 1.25rem);
  font-weight: 500;
  color: var(--footer-link);
}

.footer-mail::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 0;
  background: currentColor;
  transition: height 0.25s ease;
}

.footer-mail:hover::after {
  height: 2px;
}

.footer-brand {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
}

.footer-mark {
  display: block;
  width: clamp(1.5rem, 3.5vw, 2.5rem);
  aspect-ratio: 502 / 680;
  color: color-mix(in srgb, var(--footer-link) 82%, var(--navy));
  background: currentColor;
  -webkit-mask: url("./assets/brand-logo.svg") center / contain no-repeat;
  mask: url("./assets/brand-logo.svg") center / contain no-repeat;
}

.footer-name {
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: color-mix(in srgb, var(--accent) 48%, var(--page));
}

@media (max-width: 48rem) {
  .hero {
    height: 70vh;
    min-height: 400px;
  }

  .work-row {
    grid-template-columns: minmax(0, 1fr);
    padding: 1.75rem 1.5rem 2rem;
  }

  .work-row > .work-site {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    margin-top: 1.5rem;
  }
}

@media (max-width: 30rem) {
  .hero {
    height: 60vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .work-site,
  .work-site-icon {
    transition: none;
  }

  .work-site:hover .work-site-icon {
    transform: none;
  }
}
