:root {
  --hero-background: oklch(0 0 0);
  --hero-foreground: oklch(1 0 0);
  --hero-foreground-muted: oklch(1 0 0 / 0.78);
  --hero-overlay: oklch(0 0 0 / 0.15);
  --hero-halo: oklch(0 0 0 / 0.25);
  --hero-menu: oklch(0 0 0 / 0.72);
  --hero-button-hover: oklch(0.92 0 0);
  --hero-shadow: oklch(0 0 0 / 0.45);
  --hero-header-paper: oklch(0.96 0.012 85 / 0.82);
  --hero-header-ink: oklch(0.16 0.012 240);
  --hero-display: "Iowan Old Style", Baskerville, "Times New Roman", serif;
  --hero-script: "Apple Chancery", "URW Chancery L", cursive;
  --hero-body: "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif;
  --hero-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --hero-page-pad: clamp(24px, 3.4vw, 48px);
  --hero-nav-clearance: 76px;
}

section[id] {
  scroll-margin-top: var(--hero-nav-clearance);
}

@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes wordmark-rise {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes nav-link-reveal {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-nav {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  display: grid;
  width: 100%;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 32px;
  padding: 32px var(--hero-page-pad) 0;
  color: var(--hero-foreground);
  font-family: var(--hero-body);
  transition:
    padding 220ms ease,
    background-color 220ms ease,
    color 220ms ease,
    box-shadow 220ms ease;
}

.hero-nav.is-scrolled {
  padding: 14px var(--hero-page-pad);
  background-color: var(--hero-header-paper);
  box-shadow: 0 1px 0
    color-mix(in oklch, var(--hero-header-ink) 12%, transparent);
  color: var(--hero-header-ink);
  -webkit-backdrop-filter: blur(18px) saturate(115%);
  backdrop-filter: blur(18px) saturate(115%);
}

.project-brand {
  display: inline-flex;
  width: fit-content;
  grid-column: 1;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: default;
  font: inherit;
  text-align: left;
  animation: hero-rise 900ms var(--hero-ease) 100ms both;
}

.project-mark {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.project-mark::before,
.project-mark::after {
  position: absolute;
  background: currentColor;
  content: "";
}

.project-mark::before {
  top: 15px;
  left: 5px;
  width: 20px;
  height: 1px;
  transform: rotate(-12deg);
}

.project-mark::after {
  top: 7px;
  left: 15px;
  width: 1px;
  height: 17px;
}

.project-brand__copy strong,
.project-brand__copy small {
  display: block;
  line-height: 1.1;
}

.project-brand__copy strong {
  font-family: var(--hero-display);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.project-brand__copy small {
  margin-top: 5px;
  font-size: 0.53rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-nav__center {
  display: flex;
  grid-column: 2;
  align-items: center;
  gap: 32px;
}

.hero-nav__center a,
.hero-nav__contact {
  position: relative;
  color: color-mix(in oklch, currentColor 95%, transparent);
  font-size: 0.9375rem;
  font-weight: 400;
  text-decoration: none;
  transition: color 180ms ease;
}

.hero-nav__center a {
  animation: nav-link-reveal 720ms var(--hero-ease) both;
}

.hero-nav__center a:nth-child(1) {
  animation-delay: 180ms;
}

.hero-nav__center a:nth-child(2) {
  animation-delay: 250ms;
}

.hero-nav__center a:nth-child(3) {
  animation-delay: 320ms;
}

.hero-nav__center a:nth-child(4) {
  animation-delay: 390ms;
}

.hero-nav__center a::after,
.hero-nav__contact::after {
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  opacity: 0.55;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 360ms var(--hero-ease);
}

.hero-nav__center a:hover,
.hero-nav__center a:focus-visible,
.hero-nav__contact:hover,
.hero-nav__contact:focus-visible {
  color: currentColor;
}

.hero-nav__center a:hover::after,
.hero-nav__center a:focus-visible::after,
.hero-nav__contact:hover::after,
.hero-nav__contact:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left center;
}

.hero-nav__contact {
  grid-column: 3;
  justify-self: end;
  animation: nav-link-reveal 720ms var(--hero-ease) 470ms both;
}

.mobile-menu {
  display: none;
}

.hero {
  position: relative;
  display: block;
  min-height: max(100svh, 720px);
  isolation: auto;
  overflow: hidden;
  padding: 0;
  background: var(--hero-background);
  color: var(--hero-foreground);
}

.hero__poster,
.hero__media,
.hero__overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__poster,
.hero__media {
  object-fit: cover;
  object-position: 50% 50%;
}

.hero__poster {
  z-index: 0;
  display: block;
  max-width: none;
  animation: hero-fade 1200ms ease-out both;
}

.hero__media {
  z-index: 1;
  opacity: 0;
  transition: opacity 700ms ease-out;
}

.hero__media.is-ready {
  opacity: 1;
}

.hero__overlay {
  z-index: 2;
  background: var(--hero-overlay);
}

.hero__content {
  position: absolute;
  z-index: 3;
  top: clamp(132px, 19vh, 188px);
  left: var(--hero-page-pad);
  width: min(672px, calc(100% - 2 * var(--hero-page-pad)));
  margin-left: var(--hero-page-pad);
  padding-top: clamp(48px, 7vh, 72px);
}

.hero__content::before {
  position: absolute;
  z-index: -1;
  inset: -36px -48px -44px;
  border-radius: 50%;
  background: var(--hero-halo);
  content: "";
  filter: blur(64px);
}

.hero__eyebrow {
  margin: 0 0 18px;
  color: var(--hero-foreground-muted);
  font-family: var(--hero-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  line-height: 1.2;
  text-transform: uppercase;
  animation: hero-rise 900ms var(--hero-ease) 400ms both;
}

.hero h1 {
  max-width: 672px;
  margin: 0;
  color: var(--hero-foreground);
  font-family: var(--hero-body);
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.25;
  text-shadow: 0 2px 12px var(--hero-shadow);
  animation: hero-rise 900ms var(--hero-ease) 400ms both;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 40px;
  padding: 6px 24px 6px 6px;
  border-radius: 999px;
  background: var(--hero-foreground);
  color: var(--hero-background);
  font-family: var(--hero-body);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 180ms ease;
  animation: hero-rise 900ms var(--hero-ease) 600ms both;
}

.hero-cta:hover {
  background: var(--hero-button-hover);
}

.hero-cta__icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  background: var(--hero-background);
  color: var(--hero-foreground);
}

.hero-cta__icon svg,
.mobile-menu__close svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.hero-wordmark {
  position: absolute;
  z-index: 2;
  right: var(--hero-page-pad);
  bottom: clamp(28px, 3.2vh, 38px);
  left: var(--hero-page-pad);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 0.08em;
  overflow: visible;
  pointer-events: none;
  animation: wordmark-rise 1100ms var(--hero-ease) 800ms both;
}

.hero-wordmark__serif,
.hero-wordmark__script {
  color: var(--hero-foreground);
  line-height: 0.92;
  white-space: nowrap;
}

.hero-wordmark__serif {
  font-family: var(--hero-display);
  font-size: 12.4vw;
  font-weight: 400;
  letter-spacing: -0.06em;
}

.hero-wordmark__script {
  margin-left: 1.2vw;
  font-family: var(--hero-script);
  font-size: 10.8vw;
  font-style: italic;
}

@media (max-width: 1023px) {
  .hero-nav {
    display: flex;
    justify-content: space-between;
    padding: 24px var(--hero-page-pad) 0;
  }

  .hero-nav.is-scrolled {
    padding: 14px var(--hero-page-pad);
  }

  .project-brand {
    cursor: pointer;
  }

  .hero-nav__center,
  .hero-nav__contact {
    display: none;
  }

  .mobile-menu {
    position: fixed;
    z-index: 110;
    top: 86px;
    right: var(--hero-page-pad);
    left: var(--hero-page-pad);
    flex-direction: column;
    gap: 16px;
    padding: 56px 24px 24px;
    border-radius: 16px;
    background: var(--hero-menu);
    box-shadow: 0 24px 80px var(--hero-shadow);
    color: var(--hero-foreground);
    font-family: var(--hero-body);
    backdrop-filter: blur(18px);
  }

  .mobile-menu.is-open,
  .menu-open .mobile-menu {
    display: flex;
    animation: hero-rise 360ms var(--hero-ease) both;
  }

  .mobile-menu a {
    color: var(--hero-foreground);
    font-size: 18px;
    text-decoration: none;
  }

  .mobile-menu.is-open a,
  .menu-open .mobile-menu a {
    animation: nav-link-reveal 480ms var(--hero-ease) both;
  }

  .mobile-menu.is-open a:nth-of-type(1),
  .menu-open .mobile-menu a:nth-of-type(1) {
    animation-delay: 70ms;
  }

  .mobile-menu.is-open a:nth-of-type(2),
  .menu-open .mobile-menu a:nth-of-type(2) {
    animation-delay: 115ms;
  }

  .mobile-menu.is-open a:nth-of-type(3),
  .menu-open .mobile-menu a:nth-of-type(3) {
    animation-delay: 160ms;
  }

  .mobile-menu.is-open a:nth-of-type(4),
  .menu-open .mobile-menu a:nth-of-type(4) {
    animation-delay: 205ms;
  }

  .mobile-menu.is-open a:nth-of-type(5),
  .menu-open .mobile-menu a:nth-of-type(5) {
    animation-delay: 250ms;
  }

  .mobile-menu.is-open a:nth-of-type(6),
  .menu-open .mobile-menu a:nth-of-type(6) {
    animation-delay: 295ms;
  }

  .mobile-menu__close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--hero-foreground);
  }

  .hero {
    min-height: max(100svh, 690px);
  }

  .hero__content {
    top: clamp(118px, 18vh, 154px);
    padding-top: clamp(36px, 7vh, 56px);
  }

  .hero h1 {
    font-size: 24px;
  }

  .hero-wordmark {
    justify-content: flex-start;
  }

  .hero-wordmark__serif {
    font-size: 15vw;
  }

  .hero-wordmark__script {
    font-size: 13vw;
  }
}

@media (max-width: 767px) {
  .project-brand__copy small {
    display: none;
  }

  .hero {
    min-height: max(100svh, 660px);
  }

  .hero__poster,
  .hero__media {
    object-position: 62% 50%;
  }

  .hero__content {
    top: 118px;
    padding-top: 32px;
  }

  .hero__content::before {
    inset: -24px -22px -34px;
  }

  .hero h1 {
    font-size: 20px;
  }

  .hero-cta {
    margin-top: 32px;
  }

  .hero-wordmark {
    right: 12px;
    bottom: 16px;
    left: 12px;
  }

  .hero-wordmark__serif {
    font-size: 15.6vw;
  }

  .hero-wordmark__script {
    margin-left: 0.5vw;
    font-size: 14.2vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-nav__center a,
  .hero-nav__contact,
  .mobile-menu.is-open a,
  .menu-open .mobile-menu a {
    animation: none;
  }

  .hero__media {
    display: none;
  }
}
