:root {
  color-scheme: dark;
  --paper: #f1f0e9;
  --header-height: 88px;
  --page-gutter: clamp(20px, 3vw, 48px);
}

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

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

html.is-back-to-top {
  scroll-behavior: auto;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--color-ink);
  color: var(--paper);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
}

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

:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 5px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--paper);
  color: var(--color-ink);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

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

.site-header {
  position: fixed;
  z-index: 30;
  inset: 0 0 auto;
  display: flex;
  height: auto;
  align-items: flex-start;
  justify-content: space-between;
  padding: 28px var(--page-gutter) 0;
  color: var(--paper);
  pointer-events: none;
}

.site-header::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(to bottom, rgb(0 0 0 / 32%), transparent);
  content: "";
}

.site-header a,
.site-header button {
  pointer-events: auto;
}

.brand {
  position: relative;
  display: grid;
  width: 112px;
  height: 107px;
  margin-top: 8px;
  place-items: center;
  cursor: pointer;
}

.brand__mark {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: invert(1);
  transition: opacity 140ms ease;
}

.brand__mark--closed {
  opacity: 0.8;
}

.brand__mark--open {
  opacity: 0;
}

.brand:hover .brand__mark--closed,
.brand:focus-visible .brand__mark--closed,
.brand.is-open .brand__mark--closed {
  opacity: 0;
}

.brand:hover .brand__mark--open,
.brand:focus-visible .brand__mark--open,
.brand.is-open .brand__mark--open {
  opacity: 0.8;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: clamp(28px, 3vw, 52px);
}

.desktop-nav a {
  padding: 8px 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 180ms ease;
}

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

.menu-toggle,
.menu-close {
  display: none;
  width: 46px;
  height: 46px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--paper);
  cursor: pointer;
}

.menu-toggle span,
.menu-close span {
  position: absolute;
  left: 10px;
  width: 26px;
  height: 1.5px;
  background: currentColor;
}

.menu-toggle span:first-child {
  top: 17px;
}

.menu-toggle span:last-child {
  top: 28px;
}

main {
  position: relative;
}

.panel {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  overflow: clip;
}

.hero {
  background: var(--color-ink);
}

.hero--selected {
  z-index: 1;
}

.hero--index {
  z-index: 2;
}

.color-panel {
  z-index: 3;
  background: var(--color-coral);
}

.hero__media {
  position: absolute;
  inset: 0;
  height: 100%;
}

.hero__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__image,
.hero__shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__image {
  object-fit: cover;
}

.hero--selected .hero__image {
  object-position: 50% 50%;
}

.hero--index .hero__image {
  object-position: 50% 50%;
}

.hero__shade {
  background: rgb(0 0 0 / 23%);
}

.hero--index .hero__shade {
  background: rgb(0 0 0 / 15%);
}

.hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 4vh, 46px);
  padding: calc(var(--header-height) + 24px) var(--page-gutter) 48px;
  text-align: center;
}

.hero h1,
.hero h2 {
  margin: 0;
  color: var(--paper);
  font-size: clamp(4rem, 10.2vw, 10rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 0.88;
  text-indent: 0.12em;
  text-shadow: 0 2px 28px rgb(0 0 0 / 22%);
  text-transform: uppercase;
}

.hero__button {
  display: inline-grid;
  min-width: 200px;
  min-height: 42px;
  place-items: center;
  padding: 10px 24px;
  border: 1px solid rgb(241 240 233 / 58%);
  border-radius: 999px;
  background: rgb(10 10 10 / 56%);
  color: var(--paper);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.hero__button:hover {
  border-color: var(--color-coral);
  background: var(--color-coral);
  transform: translateY(-2px);
}

.hero__button:active {
  transform: translateY(0);
}

.mobile-menu {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgb(8 8 8 / 97%);
  color: var(--paper);
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.mobile-menu nav a {
  font-size: clamp(2.4rem, 11vw, 4.6rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}

.mobile-menu nav a:hover,
.mobile-menu nav a:focus-visible {
  color: var(--color-coral);
}

.menu-close {
  position: absolute;
  top: 20px;
  right: var(--page-gutter);
}

.menu-close span {
  top: 23px;
}

.menu-close span:first-child {
  transform: rotate(45deg);
}

.menu-close span:last-child {
  transform: rotate(-45deg);
}

@media (max-width: 720px) {
  :root {
    --header-height: 88px;
  }

  .site-header {
    height: var(--header-height);
    align-items: center;
    padding: 0 var(--page-gutter);
  }

  .desktop-nav {
    display: none;
  }

  .menu-toggle,
  .menu-close {
    position: relative;
    display: block;
  }

  .menu-close {
    position: absolute;
  }

  .brand {
    width: 100px;
    height: auto;
    aspect-ratio: 2109.96 / 2011.23;
    margin-top: 0;
    transform: translateY(32px);
  }

  .hero h1,
  .hero h2 {
    font-size: clamp(3.1rem, 16vw, 5.8rem);
    letter-spacing: 0.08em;
    text-indent: 0.08em;
  }

  .hero__content {
    gap: 30px;
  }

  .hero--selected .hero__image {
    object-position: 50% 50%;
  }

  .hero--index .hero__image {
    object-position: 56% 50%;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .panel {
    position: relative;
  }

  .hero__button:hover {
    transform: none;
  }
}
