/* =========================
   Club de Lectura — estilos
   ========================= */

:root {
  --cream: #f4ecdc;
  --cream-2: #ebe1cc;
  --paper: #fbf6ea;
  --rose: #e9c8c0;
  --rose-soft: #f3dad3;
  --sage: #bcc9b3;
  --sage-soft: #d6dec8;
  --lavender: #cfc6dc;
  --oxygen: #b53227;
  --oxygen-dark: #6f1f19;
  --oxygen-soft: #f2d8d1;
  --ink: #3a2e25;
  --ink-soft: #6b5a4a;
  --muted: #a99880;
  --line: #d8c9ad;
  --shadow: 0 18px 40px -22px rgba(58, 46, 37, 0.35),
            0 4px 10px -4px rgba(58, 46, 37, 0.12);

  --font-serif: "Fraunces", "Cormorant Garamond", Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { overflow-x: hidden; }

::selection { background: var(--rose); color: var(--ink); }

/* =========================
   HERO / LANDING
   ========================= */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(24px, 6vw, 72px);
  background:
    radial-gradient(80% 60% at 80% 10%, var(--rose-soft) 0%, transparent 60%),
    radial-gradient(70% 60% at 10% 90%, var(--sage-soft) 0%, transparent 55%),
    linear-gradient(180deg, var(--cream) 0%, var(--cream-2) 100%);
  overflow: hidden;
}

.hero-grain {
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: .35;
  mix-blend-mode: multiply;
  background-image:
    radial-gradient(rgba(58,46,37,.08) 1px, transparent 1px),
    radial-gradient(rgba(58,46,37,.06) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 2px;
}

.hero-inner {
  position: relative;
  max-width: 760px;
  text-align: center;
}

.eyebrow {
  font-family: var(--font-sans);
  text-transform: lowercase;
  letter-spacing: .22em;
  font-size: 12px;
  color: var(--ink-soft);
  margin: 0 0 28px;
}
.eyebrow-dark { color: var(--ink); }

.title {
  font-family: var(--font-serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(48px, 11vw, 132px);
  line-height: .95;
  letter-spacing: -0.02em;
  margin: 0 0 28px;
  color: var(--ink);
}
.title-line { display: block; }
.title-amp {
  font-style: italic;
  color: var(--ink-soft);
  font-weight: 300;
}

.lede {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 0 auto 56px;
}
.lede em { color: var(--oxygen-dark); font-style: italic; }

.scroll-hint {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: lowercase;
  padding: 10px 4px;
  border-bottom: 1px solid transparent;
  transition: gap .35s ease, color .3s ease, border-color .3s ease;
}
.scroll-hint:hover { gap: 18px; color: var(--ink-soft); border-color: var(--line); }
.scroll-hint svg {
  animation: bob 2.6s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(4px); }
}

/* curva inferior del hero */
.divider {
  display: block;
  width: 100%;
  height: 140px;
  position: absolute;
  left: 0;
  bottom: -1px;
}
.divider-hero path { fill: var(--paper); }

/* =========================
   SESIONES
   ========================= */

.sesiones {
  position: relative;
  background: var(--paper);
  padding: clamp(40px, 7vw, 96px) clamp(20px, 5vw, 64px) clamp(60px, 9vw, 120px);
}

.sesiones-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto clamp(40px, 6vw, 72px);
}
.sesiones-head h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(32px, 5vw, 52px);
  margin: 6px 0 14px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.sesiones-head .sub {
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.5;
  margin: 0;
}

.cards {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 1180px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: clamp(28px, 4vw, 56px) clamp(20px, 3vw, 36px);
  justify-items: center;
}

