@font-face {
  font-family: "Barlow Condensed";
  src: url("assets/fonts/barlow-condensed-black.woff2") format("woff2");
  font-style: normal;
  font-weight: 900;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("assets/fonts/source-sans-3.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ground: #171e25;
  --ink: #fff2e3;
  --accent: #d6fff0;
  --focus: var(--ink);
  --trail-ground: #e6e9e8;
  --trail-ink: #172c31;
  --trail-soft: #405359;
  --trail-panel: #dce1da;
  --trail-panel-active: #cdd9d1;
  --heading: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Source Sans 3", system-ui, sans-serif;
  --gutter: clamp(1.25rem, 6.25vw, 7.5rem);
}

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

body {
  margin: 0;
  color: var(--ink);
  background: var(--ground);
  font: 1.125rem / 1.45 var(--body);
}

h1, h2, p {
  margin: 0;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

#toppen, #raider {
  outline-offset: -6px;
}

.frame {
  width: min(100% - 2 * var(--gutter), 93rem);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  z-index: 4;
  inset: 0.75rem auto auto 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--ground);
  font-weight: 700;
  transform: translateY(calc(-100% - 1.75rem));
}

.skip-link:focus {
  transform: none;
}

.site-header {
  position: absolute;
  z-index: 2;
  inset: 0 0 auto;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 1rem;
  min-block-size: 5.3rem;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-block-size: 2.75rem;
  gap: 0.65rem;
  text-decoration: none;
}

.nav a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.wordmark {
  font: 900 1.55rem / 1 var(--heading);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: clamp(0.55rem, 2vw, 1.75rem);
}

.nav-link[aria-current="page"] {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.nav-link {
  padding-inline: 0.25rem;
  font-weight: 700;
}

.gate-mark {
  display: inline-flex;
  flex: none;
  justify-content: center;
  gap: 0.15em;
  inline-size: 1.16em;
  block-size: 0.95em;
  transform: skewX(-12deg);
}

.gate-mark::before, .gate-mark::after {
  inline-size: 0.22em;
  background: currentColor;
  content: "";
}

.gate-mark::before {
  clip-path: polygon(52% 0, 100% 0, 100% 100%, 0 100%);
}

.gate-mark::after {
  clip-path: polygon(0 0, 55% 0, 100% 100%, 0 100%);
}

.wordmark .gate-mark {
  color: var(--accent);
}

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-block-size: clamp(43rem, 57vw, 55rem);
}

#innehall:focus-visible {
  outline: none;
}

#innehall:focus-visible .hero::after {
  position: absolute;
  z-index: 1;
  inset: 0.3rem;
  border: 3px solid var(--focus);
  outline: 2px solid var(--ground);
  pointer-events: none;
  content: "";
}

.hero-scenes, .hero-scenes::after, .scene {
  position: absolute;
  inset: 0;
}

.hero-scenes {
  --nav-scrim: linear-gradient(180deg, rgb(11 17 26 / 72%) 2.8rem, transparent 8rem); /* taste-skill-ignore: image scrim for navigation contrast */
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.hero-scenes::after {
  background: var(--nav-scrim), linear-gradient(90deg, rgb(11 17 26 / 96%) 4%, rgb(11 17 26 / 79%) 37%, rgb(11 17 26 / 58%) 60%, transparent 79%); /* taste-skill-ignore: image scrim for text contrast */
  content: "";
}

.scene img {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: 64% 54%;
}

.scene-inside {
  visibility: hidden;
}

.hero:has(.cave-gate[open]) .scene-inside {
  visibility: visible;
}

.hero-copy {
  padding-block: 7rem 6rem;
}

.hero h1 {
  font: 900 clamp(3.8rem, 8.8vw, 10.4rem) / 0.86 var(--heading);
  letter-spacing: -0.012em;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.hero-lead {
  margin-top: 1.15rem;
  color: var(--accent);
  font-size: clamp(1.65rem, 3vw, 2.9rem);
  font-weight: 650;
  line-height: 1.1;
}

.hero-description {
  max-inline-size: 34ch;
  margin-top: 0.9rem;
  font-size: clamp(1.125rem, 1.7vw, 1.42rem);
  text-wrap: pretty;
}

.cave-gate {
  width: fit-content;
  max-width: 100%;
  min-block-size: 6.65rem;
  margin-top: clamp(1.45rem, 2.8vw, 2.25rem);
}

summary {
  list-style: none;
  cursor: pointer;
}

summary::-webkit-details-marker {
  display: none;
}

.cave-gate summary {
  display: inline-block;
}

.gate-control {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-block-size: 3.5rem;
  padding: 0.7rem 1.5rem;
  color: var(--ground);
  background: var(--accent);
  font-weight: 750;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 0.62rem), calc(100% - 0.62rem) 100%, 0 100%);
}

.cave-gate summary:hover .gate-control {
  background: var(--ink);
}

.cave-gate summary:focus-visible {
  outline: none;
}

.cave-gate summary:focus-visible .gate-control {
  outline: 3px solid var(--ground);
  outline-offset: -6px;
}

.gate-hotspot {
  /* Match the crop viewport so the marker and the camera share the same aim. */
  position: absolute;
  pointer-events: none;
  inset: 0;
  container-type: size;
}

