/* Fuego Lento — landing. Misma marca que el juego (client/src/styles). */

@font-face { font-family: 'Ubuntu'; font-weight: 500; font-style: normal; font-display: swap; src: url(fonts/ubuntu-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/nunito-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 700; font-style: normal; font-display: swap; src: url(fonts/nunito-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 800; font-style: normal; font-display: swap; src: url(fonts/nunito-latin-800-normal.woff2) format('woff2'); }

:root {
  --frambuesa: #e8455e;
  --cereza: #b8243d;
  --vino: #4a0d19;
  --rubor: #ffd9df;
  --blanco: #ffffff;
  --vino-suave: #6b2a36;
  --linea: #f3c9d0;

  --font-brand: 'Ubuntu', system-ui, -apple-system, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, sans-serif;
  --brand-tracking: 0.3em;

  --shadow-card: 0 30px 50px -26px rgba(74, 13, 25, 0.7);
  --shadow-soft: 0 14px 28px -14px rgba(74, 13, 25, 0.6);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  --gutter: 20px;
  --maxw: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--frambuesa);
  color: var(--blanco);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; }
main { overflow-x: clip; }
:focus-visible { outline: 3px solid var(--blanco); outline-offset: 3px; border-radius: 6px; }
.faq :focus-visible, .how :focus-visible, .gate :focus-visible { outline-color: var(--cereza); }
body.gate-open { overflow: hidden; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  padding: 10px 16px; border-radius: 999px; background: var(--blanco); color: var(--cereza); font-weight: 800;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

/* Títulos: Nunito 800 en tipo oración, la misma voz que el texto de las cartas */
.h2 {
  font-weight: 800;
  font-size: clamp(30px, 7.6vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.015em;
  max-width: 17ch;
  text-wrap: balance;
}
.sub { margin-top: 14px; max-width: 46ch; font-size: 18px; }

/* ---------- Botones (como en el juego: píldora, Nunito 800) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0 28px;
  border: 0; border-radius: 999px;
  font: 800 17px/1 var(--font-body);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s var(--ease-out), box-shadow 0.3s, background-color 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn--sm { min-height: 46px; padding: 0 20px; font-size: 16px; }
.btn--light { background: var(--blanco); color: var(--cereza); box-shadow: var(--shadow-soft); }
.btn--line { background: transparent; color: var(--blanco); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.75); }
.btn--rosa { background: var(--frambuesa); color: var(--blanco); }
.btn--cereza { background: var(--cereza); color: var(--blanco); box-shadow: var(--shadow-soft); }
.btn--ghost { background: transparent; color: var(--cereza); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
@media (hover: hover) {
  .btn--light:hover { box-shadow: 0 18px 30px -14px rgba(74, 13, 25, 0.75); }
  .btn--line:hover { background: rgba(255, 255, 255, 0.12); }
}

/* ---------- Header ---------- */
.top {
  position: absolute; inset: 0 0 auto 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--maxw); margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top, 0px)) var(--gutter) 0;
}
.top__logo img { width: 150px; height: auto; margin-left: -6px; }
.top .btn--sm { min-height: 40px; padding: 0 18px; font-size: 15px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  max-width: var(--maxw); margin: 0 auto;
  padding: 92px var(--gutter) 64px;
  display: grid; gap: 34px;
}
.hero::before {
  /* brasa: un resplandor suave detrás del mazo */
  content: ''; position: absolute; z-index: -1;
  width: 520px; height: 520px; right: -160px; top: 220px;
  background: radial-gradient(closest-side, rgba(255, 217, 223, 0.45), rgba(255, 217, 223, 0));
  pointer-events: none;
}
.hero__title {
  font-weight: 800;
  font-size: clamp(40px, 11.4vw, 80px);
  line-height: 1.0;
  letter-spacing: -0.025em;
  max-width: 11ch;
  text-wrap: balance;
}
.hero__lead { margin-top: 16px; max-width: 34ch; font-size: 18px; line-height: 1.5; }
.hero__cta { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero__note { margin-top: 16px; font-size: 14px; font-weight: 700; opacity: 0.85; }

.hero__play { display: flex; flex-direction: column; align-items: center; }

/* Mazo interactivo */
.deck {
  position: relative;
  width: min(76vw, 300px);
  aspect-ratio: 5 / 7;
  touch-action: pan-y;
}
.deck > .card { position: absolute; inset: 0; }
.deck .card.is-top { cursor: grab; }
.deck .card.is-dragging { cursor: grabbing; }
.deck .card.is-under { transform: translateY(14px) scale(0.95); }
.deck .card.is-under2 { transform: translateY(26px) scale(0.9); }
.deck .card.is-hidden { visibility: hidden; }
.deck .card.is-settling { transition: transform 0.45s var(--ease-out); }
.deck .card.is-leaving { transition: transform 0.4s cubic-bezier(0.4, 0, 0.9, 0.6), opacity 0.4s; }
.deck .card.is-under, .deck .card.is-under2 { transition: transform 0.45s var(--ease-out); }
.stamp {
  position: absolute; top: 9cqw; z-index: 2;
  padding: 1.6cqw 4cqw; border-radius: 999px;
  font-weight: 800; font-size: 4.6cqw; letter-spacing: 0.02em;
  opacity: 0; pointer-events: none;
}
.stamp--done { left: 8cqw; background: var(--cereza); color: var(--blanco); transform: rotate(-8deg); }
.stamp--skip { right: 8cqw; background: var(--vino); color: var(--blanco); transform: rotate(8deg); }

.deck-actions {
  margin-top: 40px; width: 100%; max-width: 360px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.deck-actions[hidden], .deck-hint[hidden] { display: none; }
.deck-count { font-weight: 800; font-size: 14px; opacity: 0.85; font-variant-numeric: tabular-nums; }
.deck-hint { margin-top: 12px; font-size: 14px; opacity: 0.85; }

/* Carta final del mazo de ejemplo */
.card--end .card__face { justify-content: space-between; }
.card--end .card__text .p { font-size: 9.6cqw; }
.card--end .end__actions { display: grid; gap: 2.4cqw; }
.card--end .btn { min-height: 0; height: 15cqw; font-size: 5.2cqw; padding: 0 5cqw; }
.card--end .btn--ghost { height: 11cqw; }

/* ---------- Carta (copiado de client/src/styles/card.css) ---------- */
.card {
  position: relative; display: block;
  width: 100%; aspect-ratio: 5 / 7;
  border-radius: 9.1% / 6.5%;
  background: var(--blanco);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  container-type: inline-size;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  color: var(--vino);
  text-align: left;
}
.card__face {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; gap: 4cqw;
  padding: 9.7cqw 8.5cqw;
}
.card__head {
  flex: none; display: flex; align-items: center; justify-content: space-between; gap: 3cqw;
  min-height: 10.9cqw;
}
.card__tag {
  padding: 1.8cqw 4.2cqw; border-radius: 999px;
  background: var(--rubor); color: var(--cereza);
  font-weight: 800; font-size: 3.65cqw; line-height: 1.2; letter-spacing: 0.08em;
  text-transform: uppercase; white-space: nowrap;
}
[data-deck='accion'] .card__tag { background: var(--cereza); color: var(--blanco); }
.card__flame { flex: none; width: 10.9cqw; height: 10.9cqw; margin-left: auto; color: var(--frambuesa); }
.card__text { flex: 1; min-height: 0; width: 100%; display: flex; align-items: center; overflow: hidden; }
.card__text p, .card__text .p {
  display: block; margin: 0; width: 100%;
  font-weight: 800; line-height: 1.18; color: var(--vino);
  text-wrap: pretty; overflow-wrap: break-word;
}
.card__foot { flex: none; display: flex; align-items: center; min-height: 6cqw; }
.card__timer { display: inline-flex; align-items: center; gap: 1.6cqw; font-weight: 800; font-size: 4.6cqw; color: var(--cereza); }
.card__timer svg { width: 6cqw; height: 6cqw; }

.card--cover { display: grid; place-items: center; }
.card--cover[data-deck='accion'] { background: var(--cereza); }
.cover { display: flex; flex-direction: column; align-items: center; gap: 4.5cqw; text-align: center; }
.cover__flame { width: 26cqw; height: 26cqw; margin-bottom: 2cqw; color: var(--frambuesa); }
.cover__num {
  padding: 1.8cqw 4.6cqw; border-radius: 999px; background: var(--rubor); color: var(--cereza);
  font-weight: 800; font-size: 4.2cqw; letter-spacing: 0.12em; text-transform: uppercase;
}
.cover__name {
  font-family: var(--font-brand); font-weight: 500; font-size: 10.5cqw; line-height: 1.2;
  letter-spacing: var(--brand-tracking); margin-right: calc(var(--brand-tracking) * -1);
  text-transform: uppercase; white-space: nowrap; color: var(--vino);
}
.card--cover[data-deck='accion'] .cover__flame,
.card--cover[data-deck='accion'] .cover__name { color: var(--blanco); }
.card--cover[data-deck='accion'] .cover__num { background: var(--blanco); color: var(--cereza); }

/* ---------- Cómo se juega ---------- */
.how { background: var(--rubor); color: var(--vino); padding: 72px 0; }
.how .h2 { color: var(--vino); }
.seg {
  margin-top: 28px; display: inline-flex; padding: 5px; gap: 4px;
  background: var(--blanco); border-radius: 999px; box-shadow: inset 0 0 0 1px var(--linea);
}
.seg button {
  min-height: 44px; padding: 0 20px; border: 0; border-radius: 999px;
  background: transparent; color: var(--vino-suave);
  font: 800 16px/1 var(--font-body); cursor: pointer;
  transition: background-color 0.25s, color 0.25s;
}
.seg button[aria-selected='true'] { background: var(--cereza); color: var(--blanco); }
.steps {
  list-style: none; margin: 28px 0 0; padding: 0;
  display: grid; gap: 18px; counter-reset: paso; max-width: 640px;
}
.steps li {
  counter-increment: paso;
  position: relative; padding-left: 52px; min-height: 36px;
  font-size: 17px; color: var(--vino-suave);
}
.steps li::before {
  content: counter(paso);
  position: absolute; left: 0; top: -2px;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--frambuesa); color: var(--blanco);
  font-weight: 800; font-size: 17px;
}
.steps strong { color: var(--vino); font-weight: 800; }
.mode[hidden] { display: none; }
.mode.is-in .steps li { animation: stepIn 0.45s var(--ease-out) both; }
.mode.is-in .steps li:nth-child(2) { animation-delay: 0.05s; }
.mode.is-in .steps li:nth-child(3) { animation-delay: 0.1s; }
.mode.is-in .steps li:nth-child(4) { animation-delay: 0.15s; }
@keyframes stepIn { from { opacity: 0; transform: translateY(8px); } }

.alto {
  margin-top: 44px; padding: 26px 24px; border-radius: 28px;
  background: var(--vino); color: var(--rubor);
  display: grid; gap: 14px; max-width: 760px;
}
.alto__word {
  font-family: var(--font-brand); font-weight: 500; font-size: 30px; line-height: 1;
  letter-spacing: var(--brand-tracking); color: var(--blanco);
}
.alto p { font-size: 16px; max-width: 56ch; }

/* ---------- Mazos ---------- */
.decks { padding: 76px 0; }
.decks__grid { margin-top: 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.deckbox { max-width: 420px; min-width: 0; }
.deckbox p { margin-top: 6px; font-size: 14px; line-height: 1.45; opacity: 0.92; max-width: 40ch; }
.deckbox__name { margin-top: 18px; font-weight: 800; font-size: 17px; line-height: 1.25; }

.flip {
  display: block; width: 100%; max-width: 260px; padding: 0; border: 0; background: none;
  font: inherit; color: inherit; text-align: left;
  perspective: 1200px; cursor: pointer; border-radius: 22px;
  -webkit-tap-highlight-color: transparent;
}
.flip__inner {
  position: relative; display: block; width: 100%; aspect-ratio: 5 / 7;
  transform-style: preserve-3d;
  transition: transform 0.7s var(--ease-out);
}
.flip[aria-pressed='true'] .flip__inner { transform: rotateY(180deg); }
.flip__side { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip__back { transform: rotateY(180deg); }

/* ---------- Precios ---------- */
.prices { background: var(--vino); padding: 76px 0; }
.prices .sub { color: var(--rubor); }
.plans { list-style: none; margin: 34px 0 0; padding: 0; max-width: 860px; }
.plan {
  display: grid; grid-template-columns: auto 1fr; align-items: center;
  column-gap: 20px; row-gap: 14px;
  padding: 24px 0;
  border-top: 1px solid rgba(255, 217, 223, 0.22);
}
.plan:last-child { border-bottom: 1px solid rgba(255, 217, 223, 0.22); }
.plan__price {
  display: flex; align-items: flex-start;
  font-weight: 800; font-size: 54px; line-height: 0.95; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  min-width: 3.2ch;
}
.plan__cur { font-size: 0.42em; margin: 0.18em 0.12em 0 0; letter-spacing: 0; }
.plan--top .plan__price { color: var(--frambuesa); }
.plan__name { font-weight: 800; font-size: 20px; }
.plan__info p { color: var(--rubor); font-size: 15px; line-height: 1.45; max-width: 38ch; }
.plan__btn { grid-column: 1 / -1; width: 100%; }
.prices__fine { margin-top: 18px; font-size: 14px; color: var(--rubor); opacity: 0.85; max-width: 60ch; }

/* ---------- FAQ ---------- */
.faq { background: var(--blanco); color: var(--vino); padding: 72px 0; }
.faq__list { margin-top: 28px; max-width: 760px; }
.faq details { border-bottom: 1px solid var(--linea); }
.faq details:first-child { border-top: 1px solid var(--linea); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 0; font-weight: 800; font-size: 18px; line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--rubor) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 1v10M1 6h10' stroke='%23b8243d' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / 12px no-repeat;
  transition: transform 0.3s var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 22px; color: var(--vino-suave); max-width: 62ch; }

/* ---------- Cierre ---------- */
.close { padding: 84px 0 92px; }
.close__wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.close__flame { width: 54px; height: 54px; color: var(--blanco); }

/* ---------- Footer ---------- */
.foot { background: var(--vino); color: var(--rubor); padding: 52px 0 calc(40px + env(safe-area-inset-bottom, 0px)); font-size: 15px; }
.foot__wrap { display: grid; gap: 22px; }
.foot__logo { width: 140px; height: auto; margin: -24px 0 -24px -34px; }
.foot__age { display: flex; align-items: center; gap: 12px; max-width: 52ch; color: var(--blanco); font-weight: 700; }
.foot__nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot__nav a { text-decoration: none; font-weight: 700; padding: 4px 0; }
.foot__nav a:hover { text-decoration: underline; }
.foot__by { opacity: 0.7; font-size: 14px; }
.badge18 {
  flex: none; display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid currentColor; font-weight: 800; font-size: 15px; letter-spacing: -0.02em;
}

/* ---------- Age gate ---------- */
.gate {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: end center;
  padding: 16px;
  background: rgba(74, 13, 25, 0.62);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  animation: fadeIn 0.3s ease both;
}
.gate[hidden] { display: none; }
.gate__panel {
  width: 100%; max-width: 420px;
  padding: 30px 24px 22px; border-radius: 30px;
  background: var(--blanco); color: var(--vino);
  box-shadow: var(--shadow-card);
  display: grid; gap: 12px; justify-items: start;
  animation: rise 0.5s var(--ease-out) both;
}
.gate__title { font-weight: 800; font-size: 26px; line-height: 1.15; margin-top: 4px; }
.gate__panel p { color: var(--vino-suave); }
.gate .badge18--lg { width: 56px; height: 56px; font-size: 18px; color: var(--cereza); }
.gate__actions { width: 100%; display: grid; gap: 4px; margin-top: 10px; }
.gate__actions .btn { width: 100%; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(30px); } }

/* ---------- Desktop ---------- */
@media (min-width: 560px) {
  .plan { grid-template-columns: 150px 1fr auto; }
  .plan__btn { grid-column: auto; width: auto; }
  .gate { place-items: center; }
}
@media (min-width: 900px) {
  :root { --gutter: 40px; }
  .top { padding-top: 26px; }
  .top__logo img { width: 180px; }
  .hero {
    grid-template-columns: 1.1fr 0.9fr; align-items: center;
    min-height: min(100vh, 860px);
    padding-top: 120px; padding-bottom: 90px;
  }
  .hero::before { right: -40px; top: 50%; transform: translateY(-50%); width: 640px; height: 640px; }
  .hero__lead { font-size: 20px; }
  .deck { width: 330px; }
  .how, .decks, .prices, .faq { padding: 110px 0; }
  .how .wrap { display: grid; grid-template-columns: 1fr 1fr; column-gap: 64px; align-items: start; }
  .how .h2, .how .seg { grid-column: 1; }
  .how .seg { justify-self: start; }
  .how .mode { grid-column: 2; grid-row: 1 / span 3; }
  .how .steps { margin-top: 8px; gap: 26px; }
  .how .alto { grid-column: 1 / -1; grid-template-columns: auto 1fr; align-items: center; column-gap: 36px; padding: 30px 36px; max-width: none; }
  .decks__grid { gap: 64px; }
  .flip { max-width: 280px; }
  .deckbox__name { font-size: 21px; margin-top: 22px; }
  .deckbox p { font-size: 16px; }
  .faq .wrap { display: grid; grid-template-columns: 0.8fr 1.2fr; column-gap: 64px; align-items: start; }
  .faq__list { margin-top: 6px; }
  .close { padding: 120px 0 130px; }
  .foot__wrap { grid-template-columns: auto 1fr; align-items: center; column-gap: 48px; }
  .foot__logo { grid-row: span 3; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
