:root {
  color-scheme: dark;
  --navy: #0b132b;
  --navy-deep: #050a14;
  --surface: rgba(7, 21, 36, 0.78);
  --surface-hover: rgba(11, 38, 51, 0.9);
  --gold: #d0a45e;
  --gold-bright: #edc47e;
  --teal: #42a8a4;
  --text: #f1e8d9;
  --muted: #b4b4b7;
  --line: rgba(208, 164, 94, 0.75);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--navy-deep);
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  color: var(--text);
  background-color: var(--navy-deep);
  background-image:
    linear-gradient(rgba(3, 10, 20, 0.08), rgba(3, 10, 20, 0.08)),
    url('/assets/celestial-background.png');
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.portal {
  width: min(100% - 8rem, 1312px);
  margin-inline: auto;
  padding-top: clamp(1rem, 2.7vh, 1.75rem);
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.brand__logo {
  display: block;
  width: min(36.875rem, 100%);
  height: auto;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.22));
}

.brand h1 {
  margin: 0.32rem 0 0;
  color: #f1d7ac;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.25rem, 5.2vw, 4.75rem);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: 0.008em;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.35);
}

.brand p {
  max-width: 50rem;
  margin: 1.25rem auto 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.22rem);
  font-weight: 400;
  line-height: 1.55;
}

.destinations {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.35rem;
  margin-top: clamp(2rem, 4.5vh, 2.65rem);
}

.destination {
  min-width: 0;
  min-height: 6rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1.6rem;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 2.25rem;
  overflow: hidden;
  color: var(--gold-bright);
  background:
    radial-gradient(circle at 80% 50%, rgba(35, 124, 127, 0.12), transparent 52%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  box-shadow: var(--shadow);
  text-decoration: none;
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.destination__icon {
  display: none;
}

.destination__name {
  min-width: 0;
  overflow-wrap: break-word;
  font-size: clamp(1rem, 1.45vw, 1.23rem);
  font-weight: 500;
  line-height: 1.25;
  text-align: left;
}

.destination__arrow {
  width: 1.6rem;
  height: 1.6rem;
  color: var(--teal);
  transition: transform 180ms ease;
}

.destination__arrow svg,
.destination__icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.destination:hover {
  color: #ffe1a6;
  background-color: var(--surface-hover);
  border-color: var(--gold-bright);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38), 0 0 24px rgba(42, 119, 115, 0.12);
  transform: translateY(-2px);
}

.destination:hover .destination__arrow {
  transform: translateX(0.22rem);
}

.destination:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 4px;
  border-color: var(--gold-bright);
}

.footer {
  margin-top: auto;
  padding: clamp(2.75rem, 5vh, 3.5rem) 1.5rem clamp(2rem, 4.5vh, 2.8rem);
  color: #a8a8ab;
  font-size: 0.95rem;
  line-height: 1.3;
  text-align: center;
}

@media (max-width: 1050px) {
  .portal {
    width: min(100% - 3rem, 900px);
  }

  .destination {
    padding-inline: 1.35rem;
  }
}

@media (max-width: 820px) {
  body {
    background-position: 20% top;
  }

  .portal {
    width: 100%;
    padding: 1.25rem 1.25rem 0;
  }

  .brand__logo {
    width: min(19rem, 88vw);
  }

  .brand h1 {
    margin-top: 0.42rem;
    font-size: clamp(2.45rem, 11.5vw, 3.15rem);
    line-height: 1.08;
  }

  .brand p {
    max-width: 20rem;
    margin-top: 0.65rem;
    font-size: 0.97rem;
    line-height: 1.48;
  }

  .destinations {
    grid-template-columns: 1fr;
    gap: 0.7rem;
    margin-top: 1.1rem;
  }

  .destination {
    min-height: 5.25rem;
    grid-template-columns: 3.35rem minmax(0, 1fr) 1.5rem;
    gap: 0;
    padding: 0.62rem 1rem;
    border-radius: 0;
    clip-path: polygon(
      0.45rem 0,
      calc(100% - 0.45rem) 0,
      100% 0.45rem,
      100% calc(100% - 0.45rem),
      calc(100% - 0.45rem) 100%,
      0.45rem 100%,
      0 calc(100% - 0.45rem),
      0 0.45rem
    );
  }

  .destination:focus-visible {
    outline: none;
    border-color: var(--gold-bright);
    box-shadow:
      inset 0 0 0 3px var(--teal),
      inset 0 0 0 5px var(--navy-deep);
  }

  .destination__icon {
    width: 2.75rem;
    height: 2.75rem;
    display: grid;
    place-items: center;
    padding: 0.58rem;
    color: var(--gold);
    border: 1px solid rgba(208, 164, 94, 0.78);
    border-radius: 50%;
  }

  .destination__name {
    margin-left: 0.85rem;
    padding: 0.55rem 0.5rem 0.55rem 1rem;
    border-left: 1px solid rgba(208, 164, 94, 0.2);
    font-size: 1.04rem;
    line-height: 1.2;
  }

  .destination__arrow {
    width: 1.45rem;
    height: 1.45rem;
  }

  .footer {
    padding: 1.75rem 1rem 1.55rem;
    font-size: 0.72rem;
  }
}

@media (max-width: 370px) {
  .portal {
    padding-inline: 0.85rem;
  }

  .brand__logo {
    width: 16.5rem;
  }

  .brand h1 {
    font-size: 2.25rem;
  }

  .destination {
    grid-template-columns: 3rem minmax(0, 1fr) 1.35rem;
    padding-inline: 0.75rem;
  }

  .destination__icon {
    width: 2.55rem;
    height: 2.55rem;
  }

  .destination__name {
    margin-left: 0.65rem;
    padding-left: 0.75rem;
    font-size: 0.96rem;
  }
}

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

@media (forced-colors: active) {
  .destination {
    border: 2px solid LinkText;
  }

  .destination:focus-visible {
    outline: 3px solid Highlight;
    outline-offset: -5px;
    box-shadow: none;
  }
}
