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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:root {
  --edge: 56px;
  --section-title-size: 2.5rem;
}

html,
body {
  height: 100%;
}

body {
  background: #000;
  color: #fff;
  font-family: "Geist Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.page-veil {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.42s cubic-bezier(0.4, 0, 0.2, 1);
}

html.is-entering .page-veil,
.page-veil.is-on {
  opacity: 1;
}

.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  transform: translateZ(0);
}

.top {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 28px 20px 0;
}

.pill {
  justify-self: center;
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: min(420px, calc(100vw - 40px));
  height: 38px;
  padding: 4px;
  border: 1px solid var(--nav-border, rgba(255, 255, 255, 0.55));
  border-radius: 999px;
  background: var(--nav-fill, rgba(255, 255, 255, 0.08));
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}

.pill__item {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--page-fg, #fff);
  text-decoration: none;
  isolation: isolate;
}

.pill__bubble {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--chip, #fff);
  border-radius: 999px;
  opacity: 0;
  transform: scale(0.72);
  transform-origin: center;
  transition:
    opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.pill__label {
  position: relative;
  z-index: 1;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1;
  transition: color 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.pill__item:hover .pill__bubble,
.pill__item:focus-visible .pill__bubble {
  opacity: 1;
  transform: scale(1);
}

.pill__item:hover .pill__label,
.pill__item:focus-visible .pill__label {
  color: var(--chip-fg, #111);
}

.pill__item:focus-visible {
  outline: none;
}

.hero {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding-bottom: 6vh;
}

.lockup {
  width: min(72vw, 760px);
  margin: 0;
  opacity: 0;
  animation: rise 1.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

.lockup img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 2px 44px rgba(0, 0, 0, 0.6));
}

.pill--hero {
  opacity: 0;
  animation: fade 1.6s cubic-bezier(0.22, 1, 0.36, 1) 0.75s forwards;
}

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

@keyframes fade {
  to {
    opacity: 1;
  }
}

@keyframes lockup-in {
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.pill__item.is-active .pill__bubble {
  opacity: 1;
  transform: scale(1);
}

.pill__item.is-active .pill__label {
  color: var(--chip-fg, #111);
}

.terrain {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  width: 100%;
  height: 22vh;
  pointer-events: none;
  overflow: visible;
  transform: translateX(-14%) scale(1.82, 1.68);
  transform-origin: center bottom;
}

.terrain path {
  fill: none;
  stroke: #fff;
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.about,
body.contact {
  --page-bg: #fff;
  --page-fg: #000;
  --page-muted: rgba(0, 0, 0, 0.62);
  --nav-border: rgba(0, 0, 0, 0.28);
  --nav-fill: rgba(0, 0, 0, 0.05);
  --chip: #000;
  --chip-fg: #fff;
  background: var(--page-bg);
  color: var(--page-fg);
}

body.about .page-veil,
body.contact .page-veil {
  background: #fff;
}

body.about .top,
body.contact .top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 28px var(--edge) 0;
}

.top__left {
  justify-self: start;
  display: flex;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  line-height: 0;
}

body.about .brand img,
body.contact .brand img {
  filter: invert(1);
}

.top__right {
  justify-self: end;
}

.back {
  display: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-left: -6px;
  color: var(--page-fg);
  text-decoration: none;
}

.back svg {
  width: 18px;
  height: 18px;
  display: block;
}

.brand img {
  height: clamp(18px, calc(6.93vw - 35.21px), 41px);
  width: auto;
  display: block;
}

body.about .pill,
body.contact .pill {
  justify-self: center;
}

.page-copy {
  position: relative;
  z-index: 2;
  width: min(42rem, calc(100vw - var(--edge) - var(--edge)));
  margin: 2.5rem auto 4rem;
  color: var(--page-fg);
  text-align: left;
}

.page-copy h1 {
  margin: 0 0 1rem;
  font-size: var(--section-title-size);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.page-copy--contact p {
  margin: 0 0 1.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--page-muted);
}

.mail {
  display: inline-block;
  padding: 0.9rem 1.25rem;
  border: 1px solid var(--page-fg);
  color: var(--page-fg);
  text-decoration: none;
  font-size: 0.9rem;
}

.mail:hover,
.mail:focus-visible {
  background: var(--page-fg);
  color: var(--page-bg);
  outline: none;
}

.copy__body {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.copy__body p {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--page-muted);
}

@media (max-width: 720px) {
  :root {
    --edge: 20px;
  }
  .pill {
    width: min(344px, calc(100vw - 32px));
    height: 34px;
    gap: 5px;
  }

  .hero {
    gap: 20px;
    padding-bottom: 12vh;
  }

  .lockup {
    width: min(78vw, 760px);
  }

  body.about .top,
  body.contact .top {
    order: 1;
    padding: 18px 16px 0;
  }

  .brand {
    display: none;
  }

  .back {
    display: flex;
  }

  body.about,
  body.contact {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .page-copy {
    order: 2;
    width: calc(100vw - var(--edge) - var(--edge));
    margin: 1.75rem auto 3rem;
  }

  .terrain {
    position: relative;
    inset: auto;
    order: 3;
    flex: 0 0 30vh;
    height: 30vh;
    margin-top: auto;
    transform: translateX(-14%) scale(1.82, 1);
  }

  .terrain path {
    stroke-width: 4;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lockup,
  .pill--hero {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .pill__bubble,
  .pill__label {
    transition: none;
  }

  .page-veil {
    transition: none;
  }
}
