@font-face {
  font-family: "Barlow Condensed";
  src: url("assets/barlow-condensed-extrabold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: system-ui, sans-serif;
  color: #231b17;
  background: #e6ded0;
  --paper: #faf1e3;
  --ink: #23201c;
  --rust: #963a20;
  --gutter: clamp(1.25rem, 4.5vw, 5.5rem);
  --display: "Barlow Condensed", Impact, "Arial Narrow", sans-serif;
}

* { box-sizing: border-box; }

body, h1, h2, p { margin: 0; }

a { color: inherit; }

:where(a, button):focus-visible {
  outline: 3px solid #a54a29;
  outline-offset: 5px;
}

.hero {
  isolation: isolate;
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  min-height: max(33rem, 100svh);
  padding-inline: var(--gutter);
}

.landscape, .hero::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.landscape {
  z-index: -2;
  object-fit: cover;
  object-position: 50% 43%;
}

.landscape-subject { z-index: 1; }

.hero::after {
  content: "";
  background: linear-gradient(to top, rgb(25 14 9 / .86), rgb(25 14 9 / .28) 16%, transparent 35%);
}

.hero-header, .hero-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  min-width: 0;
  z-index: 2;
}

.hero-header {
  min-height: clamp(4.25rem, 9svh, 5.75rem);
  border-bottom: 1px solid rgb(35 32 28 / .24);
}

.wordmark {
  color: var(--ink);
  font: 800 2.15rem/.9 var(--display);
  text-transform: uppercase;
  letter-spacing: .025em;
}

.wordmark span, .period { color: var(--rust); }

.photo-credit {
  font-size: .75rem;
  font-weight: 650;
  padding-block: .7rem;
  text-decoration: none;
}

.photo-credit:hover { text-decoration: underline; }

.hero-title {
  align-self: start;
  text-align: center;
  padding-top: clamp(2rem, 4.6svh, 5rem);
}

.location {
  font-size: clamp(.69rem, 1vw, .8rem);
  font-weight: 720;
  letter-spacing: .21em;
  text-transform: uppercase;
}

.hero-title h1 {
  color: var(--ink);
  font: 800 clamp(4rem, min(18.75vw, 30svh), 24rem)/.75 var(--display);
  letter-spacing: -.016em;
  text-transform: uppercase;
  margin: .115em 0 0;
  opacity: .78;
}

.hero-title h1 > span {
  display: block;
  white-space: nowrap;
}

.hero-title h1 > span:last-child { color: var(--rust); }

.hero-title h1 .period { color: var(--ink); }

.hero-footer {
  padding-block: 1.35rem clamp(1.35rem, 4svh, 2.5rem);
  color: var(--paper);
  border-top: 1px solid rgb(250 241 227 / .36);
}

.hero-footer p {
  max-width: 30ch;
  font-size: clamp(.9rem, 1.4vw, 1.12rem);
  line-height: 1.45;
  font-weight: 510;
}

.explore {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.55rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: .78rem .87rem .78rem 1.25rem;
  font-size: .85rem;
  font-weight: 720;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .24s ease, color .24s ease, border-color .24s ease;
}

.explore span {
  display: grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  color: var(--paper);
  background: var(--rust);
  font-size: .95rem;
  line-height: 1;
}

.explore:hover { background: #eed3b8; }

.destination {
  color: var(--ink);
  background: var(--paper);
  border: 0;
  border-radius: .75rem;
  width: min(31rem, calc(100% - 2rem));
  padding: clamp(1.5rem, 6vw, 3rem);
}

.destination::backdrop { background: rgb(27 16 10 / .72); }

.destination h2 {
  font: 800 clamp(3.3rem, 10vw, 5rem)/.94 var(--display);
  text-transform: uppercase;
  margin: .5rem 0 .8rem;
}

.destination p + .explore {
  margin-top: 1.3rem;
  background: #efdbca;
}

.destination p:not(.location) { line-height: 1.55; }

.close {
  position: absolute;
  top: .7rem;
  right: .7rem;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  color: inherit;
  width: 2.75rem;
  height: 2.75rem;
  font: 1.75rem/1 system-ui, sans-serif;
  cursor: pointer;
}

@media (max-width: 660px) {
  .landscape { object-position: 56% 41%; }
  .hero-header { min-height: 4rem; }
  .wordmark { font-size: 1.85rem; }
  .hero-title {
    margin-inline: -.25rem;
    padding-top: clamp(2.25rem, 7svh, 4.5rem);
  }
  .hero-title h1 { font-size: clamp(3.7rem, min(18.8vw, 30svh), 7.75rem); }
  .hero-footer {
    align-items: start;
    flex-direction: column;
    gap: .9rem;
    padding-block: 1rem 1.35rem;
  }
  .hero-footer p { max-width: 29ch; }
  .hero::after { background: linear-gradient(to top, rgb(25 14 9 / .86), rgb(25 14 9 / .33) 24%, transparent 50%); }
}

@media (max-height: 600px) and (orientation: landscape) {
  .hero { min-height: max(23rem, 100svh); }
  .hero-header { min-height: 3.6rem; }
  .hero-title { padding-top: 0; }
  .hero-title h1 { font-size: clamp(4rem, min(18.75vw, 25svh), 9.4rem); }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-title h1 { display: grid; }

  .hero-title h1 > span {
    padding-block: .075em;
    margin-block: -.075em;
    animation: reveal-title 1.42s cubic-bezier(.34, .05, .19, 1) .08s backwards;
  }

  .hero-title h1 > span + span { animation-delay: .48s; }

  @keyframes reveal-title {
    from, to {
      mask-image: linear-gradient(90deg, #000 41%, transparent 52%);
      mask-size: 260% 100%;
      mask-repeat: no-repeat;
    }

    from {
      mask-position: 100% 50%;
      opacity: .55;
      transform: translateY(.045em);
    }

    to {
      mask-position: 0% 50%;
      opacity: 1;
      transform: translateY(0);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .explore { transition: none; }
}
