:root {
  --ink: #16231b;
  --deep: #08342b;
  --forest: #0d5b41;
  --leaf: #1fa46b;
  --moss: #88b85b;
  --gold: #f0c94a;
  --amber: #b56f2e;
  --sky: #7ed4d6;
  --lake: #256b7e;
  --heart: #d83c4b;
  --paper: #f8edcc;
  --paper-dark: #e3c98d;
  --stone: #d9ddcd;
  --line: #17251d;
  --shadow: 9px 9px 0 rgba(8, 52, 43, 0.22);
  --small-shadow: 4px 4px 0 rgba(8, 52, 43, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 12%, rgba(126, 212, 214, 0.42), transparent 24%),
    radial-gradient(circle at 82% 18%, rgba(240, 201, 74, 0.26), transparent 23%),
    linear-gradient(135deg, #082d29 0%, #0d5b41 34%, #f3e8c7 34.1%, #f8edcc 66%, #dfe6c7 66.1%, #184b3f 100%);
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  content: "";
  background:
    linear-gradient(90deg, rgba(22, 35, 27, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(22, 35, 27, 0.08) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.75));
}

body::after {
  position: fixed;
  z-index: -2;
  right: -8vw;
  bottom: -8vw;
  content: "";
  width: 38vw;
  aspect-ratio: 1;
  border: 2px solid rgba(248, 237, 204, 0.3);
  border-radius: 50%;
  background: rgba(126, 212, 214, 0.28);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

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

#runeCanvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1180px, calc(100% - 32px));
  margin: 1rem auto 0;
  padding: 0.8rem 0.9rem;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 237, 204, 0.9);
  box-shadow: var(--small-shadow);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: max-content;
  color: var(--deep);
  font-weight: 950;
}

.brand-crest {
  position: relative;
  display: grid;
  width: 38px;
  height: 34px;
}

.brand-crest span {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid var(--line);
  background: var(--gold);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  filter: drop-shadow(2px 2px 0 rgba(8, 52, 43, 0.22));
}

.brand-crest span:nth-child(1) {
  left: 10px;
  top: 0;
}

.brand-crest span:nth-child(2) {
  left: 0;
  bottom: 0;
}

.brand-crest span:nth-child(3) {
  right: 0;
  bottom: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.site-nav a,
.button,
.filter-button,
.contact-row a,
.quest-card a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 2px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 900;
  line-height: 1.1;
  box-shadow: var(--small-shadow);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.site-nav a {
  padding: 0.62rem 0.84rem;
  background: rgba(255, 253, 239, 0.86);
  font-size: 0.9rem;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.button:hover,
.button:focus-visible,
.filter-button:hover,
.filter-button:focus-visible,
.contact-row a:hover,
.contact-row a:focus-visible,
.quest-card a:hover,
.quest-card a:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(8, 52, 43, 0.25);
  outline: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 42px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--gold);
  box-shadow: var(--small-shadow);
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 20px;
  height: 2px;
  margin-inline: auto;
  background: var(--line);
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
  gap: clamp(1.25rem, 4vw, 4rem);
  align-items: center;
  min-height: calc(100vh - 86px);
  padding: clamp(2rem, 6vw, 5rem) 0 2rem;
}

.hero-copy,
.map-card,
.profile-strip,
.section-block {
  border: 2px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(181, 111, 46, 0.12) 0 1px, transparent 1px),
    linear-gradient(rgba(181, 111, 46, 0.1) 0 1px, transparent 1px),
    var(--paper);
  background-size: 22px 22px, 22px 22px, auto;
  box-shadow: var(--shadow);
}

.hero-copy {
  position: relative;
  padding: clamp(1.1rem, 4vw, 2.1rem);
}

.hero-copy::before,
.section-block::before {
  position: absolute;
  content: "";
  width: 118px;
  height: 22px;
  border: 2px solid rgba(22, 35, 27, 0.16);
  border-radius: 4px;
  background: rgba(240, 201, 74, 0.72);
  transform: rotate(-2deg);
}

.hero-copy::before {
  top: -13px;
  left: clamp(1rem, 4vw, 2rem);
}

