:root {
  --ink: #152117;
  --cream: #f5efdc;
  --paper: #fffaf0;
  --green: #527a45;
  --green-dark: #29482d;
  --gold: #dc9f3e;
  --blue: #5b91a3;
  --shadow: rgba(27, 42, 29, .18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #152117;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .12;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 244, 210, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 244, 210, .07) 1px, transparent 1px);
  background-size: 5px 5px;
}

.portal-button {
  display: inline-block;
  padding: 12px 18px;
  border: 2px solid rgba(255, 250, 240, .4);
  background: rgba(15, 25, 17, .68);
  color: #fffaf0;
  text-decoration: none;
  font: 800 .73rem/1 "Courier New", monospace;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  backdrop-filter: blur(9px);
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.portal-button:hover {
  transform: translateY(-2px);
  background: #29482d;
  box-shadow: 3px 3px 0 #dc9f3e;
}

.scene {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  pointer-events: none;
  background: #172116;
}

.scene-image {
  position: absolute;
  inset: -5%;
  background: url("assets/loomwood-background.png") center center / cover no-repeat;
  transform: translate3d(0, var(--scene-shift, 0px), 0) scale(1.05);
  filter: blur(var(--scene-blur, 0px));
  will-change: transform, filter;
}

.scene-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(9, 14, 9, .34) 0%, rgba(9, 14, 9, .08) 35%, rgba(9, 14, 9, .46) 75%, rgba(9, 14, 9, .76) 100%),
    radial-gradient(circle at center 28%, transparent 20%, rgba(10, 17, 11, .28) 100%);
}

.particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  left: var(--x);
  bottom: -20px;
  width: var(--size);
  height: var(--size);
  opacity: 0;
  border-radius: 50%;
  background: #ffd784;
  box-shadow: 0 0 8px 2px rgba(255, 188, 77, .55);
  animation: particle-drift var(--duration) linear var(--delay) infinite;
}

.site-header {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--paper);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--paper);
  text-decoration: none;
  font: 800 .73rem/1 "Courier New", monospace;
  letter-spacing: 1.4px;
  padding: 10px 14px;
  border: 2px solid rgba(255, 250, 240, .4);
  background: rgba(15, 25, 17, .68);
  backdrop-filter: blur(9px);
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.brand:hover,
.brand:focus-visible {
  transform: translateY(-2px);
  background: #5865f2;
  box-shadow: 3px 3px 0 var(--gold);
  outline: none;
}

.discord-icon {
  width: 22px;
  height: 22px;
  fill: currentColor;
  flex: 0 0 auto;
}

.copy-ip {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 2px solid rgba(255, 250, 240, .4);
  padding: 10px 13px;
  background: rgba(15, 25, 17, .68);
  color: var(--paper);
  cursor: pointer;
  font: 700 .72rem/1 "Courier New", monospace;
  letter-spacing: .5px;
  transition: .2s ease;
  backdrop-filter: blur(9px);
}

.copy-ip:hover {
  transform: translateY(-2px);
  color: var(--ink);
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--gold);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #51a84f;
  box-shadow: 0 0 0 3px rgba(81, 168, 79, .18);
}

.copy-hint {
  margin-left: 5px;
  padding-left: 10px;
  border-left: 1px solid rgba(21, 33, 23, .25);
  opacity: .55;
}

.hero {
  min-height: 500px;
  padding: 80px 20px 110px;
  text-align: center;
  color: var(--paper);
  text-shadow: 0 2px 15px rgba(0, 0, 0, .8);
}

.eyebrow,
.section-heading p,
.card-type,
.dialog-kicker {
  font: 800 .67rem/1.4 "Courier New", monospace;
  letter-spacing: 2.5px;
}

.eyebrow {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
  color: #ffe1a0;
}

.eyebrow span {
  width: 28px;
  height: 2px;
  background: #ffe1a0;
}

h1 {
  margin: 0;
  font: 900 clamp(3.1rem, 8vw, 7rem)/.82 Impact, "Arial Black", sans-serif;
  letter-spacing: -1px;
  text-transform: uppercase;
  text-shadow: 4px 4px 0 rgba(255, 250, 240, .55);
}

h1 em {
  color: var(--green);
  font-style: normal;
  -webkit-text-stroke: 2px var(--ink);
  text-shadow: 4px 4px 0 var(--gold);
}

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

.hero-logo {
  display: block;
  width: min(700px, 92vw);
  height: auto;
  margin: -10px auto 0;
  filter: drop-shadow(0 14px 12px rgba(21, 33, 23, .24));
  animation: logo-arrive .7s ease-out both;
}

.intro {
  width: min(590px, 100%);
  margin: 20px auto 33px;
  padding: 10px 16px;
  border-radius: 4px;
  background: rgba(12, 21, 14, .42);
  backdrop-filter: blur(5px);
  font: 500 1.08rem/1.7 Georgia, serif;
}

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--paper);
  font: 800 .67rem/1 "Courier New", monospace;
  letter-spacing: 2px;
  text-decoration: none;
}

.scroll-cue span {
  font-size: 1rem;
  animation: bounce 1.5s infinite;
}

.paths {
  width: min(1320px, calc(100% - 40px));
  margin: 0 auto 80px;
  padding: 58px 20px 70px;
  color: var(--paper);
  text-align: center;
  text-shadow: 0 3px 18px rgba(0, 0, 0, .9);
}

.section-heading {
  margin-bottom: 20px;
}

