/* The Dungeons landing page (/play for signed-out visitors, src/pages/dungeons.ts). Only tokens from
   tokens.css; cut corners through .dm-cut and its knobs, never a border or shadow on a cut shape
   (docs/design-system.md, "the border problem"). */

.dl-features,
.dl-steps,
.dl-plans,
.dl-plan ul,
.dl-links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.dl-center {
  text-align: center;
  justify-content: center;
}

/* ---------- hero: a dark panel with the words and a framed screenshot of the demo ---------- */
.dl-hero {
  --dm-cut: var(--dm-cut-xl);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--dm-space-6);
  align-items: center;
  margin: 0 0 var(--dm-space-7);
  padding: var(--dm-space-6) var(--dm-space-5);
  color: var(--dm-on-bar);
  background:
    radial-gradient(ellipse at 85% 20%, rgba(253, 185, 49, 0.22), transparent 55%),
    radial-gradient(ellipse at 10% 100%, rgba(125, 211, 176, 0.18), transparent 60%),
    linear-gradient(160deg, var(--dm-bar-raised), var(--dm-bar) 70%);
}
@media (min-width: 60rem) {
  .dl-hero {
    grid-template-columns: 0.9fr 1.1fr;
    padding: var(--dm-space-7) var(--dm-space-6);
  }
}
.dl-hero h1 {
  color: var(--dm-on-bar);
  font-size: clamp(2.1rem, 1.4rem + 2.6vw, 3.3rem);
  line-height: 1.08;
  margin: var(--dm-space-2) 0 var(--dm-space-4);
}
.dl-kicker {
  margin: 0;
  color: var(--dm-gold-light);
  font-family: var(--dm-font-display);
  font-weight: var(--dm-weight-strong);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.95rem;
}
.dl-lead {
  font-size: 1.2rem;
  max-width: 34rem;
  margin: 0;
}
.dl-small {
  margin: var(--dm-space-3) 0 0;
  color: var(--dm-on-bar-muted);
  font-size: 0.95rem;
}
.dl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--dm-space-3);
  margin: var(--dm-space-5) 0 0;
}
.dl-hero a:not(.btn),
.dl-band a:not(.btn),
.dl-final a:not(.btn) {
  color: var(--dm-gold-light);
}
.dl-hero .btn.secondary,
.dl-band .btn.secondary,
.dl-final .btn.secondary {
  --dm-edge: var(--dm-on-bar-muted);
  color: var(--dm-on-bar);
}
.dl-hero .btn.secondary:hover,
.dl-final .btn.secondary:hover {
  --dm-fill: var(--dm-bar-raised);
  --dm-edge: var(--dm-on-bar);
}

/* the big gold "Play the demo" button with a play triangle */
.btn.dl-play {
  --dm-fill: var(--dm-gold);
  --dm-edge: var(--dm-gold-light);
  --dm-focus-ring: var(--dm-bar);
  color: var(--dm-on-gold);
  font-family: var(--dm-font-display);
  font-size: 1.25rem;
  min-height: 3.4rem;
  padding: 0.7rem 1.8rem 0.7rem 1.5rem;
  gap: 0.7rem;
}
.btn.dl-play:hover {
  --dm-fill: var(--dm-gold-light);
}
.btn.dl-play-large {
  font-size: 1.4rem;
  min-height: 3.8rem;
  padding: 0.8rem 2.2rem 0.8rem 1.8rem;
}
.dl-play-hex {
  width: 0.85em;
  height: 1em;
  background: currentColor;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

/* the screenshot: a gold cut frame, the picture clipped just inside it, a play hexagon on top */
.dl-shot {
  position: relative;
  display: block;
  --dm-cut: var(--dm-cut-lg);
  --dm-edge: var(--dm-gold);
  --dm-edge-w: 3px;
  --dm-fill: var(--dm-bar);
  --dm-focus-ring: var(--dm-gold-light);
  padding: 0;
  transition: transform 0.25s ease;
}
.dl-shot img {
  display: block;
  width: 100%;
  height: auto;
  --_ci: max(0px, calc(var(--dm-cut) - var(--dm-edge-w) * 0.586));
  clip-path: polygon(
    var(--_ci) 0,
    calc(100% - var(--_ci)) 0,
    100% var(--_ci),
    100% calc(100% - var(--_ci)),
    calc(100% - var(--_ci)) 100%,
    var(--_ci) 100%,
    0 calc(100% - var(--_ci)),
    0 var(--_ci)
  );
}
.dl-shot-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5.2rem;
  height: 6rem;
  margin: -3rem 0 0 -2.6rem;
  clip-path: var(--dm-hex-clip-pointy);
  background: var(--dm-gold);
  opacity: 0.94;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}
.dl-shot-play::after {
  content: '';
  position: absolute;
  left: 38%;
  top: 33%;
  width: 32%;
  height: 34%;
  background: var(--dm-on-gold);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.dl-shot:hover,
.dl-shot:focus-visible {
  --dm-edge: var(--dm-gold-light);
  transform: translateY(-4px);
}
.dl-shot:hover .dl-shot-play,
.dl-shot:focus-visible .dl-shot-play {
  opacity: 1;
  transform: scale(1.12);
}
/* the inner clip covers the frame's focus ring: draw a gold ring on the picture instead */
.dl-shot:focus-visible img {
  filter: brightness(1.1);
}

/* ---------- sections ---------- */
.dl-section {
  margin: 0 0 var(--dm-space-7);
}
.dl-section > h2,
.dl-band h2,
.dl-final h2 {
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem);
  line-height: 1.15;
  margin: 0 0 var(--dm-space-5);
}
.dl-section > h2 {
  text-align: center;
}

