:root {
  --page: #49022a;
  --lavender: #eae0fa;
  --burgundy: #701b40;
  --butter: #f5d76e;
  --font: "BenzinRegular", "Helvetica Neue", Arial, sans-serif;
  --font-strong: "BenzinSemibold", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(20px, 4vw, 56px);
  --max: 1440px;

  --card: clamp(280px, 43vw, 620px);
  --gap: 30px;
  --stroke: 5px;
  --radius: 16px;
  --lift: 1.15;
  --room: 44px;
  --speed: 42s;

  color-scheme: dark;
}

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

html { scroll-behavior: smooth; }

html { background: var(--page); }

/* Fixed layer, so the swirls stay on screen behind the whole page as it scrolls. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--page) url("/assets/swirl.jpg") center / cover no-repeat;
}

body {
  margin: 0;
  color: var(--lavender);
  font-family: var(--font);
  font-size: 12px;
  line-height: 1.6;
  overflow-x: hidden;
}

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

.site-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px var(--gutter) 0;
}

.nav { display: flex; flex-wrap: wrap; gap: 8px 28px; }

.nav a {
  letter-spacing: .04em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color .2s ease;
}
.nav a:hover,
.nav a:focus-visible { color: var(--butter); }

.name {
  max-width: var(--max);
  margin: 36px auto 0;
  padding: 0 var(--gutter);
  font-size: 0;
}

/* Scrolling strip. The vertical padding is the room a hovered image grows into. */
.stage {
  margin-top: 8px;
  padding-block: var(--room);
  overflow: hidden;
}

.track {
  display: flex;
  gap: var(--gap);
  width: max-content;
  padding-inline: calc(var(--gap) / 2);
  animation: slide var(--speed) linear infinite;
}
.stage.paused .track { animation-play-state: paused; }

@keyframes slide {
  to { transform: translateX(-50%); }
}

.card {
  position: relative;
  flex: 0 0 var(--card);
  width: var(--card);
  aspect-ratio: 16 / 9;
  margin: 0;
  overflow: hidden;
  background: var(--page);
  border: var(--stroke) solid var(--lavender);
  border-radius: var(--radius);
  cursor: pointer;
  outline: 0;
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s ease;
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
}

.card figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  max-width: 92%;
  padding: 12px 16px 13px;
  background: var(--box);
  color: var(--ink);
  font-size: clamp(9px, .86vw, 12px);
  line-height: 1.45;
  text-align: right;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .22s ease, transform .22s ease;
}
.card figcaption strong,
.card figcaption span { display: block; }
.card figcaption strong { font-family: var(--font-strong); font-weight: 400; }

.card.on {
  z-index: 5;
  transform: scale(var(--lift));
  box-shadow: 0 18px 44px rgba(20, 0, 12, .55);
}
.card.on figcaption { opacity: 1; transform: none; }
.card:focus-visible { box-shadow: 0 0 0 3px var(--butter); }

/* Project covers */
.work {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px var(--gutter) 96px;
}

.cover { margin: 0; }
.cover img { width: 100%; }

.cover figcaption {
  display: flex;
  justify-content: center;
  width: 100%;
  padding-top: 20px;
  font-family: var(--font-strong);
  font-size: clamp(12px, 1.15vw, 16px);
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* Footer */
.site-footer {
  background: var(--lavender);
  color: var(--burgundy);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(64px, 9vw, 120px) var(--gutter) 40px;
}

.site-footer h2 {
  margin: 0 0 32px;
  font-family: var(--font-strong);
  font-size: clamp(32px, 9.4vw, 112px);
  font-weight: 400;
  letter-spacing: -.01em;
  line-height: 1;
  white-space: nowrap;
}

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

.contact-links a {
  background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat;
  text-decoration: none;
  transition: background-size .25s ease;
}
.contact-links a:hover,
.contact-links a:focus-visible { background-size: 100% 1px; }

.credits {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-top: clamp(64px, 9vw, 112px);
  padding-top: 32px;
  border-top: 1px solid rgba(112, 27, 64, .25);
}
.credits p { margin: 0; }

.footer-logo {
  width: 240px;
  height: auto;
  margin-bottom: 16px;
}

.imprint,
.tags {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px .75em;
}
.imprint { letter-spacing: .08em; }
.imprint span,
.tags span { white-space: nowrap; }

.dot {
  width: .3em;
  height: .3em;
  background: currentColor;
  border-radius: 50%;
}

/* Phones and anyone who turns off motion: swipe through instead. */
@media (hover: none), (prefers-reduced-motion: reduce) {
  :root {
    --card: min(78vw, 620px);
    --lift: 1;
    --room: 16px;
  }
  html { scroll-behavior: auto; }
  .stage {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .stage::-webkit-scrollbar { display: none; }
  .track { animation: none; }
  .track .dupe { display: none; }
  .card { scroll-snap-align: center; }
}

@media (max-aspect-ratio: 1/1) {
  body::before { background-image: url("/assets/swirl-phone.jpg"); }
}

@media (max-width: 640px) {
  .credits { flex-direction: column; align-items: flex-start; }
  .imprint { letter-spacing: .05em; }
  .cover figcaption {
    gap: 2px .5em;
    font-size: 11px;
    letter-spacing: .01em;
  }
}
