@font-face {
  font-family: "RedHatDisplay";
  src: url("/static/trivia_web/interfaz/fonts/RedHatDisplayRegular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "RedHatDisplay";
  src: url("/static/trivia_web/interfaz/fonts/RedHatDisplayMedium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "RedHatDisplay";
  src: url("/static/trivia_web/interfaz/fonts/RedHatDisplaySemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "RedHatDisplay";
  src: url("/static/trivia_web/interfaz/fonts/RedHatDisplayBold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-red: #e2001a;
  --color-red-dark: #b5007f;
  --color-text: #2b2b2b;
  --color-white: #fff;
  --radius-pill: 999px;
  --header-h: clamp(3.5rem, 8vw, 5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "RedHatDisplay", system-ui, sans-serif;
  color: var(--color-text);
  min-height: 100dvh;
  background: #111;
}

.trivia-screen {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.trivia-screen__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.trivia-screen__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.trivia-screen__content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: clamp(1rem, 3vw, 2.5rem);
  padding-top: var(--header-h);
}

.trivia-header {
  position: absolute;
  top: clamp(1rem, 3vw, 2rem);
  left: clamp(1rem, 4vw, 3rem);
  z-index: 2;
  line-height: 1;
}
.trivia-header__title {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
  color: var(--color-red);
  margin: 0;
}
.trivia-header__brand {
  font-size: clamp(1.25rem, 3.5vw, 1.75rem);
  font-weight: 500;
  color: var(--color-red-dark);
  margin: 0.15rem 0 0;
}

.trivia-plane {
  width: min(92vw, 720px);
  margin: auto auto 1rem;
  display: block;
  height: auto;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,.15));
}

.trivia-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: clamp(1rem, 3vw, 2rem);
  padding-bottom: 2rem;
}
.trivia-tagline {
  font-size: clamp(1.1rem, 2.8vw, 1.65rem);
  font-weight: 500;
  color: var(--color-white);
  text-shadow: 0 2px 12px rgba(0,0,0,.45);
  margin: 0;
  max-width: 22ch;
}

.btn-trivia {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(280px, 80vw);
  padding: 0.85rem 2rem;
  border: none;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--color-red), var(--color-red-dark));
  color: var(--color-white);
  font-family: inherit;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(226,0,26,.35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-trivia:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(226,0,26,.45); }
.btn-trivia:disabled { opacity: .55; cursor: not-allowed; }

.trivia-form-card {
  width: min(520px, 100%);
  margin: 0 auto;
  background: rgba(255,255,255,.92);
  border: 2px solid var(--color-red-dark);
  border-radius: 20px;
  padding: clamp(1.25rem, 4vw, 2rem);
  backdrop-filter: blur(6px);
}
.trivia-form-card input[type="text"],
.trivia-form-card input[type="email"],
.trivia-form-card input[type="tel"] {
  width: 100%;
  margin-bottom: .75rem;
  padding: .65rem 1rem;
  border: 1px solid #ccc;
  border-radius: var(--radius-pill);
  text-align: center;
  font: inherit;
  font-size: clamp(.9rem, 2.2vw, 1rem);
}
.trivia-form-card fieldset {
  border: none;
  margin: 1rem 0;
  padding: 0;
}
.trivia-form-extra {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed #ccc;
  font-size: .85rem;
}
.trivia-form-extra legend { font-weight: 600; margin-bottom: .5rem; }
.trivia-radio-row { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: space-between; }
.trivia-errors { color: var(--color-red); font-size: .9rem; margin-bottom: .75rem; }

.trivia-game {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(900px, 100%);
  margin: 0 auto;
  gap: 1rem;
}
.trivia-q-meta {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.trivia-q-num {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
  color: var(--color-red);
  line-height: 1;
  flex-shrink: 0;
}
.trivia-timer {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 700;
  color: var(--color-red-dark);
  background: rgba(255,255,255,.85);
  padding: .35rem .9rem;
  border-radius: var(--radius-pill);
  border: 2px solid var(--color-red-dark);
}
.trivia-question {
  width: 100%;
  font-size: clamp(1.05rem, 2.8vw, 1.65rem);
  font-weight: 600;
  text-align: center;
  color: var(--color-white);
  text-shadow: 0 2px 10px rgba(0,0,0,.5);
  margin: .5rem 0 1rem;
  line-height: 1.35;
}
.trivia-options {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.trivia-option {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .75rem;
  width: 100%;
  padding: .65rem 1rem;
  border: 2px solid rgba(255,255,255,.75);
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,.88);
  cursor: pointer;
  font-size: clamp(.9rem, 2.2vw, 1.05rem);
  transition: border-color .15s, background .15s;
}
.trivia-option:hover { border-color: var(--color-red-dark); background: #fff; }
.trivia-option__letter {
  font-weight: 700;
  color: var(--color-red);
  min-width: 1.5rem;
}
.trivia-option__text { text-align: left; }
.trivia-feedback {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.55);
  padding: 1rem;
}
.trivia-feedback__card {
  background: #fff;
  border-radius: 20px;
  border: 3px solid var(--color-red);
  padding: clamp(1.25rem, 4vw, 2rem);
  max-width: 420px;
  width: 100%;
  text-align: center;
}
.trivia-feedback__card h2 {
  margin: 0 0 .5rem;
  color: var(--color-red);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
}
.trivia-feedback.hidden { display: none; }

.trivia-end-score {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 700;
  color: var(--color-red);
  border: 3px solid var(--color-red);
  border-radius: var(--radius-pill);
  padding: .5rem 1.5rem;
  background: rgba(255,255,255,.9);
}

.trivia-table-wrap { width: min(1100px, 100%); overflow-x: auto; margin: 0 auto; }
.trivia-table { width: 100%; border-collapse: collapse; background: rgba(255,255,255,.95); font-size: .85rem; }
.trivia-table th { background: linear-gradient(90deg, var(--color-red), var(--color-red-dark)); color: #fff; padding: .6rem; }
.trivia-table td { padding: .5rem .6rem; border-bottom: 1px solid #eee; }

@media (max-width: 640px) {
  .trivia-header { left: 1rem; right: 1rem; }
  .trivia-option { grid-template-columns: auto 1fr; }
  .trivia-option__text { font-size: .92rem; }
}


/* --- Layout según arte fondo1 (panel negro ~25% + escena) --- */
.trivia-screen--landing .trivia-screen__bg img {
  object-fit: cover;
  object-position: center center;
}

.trivia-screen--landing .trivia-header {
  left: clamp(1.25rem, 4vw, 3.5rem);
  top: clamp(1.25rem, 4vh, 3rem);
  max-width: 28vw;
}

.trivia-hero--landing {
  position: absolute;
  z-index: 2;
  left: clamp(30%, 32vw, 38%);
  right: clamp(1rem, 4vw, 3rem);
  bottom: clamp(6%, 10vh, 14%);
  top: auto;
  flex: unset;
  padding: 0;
  align-items: center;
  justify-content: flex-end;
}

.trivia-hero--landing .trivia-tagline {
  font-size: clamp(1.35rem, 3.2vw, 2.4rem);
  font-weight: 600;
  max-width: 16ch;
  text-shadow: 0 2px 16px rgba(0,0,0,.85), 0 0 40px rgba(0,0,0,.5);
}

.trivia-hero--landing .trivia-tagline-wrap {
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.35));
  padding: .5rem 1rem 1rem;
  border-radius: 12px;
}

.trivia-screen--inner .trivia-screen__content {
  justify-content: center;
}

.trivia-screen--inner .trivia-header {
  color: inherit;
}

/* Preguntas: rejilla a/b arriba, c abajo (como PDF) */
.trivia-options--grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  width: 100%;
}
.trivia-options--grid .trivia-option--full {
  grid-column: 1 / -1;
  max-width: 50%;
  justify-self: center;
  width: 100%;
}

@media (max-width: 900px) {
  .trivia-hero--landing {
    left: 0;
    right: 0;
    bottom: clamp(8%, 12vh, 18%);
    padding: 0 1.25rem;
  }
  .trivia-screen--landing .trivia-header {
    max-width: 55vw;
  }
}

@media (max-width: 640px) {
  .trivia-screen--landing .trivia-screen__bg img {
    object-position: 65% center;
  }
  .trivia-options--grid { grid-template-columns: 1fr; }
  .trivia-options--grid .trivia-option--full { max-width: 100%; }
}


/* === Landing lámina 1 — interfaz 1.pdf (pixel-perfect) === */
body:has(.trivia-landing) {
  overflow: hidden;
  height: 100vh;
}

.trivia-landing {
  display: grid;
  grid-template-columns: 38.5% 61.5%;
  width: 100%;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  background: #000;
}

.trivia-landing__brand {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  height: 100%;
  padding: 11vh 0 9vh;
  background: linear-gradient(180deg, #ff0000 0%, #f50520 40%, #e5007d 100%);
  overflow: hidden;
}

.trivia-landing__title-block {
  margin: 0;
  padding: 0 9%;
  width: 100%;
  text-align: center;
  color: #fff;
  font-family: "RedHatDisplay", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(4.2rem, 6.2vw, 6.5rem);
  line-height: 0.92;
  letter-spacing: -0.025em;
  flex-shrink: 0;
}

.trivia-landing__title-main,
.trivia-landing__title-sub {
  display: block;
  font-weight: 800;
}

/* Linea.png borde a borde; Avion.png encima (despiece) */
.trivia-landing__scene {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
  pointer-events: none;
}

.trivia-landing__arco {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
}

.trivia-landing__plane {
  position: absolute;
  left: 50%;
  top: 50px;
  width: 58%;
  max-width: 340px;
  height: auto;
  margin: 0;
  transform: translateX(-50%);
  z-index: 2;
}

.trivia-landing__foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  flex-shrink: 0;
}

.trivia-landing__cta {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68%;
  max-width: 340px;
  height: clamp(54px, 4.4vw, 66px);
  padding: 0 1.5rem;
  border: none;
  border-radius: 9999px;
  background: #fff;
  color: #f00818;
  font-family: "RedHatDisplay", system-ui, sans-serif;
  font-size: clamp(1.5rem, 1.9vw, 2rem);
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  transition: box-shadow 0.15s ease;
}

.trivia-landing__cta:hover {
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.trivia-landing__slogan {
  margin: clamp(1rem, 2.2vh, 1.5rem) 0 0;
  padding: 0 9%;
  width: 100%;
  color: #fff;
  font-family: "RedHatDisplay", system-ui, sans-serif;
  font-size: clamp(1.25rem, 1.6vw, 1.65rem);
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
}

.trivia-landing__hero {
  position: relative;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.trivia-landing__hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.trivia-landing__marcas-lockup,
.pdf-header__marcas-lockup {
  height: auto;
  object-fit: contain;
  object-position: top right;
}

.trivia-landing__marcas-lockup {
  position: absolute;
  top: clamp(0.75rem, 2.5vh, 1.5rem);
  right: clamp(0.75rem, 2vw, 1.75rem);
  z-index: 3;
  width: auto;
  height: clamp(84px, 12.5vh, 132px);
  max-width: min(42vw, 420px);
  pointer-events: none;
}

.btn-trivia--inverse {
  background: #fff;
  color: #e30613;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  z-index: 1;
  min-width: min(260px, 75vw);
}

.btn-trivia--inverse:hover {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

@media (max-width: 900px) {
  body:has(.trivia-landing) {
    overflow: auto;
    height: auto;
  }

  .trivia-landing {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(50vh, 1fr);
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .trivia-landing__brand {
    height: auto;
    min-height: 58vh;
  }

  .trivia-landing__hero {
    min-height: 50vh;
  }
}