.eyebrow,
.section-heading p,
.quest-type,
.map-label,
.ally-grid p {
  margin: 0;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 10ch;
  margin-bottom: 1rem;
  color: var(--deep);
  font-size: clamp(4rem, 12vw, 9.2rem);
  line-height: 0.88;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-lede {
  max-width: 70ch;
  margin-bottom: 1.25rem;
  color: #4d5543;
  font-size: clamp(1.02rem, 2vw, 1.2rem);
  line-height: 1.68;
}

.heart-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.35rem;
}

.heart-row span {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 34px;
  padding: 0.45rem 0.66rem;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff9e8;
  color: var(--deep);
  font-weight: 900;
  box-shadow: 3px 3px 0 rgba(8, 52, 43, 0.14);
}

.heart-row span::before {
  content: "";
  width: 12px;
  height: 12px;
  background: var(--heart);
  clip-path: polygon(50% 84%, 9% 44%, 10% 20%, 28% 7%, 50% 20%, 72% 7%, 90% 20%, 91% 44%);
}

.hero-actions,
.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button,
.contact-row a {
  padding: 0.78rem 1rem;
}

.button.primary {
  background: var(--gold);
}

.button.secondary {
  background: var(--sky);
}

.map-panel {
  position: relative;
  min-height: 530px;
}

.map-card {
  position: absolute;
  z-index: 2;
  right: 1.2rem;
  bottom: 1.4rem;
  width: min(405px, calc(100% - 2rem));
  padding: 1.35rem;
  transform: rotate(2deg);
}

.compass {
  position: relative;
  display: grid;
  place-items: center;
  width: 160px;
  aspect-ratio: 1;
  margin: 0.8rem auto 1rem;
  border: 2px solid var(--line);
  border-radius: 50%;
  background:
    radial-gradient(circle, #fff7dd 0 28%, transparent 29%),
    conic-gradient(from 45deg, var(--gold), var(--sky), var(--leaf), var(--paper-dark), var(--gold));
  box-shadow: inset 0 0 0 10px rgba(248, 237, 204, 0.72), 5px 5px 0 rgba(8, 52, 43, 0.18);
}

.compass::before {
  content: "DJ";
  display: grid;
  place-items: center;
  width: 72px;
  aspect-ratio: 1;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--deep);
  font-size: 2rem;
  font-weight: 950;
}