.card {
  width: 100%;
  max-width: 220px;
  text-align: center;
  transform: translateY(0);
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
/* desfase orgánico — siente flotante, no rejilla */
.card:nth-child(3n+1) { transform: translateY(-14px); }
.card:nth-child(3n+2) { transform: translateY(8px); }
.card:nth-child(4n)   { transform: translateY(-22px); }
.card:nth-child(5n)   { transform: translateY(14px); }

.card-poster {
  position: relative;
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  border-radius: 6px;
  overflow: hidden;
  background: var(--cream-2);
  aspect-ratio: 9 / 16;
  box-shadow: var(--shadow);
  color: inherit;
  font: inherit;
  transition: transform .55s cubic-bezier(.2,.7,.2,1), box-shadow .55s ease;
}
.card-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card.is-available:hover .card-poster {
  transform: translateY(-8px) rotate(-.6deg);
  box-shadow:
    0 28px 50px -22px rgba(58, 46, 37, .45),
    0 6px 14px -4px rgba(58, 46, 37, .18);
}
.card.is-available .card-poster {
  cursor: pointer;
  outline: 1px solid rgba(181, 50, 39, .18);
  outline-offset: 8px;
}
.card.is-available .card-num,
.card.is-available .card-date {
  color: var(--oxygen-dark);
}
.signup-corner,
.past-corner {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  max-width: calc(100% - 20px);
  border-radius: 999px;
  padding: 6px 10px;
  font-family: var(--font-sans);
  font-size: 10px;
  line-height: 1;
  letter-spacing: .12em;
  text-transform: lowercase;
  white-space: nowrap;
  box-shadow: 0 8px 20px -14px rgba(0, 0, 0, .45);
}
.signup-corner {
  background: rgba(251, 246, 234, .92);
  color: var(--oxygen-dark);
  border: 1px solid rgba(181, 50, 39, .28);
}
.past-corner {
  background: rgba(251, 246, 234, .78);
  color: var(--ink-soft);
  border: 1px solid rgba(58, 46, 37, .12);
}
.card.is-past .card-poster {
  cursor: default;
  filter: grayscale(.28) saturate(.74);
}
.card.is-past .card-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(244, 236, 220, .18);
  pointer-events: none;
}
.card.is-past .card-date,
.card.is-past .card-num {
  opacity: .62;
}

.card-meta {
  margin-top: 14px;
  font-family: var(--font-serif);
  color: var(--ink);
}
.card-num {
  display: block;
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.card-date {
  display: block;
  font-style: italic;
  font-size: 15px;
  color: var(--ink-soft);
}

/* PROXIMAMENTE — póster fantasma */
.card.is-soon .card-poster {
  background:
    radial-gradient(60% 60% at 50% 30%, var(--rose-soft) 0%, transparent 70%),
    radial-gradient(60% 60% at 50% 80%, var(--sage-soft) 0%, transparent 70%),
    var(--cream-2);
  display: grid;
  place-items: center;
  color: var(--muted);
}
.card.is-soon .card-poster::before {
  content: "";
  position: absolute; inset: 14px;
  border: 1px dashed var(--line);
  border-radius: 4px;
  pointer-events: none;
}
.card.is-soon .soon-label {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  letter-spacing: .26em;
  text-transform: lowercase;
  color: var(--ink-soft);
  opacity: .65;
}
.card.is-soon .card-date { opacity: .55; }

/* paleta rotativa para los fantasmas */
.card.is-soon:nth-of-type(3n)   .card-poster { filter: hue-rotate(15deg); }
.card.is-soon:nth-of-type(3n+1) .card-poster { filter: hue-rotate(-12deg); }

/* =========================
   ONDA → APUNTARSE
   ========================= */

.divider-form {
  position: relative;
  bottom: auto;
  margin-top: -1px;
  height: 140px;
  background: var(--paper);
  display: block;
}
.divider-form path { fill: var(--oxygen-soft); }

/* =========================
   APUNTARSE
   ========================= */

.apuntarse {
  background: var(--oxygen-soft);
  padding: clamp(40px, 8vw, 110px) clamp(20px, 5vw, 64px) clamp(80px, 10vw, 140px);
  position: relative;
}
.apuntarse-inner {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
}
.apuntarse h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(36px, 6vw, 64px);
  margin: 8px 0 18px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.apuntarse .sub {
  font-family: var(--font-serif);
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 40px;
}
.apuntarse em { font-style: italic; color: var(--ink); }

.cta {
  appearance: none;
  border: 1px solid var(--oxygen-dark);
  background: transparent;
  color: var(--oxygen-dark);
  font-family: var(--font-sans);
  font-size: 14px;
  letter-spacing: .14em;
  text-transform: lowercase;
  padding: 16px 28px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  transition: background .3s ease, color .3s ease, gap .3s ease, transform .3s ease;
}
.cta:hover { background: var(--oxygen-dark); color: var(--paper); gap: 22px; }
.cta:active { transform: scale(.98); }

/* =========================
   FOOT
   ========================= */

.foot {
  background: var(--oxygen-soft);
  text-align: center;
  padding: 24px 20px 40px;
  color: var(--ink-soft);
  border-top: 1px solid rgba(58, 46, 37, .08);
}
.foot p { margin: 0; }
.foot-main {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 6px !important;
}
.foot-credit {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--ink-soft);
  margin-bottom: 4px !important;
}
.foot-credit a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
  transition: border-color .25s ease;
}
.foot-credit a:hover { border-color: var(--ink); }
.foot-year {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--muted);
}