.dl-features {
  display: grid;
  gap: var(--dm-space-4);
  grid-template-columns: 1fr;
}
@media (min-width: 40rem) {
  .dl-features {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 64rem) {
  .dl-features {
    grid-template-columns: repeat(4, 1fr);
  }
}
.dl-feature,
.dl-step,
.dl-plan {
  --dm-cut: var(--dm-cut-lg);
  --dm-fill: var(--dm-surface-raised);
  --dm-edge: var(--dm-border);
  padding: var(--dm-space-5);
}
.dl-feature h3,
.dl-step h3,
.dl-plan h3 {
  font-size: 1.2rem;
  margin: var(--dm-space-3) 0 var(--dm-space-2);
}
.dl-feature p,
.dl-step p {
  margin: 0;
  color: var(--dm-text-muted);
}
.dl-icon {
  display: block;
  color: var(--dm-accent);
}

/* the wide band in the middle: the dungeon picture and a second big button */
.dl-band {
  /* shape only (the picture would cover an outline at the slants) */
  --dm-cut: var(--dm-cut-xl);
  background: var(--dm-bar);
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  overflow: hidden;
  margin: 0 0 var(--dm-space-7);
  color: var(--dm-on-bar);
}
@media (min-width: 52rem) {
  .dl-band {
    grid-template-columns: 1fr 1fr;
  }
}
.dl-band-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}
.dl-band-copy {
  padding: var(--dm-space-6) var(--dm-space-5);
}
.dl-band h2 {
  color: var(--dm-on-bar);
  margin-bottom: var(--dm-space-3);
}
.dl-band p {
  margin: 0 0 var(--dm-space-5);
  font-size: 1.1rem;
}

.dl-steps {
  display: grid;
  gap: var(--dm-space-4);
  grid-template-columns: 1fr;
  counter-reset: none;
}
@media (min-width: 48rem) {
  .dl-steps {
    grid-template-columns: repeat(3, 1fr);
  }
}
.dl-step-n {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 3rem;
  clip-path: var(--dm-hex-clip-pointy);
  background: var(--dm-gold);
  color: var(--dm-on-gold);
  font-family: var(--dm-font-display);
  font-weight: var(--dm-weight-strong);
  font-size: 1.3rem;
}

.dl-plans {
  display: grid;
  gap: var(--dm-space-4);
  grid-template-columns: 1fr;
  margin-bottom: var(--dm-space-5);
}
@media (min-width: 48rem) {
  .dl-plans {
    grid-template-columns: repeat(3, 1fr);
  }
}
.dl-plan {
  text-align: center;
}
.dl-plan img {
  display: block;
  margin: 0 auto;
  width: 4rem;
  height: 4rem;
}
.dl-plan h3 {
  margin-bottom: 0;
}
.dl-plan-note {
  margin: 0 0 var(--dm-space-3);
  color: var(--dm-gold-text);
  font-weight: var(--dm-weight-strong);
}
.dl-plan-plus {
  margin: 0 0 var(--dm-space-1);
  font-weight: var(--dm-weight-strong);
}
.dl-plan li {
  padding: var(--dm-space-1) 0;
  color: var(--dm-text-muted);
}

/* the questions: plain disclosure rows (not cut shapes, so a dividing line is fine) */
.dl-faq {
  max-width: 50rem;
  margin-left: auto;
  margin-right: auto;
}
.dl-question {
  border-bottom: 1px solid var(--dm-border);
  padding: var(--dm-space-3) 0;
}
.dl-question summary {
  cursor: pointer;
  list-style-position: inside;
}
.dl-question summary h3 {
  display: inline;
  font-size: 1.15rem;
  margin: 0;
}
.dl-question p {
  margin: var(--dm-space-2) 0 var(--dm-space-2);
  color: var(--dm-text-muted);
}

.dl-links {
  max-width: 50rem;
  margin: 0 auto;
}
.dl-links li {
  padding: var(--dm-space-2) 0;
}
.dl-links a {
  font-weight: var(--dm-weight-strong);
}

/* the closing call to action */
.dl-final {
  --dm-cut: var(--dm-cut-xl);
  --dm-fill: var(--dm-bar);
  --dm-edge: var(--dm-gold);
  --dm-edge-w: 2px;
  text-align: center;
  padding: var(--dm-space-7) var(--dm-space-5);
  color: var(--dm-on-bar);
}
.dl-final h2 {
  color: var(--dm-on-bar);
  margin-bottom: var(--dm-space-3);
}
.dl-final p {
  max-width: 36rem;
  margin: 0 auto;
}

@media (prefers-reduced-motion: reduce) {
  .dl-shot,
  .dl-shot-play {
    transition: none;
  }
  .dl-shot:hover,
  .dl-shot:focus-visible,
  .dl-shot:hover .dl-shot-play,
  .dl-shot:focus-visible .dl-shot-play {
    transform: none;
  }
}