.compass span {
  position: absolute;
  width: 18px;
  height: 38px;
  background: var(--deep);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.compass span:nth-child(1) {
  top: 12px;
}

.compass span:nth-child(2) {
  right: 12px;
  transform: rotate(90deg);
}

.compass span:nth-child(3) {
  bottom: 12px;
  transform: rotate(180deg);
}

.compass span:nth-child(4) {
  left: 12px;
  transform: rotate(270deg);
}

.map-card h2 {
  margin-bottom: 1rem;
  color: var(--deep);
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1;
  text-align: center;
}

.map-card dl {
  display: grid;
  gap: 0.65rem;
  margin: 0;
}

.map-card dl div {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.65rem;
  border: 2px solid rgba(22, 35, 27, 0.18);
  border-radius: 8px;
  background: rgba(255, 251, 232, 0.82);
}

.map-card dt {
  color: var(--amber);
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.map-card dd {
  margin: 0;
  color: #4d5543;
  font-weight: 850;
}

.map-routes {
  position: absolute;
  z-index: 1;
  top: 1rem;
  left: 0;
  width: min(360px, 75%);
  height: 270px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 24% 38%, var(--gold) 0 8px, transparent 9px),
    radial-gradient(circle at 66% 24%, var(--sky) 0 8px, transparent 9px),
    radial-gradient(circle at 74% 72%, var(--heart) 0 8px, transparent 9px),
    linear-gradient(135deg, rgba(248, 237, 204, 0.9), rgba(217, 221, 205, 0.86));
  box-shadow: var(--shadow);
  transform: rotate(-6deg);
}

.map-routes::before {
  position: absolute;
  inset: 52px 40px;
  content: "";
  border-top: 4px dashed rgba(8, 52, 43, 0.42);
  border-right: 4px dashed rgba(8, 52, 43, 0.42);
  border-radius: 8px;
  transform: skewY(-8deg);
}

.map-routes span {
  position: absolute;
  border: 2px solid var(--line);
  background: var(--leaf);
}

.map-routes span:nth-child(1) {
  left: 26px;
  bottom: 28px;
  width: 62px;
  height: 28px;
  border-radius: 8px;
}

.map-routes span:nth-child(2) {
  right: 34px;
  top: 36px;
  width: 46px;
  height: 46px;
  transform: rotate(45deg);
}

.map-routes span:nth-child(3) {
  right: 68px;
  bottom: 42px;
  width: 80px;
  height: 26px;
  border-radius: 999px;
  background: var(--sky);
}

.profile-strip,
.section-block {
  margin: 0 0 clamp(2rem, 5vw, 4.5rem);
}

.profile-strip {
  padding: clamp(1.25rem, 3vw, 2rem);
}

.profile-strip p {
  max-width: 920px;
  margin: 0 auto;
  color: #4d5543;
  font-size: clamp(1.12rem, 2.2vw, 1.55rem);
  font-weight: 820;
  line-height: 1.55;
  text-align: center;
}

.section-block {
  position: relative;
  padding: clamp(1.2rem, 4vw, 2.4rem);
}

.section-block::before {
  top: -13px;
  right: clamp(1rem, 5vw, 4rem);
  background: rgba(126, 212, 214, 0.72);
  transform: rotate(3deg);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section-heading h2 {
  margin: 0;
  color: var(--deep);
  font-size: clamp(2rem, 6vw, 4.3rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.filter-button {
  padding: 0.58rem 0.9rem;
  background: #fff9e8;
  cursor: pointer;
}

.filter-button.is-active {
  background: var(--gold);
}

.quest-grid,
.gear-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.quest-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 1rem;
  border: 2px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(181, 111, 46, 0.09) 0 1px, transparent 1px),
    #fff9e8;
  background-size: 18px 18px;
  box-shadow: var(--small-shadow);
  transition: opacity 160ms ease, transform 160ms ease;
}

.quest-card:nth-child(2n) {
  background:
    linear-gradient(90deg, rgba(37, 107, 126, 0.09) 0 1px, transparent 1px),
    #f4fbf1;
  background-size: 18px 18px;
}

.quest-card:nth-child(3n) {
  background:
    linear-gradient(90deg, rgba(31, 164, 107, 0.09) 0 1px, transparent 1px),
    #f4fdff;
  background-size: 18px 18px;
}

.quest-card.is-hidden {
  display: none;
}

.quest-card:hover {
  transform: translateY(-4px);
}

.quest-rank {
  position: absolute;
  top: -14px;
  right: 16px;
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 34px;
  padding: 0 0.5rem;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--gold);
  color: var(--deep);
  font-size: 0.8rem;
  font-weight: 950;
  box-shadow: 3px 3px 0 rgba(8, 52, 43, 0.16);
}

.quest-card h3 {
  margin: 0.35rem 0 0.7rem;
  color: var(--deep);
  font-size: 1.45rem;
  line-height: 1.05;
}

.quest-card p:not(.quest-type) {
  color: #4d5543;
  line-height: 1.58;
}

.quest-card ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0;
  margin: auto 0 1rem;
  list-style: none;
}

.quest-card li {
  padding: 0.36rem 0.52rem;
  border: 2px solid rgba(22, 35, 27, 0.18);
  border-radius: 8px;
  background: rgba(240, 201, 74, 0.5);
  color: var(--deep);
  font-size: 0.78rem;
  font-weight: 850;
}

.quest-card a {
  align-self: flex-start;
  padding: 0.62rem 0.72rem;
  background: var(--leaf);
  color: #fffef0;
}

.gear-section,
.allies-section {
  background:
    linear-gradient(rgba(248, 237, 204, 0.9), rgba(248, 237, 204, 0.9)),
    linear-gradient(135deg, var(--forest), var(--sky));
}

.gear-grid article,
.ally-grid article {
  padding: 1rem;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff9e8;
  box-shadow: var(--small-shadow);
}

