* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #121214;
  background-image: url("images/grain.svg");
  color: #fff;
  font-family: Futura, "Futura PT", "Century Gothic", sans-serif;
}

/* Header */

.site-header {
  height: 80px;
  padding: 0 clamp(20px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  z-index: 2;
}

.logo-link {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: block;
  width: min(180px, 45vw);
}

.logo-link img {
  display: block;
  width: 100%;
  max-height: 48px;
  object-fit: contain;
}

/* Navigation */

.menu {
  position: relative;
}

.menu summary {
  list-style: none;
  cursor: pointer;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
}

.menu summary::-webkit-details-marker {
  display: none;
}

.hamburger {
  display: grid;
  gap: 6px;
  width: 28px;
}

.hamburger span {
  height: 2px;
  background: currentColor;
  transition: transform 250ms ease, opacity 200ms ease;
}

.menu[open] .hamburger span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu[open] .hamburger span:nth-child(2) {
  opacity: 0;
}

.menu[open] .hamburger span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.menu nav {
  position: absolute;
  left: calc(100% + 8px);
  top: 0;
  display: flex;
  align-items: center;
  width: max-content;
  max-width: calc(100vw - 48px - 8px - 2 * clamp(20px, 4vw, 64px));
  min-height: 48px;
  background: transparent;
  padding: 0 4px;
}

.menu a {
  display: block;
  padding: 14px 12px;
  color: inherit;
  text-decoration: none;
  font-family: "Bebas Neue", "Arial Narrow", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.menu a:hover {
  color: #bcbcbf;
}

.menu[open] nav {
  transform-origin: top left;
  animation: menu-slide 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.menu[open] nav a {
  animation: menu-link-slide 300ms ease-out both;
  animation-delay: 70ms;
}

.menu[open] nav a:nth-child(2) { animation-delay: 120ms; }
.menu[open] nav a:nth-child(3) { animation-delay: 170ms; }

@keyframes menu-slide {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes menu-link-slide {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 600px) {
  .site-header:has(.menu[open]) .logo-link { visibility: hidden; }
}

:focus-visible {
  outline: 2px solid white;
  outline-offset: 4px;
}

/* Video */

.film {
  position: relative;
  height: 62vh;
  height: 62svh;
  min-height: 260px;
  background: #121214;
}

.film video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Animated logo over the video */

.signature-heading {
  opacity: 0.8;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(300px, 65vw);
  margin: 0;
  line-height: 0;
  pointer-events: none;
  filter: drop-shadow(0 2px 8px rgb(0 0 0 / 55%));
}

/* Quote beneath the video */

.quote-band {
  padding: clamp(32px, 5vw, 64px) 24px;
  text-align: center;
}

.quote {
  max-width: 780px;
  margin: 0 auto;
}

.quote blockquote {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  margin: 0;
  font-size: clamp(24px, 2.5vw, 32px);
  line-height: 1.6;
}

.quote p { margin: 0; }

.quote figcaption {
  margin-top: 20px;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: #bcbcbf;
}

.signature-logo {
  display: block;
  width: 100%;
  height: auto;
}

/* Writing animation */

.draw-stroke {
  fill: none;
  stroke: white;
  stroke-width: 20;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: write-stroke 1s ease-in-out both;
}

.draw-stem {
  animation-delay: 0.25s;
}

.draw-loop {
  animation-duration: 1.5s;
  animation-delay: 1.15s;
}

.draw-name {
  animation: reveal-name 1.2s ease-in-out 2.5s both;
}

@keyframes write-stroke {
  from {
    stroke-dashoffset: 1;
    opacity: 0;
  }
  1% {
    opacity: 1;
  }
  to {
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

@keyframes reveal-name {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

/* Mobile */

@media (max-width: 600px) {
  .site-header {
    height: 64px;
  }

}

/* Reduced motion */

.site-footer {
  padding: 24px 20px 32px;
  color: rgb(255 255 255 / 22%);
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0.04em;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

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

  .draw-stroke,
  .draw-name,
  .menu[open] nav,
  .menu[open] nav a {
    animation: none;
  }

  .hamburger span { transition: none; }
}
