@font-face {
  font-family: "EvaQuestArcade";
  src: url("assets/evaquest_arcade.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #1a1c23;
  --gold: #ffd94a;
  --cyan: #bfe6f2;
  --cream: #f6e3b4;
  --muted: #e8e3d4;
  --press: #d8c69a;
  --edge: #6b5a3a;
  --scrim: rgba(10, 8, 20, 0.42);
  --patch: 34px;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--cream);
  font-family: "EvaQuestArcade", ui-monospace, monospace;
  font-size: 16px;
  line-height: 1.25;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: unset;
  font-smooth: never;
}

body {
  min-height: 100dvh;
}

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

.stage {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  overflow-x: hidden;
}

.stage__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  image-rendering: -moz-crisp-edges;
  image-rendering: pixelated;
  z-index: -2;
  pointer-events: none;
}

.stage__scrim {
  position: absolute;
  inset: 0;
  background: var(--scrim);
  z-index: -1;
  pointer-events: none;
}

.panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 100dvh;
  padding: max(24px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom));
  text-align: center;
}

.icon {
  width: 72px;
  height: 72px;
  image-rendering: pixelated;
}

.title-plate {
  position: relative;
  width: min(640px, 94%);
}

.title-plate img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: -moz-crisp-edges;
  image-rendering: pixelated;
}

.title-plate__text {
  position: absolute;
  inset: 20% 14% 22%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.title-plate h1 {
  margin: 0;
  color: var(--gold);
  font-size: clamp(28px, 8vw, 64px);
  font-weight: normal;
  line-height: 1;
  letter-spacing: 0.02em;
}

.title-plate p {
  margin: 0;
  color: var(--cyan);
  font-size: clamp(12px, 3.1vw, 24px);
  font-weight: normal;
  line-height: 1.15;
}

.tagline,
.controls,
.note,
.steps {
  margin: 0;
  max-width: 34rem;
  text-wrap: pretty;
}

.tagline {
  color: var(--muted);
  font-size: clamp(14px, 3.4vw, 20px);
}

.controls,
.note,
.steps {
  color: rgba(232, 227, 212, 0.78);
  font-size: clamp(12px, 2.8vw, 16px);
}

.note {
  max-width: 28rem;
}

.ctas {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: min(600px, 92%);
}

/* 9-patch del plato de latón: slice 34 px = MenuArt.BUTTON_PATCH.
   El marco y los remaches no se estiran; sólo el centro. */
.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 118px;
  padding: 8px 12px;
  border: var(--patch) solid transparent;
  border-image-source: url("assets/menu_button.png");
  border-image-slice: 34 fill;
  border-image-repeat: stretch;
  background-color: #21252e;
  color: var(--cream);
  font-family: inherit;
  font-size: clamp(18px, 4.6vw, 28px);
  font-weight: normal;
  line-height: 1.15;
  text-align: center;
  cursor: pointer;
  image-rendering: -moz-crisp-edges;
  image-rendering: pixelated;
  touch-action: manipulation;
}

.cta:hover,
.cta:focus-visible {
  color: #fff;
  filter: brightness(1.18);
}

.cta:active {
  color: var(--press);
  filter: brightness(0.82);
}

.cta:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

.steps {
  text-align: left;
  max-width: min(600px, 92%);
  padding-left: 1.4em;
}

.steps strong {
  font-weight: normal;
  color: var(--cream);
}

.steps li + li {
  margin-top: 10px;
}

@media (max-width: 380px) {
  :root {
    --patch: 24px;
  }

  .cta {
    min-height: 100px;
  }
}

@media (min-width: 800px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
  }

  .stage {
    width: min(720px, calc((100dvh - 32px) * 9 / 16));
    height: min(calc(100dvh - 32px), calc(720px * 16 / 9));
    min-height: 0;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    border-radius: 12px;
    box-shadow:
      0 0 0 2px var(--edge),
      0 0 0 8px var(--bg),
      0 18px 48px rgba(0, 0, 0, 0.55);
  }

  .panel {
    min-height: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 28px 24px 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cta {
    filter: none;
  }
}