.gate-emblem {
  position: absolute;
  inset-inline-start: calc(100cqw * var(--portal-x) + var(--plate-width) * (var(--portal-center-x) - var(--portal-x)));
  inset-block-start: calc(100cqh * var(--portal-y) + var(--plate-height) * (var(--portal-center-y) - var(--portal-y)));
  transform: translate(-50%, -50%);
  pointer-events: auto;
  display: grid;
  place-items: center;
  inline-size: 3.25rem;
  block-size: 3.25rem;
  color: var(--ink);
  background: rgb(12 21 31 / 88%);
  border: 2px solid currentColor;
  border-radius: 50%;
}

.cave-gate summary:hover .gate-emblem,
.cave-gate summary:focus-visible .gate-emblem {
  color: var(--ground);
  background: var(--accent);
}

.cave-gate[open] .gate-hotspot {
  display: none;
}

.gate-open-label,
.cave-gate[open] .gate-closed-label {
  display: none;
}

.cave-gate[open] .gate-open-label {
  display: inline;
}

.cave-gate[open] .gate-mark {
  gap: 0.4em;
}

.gate-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1rem;
  margin-top: 0.4rem;
}

.gate-info a, .raid-source, .raid-guide-link {
  display: inline-flex;
  align-items: center;
  min-block-size: 2.75rem;
  gap: 0.45rem;
  text-underline-offset: 0.22em;
}

.gate-info a:hover {
  color: var(--accent);
}

.raid-wall {
  --focus: var(--trail-ink);
  position: relative;
  color-scheme: light;
  background: var(--trail-ground);
  color: var(--trail-ink);
  padding-block: clamp(3.25rem, 6vw, 6.75rem);
}

.raid-wall::before {
  position: absolute;
  pointer-events: none;
  inset: -1.65rem 0 calc(100% - 2px);
  background: var(--trail-ground);
  clip-path: polygon(0 76%, 19% 76%, 36% 4%, 69% 58%, 100% 18%, 100% 100%, 0 100%);
  content: "";
}

.raid-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6.5rem);
}

.trail-art {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  clip-path: polygon(0 0, calc(100% - 2rem) 0, 100% 2rem, 100% 100%, 0 100%);
}

.raid-copy h2 {
  font: 900 clamp(2.75rem, 5vw, 5.2rem) / 0.94 var(--heading);
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.raid-opening {
  margin-top: 0.9rem;
  color: var(--trail-soft);
}

.raid-opening time {
  font-weight: 750;
  white-space: nowrap;
}

#progress-note {
  margin-top: 0.45rem;
}

.raid-briefings {
  display: grid;
  gap: 0.4rem;
  margin-block: 1.25rem 0.4rem;
}

.raid-cut {
  background: var(--trail-panel);
}

.raid-cut summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 0.7rem;
  gap: clamp(0.6rem, 1.5vw, 1.15rem);
  align-items: center;
  min-block-size: 3.5rem;
  padding: 0.72rem 1rem;
}

.raid-cut summary:hover, .raid-cut[open] {
  background: var(--trail-panel-active);
}

.raid-name {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 750;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.raid-size {
  color: var(--trail-soft);
  font-size: 1rem;
  white-space: nowrap;
}

.cut-indicator {
  inline-size: 0.55rem;
  block-size: 0.55rem;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: translateY(-0.12rem) rotate(45deg);
}

.raid-cut[open] .cut-indicator {
  transform: translateY(0.12rem) rotate(225deg);
}

.raid-detail {
  max-width: 62ch;
  padding: 0 1rem 0.9rem;
  text-wrap: pretty;
}

.raid-guide-link {
  margin-inline-end: 1.2rem;
  font-weight: 750;
}

.raid-source:hover {
  text-decoration-thickness: 2px;
}

@media (max-width: 700px) {
  .nav {
    min-block-size: 3.9rem;
  }

  .wordmark {
    font-size: 1.3rem;
  }

  .hero {
    min-block-size: 0;
  }

  .hero-scenes, .gate-hotspot {
    block-size: min(100%, 37rem);
  }

  .hero-scenes::after {
    background: var(--nav-scrim), linear-gradient(180deg, transparent 25%, rgb(23 30 37 / 72%) 53%, var(--ground) 100%); /* taste-skill-ignore: image scrim for text contrast */
  }

  .scene img {
    object-position: 55% 42%;
  }

  .hero-copy {
    padding-block: clamp(16.5rem, 75vw, 22rem) 2.6rem;
  }

  .hero h1 {
    font-size: clamp(2.4rem, 14vw, 6rem);
  }

  .hero-lead {
    margin-top: 0.85rem;
  }

  .hero-description {
    margin-top: 0.6rem;
  }

  .raid-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.65rem;
  }

  .trail-art {
    max-block-size: 16rem;
    aspect-ratio: 3 / 2;
  }

  .raid-copy h2 {
    font-size: clamp(2.35rem, 10.8vw, 3.45rem);
  }
}

@media (forced-colors: active) {
  .hero-content {
    color: CanvasText;
    background: Canvas;
    padding: 0.75rem;
  }

  .cave-gate summary, .raid-cut summary {
    border: 2px solid ButtonText;
  }

  .gate-hotspot {
    display: none;
  }

  .gate-control {
    clip-path: none;
  }

  .cave-gate summary:focus-visible .gate-control {
    outline-color: ButtonText;
  }
}