/* =========================
   MODAL · libro abierto
   ========================= */

.modal {
  position: fixed; inset: 0;
  z-index: 100;
  overflow: hidden;
}
.modal[hidden] { display: none; }

.modal-backdrop {
  position: fixed; inset: 0;
  z-index: 0;
  background: rgba(40, 30, 22, .55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fadein .3s ease;
}

.modal-stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  padding-top: max(16px, env(safe-area-inset-top));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  box-sizing: border-box;
}

.book {
  position: relative;
  width: 100%;
  max-width: 880px;
  height: 100%;
  max-height: min(720px, 100%);
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: minmax(0, 1fr);
  background: var(--paper);
  border-radius: 8px;
  box-shadow:
    0 40px 80px -24px rgba(0,0,0,.45),
    0 12px 24px -6px rgba(0,0,0,.25),
    inset 0 0 0 1px rgba(58,46,37,.06);
  overflow: hidden;
  animation: bookin .5s cubic-bezier(.2,.8,.2,1);
}

@keyframes fadein { from { opacity: 0 } to { opacity: 1 } }
@keyframes bookin {
  from { opacity: 0; transform: translateY(20px) rotateX(8deg) scale(.96); }
  to   { opacity: 1; transform: none; }
}

.book::before {
  /* lomo central del libro */
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 28px; transform: translateX(-50%);
  background:
    linear-gradient(90deg,
      rgba(58,46,37,0) 0%,
      rgba(58,46,37,.12) 35%,
      rgba(58,46,37,.20) 50%,
      rgba(58,46,37,.12) 65%,
      rgba(58,46,37,0) 100%);
  pointer-events: none;
  z-index: 2;
}

.book-close {
  position: absolute;
  top: 10px; right: 14px;
  z-index: 3;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background .25s ease, transform .25s ease;
}
.book-close:hover { background: var(--cream-2); transform: rotate(90deg); }

.page {
  position: relative;
  padding: clamp(28px, 4vw, 56px) clamp(24px, 4vw, 48px);
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(255,255,255,.5), transparent 60%),
    var(--paper);
  min-height: 0;
  min-width: 0;
  height: 100%;
}
.page-left  {
  border-right: 1px solid rgba(58,46,37,.06);
  overflow: hidden;
}
.page-right {
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(255,255,255,.5), transparent 60%),
    var(--paper);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.page-number {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  margin: 0 0 28px;
  letter-spacing: .12em;
}

.page-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(20px, 2.6vw, 28px);
  line-height: 1.4;
  color: var(--ink);
  margin: 30% 0 18px;
}
.page-quote-author {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--ink-soft);
  text-align: right;
  margin: 0;
}

