/* Park Poster — a vintage national-park travel poster. Flat layered
   ridges and pines, a sun that rises behind them with slowly turning
   rays, centered slab-serif lettering, and the page falling away into
   the dark valley floor where the links live. */

:root {
  --color-bg: #152326;
  --color-ink: #f3dfb5;
  --color-red: #e5673a;
  --color-yellow: #e8b64c;
  --color-blue: #7fb3ae;
  --sky: #f3dfb5;
  --sun: #e5673a;
  --pine: #1b2d31;
  --card: #1d3034;
  --font-slab: "Alfa Slab One", Rockwell, Georgia, serif;
  --font-cond: "Barlow Condensed", "Arial Narrow", sans-serif;
  --maxw: 1100px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-cond);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

/* Hero: the poster scene */

.hero {
  position: relative;
  z-index: 1;
  overflow: hidden;
  padding: 5rem 1.5rem clamp(15rem, 36vw, 27rem);
  text-align: center;
  background: var(--sky);
  color: var(--pine);
}

/* Mountains sit above the sun (same z-index, later in paint order) */
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 0;
  right: 0;
  bottom: -1px;
  height: clamp(11rem, 30vw, 21rem);
  background: url("mountains.svg") center bottom / cover no-repeat;
}

.hero__sun {
  --size: clamp(11rem, 26vw, 18rem);
  position: absolute;
  z-index: -1;
  left: 50%;
  bottom: clamp(3.5rem, 9vw, 7rem);
  width: var(--size);
  height: var(--size);
  margin-left: calc(var(--size) / -2);
  border-radius: 50%;
  background: var(--sun);
  animation: sun-rise 2.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero__sun::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -70%;
  border-radius: 50%;
  background: repeating-conic-gradient(rgba(229, 103, 58, 0.16) 0 5deg, transparent 5deg 15deg);
  -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent);
  mask-image: radial-gradient(closest-side, #000 55%, transparent);
  animation: spin 90s linear infinite;
}

/* Horizontal cut-out stripes across the lower sun */
.hero__sun::after {
  content: "";
  position: absolute;
  inset: auto 0 18%;
  height: 0;
  box-shadow:
    0 0 0 3px var(--sky),
    0 -1.4rem 0 3px var(--sky),
    0 -2.6rem 0 2px var(--sky);
  opacity: 0.9;
}

.hero__title {
  position: relative;
  margin: 0;
  font-family: var(--font-slab);
  font-size: clamp(3.25rem, 11vw, 7.5rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hero__byline {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  margin: 1.25rem 0 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.hero__byline::before,
.hero__byline::after {
  content: "";
  width: 2.5rem;
  height: 3px;
  background: currentColor;
}

/* Links */

.links {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.5rem 2rem 6rem;
}

.links__head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding-top: 1rem;
  color: var(--color-yellow);
}

.links__compass {
  width: 2.4rem;
  height: 2.4rem;
  flex: none;
}

.links__compass-needle {
  transform-origin: 12px 12px;
  animation: needle-settle 2.6s 1.2s cubic-bezier(0.3, 0.6, 0.4, 1) both;
}

.links__heading {
  margin: 0;
  font-family: var(--font-slab);
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.links__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr));
  gap: 0.9rem;
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}

.links__item {
  animation: rise-in 0.6s ease both;
  animation-delay: calc(var(--i, 0) * 70ms + 900ms);
}

.links__link {
  position: relative;
  display: grid;
  grid-template-columns: 2.6rem 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 1.4rem 0.6rem 0.6rem;
  overflow: hidden;
  isolation: isolate;
  border: 2px solid rgba(243, 223, 181, 0.25);
  border-radius: 999px;
  background: var(--card);
  color: inherit;
  text-decoration: none;
  transition: color 0.3s, border-color 0.3s;
}

.links__link::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--accent, var(--color-ink));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}

.links__link:hover::before,
.links__link:focus-visible::before {
  transform: scaleX(1);
}

.links__link:hover,
.links__link:focus-visible {
  color: var(--color-bg);
  border-color: var(--accent);
  outline: none;
}

.links__badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--color-bg);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: background-color 0.35s, color 0.35s;
}

.links__badge-icon {
  width: 1.3rem;
  height: 1.3rem;
  display: block;
}

.links__link:hover .links__badge,
.links__link:focus-visible .links__badge {
  background: var(--color-bg);
  color: var(--color-ink);
}

.links__name {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.links__arrow {
  font-size: 1.25rem;
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}

.links__link:hover .links__arrow,
.links__link:focus-visible .links__arrow {
  transform: translate(0.25rem, -0.25rem);
}

/* Footer */

.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  opacity: 0.6;
}

.footer__text {
  margin: 0;
}

.footer__mark {
  width: 0.8rem;
  height: 0.9rem;
  background: var(--color-blue);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

@keyframes sun-rise {
  from { transform: translateY(45%); }
  to { transform: none; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(1rem); }
  to { opacity: 1; transform: none; }
}

@keyframes needle-settle {
  0% { transform: rotate(-120deg); }
  30% { transform: rotate(40deg); }
  50% { transform: rotate(-20deg); }
  68% { transform: rotate(9deg); }
  84% { transform: rotate(-3deg); }
  100% { transform: rotate(0); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
