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

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

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
}

:root {
  --jam-red: #c45252;
  --jam-red-dark: #ac3031;
  --ink: #666;
  --ink-strong: #333;
  --paper: #fff;
  --footer: #202020;
  --line: #e5e5e5;
  --header-width: 1080px;
  --gallery-width: 1400px;
  --page-pad: clamp(10px, 2vw, 24px);
  color-scheme: light;
}

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

html {
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Lato", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--jam-red-dark);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 10px 16px;
  color: #fff;
  background: #222;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-topbar {
  height: 33px;
  color: #fff;
  background: var(--jam-red);
  font-size: 13px;
  line-height: 1;
}

.site-topbar__inner {
  width: min(calc(100% - 40px), var(--header-width));
  height: 33px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 17px;
}

.site-topbar a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
}

.site-topbar a:hover,
.site-topbar a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  height: 80px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 1px 22px rgba(0, 0, 0, 0.5);
}

.site-header__inner {
  position: relative;
  width: min(calc(100% - 40px), var(--header-width));
  height: 80px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.brand-link {
  flex: 0 0 216px;
  width: 216px;
  height: 72px;
  display: flex;
  align-items: center;
}

.brand-link img {
  width: 216px;
  height: auto;
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 42px;
  padding: 0;
  align-items: center;
  justify-content: center;
  color: var(--jam-red-dark);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.nav-toggle__icon,
.nav-toggle__icon::before,
.nav-toggle__icon::after {
  width: 25px;
  height: 2px;
  display: block;
  background: currentColor;
  content: "";
}

.nav-toggle__icon {
  position: relative;
}

.nav-toggle__icon::before,
.nav-toggle__icon::after {
  position: absolute;
  left: 0;
}

.nav-toggle__icon::before {
  top: -7px;
}

.nav-toggle__icon::after {
  top: 7px;
}

.primary-nav ul,
.footer-nav ul {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  list-style: none;
}

.primary-nav ul {
  gap: 26px;
}

.primary-nav a {
  display: inline-block;
  padding-block: 31px;
  color: rgba(0, 0, 0, 0.6);
  font-family: "Lato", Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: normal;
  line-height: 18px;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 150ms ease;
}

.primary-nav a:hover,
.primary-nav a:focus-visible,
.primary-nav a[aria-current="page"] {
  color: var(--jam-red-dark);
}

.hero {
  position: relative;
  min-height: clamp(500px, 44vw, 630px);
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  background: #15212a;
}

.hero picture,
.hero img,
.hero__screen,
.hero__divider {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero img {
  object-fit: cover;
  object-position: center 49%;
}

.hero__screen {
  z-index: 1;
  background: linear-gradient(rgba(192, 52, 239, 0.34) 0%, rgba(20, 61, 88, 0.73) 100%);
}

.hero__divider {
  z-index: 2;
  top: auto;
  bottom: -1px;
  height: min(20vw, 288px);
  background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIyMHZ3IiB2aWV3Qm94PSIwIDAgMTI4MCAxNDAiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZyI+PGcgZmlsbD0icmdiYSg1LDQxLDY2LDAuMykiPjxwYXRoIGQ9Ik0wIDQ3LjQ0TDE3MCAwbDYyNi40OCA5NC44OUwxMTEwIDg3LjExbDE3MC0zOS42N1YxNDBIMFY0Ny40NHoiIGZpbGwtb3BhY2l0eT0iLjUiLz48cGF0aCBkPSJNMCA5MC43MmwxNDAtMjguMjggMzE1LjUyIDI0LjE0TDc5Ni40OCA2NS44IDExNDAgMTA0Ljg5bDE0MC0xNC4xN1YxNDBIMFY5MC43MnoiLz48L2c+PC9zdmc+");
  background-position: center bottom;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  pointer-events: none;
}

.hero__title-screen {
  position: relative;
  z-index: 3;
  width: 100%;
  display: grid;
  place-items: center;
  filter: brightness(1.15);
  mix-blend-mode: color-dodge;
}

.hero__title {
  position: relative;
  margin: 0;
  padding: 20px var(--page-pad) 12vw;
  color: #a34646;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: clamp(64px, 7vw, 101px);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  filter: brightness(0.86) invert(0.32);
}

.portfolio-gallery {
  padding: clamp(50px, 6vw, 86px) var(--page-pad) clamp(80px, 9vw, 126px);
  background: var(--paper);
}

.gallery-shell {
  width: min(100%, var(--gallery-width));
  margin-inline: auto;
}

.gallery-row {
  display: grid;
  align-items: start;
  gap: clamp(12px, 1.4vw, 20px);
  margin: 0 0 clamp(42px, 4.5vw, 64px);
}

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

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

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

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

.gallery-row--portrait.gallery-row--2 {
  width: min(100%, 700px);
  margin-inline: auto;
}

.gallery-row--portrait.gallery-row--3 {
  width: min(100%, 1020px);
  margin-inline: auto;
}

.gallery-row--portrait.gallery-row--4 {
  width: min(100%, 1260px);
  margin-inline: auto;
}

.gallery-row--marquee {
  width: min(70%, 920px);
  margin-inline: auto;
  margin-block: clamp(60px, 7vw, 100px);
}

.gallery-card {
  min-width: 0;
  margin: 0;
}

.gallery-card picture {
  display: block;
  overflow: hidden;
  background: #eee;
}

.gallery-row--landscape .gallery-card picture {
  aspect-ratio: 3 / 2;
}

.gallery-row--portrait .gallery-card picture {
  aspect-ratio: 2 / 3;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-card figcaption {
  margin-top: 9px;
  color: #555;
  font-family: "Lato", Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.3;
  text-transform: uppercase;
}

.gallery-card figcaption::before {
  width: 24px;
  height: 2px;
  margin-right: 7px;
  display: inline-block;
  vertical-align: 3px;
  background: var(--jam-red);
  content: "";
}

.site-footer {
  padding: clamp(56px, 7vw, 86px) var(--page-pad) 24px;
  color: #ececec;
  background: var(--footer);
}

.site-footer__inner {
  width: min(100%, 1120px);
  margin-inline: auto;
  display: grid;
  justify-items: center;
  gap: 34px;
  text-align: center;
}

.site-footer__logo {
  width: min(430px, 86vw);
  height: auto;
}

.footer-nav ul {
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 29px;
}

.footer-nav a {
  color: #f2f2f2;
  font-family: "Lato", Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-transform: uppercase;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: var(--jam-red);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.site-footer__copyright {
  width: 100%;
  margin: 16px 0 0;
  padding-top: 20px;
  color: #aaa;
  border-top: 1px solid #393939;
  font-size: 13px;
}

@media (max-width: 1049px) {
  .gallery-row--3,
  .gallery-row--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-row--3 > :last-child:nth-child(odd) {
    width: calc(50% - 6px);
    grid-column: 1 / -1;
    justify-self: center;
  }

  .gallery-row--portrait.gallery-row--2,
  .gallery-row--portrait.gallery-row--3,
  .gallery-row--portrait.gallery-row--4 {
    width: 100%;
  }

  .gallery-row--marquee {
    width: min(88%, 920px);
  }
}

@media (max-width: 980px) {
  .site-header,
  .site-header__inner {
    height: 72px;
  }

  .brand-link {
    flex-basis: 190px;
    width: 190px;
    height: 64px;
  }

  .brand-link img {
    width: 190px;
  }

  .js .nav-toggle {
    display: inline-flex;
  }

  .js .primary-nav {
    position: absolute;
    top: 100%;
    right: -20px;
    left: -20px;
    padding: 7px 20px 14px;
    display: none;
    background: #fff;
    border-top: 1px solid var(--line);
    box-shadow: 0 9px 16px rgba(0, 0, 0, 0.12);
  }

  .js .primary-nav[data-open="true"] {
    display: block;
  }

  .primary-nav ul {
    align-items: stretch;
    flex-direction: column;
    gap: 0;
  }

  .primary-nav a {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }

  .primary-nav li:last-child a {
    border-bottom: 0;
  }
}

@media (max-width: 699px) {
  .site-topbar,
  .site-topbar__inner {
    height: 40px;
  }

  .site-topbar__inner {
    width: min(calc(100% - 24px), var(--header-width));
    justify-content: center;
    gap: 12px;
    font-size: 12px;
  }

  .site-header__inner {
    width: min(calc(100% - 24px), var(--header-width));
  }

  .js .primary-nav {
    right: -12px;
    left: -12px;
    padding-inline: 12px;
  }

  .hero {
    min-height: clamp(390px, 112vw, 500px);
  }

  .hero img {
    object-position: center center;
  }

  .hero__divider {
    height: 31vw;
  }

  .hero__title {
    padding-bottom: 17vw;
    font-size: clamp(48px, 15vw, 68px);
  }

  .portfolio-gallery {
    padding-top: 34px;
  }

  .gallery-row,
  .gallery-row--2,
  .gallery-row--3,
  .gallery-row--4 {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }

  .gallery-row {
    gap: 34px;
    margin-bottom: 46px;
  }

  .gallery-row--3 > :last-child:nth-child(odd) {
    width: 100%;
    grid-column: auto;
  }

  .gallery-row--marquee {
    margin-block: 58px;
  }
}

@media (max-width: 369px) {
  .site-topbar,
  .site-topbar__inner {
    height: 52px;
  }

  .site-topbar__inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
  }

  .brand-link {
    flex-basis: 175px;
    width: 175px;
  }

  .brand-link img {
    width: 175px;
  }

  .hero__title {
    padding-inline: 6px;
    font-size: 45px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  .site-topbar,
  .site-header,
  .site-footer,
  .skip-link {
    display: none !important;
  }

  .hero {
    min-height: 280px;
  }

  .portfolio-gallery {
    padding-inline: 0;
  }
}