.page-fold {
  position: absolute;
  bottom: 0; right: 0;
  width: 40px; height: 40px;
  background:
    linear-gradient(135deg, transparent 50%, rgba(58,46,37,.08) 50%, rgba(58,46,37,.16));
  border-top-left-radius: 8px;
}

/* form */
.page-right h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(22px, 3vw, 30px);
  margin: 0 0 12px;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.form-context {
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0 0 22px;
}
.form-context strong {
  color: var(--ink);
  font-style: italic;
  font-weight: 500;
}

.page-right label {
  display: block;
  margin-bottom: 16px;
}
.page-right label > span {
  display: block;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.page-right input,
.page-right textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 8px 2px;
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--ink);
  outline: none;
  resize: none;
  transition: border-color .25s ease;
}
.page-right input:focus,
.page-right textarea:focus { border-color: var(--ink); }
.page-right textarea { line-height: 1.45; }

.aviso {
  background: rgba(188, 201, 179, .35);
  border-left: 2px solid var(--sage);
  padding: 12px 14px;
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 18px 0 22px;
  border-radius: 0 4px 4px 0;
}
.aviso strong { color: var(--ink); font-style: italic; font-weight: 500; }

.submit {
  appearance: none;
  width: 100%;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 14px;
  letter-spacing: .14em;
  text-transform: lowercase;
  padding: 14px 20px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .25s ease, color .25s ease, transform .2s ease;
}
.submit:hover { background: transparent; color: var(--ink); }
.submit:active { transform: scale(.98); }
.submit[disabled] { opacity: .55; cursor: progress; }

.form-msg {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  text-align: center;
  margin: 14px 0 0;
  min-height: 1.2em;
}
.form-msg.is-ok    { color: #4a6b3f; }
.form-msg.is-error { color: #a04848; }

/* =========================
   TICKET POPUP
   ========================= */

.ticket-modal {
  position: fixed; inset: 0;
  z-index: 200;
  overflow: hidden;
}
.ticket-modal[hidden] { display: none; }

.ticket-backdrop {
  position: fixed; inset: 0;
  background: rgba(40, 30, 22, .62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadein .35s ease;
}

.ticket-stage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  padding-top: max(24px, env(safe-area-inset-top));
  padding-bottom: max(28px, env(safe-area-inset-bottom));
  gap: 18px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.ticket-close {
  position: absolute;
  top: 16px; right: 18px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(251, 246, 234, .35);
  background: rgba(0, 0, 0, .25);
  color: var(--paper);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
  transition: background .25s ease, transform .25s ease;
}
.ticket-close:hover { background: rgba(0, 0, 0, .45); transform: rotate(90deg); }

.ticket-headline {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(26px, 4vw, 38px);
  color: var(--paper);
  margin: 0;
  text-align: center;
  text-shadow: 0 2px 18px rgba(0,0,0,.35);
  letter-spacing: -.01em;
  animation: ticket-headline-in .55s .15s cubic-bezier(.2,.8,.2,1) both;
}
.ticket-sub {
  font-family: var(--font-serif);
  font-size: 15px;
  color: rgba(251, 246, 234, .82);
  margin: -6px 0 4px;
  text-align: center;
  max-width: 36ch;
  animation: ticket-headline-in .55s .25s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes ticket-headline-in {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- el ticket ---------- */

.ticket {
  --ticket-bg: var(--paper);
  --ticket-ink: var(--ink);
  --ticket-accent: var(--oxygen-dark);

  position: relative;
  display: grid;
  grid-template-columns: 130px 1fr;
  width: min(560px, 100%);
  background: var(--ticket-bg);
  color: var(--ticket-ink);
  border-radius: 14px;
  box-shadow:
    0 40px 80px -20px rgba(0,0,0,.55),
    0 12px 24px -6px rgba(0,0,0,.35),
    inset 0 0 0 1px rgba(58,46,37,.08);
  overflow: hidden;
  transform-style: preserve-3d;
  animation: ticket-print 1.05s cubic-bezier(.16,.84,.32,1) both;
}

@keyframes ticket-print {
  0%   { opacity: 0; transform: translateY(60px) rotateX(28deg) scale(.92); }
  60%  { opacity: 1; transform: translateY(-4px) rotateX(-2deg) scale(1.01); }
  100% { opacity: 1; transform: none; }
}

/* textura fina de papel */
.ticket::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(rgba(58,46,37,.05) 1px, transparent 1px),
    radial-gradient(rgba(58,46,37,.04) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 2px;
  opacity: .55;
  pointer-events: none;
}
/* esquinas recortadas */
.ticket::after {
  content: "";
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(40, 30, 22, .55);
  left: calc(130px - 9px);
  box-shadow: 0 0 0 1px rgba(58,46,37,.12);
  pointer-events: none;
  z-index: 2;
}

.ticket-stub {
  position: relative;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(181, 50, 39, .92) 0 14px,
      rgba(111, 31, 25, .92) 14px 28px
    );
  color: var(--paper);
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  text-align: center;
  min-height: 220px;
}
.ticket-stub::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.18), transparent 30%, transparent 70%, rgba(0,0,0,.22));
  pointer-events: none;
}
.stub-eyebrow {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: .32em;
  text-transform: uppercase;
  opacity: .85;
}
.stub-sesion {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 30px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: -.01em;
}
.stub-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  letter-spacing: .14em;
  background: rgba(0,0,0,.28);
  padding: 5px 9px;
  border-radius: 4px;
  border: 1px dashed rgba(251, 246, 234, .35);
}

