/* Dungeon Academy free sampler — cinematic quest arrival, v151. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(201, 164, 74, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 164, 74, 0.08) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 50% 34%, black, transparent 74%);
}

.topbar {
  position: relative;
  z-index: 5;
  min-height: 4.6rem;
  border-bottom-color: rgba(201, 164, 74, 0.22);
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.24);
}

.brand-mark {
  position: relative;
  overflow: hidden;
  border-color: rgba(242, 201, 76, 0.68);
  background: radial-gradient(circle, rgba(242, 201, 76, 0.16), rgba(8, 6, 3, 0.78));
  box-shadow: inset 0 0 1rem rgba(242, 201, 76, 0.1), 0 0 1.5rem rgba(242, 201, 76, 0.08);
}

.brand-copy {
  display: grid;
  gap: 0.05rem;
}

.brand-copy > span {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-copy small {
  color: var(--paper-mute);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 0.52rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.toplinks a {
  text-decoration-color: transparent;
  transition: color 180ms ease, text-decoration-color 180ms ease;
}

.toplinks a:hover,
.toplinks a:focus-visible {
  color: var(--paper);
  text-decoration-color: var(--gold);
}

.toplinks .nav-join {
  min-height: 2.35rem;
  border: 1px solid rgba(201, 164, 74, 0.42);
  padding: 0.35rem 0.7rem;
  color: var(--gold-soft);
  text-decoration: none;
}

.hero::before {
  background-image:
    linear-gradient(90deg, rgba(8, 6, 3, 0.98) 0%, rgba(8, 6, 3, 0.88) 37%, rgba(8, 6, 3, 0.18) 70%, rgba(8, 6, 3, 0.54) 100%),
    url("/stem-rover-lab/assets/dungeon-academy-first-quest-ai.webp?v=academy-sampler-v151");
  background-position: 58% center;
}

.hero::after {
  background:
    radial-gradient(circle at 74% 42%, rgba(158, 232, 255, 0.12), transparent 24rem),
    radial-gradient(ellipse at 26% 38%, rgba(242, 201, 76, 0.11), transparent 30rem),
    linear-gradient(180deg, rgba(8, 6, 3, 0.08), rgba(8, 6, 3, 0.97));
}

.hero-inner {
  width: min(1280px, calc(100% - 2rem));
  min-height: min(810px, calc(100dvh - 4.6rem));
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.52fr);
  align-items: center;
  padding-top: clamp(2rem, 5vw, 4rem);
}

.hero-copy,
.quest-dossier {
  position: relative;
  border: 1px solid rgba(201, 164, 74, 0.32);
  box-shadow: inset 0 1px rgba(255, 246, 215, 0.08), 0 2rem 5rem rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(8px);
}

.hero-copy {
  max-width: 680px;
  padding: clamp(1.35rem, 3vw, 2.2rem);
  background:
    linear-gradient(135deg, rgba(17, 12, 7, 0.94), rgba(8, 6, 3, 0.7)),
    radial-gradient(circle at 18% 0%, rgba(242, 201, 76, 0.12), transparent 23rem);
}

.hero-copy::before,
.hero-copy::after,
.quest-dossier::before,
.quest-dossier::after {
  content: "";
  position: absolute;
  width: 2rem;
  height: 2rem;
  pointer-events: none;
}

.hero-copy::before,
.quest-dossier::before {
  left: -1px;
  top: -1px;
  border-left: 2px solid var(--gold);
  border-top: 2px solid var(--gold);
}

.hero-copy::after,
.quest-dossier::after {
  right: -1px;
  bottom: -1px;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.quest-seal {
  display: grid;
  width: 2.55rem;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(242, 201, 76, 0.62);
  color: #fff0b5;
  background: rgba(56, 34, 8, 0.72);
  box-shadow: inset 0 0 1rem rgba(242, 201, 76, 0.14), 0 0 1.4rem rgba(242, 201, 76, 0.12);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 900;
}

.hero h1 {
  margin-top: 1.1rem;
  color: #fff7df;
  font-size: clamp(2.8rem, 5.3vw, 4.25rem);
  letter-spacing: 0.025em;
  text-shadow: 0 0.25rem 2rem rgba(0, 0, 0, 0.6);
}

.hero h1 span {
  display: block;
  color: var(--gold-soft);
  font-size: 0.28em;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.hero .lead {
  max-width: 31ch;
  color: #fff7df;
  font-size: clamp(1.02rem, 1.7vw, 1.23rem);
  line-height: 1.48;
}

.hero .sublead {
  max-width: 60ch;
  margin-top: 1.1rem;
  line-height: 1.55;
}

.button.primary-quest {
  border-color: #f2c94c;
  background: linear-gradient(180deg, #f7dc78, #c18a21);
  color: #1a1104;
  box-shadow: 0 5px 0 #6e4611, 0 1rem 2rem rgba(0, 0, 0, 0.3), 0 0 2rem rgba(242, 201, 76, 0.12);
}

.button.primary-quest:hover {
  background: linear-gradient(180deg, #ffea96, #d49c2b);
  transform: translateY(-2px);
  box-shadow: 0 7px 0 #6e4611, 0 1.25rem 2.4rem rgba(0, 0, 0, 0.34), 0 0 2.4rem rgba(242, 201, 76, 0.2);
}

.hero-trust {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 1.55rem 0 0;
  padding: 0;
  border-top: 1px solid rgba(201, 164, 74, 0.2);
  list-style: none;
}

.hero-trust li {
  padding: 0.8rem 0.7rem 0 0;
  color: var(--paper-dim);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 0.62rem;
  line-height: 1.45;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-trust b {
  display: block;
  color: var(--paper);
  font-size: 0.7rem;
}

.quest-dossier {
  align-self: center;
  padding: 1.25rem;
  background: rgba(8, 6, 3, 0.87);
  box-shadow: inset 0 0 2rem rgba(242, 201, 76, 0.04), 0 2rem 5rem rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(10px);
}

.dossier-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(201, 164, 74, 0.2);
  padding-bottom: 0.8rem;
}

.dossier-head span,
.dossier-head b {
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dossier-head span { color: var(--paper-mute); }
.dossier-head b { color: var(--aqua); }

.dossier-equation {
  display: grid;
  grid-template-columns: repeat(5, auto);
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
  margin: 1.1rem 0;
  color: var(--paper-mute);
  font-family: "JetBrains Mono", Consolas, monospace;
}

.dossier-equation strong {
  display: grid;
  min-width: 3.1rem;
  min-height: 3.1rem;
  place-items: center;
  border: 1px solid rgba(201, 164, 74, 0.38);
  color: #fff3c4;
  background: rgba(201, 164, 74, 0.08);
  font-size: 1.2rem;
}

.dossier-equation strong:last-child {
  border-color: rgba(158, 232, 255, 0.5);
  color: var(--aqua);
  background: rgba(158, 232, 255, 0.08);
  box-shadow: 0 0 1.5rem rgba(158, 232, 255, 0.08);
}

.dossier-steps {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dossier-steps li {
  display: grid;
  grid-template-columns: 1.8rem 1fr;
  gap: 0.65rem;
  align-items: center;
  color: var(--paper-dim);
  font-size: 0.78rem;
}

.dossier-steps span {
  display: grid;
  width: 1.8rem;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(201, 164, 74, 0.34);
  color: var(--gold-soft);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 0.58rem;
}

.dossier-reward {
  margin-top: 1rem;
  border-left: 2px solid var(--aqua);
  background: rgba(5, 17, 21, 0.72);
  padding: 0.7rem 0.8rem;
  color: #cdeef6;
  font-size: 0.72rem;
  line-height: 1.45;
}

.main {
  width: min(1100px, calc(100% - 2rem));
  padding-top: clamp(2.5rem, 5vw, 4.5rem);
}

.lesson-intro {
  position: relative;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid rgba(201, 164, 74, 0.28);
  background: linear-gradient(135deg, rgba(28, 18, 8, 0.94), rgba(8, 7, 5, 0.9));
  padding: 1rem;
  box-shadow: inset 0 1px rgba(255, 246, 215, 0.06), 0 1.5rem 3.5rem rgba(0, 0, 0, 0.2);
}

.mentor-dispatch {
  display: grid;
  grid-template-columns: 6.6rem minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
}

.mentor-portrait {
  position: relative;
  width: 6.6rem;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(201, 164, 74, 0.42);
  background: var(--ink);
  box-shadow: inset 0 0 1.5rem rgba(242, 201, 76, 0.1);
}

.mentor-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
}

.lesson-intro h2 { color: #fff7df; }

.lesson-command {
  display: grid;
  align-content: center;
  min-width: 12rem;
  border-left: 1px solid rgba(201, 164, 74, 0.2);
  padding-left: 1rem;
}

.lesson-command span,
.lesson-command b {
  font-family: "JetBrains Mono", Consolas, monospace;
}

.lesson-command span {
  color: var(--paper-mute);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lesson-command b {
  margin: 0.25rem 0 0.7rem;
  color: var(--aqua);
  font-size: 0.72rem;
  line-height: 1.4;
}

.stage-rail {
  position: relative;
  margin-top: 1rem;
  border-color: rgba(201, 164, 74, 0.3);
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.18);
}

.stage-pill {
  min-height: 3.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stage-pill.active {
  background: linear-gradient(180deg, #f2d777, #b87c18);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.24);
}

.stage-pill.complete .stage-number::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #102e26;
  color: #bfffd7;
}

.stage-number { position: relative; }

.panel {
  min-height: 37rem;
  border-color: rgba(201, 164, 74, 0.36);
  box-shadow: inset 0 1px rgba(255, 246, 215, 0.06), 0 2rem 5rem rgba(0, 0, 0, 0.34);
}

.panel-challenge-seal {
  position: absolute;
  right: clamp(1rem, 5vw, 3rem);
  top: 50%;
  width: clamp(8rem, 18vw, 11rem);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(158, 232, 255, 0.38);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(10, 36, 44, 0.92), rgba(5, 10, 12, 0.72) 58%, transparent 60%);
  color: var(--aqua);
  box-shadow: 0 0 3rem rgba(158, 232, 255, 0.12), inset 0 0 2rem rgba(158, 232, 255, 0.09);
  transform: translateY(-35%);
  pointer-events: none;
}

.panel-challenge-seal::before,
.panel-challenge-seal::after {
  content: "";
  position: absolute;
  inset: 10%;
  border: 1px solid rgba(158, 232, 255, 0.22);
  border-radius: 50%;
  transform: rotate(45deg);
}

.panel-challenge-seal::after {
  inset: 22%;
  border-radius: 0;
}

.panel-challenge-seal div {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
}

.panel-challenge-seal span,
.panel-challenge-seal small {
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 0.5rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.panel-challenge-seal strong {
  color: #e9fbff;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  line-height: 1;
  text-shadow: 0 0 1.5rem rgba(158, 232, 255, 0.36);
}

[data-panel="0"] .panel-inner { width: min(760px, calc(100% - 12rem)); }

.footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  border-top-color: rgba(201, 164, 74, 0.24);
}

.footer-links { display: flex; gap: 1rem; }
.footer-links a { color: var(--gold-soft); text-underline-offset: 0.25em; }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; min-height: auto; }
  .hero-copy { max-width: 700px; }
  .quest-dossier { width: min(520px, 100%); }
  .lesson-intro { flex-direction: column; }
  .lesson-command {
    border-left: 0;
    border-top: 1px solid rgba(201, 164, 74, 0.2);
    padding: 0.9rem 0 0;
  }
}

@media (max-width: 720px) {
  .topbar { position: relative; min-height: auto; }
  .brand-copy small { display: none; }
  .toplinks { width: 100%; gap: 0.55rem 0.85rem; }
  .toplinks .nav-join { margin-left: auto; }
  .hero::before {
    background-image:
      linear-gradient(180deg, rgba(8, 6, 3, 0.25), rgba(8, 6, 3, 0.82) 36%, rgba(8, 6, 3, 0.99) 72%),
      url("/stem-rover-lab/assets/dungeon-academy-first-quest-ai.webp?v=academy-sampler-v151");
    background-position: 61% top;
    background-size: auto 48%;
    background-repeat: no-repeat;
  }
  .hero-inner { width: min(100% - 1rem, 680px); padding: 12.5rem 0 2rem; gap: 0.75rem; }
  .hero-copy { padding: 1.15rem; backdrop-filter: blur(4px); }
  .hero h1 { font-size: clamp(2.65rem, 15vw, 4rem); }
  .hero .lead { font-size: 1rem; }
  .hero-trust { grid-template-columns: 1fr; }
  .hero-trust li {
    display: grid;
    grid-template-columns: 6.5rem 1fr;
    gap: 0.5rem;
    padding-top: 0.55rem;
  }
  .quest-dossier { padding: 1rem; }
  .mentor-dispatch { grid-template-columns: 4.6rem minmax(0, 1fr); }
  .mentor-portrait { width: 4.6rem; }
  .lesson-intro h2 { font-size: 1.45rem; }
  .stage-pill { min-height: 3.6rem; }
  .panel { min-height: 35rem; }
  [data-panel="0"] .panel-inner { width: 100%; }
  .panel-challenge-seal {
    position: relative;
    right: auto;
    top: auto;
    width: 6.5rem;
    margin: 0 0 1rem auto;
    transform: none;
  }
  .footer { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .button.primary-quest:hover { transform: none; }
}