.gear-icon {
  position: relative;
  display: block;
  width: 56px;
  height: 56px;
  margin-bottom: 0.85rem;
  border: 2px solid var(--line);
  border-radius: 8px;
  box-shadow: 3px 3px 0 rgba(8, 52, 43, 0.14);
}

.gear-icon.blade {
  background:
    linear-gradient(45deg, transparent 0 38%, #e7ece6 38% 54%, transparent 54%),
    var(--sky);
}

.gear-icon.shield {
  background:
    radial-gradient(circle at 50% 30%, var(--gold) 0 11px, transparent 12px),
    linear-gradient(135deg, var(--deep), var(--leaf));
}

.gear-icon.gem {
  background:
    linear-gradient(135deg, transparent 0 26%, rgba(255, 255, 255, 0.62) 26% 38%, transparent 38%),
    var(--gold);
  clip-path: polygon(50% 0, 100% 34%, 84% 100%, 16% 100%, 0 34%);
}

.gear-icon.boots {
  background:
    radial-gradient(circle at 18px 36px, var(--amber) 0 12px, transparent 13px),
    radial-gradient(circle at 37px 32px, var(--amber) 0 12px, transparent 13px),
    var(--moss);
}

.gear-grid h3,
.ally-grid h3 {
  margin-bottom: 0.55rem;
  color: var(--deep);
  font-size: 1.25rem;
}

.gear-grid p,
.ally-grid span,
.timeline p,
.contact-section > p {
  color: #4d5543;
  line-height: 1.6;
}

.timeline {
  display: grid;
  gap: 0.8rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 105px 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1rem;
  border: 2px solid rgba(22, 35, 27, 0.18);
  border-radius: 8px;
  background: #fff9e8;
}

.timeline span {
  display: inline-flex;
  justify-content: center;
  padding: 0.5rem;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--gold);
  color: var(--deep);
  font-weight: 950;
}

.timeline p {
  margin: 0;
}

.ally-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.contact-section > p {
  max-width: 780px;
  margin-bottom: 1.1rem;
}

.contact-row a {
  background: #fff9e8;
}

.contact-row a:nth-child(1) {
  background: var(--gold);
}

.contact-row a:nth-child(2) {
  background: var(--sky);
}

.contact-row a:nth-child(3) {
  background: var(--moss);
}

.contact-row a:nth-child(4) {
  background: var(--leaf);
  color: #fffef0;
}

.contact-row a:nth-child(5) {
  background: var(--lake);
  color: #fffef0;
}

@media (max-width: 1040px) {
  .hero,
  .quest-grid,
  .gear-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-copy {
    grid-column: 1 / -1;
  }

  .map-panel {
    grid-column: 1 / -1;
    min-height: 480px;
  }
}

@media (max-width: 760px) {
  body::after {
    display: none;
  }

  .site-header,
  main {
    width: min(100% - 20px, 1180px);
  }

  .site-header {
    flex-wrap: wrap;
    margin-top: 0.6rem;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    display: none;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }

  .site-nav.is-open {
    display: grid;
  }

  .site-nav a {
    min-width: 0;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 2.2rem;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(3.1rem, 20vw, 5.2rem);
  }

  .map-panel {
    min-height: 550px;
  }

  .map-routes {
    top: 0;
    left: 0;
    width: calc(100% - 2rem);
  }

  .map-card {
    right: 0;
    bottom: 0;
    width: calc(100% - 0.3rem);
  }

  .section-heading {
    display: block;
  }

  .section-heading p {
    margin-bottom: 0.4rem;
  }

  .quest-grid,
  .gear-grid,
  .ally-grid {
    grid-template-columns: 1fr;
  }

  .timeline li {
    grid-template-columns: 1fr;
  }

  .contact-row a,
  .button {
    flex: 1 1 140px;
  }
}

@media (max-width: 430px) {
  .hero-copy,
  .section-block,
  .profile-strip {
    padding: 1rem;
  }

  .brand {
    gap: 0.45rem;
    font-size: 0.95rem;
  }

  .map-panel {
    min-height: 585px;
  }

  .map-card dl div {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .filter-button {
    flex: 1 1 120px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