.section-heading p {
  margin: 0 0 10px;
  color: #ffe1a0;
}

.section-heading h2 {
  margin: 0;
  font: 700 clamp(1.8rem, 4vw, 2.8rem)/1 Georgia, serif;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: clamp(8px, 2vw, 32px);
}

.path-card {
  position: relative;
  padding: 10px 4px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--paper);
  text-decoration: none;
  opacity: 0;
  transform: translateY(20px);
  animation: rise .6s var(--delay) forwards;
  transition: transform .3s ease, filter .3s ease;
}

.path-card:hover,
.path-card:focus-visible {
  transform: translateY(-10px);
  filter: brightness(1.08);
  outline: none;
}

.staff { --accent: var(--green); }
.media { --accent: var(--gold); }
.vote { --accent: var(--blue); }
.store { --accent: #a96c43; }

.art-wrap {
  display: block;
  position: relative;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1;
  margin-bottom: -16px;
  animation: art-float 4s ease-in-out var(--delay) infinite;
  filter: drop-shadow(0 18px 14px rgba(0, 0, 0, .44));
  transition: filter .3s ease;
}

.art-wrap::after {
  content: "";
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: 9%;
  height: 9%;
  z-index: -1;
  border-radius: 50%;
  background: rgba(0, 0, 0, .45);
  filter: blur(13px);
  transition: transform .3s ease, opacity .3s ease;
}

.art-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.path-card:hover .art-wrap {
  filter: drop-shadow(0 24px 18px rgba(0, 0, 0, .52)) drop-shadow(0 0 14px rgba(255, 211, 119, .24));
}

.path-card:hover .art-wrap::after {
  opacity: .6;
  transform: scale(.8);
}

.card-type {
  margin-bottom: 7px;
  color: #ffe1a0;
}

.path-card strong {
  font: 900 clamp(1.45rem, 2.3vw, 2.2rem)/1 Impact, "Arial Black", sans-serif;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.card-action {
  margin-top: 12px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 225, 160, .45);
  background: rgba(10, 17, 11, .5);
  backdrop-filter: blur(6px);
  font: 900 .73rem/1 "Courier New", monospace;
  letter-spacing: 1.5px;
  opacity: .82;
  transition: background .2s ease, opacity .2s ease;
}

.card-action b {
  margin-left: 8px;
  font-size: 1.1rem;
  transition: transform .2s ease;
}

.path-card:hover .card-action {
  opacity: 1;
  background: rgba(41, 72, 45, .82);
}

.path-card:hover .card-action b {
  display: inline-block;
  transform: translateX(4px);
}

footer {
  padding: 25px max(20px, calc((100% - 1180px) / 2));
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--cream);
  background: rgba(10, 17, 11, .88);
  backdrop-filter: blur(10px);
  font: 700 .65rem/1.4 "Courier New", monospace;
  letter-spacing: 1px;
}

.footer-motto {
  color: #a8c59c;
}

.link-dialog {
  width: min(430px, calc(100% - 32px));
  padding: 38px;
  color: var(--ink);
  border: 3px solid var(--ink);
  background: var(--paper);
  box-shadow: 10px 10px 0 var(--ink);
}

.link-dialog::backdrop {
  background: rgba(21, 33, 23, .7);
  backdrop-filter: blur(3px);
}

.link-dialog h2 {
  margin: 8px 0 14px;
  font: 900 2.2rem/1 Impact, "Arial Black", sans-serif;
  text-transform: uppercase;
}

.link-dialog p:not(.dialog-kicker) {
  font: 500 1rem/1.6 Georgia, serif;
}

.dialog-kicker {
  margin: 0;
  color: var(--green);
}

.dialog-close {
  position: absolute;
  top: 10px;
  right: 14px;
  border: 0;
  background: transparent;
  font-size: 1.8rem;
  cursor: pointer;
}

.dialog-button {
  border: 2px solid var(--ink);
  padding: 12px 20px;
  color: var(--cream);
  background: var(--green-dark);
  box-shadow: 3px 3px 0 var(--gold);
  font: 800 .73rem/1 "Courier New", monospace;
  letter-spacing: 1px;
  cursor: pointer;
}

@keyframes bounce {
  50% { transform: translateY(5px); }
}

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes logo-arrive {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes particle-drift {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0);
  }
  15% {
    opacity: var(--opacity);
  }
  85% {
    opacity: calc(var(--opacity) * .75);
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift), -110vh, 0);
  }
}

@keyframes art-float {
  0%, 100% { transform: translateY(0) rotate(-.4deg); }
  50% { transform: translateY(-9px) rotate(.4deg); }
}

@media (max-width: 820px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 26px;
  }

  .section-heading {
    display: block;
  }

  .section-heading p {
    margin-bottom: 12px;
  }
}

@media (max-width: 540px) {
  .site-header {
    width: calc(100% - 28px);
  }

  .copy-hint {
    display: none;
  }

  .copy-label {
    font-size: .61rem;
  }

  .hero {
    padding-top: 70px;
  }

  .hero-logo {
    width: min(530px, 100%);
  }

  .paths {
    width: calc(100% - 28px);
    padding: 42px 8px 54px;
  }

  .card-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .path-card {
    width: min(340px, 100%);
    margin: 0 auto;
    padding: 6px 10px 18px;
  }

  .art-wrap {
    max-width: 280px;
  }

  footer {
    flex-direction: column;
  }
}

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

  .scene-image {
    transform: scale(1.05);
    filter: none;
  }

  .particles {
    display: none;
  }
}