/* perforado vertical separador */
.ticket-perf {
  position: absolute;
  top: 14px; bottom: 14px;
  left: 130px;
  width: 0;
  border-left: 2px dashed rgba(58, 46, 37, .28);
  z-index: 1;
}

.ticket-body {
  position: relative;
  padding: 22px 26px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.ticket-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.ticket-titulo {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(22px, 3.4vw, 28px);
  line-height: 1.1;
  margin: 4px 0 0;
  letter-spacing: -.01em;
  color: var(--ink);
}
.ticket-autor {
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
  font-style: italic;
}
.ticket-frase {
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 6px 0 0;
  padding-left: 10px;
  border-left: 2px solid var(--oxygen);
}
.ticket-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.ticket-name, .ticket-id {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ticket-id { text-align: right; }
.ticket-name .label, .ticket-id .label {
  font-family: var(--font-sans);
  font-size: 9px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
}
.ticket-name .value {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 17px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ticket-id .value {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--oxygen-dark);
}

/* sello "lista de espera" — oculto por defecto */
.ticket-stamp {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(-12deg) scale(.6);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 30px;
  letter-spacing: .04em;
  color: var(--oxygen-dark);
  border: 4px double var(--oxygen-dark);
  border-radius: 6px;
  padding: 8px 22px;
  text-transform: lowercase;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 3;
  text-shadow: 0 0 1px rgba(181, 50, 39, .25);
}

/* ----- variante: lista de espera ----- */
.ticket.is-espera {
  animation: ticket-tear 1.4s cubic-bezier(.16,.84,.32,1) both;
}
.ticket.is-espera .ticket-body {
  filter: grayscale(.45) brightness(.96);
}
.ticket.is-espera .ticket-stub {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(105, 95, 85, .92) 0 14px,
      rgba(75, 65, 55, .92) 14px 28px
    );
}
.ticket.is-espera .ticket-stamp {
  animation: stamp-down .5s .9s cubic-bezier(.2,.8,.2,1) both;
}

/* corte diagonal "rasgado" sobre el ticket */
.ticket.is-espera::before {
  background:
    linear-gradient(
      102deg,
      transparent 0 48%,
      rgba(40, 30, 22, .55) 48% 49%,
      rgba(251, 246, 234, .9) 49% 51%,
      rgba(40, 30, 22, .55) 51% 52%,
      transparent 52% 100%
    ),
    radial-gradient(rgba(58,46,37,.05) 1px, transparent 1px),
    radial-gradient(rgba(58,46,37,.04) 1px, transparent 1px);
  background-size: 100% 100%, 3px 3px, 7px 7px;
  background-position: 0 0, 0 0, 1px 2px;
  opacity: 1;
  z-index: 2;
}

@keyframes ticket-tear {
  0%   { opacity: 0; transform: translateY(60px) rotateX(28deg) scale(.92); }
  55%  { opacity: 1; transform: translateY(-4px) rotateX(-2deg) scale(1.01); }
  72%  { transform: none; }
  82%  { transform: translateX(-2px) rotate(-.4deg); }
  90%  { transform: translateX(3px) rotate(.6deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes stamp-down {
  0%   { opacity: 0; transform: translate(-50%, -50%) rotate(-12deg) scale(2.2); }
  60%  { opacity: 1; transform: translate(-50%, -50%) rotate(-12deg) scale(.92); }
  100% { opacity: .92; transform: translate(-50%, -50%) rotate(-12deg) scale(1); }
}

.ticket-foot {
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 1.5;
  color: rgba(251, 246, 234, .82);
  text-align: center;
  max-width: 38ch;
  margin: 6px 0 0;
  animation: ticket-headline-in .55s .55s cubic-bezier(.2,.8,.2,1) both;
}
.ticket-foot strong { color: var(--paper); font-style: italic; font-weight: 500; }

.ticket-done {
  appearance: none;
  border: 1px solid rgba(251, 246, 234, .55);
  background: transparent;
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: lowercase;
  padding: 12px 26px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .25s ease, color .25s ease;
  animation: ticket-headline-in .55s .7s cubic-bezier(.2,.8,.2,1) both;
}
.ticket-done:hover { background: var(--paper); color: var(--ink); }

@media (max-width: 560px) {
  .ticket { grid-template-columns: 96px 1fr; width: 100%; }
  .ticket::after { left: calc(96px - 9px); }
  .ticket-perf { left: 96px; }
  .ticket-body { padding: 18px 18px 16px; }
  .stub-sesion { font-size: 24px; }
  .ticket-stub { padding: 18px 8px; min-height: 200px; }
  .ticket-titulo { font-size: 20px; }
  .ticket-stamp { font-size: 22px; padding: 6px 16px; }
}

/* =========================
   RESPONSIVE
   ========================= */

/* Dots indicador (solo se ve en móvil) */
.dots { display: none; }

@media (max-width: 720px) {
  .book {
    grid-template-columns: 1fr;
  }
  .book::before { display: none; }
  .page-left { display: none; }
  .page-right { background: var(--paper); }
  .divider { height: 90px; }
  .divider-form { height: 90px; }

  /* Carrusel de sesiones */
  .cards {
    display: flex;
    grid-template-columns: none;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    gap: 20px;
    padding: 24px 12vw 28px;
    margin: 0 calc(-1 * clamp(20px, 5vw, 64px));
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
  }
  .cards::-webkit-scrollbar { display: none; }

  .card {
    flex: 0 0 76%;
    max-width: 280px;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    transform: none !important;
    transition: transform .35s ease, opacity .35s ease;
    opacity: .45;
  }
  .card.is-current {
    opacity: 1;
  }
  .card.is-current .card-poster {
    transform: translateY(-4px);
    box-shadow:
      0 28px 50px -22px rgba(58, 46, 37, .5),
      0 8px 16px -4px rgba(58, 46, 37, .2);
  }

  .dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
    padding: 0 16px;
  }
  .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--line);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background .3s ease, transform .3s ease, width .3s ease;
  }
  .dot.is-active {
    background: var(--ink);
    width: 22px;
    border-radius: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}
