/* Perfectos Mentirosos · Experiencia Fan
   Escenario vertical de diseño 1080 de ancho (min 1920 de alto). app.js lo escala
   uniforme al viewport: en un celular, una tablet o un totem se ve con la misma
   proporcion. Todos los px de este archivo son px de ese escenario.
   Radios: sistema "sharp" (4px), como las referencias del cliente. */

@font-face { font-family: "Alverata"; src: url("/f/alverata.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Alverata"; src: url("/f/alverata-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Ember Modern Display"; src: url("/f/ember.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Ember Modern Display"; src: url("/f/ember-bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Alverata"; src: url("/f/alverata-bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  color-scheme: dark;
  /* Tier 1: medidos en las referencias del cliente (Pantalla-1/2/3) */
  --pm-gold: #f5be69;
  --pm-burgundy: #5c001e;
  --pm-card: #121516;
  --pm-card-border: #acadad;
  --pm-panel: #0f100b;
  --pm-teal: #0e312f;
  --pm-pill-off: #3e3e3e;
  --pm-ivory: #f7f4ec;

  /* Tier 2: semanticos */
  --surface: var(--pm-panel);
  --surface-raised: var(--pm-card);
  --border: var(--pm-card-border);
  --text: var(--pm-ivory);
  --text-muted: color-mix(in oklch, var(--pm-ivory) 80%, var(--pm-panel));
  --accent: var(--pm-gold);
  --on-accent: #1a1408;
  --cta: var(--pm-burgundy);
  --cta-hover: color-mix(in oklch, var(--pm-burgundy), white 8%);
  --focus-ring: var(--pm-gold);

  /* Fuentes de la carpeta del cliente: Alverata = titulares y etiquetas; Ember = texto, opciones y botones */
  --font: "Alverata", Georgia, "Times New Roman", serif;
  --font-body: "Ember Modern Display", "Helvetica Neue", Arial, sans-serif;
  --radius: 4px;

  --dur-instant: 120ms;  --dur-toggle: 240ms;  --dur-modal: 400ms;  --dur-page: 500ms;
  --ease-out:        cubic-bezier(0.33, 1, 0.68, 1);
  --ease-out-strong: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in:         cubic-bezier(0.32, 0, 0.67, 0);
  --ease-in-out:     cubic-bezier(0.45, 0, 0.55, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none; -webkit-user-select: none;
  overscroll-behavior: none;
}
img { display: block; -webkit-user-drag: none; user-select: none; }
button { font: inherit; color: inherit; }

.stage {
  position: fixed; top: 0; left: 0;
  width: 1080px; height: 1920px;
  transform-origin: 0 0;
  overflow: hidden;
  background: var(--surface);
}

/* ---------- Pantallas ---------- */
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center;
  padding-inline: max(90px, calc((100% - 900px) / 2));
  text-align: center;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity var(--dur-toggle) var(--ease-in), visibility 0s linear var(--dur-toggle);
}
.screen.is-active {
  opacity: 1; visibility: visible; pointer-events: auto;
  transition: opacity var(--dur-page) var(--ease-out), visibility 0s;
}

.screen--tapiz {
  background:
    radial-gradient(ellipse 85% 60% at 50% 45%, rgb(6 18 17 / 0) 30%, rgb(6 14 13 / 0.62) 100%),
    url("/a/tapiz.webp") center top / 600px 400px repeat,
    var(--pm-teal);
}

.screen--poster {
  background:
    radial-gradient(ellipse 70% 40% at 50% 100%, rgb(40 44 30 / 0.35), rgb(0 0 0 / 0) 70%),
    var(--surface);
  justify-content: flex-end;
  padding-bottom: 110px;
}
.poster {
  position: absolute; top: 0; left: 50%;
  width: 1080px;
  height: max(1040px, calc(100% - 820px));
  translate: -50% 0;
  overflow: hidden;
}
.poster img { width: 100%; height: 100%; object-fit: cover; object-position: 46% 0; }
.poster::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgb(15 16 11 / 0) 62%, rgb(15 16 11 / 0.85) 88%, var(--pm-panel) 100%),
    linear-gradient(to right, rgb(15 16 11 / 0.35), rgb(15 16 11 / 0) 12% 88%, rgb(15 16 11 / 0.35));
}
.panel {
  position: relative; z-index: 1;
  width: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 30px;
}

/* ---------- Tipografia ---------- */
.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 34px; font-weight: 400;
  letter-spacing: 0.34em; text-transform: uppercase;
  padding-left: 0.34em; /* compensa el tracking del ultimo caracter */
}
.title {
  margin: 0;
  font-size: 100px; font-weight: 700; line-height: 1.04;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.title--q { font-size: 84px; line-height: 1.08; }
.lead {
  margin: 0;
  font-family: var(--font-body);
  font-size: 38px; line-height: 1.38;
  color: var(--text-muted);
  text-wrap: balance;
  max-width: 860px;
}
.rule {
  display: block; width: 150px; height: 3px;
  background: var(--accent);
  flex: none;
}

/* ---------- Botones ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 16px;
  min-height: 108px; padding: 0 64px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  font-family: var(--font-body);
  font-size: 38px; font-weight: 700;
  cursor: pointer;
  transition: transform var(--dur-instant) var(--ease-out), background-color var(--dur-instant) var(--ease-out), opacity var(--dur-toggle) var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 4px; }
.btn svg { width: 40px; height: 40px; position: absolute; top: 50%; translate: 0 -50%; }
.btn--primary { background: var(--cta); color: var(--text); }
.btn--primary svg { right: 30px; }
.btn--ghost { background: var(--surface-raised); border-color: var(--border); }
.btn--ghost svg { left: 30px; }
.btn--wide { width: 100%; max-width: 900px; }
.btn[disabled] { opacity: 0.42; cursor: default; }
.btn[disabled]:active { transform: none; }
@media (hover: hover) {
  .btn--primary:not([disabled]):hover { background: var(--cta-hover); }
}

/* ---------- Logos ---------- */
.logo-pm { width: 600px; height: auto; flex: none; }
.logo-pm--sm { width: 470px; }
.logo-amz { width: 236px; height: auto; flex: none; }

/* ---------- Test ---------- */
#s-test { padding-top: 120px; padding-bottom: 96px; gap: 40px; }
.progreso { display: flex; flex-direction: column; align-items: center; gap: 26px; }
.pills { display: flex; gap: 14px; }
.pills i {
  display: block; width: 62px; height: 10px; border-radius: 5px;
  background: var(--pm-pill-off);
  transition: background-color var(--dur-toggle) var(--ease-out);
}
.pills i.is-on { background: var(--accent); }

.centro {
  flex: 1; width: 100%;
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 64px;
}
.pregunta { width: 100%; display: flex; flex-direction: column; gap: 64px; }
.opciones { display: flex; flex-direction: column; gap: 26px; }
.opcion {
  display: flex; align-items: center; gap: 34px;
  width: 100%; min-height: 128px; padding: 20px 36px;
  background: var(--surface-raised);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  text-align: left; font-family: var(--font-body); font-size: 40px; line-height: 1.22;
  cursor: pointer;
  transition: transform var(--dur-instant) var(--ease-out), border-color var(--dur-instant) var(--ease-out), background-color var(--dur-instant) var(--ease-out);
}
.opcion:active { transform: scale(0.985); }
.opcion:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 4px; }
.opcion__letra {
  flex: none;
  display: grid; place-items: center;
  width: 70px; height: 70px; border-radius: 50%;
  border: 3px solid var(--accent);
  color: var(--accent);
  font-family: var(--font); font-size: 38px; line-height: 1;
  padding-top: 2px;
  transition: background-color var(--dur-instant) var(--ease-out), color var(--dur-instant) var(--ease-out);
}
.opcion[aria-checked="true"] {
  border-color: var(--accent);
  background: color-mix(in oklch, var(--pm-gold) 12%, var(--pm-card));
}
.opcion[aria-checked="true"] .opcion__letra { background: var(--accent); color: var(--on-accent); }

.nav { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; width: 100%; }
.nav .btn { padding: 0 64px; font-size: 36px; white-space: nowrap; }

/* Cambio de pregunta: sale rapido, entra suave */
.pregunta.sale { opacity: 0; transform: translateX(calc(var(--dir, 1) * -48px)); transition: opacity var(--dur-toggle) var(--ease-in), transform var(--dur-toggle) var(--ease-in); }
.pregunta.prepara { opacity: 0; transform: translateX(calc(var(--dir, 1) * 48px)); transition: none; }
.pregunta.entra { opacity: 1; transform: none; transition: opacity var(--dur-modal) var(--ease-out), transform var(--dur-modal) var(--ease-out); }

/* ---------- Resultado ---------- */
#s-resultado { padding-top: 110px; padding-bottom: 90px; gap: 40px; }
#s-resultado .centro { gap: 48px; }
.retrato {
  position: relative; margin: 0;
  width: 820px; aspect-ratio: 640 / 450;
  overflow: hidden; flex: none;
  outline: 2px solid rgb(245 190 105 / 0.35); outline-offset: 10px;
  box-shadow: 0 30px 60px -20px rgb(2 10 9 / 0.75), 0 10px 24px -8px rgb(2 10 9 / 0.6);
}
.retrato img { width: 100%; height: 100%; }
.foco {
  position: absolute; left: -100%; top: -100%;
  width: 300%; height: 300%;
  background: radial-gradient(ellipse 7% 13% at 50% 50%, rgb(10 12 9 / 0) 50%, rgb(10 12 9 / 0.74) 100%);
  transform: translate(0, 0);
  transition: transform var(--dur-modal) var(--ease-in-out);
  will-change: transform;
}
.ficha { display: flex; flex-direction: column; align-items: center; gap: 22px; width: 100%; }
.ficha .title { font-size: 104px; }
.perfil { margin: 0; color: var(--accent); font-style: italic; font-size: 44px; }
.claim { margin: 6px 0 0; font-size: 50px; font-weight: 700; line-height: 1.15; text-wrap: balance; }
.ficha .lead { font-size: 36px; }
.ficha .btn { margin-top: 18px; }
/* La ficha aparece cuando el foco termina de elegir */
.ficha > * { opacity: 0; transform: translateY(24px); }
.revelado .ficha > * {
  opacity: 1; transform: none;
  transition: opacity var(--dur-page) var(--ease-out), transform var(--dur-page) var(--ease-out-strong);
  transition-delay: calc(var(--i, 0) * 60ms);
}

/* ---------- Cierre ---------- */
.eyebrow--secreto { margin-top: 10px; font-size: 30px; letter-spacing: 0.24em; padding-left: 0.24em; }
#s-cierre { padding-top: 110px; padding-bottom: 90px; gap: 40px; }
#s-cierre .centro { gap: 56px; }
#s-cierre .panel { gap: 26px; }
#s-cierre .btn { margin-top: 18px; }

/* Entrada escalonada de los paneles */
.screen .panel > * { opacity: 0; transform: translateY(20px); }
.screen.is-active .panel > * {
  opacity: 1; transform: none;
  transition: opacity var(--dur-page) var(--ease-out), transform var(--dur-page) var(--ease-out-strong);
  transition-delay: calc(120ms + var(--i, 0) * 60ms);
}

/* ---------- Panel de staff ---------- */
.staff {
  width: min(92vw, 520px);
  background: var(--surface-raised); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; font-family: var(--font-body); font-size: 17px; text-align: left;
}
.staff::backdrop { background: rgb(5 8 7 / 0.7); }
.staff h2 { margin: 0 0 6px; font-size: 24px; }
.staff__nota { margin: 0 0 18px; color: var(--text-muted); font-size: 14px; }
.staff__metricas { display: grid; grid-template-columns: 1fr auto; gap: 8px 20px; margin: 0 0 22px; }
.staff__metricas dt { color: var(--text-muted); }
.staff__metricas dd { margin: 0; font-weight: 700; color: var(--accent); text-align: right; }
.staff__acciones { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.staff .btn { min-height: 52px; font-size: 16px; padding: 0 14px; }

@media (prefers-reduced-motion: reduce) {
  .screen, .screen.is-active, .pregunta.sale, .pregunta.entra, .foco,
  .screen.is-active .panel > *, .revelado .ficha > * { transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .pregunta.sale, .pregunta.prepara { transform: none; }
}

/* Inicio: "Bienvenido a Tagus" manda, la frase acompana (pedido del cliente 2026-11-05) */
#s-inicio .eyebrow { font-size: 54px; font-weight: 700; letter-spacing: 0.2em; padding-left: 0.2em; }
#s-inicio .title { font-size: 70px; line-height: 1.1; max-width: 820px; }
