/* ============================================================
   TEST "¿Qué cacao es para ti?" — solo se carga en el post del test.
   Portada en la página + diálogo claro a pantalla completa (estilo editorial).
   ============================================================ */

/* ── portada en el post ── */
.qz-hero { margin: 2.2rem 0; padding: clamp(1.8rem, 5vw, 3.2rem) clamp(1.3rem, 4vw, 3rem); border: 1px solid var(--border); border-radius: 18px; background: radial-gradient(120% 90% at 100% 0%, #fbf3e2 0%, #F4EEE3 55%, #f7f3ee 100%); text-align: center; scroll-margin-top: 110px; }
.blog-body .qz-hero .qz-kicker { margin: 0 0 0.8rem; font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; color: var(--gold-label); }
.blog-body .qz-hero h2.qz-hero-title { margin: 0 0 0.6rem; font-family: 'Playfair Display', serif; font-weight: 400; font-size: clamp(1.9rem, 4.6vw, 2.9rem); line-height: 1.12; color: var(--brown); }
/* cursiva dorada: el dorado oscuro de la paleta (el claro no llega a 3:1 sobre crema) */
.qz-hero-title em, .qz em { font-style: italic; color: var(--gold-label); }
.blog-body .qz-hero .qz-hero-sub { max-width: 34rem; margin: 0 auto 1.3rem; font-size: 0.98rem; color: var(--text-muted); }
.qz-hero-icons { display: flex; justify-content: center; gap: 0.55rem; margin-bottom: 1.6rem; font-size: 1.35rem; }
.qz-hero-icons span { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: #fff; border: 1px solid var(--border); animation: qzFlota 4s ease-in-out infinite; animation-delay: calc(var(--i) * 0.35s); }
@keyframes qzFlota { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.qz-start { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 56px; padding: 0 2.2rem; border: none; border-radius: 999px; background: var(--brown); color: var(--cream); font-family: inherit; font-size: 1.02rem; font-weight: 600; letter-spacing: 0.02em; cursor: pointer; box-shadow: 0 10px 24px rgba(61, 43, 31, 0.22); transition: transform .25s ease, box-shadow .25s ease, background .25s ease; }
.qz-start::after { content: '→'; transition: transform .25s ease; }
.qz-start:hover, .qz-start:focus-visible { background: var(--cocoa); transform: translateY(-2px); box-shadow: 0 14px 30px rgba(61, 43, 31, 0.28); }
.qz-start:hover::after { transform: translateX(4px); }
.qz-start:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.blog-body .qz-hero .qz-fallback { margin: 0; font-size: 0.9rem; }
.qz-hero.qz-ready .qz-fallback { display: none; }

/* ── diálogo a pantalla completa ── */
html.qz-open { overflow: hidden; }
dialog.qz { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: none; background: radial-gradient(90% 60% at 85% 0%, #fbf3e2 0%, var(--cream) 60%); color: var(--brown); font-family: 'DM Sans', sans-serif; overflow-y: auto; overscroll-behavior: contain; }
dialog.qz[open] { display: flex; flex-direction: column; animation: qzAbre .35s ease both; }
dialog.qz::backdrop { background: rgba(26, 20, 16, 0.35); }
@keyframes qzAbre { from { opacity: 0; transform: scale(0.985); } to { opacity: 1; transform: none; } }
.qz-top { display: flex; align-items: center; gap: 1.2rem; padding: 1.1rem clamp(1rem, 4vw, 3rem); position: sticky; top: 0; background: rgba(247, 243, 238, 0.86); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); z-index: 2; }
.qz-brand { font-family: 'Playfair Display', serif; font-size: 1.15rem; white-space: nowrap; }
.qz-bar { flex: 1; display: flex; gap: 0.4rem; max-width: 420px; margin: 0 auto; }
.qz-bar i { flex: 1; height: 4px; border-radius: 2px; background: var(--border); position: relative; overflow: hidden; }
.qz-bar i::after { content: ''; position: absolute; inset: 0; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .55s cubic-bezier(.22, 1, .36, 1); }
.qz-bar i.on::after { transform: scaleX(1); }
.qz-x { flex: none; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 50%; background: #fff; color: var(--brown); font-size: 1.5rem; line-height: 1; cursor: pointer; transition: transform .2s ease, border-color .2s ease; }
.qz-x:hover, .qz-x:focus-visible { transform: rotate(90deg); border-color: var(--gold); }
.qz-x:focus-visible, .qz-back:focus-visible, .qz-again:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.qz-live, .qz-vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.qz-stage { width: min(1080px, 100%); margin: 0 auto; padding: clamp(1.2rem, 4vh, 3.5rem) clamp(1rem, 4vw, 3rem) 3rem; }
.qz-stage.qz-in { animation: qzEntra .45s cubic-bezier(.22, 1, .36, 1) both; }
.qz-stage.qz-out { animation: qzSale .22s ease both; }
@keyframes qzEntra { from { opacity: 0; transform: translateX(28px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes qzSale { to { opacity: 0; transform: translateX(-28px); filter: blur(4px); } }

/* pregunta */
.qz-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.6rem; }
.qz-num { font-family: 'Playfair Display', serif; font-size: 1.05rem; color: var(--text-muted); }
.qz-num b { display: inline-block; font-size: 2.2rem; font-weight: 400; color: var(--gold-label); animation: qzNum .5s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes qzNum { from { opacity: 0; transform: translateY(60%); } to { opacity: 1; transform: none; } }
.qz-back, .qz-again { min-height: 44px; padding: 0 0.9rem; border: none; border-radius: 999px; background: transparent; color: var(--cocoa); font-family: inherit; font-size: 0.95rem; font-weight: 600; cursor: pointer; }
.qz-back:hover, .qz-again:hover { background: rgba(196, 154, 60, 0.12); }
.qz-q { margin: 0 0 clamp(1.4rem, 4vh, 2.6rem); min-height: 2.3em; font-family: 'Playfair Display', serif; font-weight: 400; font-size: clamp(2rem, 5.2vw, 3.6rem); line-height: 1.1; color: var(--brown); outline: none; }
.qz-caret { display: inline-block; width: 3px; height: 0.9em; margin-left: 4px; vertical-align: -0.08em; background: var(--gold); animation: qzCaret .8s steps(1) infinite; }
@keyframes qzCaret { 50% { opacity: 0; } }

/* opciones */
.qz-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; }
.qz-opts.qz-5 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.qz-opts.qz-5 .qz-opt { grid-column: span 2; }
.qz-opts.qz-5 .qz-opt:nth-child(4) { grid-column: 2 / span 2; }
.qz-opt { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 0.9rem; min-height: 56px; padding: 1.3rem 1.3rem 1.2rem; border: 1px solid var(--border); border-radius: 16px; background: #fff; color: var(--brown); font-family: inherit; text-align: left; cursor: pointer; animation: qzOpt .5s cubic-bezier(.22, 1, .36, 1) both; animation-delay: calc(var(--d) + 0.15s); transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease, opacity .25s ease; }
@keyframes qzOpt { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.qz-opt:hover, .qz-opt:focus-visible { transform: translateY(-4px); border-color: var(--gold); box-shadow: 0 14px 30px rgba(61, 43, 31, 0.1); outline: none; }
.qz-opt:focus-visible { box-shadow: 0 0 0 3px rgba(196, 154, 60, 0.45), 0 14px 30px rgba(61, 43, 31, 0.1); }
.qz-ico { position: relative; display: grid; place-items: center; width: 3.6rem; height: 3.6rem; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6e3, #f2e4c8); font-size: 1.75rem; line-height: 1; transition: transform .45s cubic-bezier(.34, 1.56, .64, 1); }
.qz-opt:hover .qz-ico, .qz-opt:focus-visible .qz-ico { transform: translateY(-3px) rotate(-8deg) scale(1.08); }
.qz-ico svg { position: absolute; inset: -4px; width: calc(100% + 8px); height: calc(100% + 8px); transform: rotate(-90deg); fill: none; stroke: var(--gold); stroke-width: 3; stroke-dasharray: 189; stroke-dashoffset: 189; }
.qz-opt.picked { border-color: var(--gold); transform: scale(0.98); }
.qz-opt.picked .qz-ico svg { transition: stroke-dashoffset .35s ease; stroke-dashoffset: 0; }
.qz-opt.dim { opacity: 0.45; }
.qz-otxt strong { display: block; font-size: 1.08rem; font-weight: 700; }
.qz-otxt small { display: block; margin-top: 0.15rem; font-size: 0.88rem; color: var(--text-muted); }
.qz-opt kbd { position: absolute; top: 0.9rem; right: 0.9rem; min-width: 1.6rem; padding: 0.1rem 0.4rem; border: 1px solid var(--border); border-radius: 6px; font: 600 0.72rem 'DM Sans', sans-serif; color: var(--text-muted); text-align: center; }

/* resultado: ficha de cata */
.qz-card { position: relative; display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: clamp(1.2rem, 3vw, 2.6rem); align-items: center; padding: clamp(1rem, 2.5vw, 1.6rem); border: 1px solid #e3d6c5; border-radius: 18px; background: #fffdf9; box-shadow: 0 1px 0 #fff inset, 0 18px 40px rgba(61, 43, 31, 0.08); overflow: hidden; }
.qz-card::before { content: ''; position: absolute; inset: 8px; border: 1px dashed rgba(196, 154, 60, 0.35); border-radius: 12px; pointer-events: none; }
.qz-nibs { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.qz-card img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 12px; animation: qzPop .6s cubic-bezier(.34, 1.56, .64, 1) both; }
@keyframes qzPop { from { opacity: 0; transform: scale(0.9) rotate(-1.5deg); } to { opacity: 1; transform: none; } }
.qz-label { margin: 0 0 0.4rem; font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; color: var(--gold-label); }
.qz-name { margin: 0 0 0.6rem; min-height: 1.15em; font-family: 'Playfair Display', serif; font-weight: 400; font-size: clamp(2rem, 4.5vw, 3.1rem); line-height: 1.08; color: var(--brown); outline: none; }
.qz-why { margin: 0 0 1rem; min-height: 3.2em; font-size: 1.02rem; line-height: 1.6; color: var(--text-muted); }
.qz-price { margin: 0 0 1.1rem; font-family: 'Playfair Display', serif; font-size: 1.2rem; color: var(--brown); animation: qzOpt .5s ease both; }
.qz-note { margin: 0 0 1rem; padding: 0.65rem 0.8rem; border-radius: 10px; background: #FBF3E2; font-size: 0.88rem; color: var(--brown); }
.qz-ctas { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.qz-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 1.3rem; border: 1px solid var(--brown); border-radius: 10px; background: var(--brown); color: var(--cream); font-family: inherit; font-size: 0.95rem; font-weight: 600; text-decoration: none; cursor: pointer; transition: transform .2s ease, background .2s ease; }
.qz-btn:hover, .qz-btn:focus-visible { transform: translateY(-2px); background: var(--cocoa); color: var(--cream); }
.qz-btn.qz-add { background: #fff; color: var(--brown); }
.qz-btn.qz-add:hover, .qz-btn.qz-add:focus-visible { background: #F4EEE3; color: var(--brown); }
.qz-btn.qz-wa { border-color: var(--wa-green); background: var(--wa-green); color: #fff; }
.qz-btn.qz-wa:hover, .qz-btn.qz-wa:focus-visible { background: var(--wa-green-hover); color: #fff; }
.qz-btn:focus-visible, .qz-alt:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.qz-also { margin: 2rem 0 0.7rem; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; color: var(--gold-label); }
.qz-alts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }
.qz-alt { display: flex; align-items: center; gap: 0.85rem; padding: 0.6rem; border: 1px solid var(--border); border-radius: 12px; background: #fff; color: var(--brown); font-weight: 600; text-decoration: none; transition: border-color .2s ease, transform .2s ease; }
.qz-alt:hover { border-color: var(--gold); transform: translateY(-2px); }
.qz-alt img { width: 48px; height: 64px; object-fit: cover; border-radius: 8px; }
.qz-again { margin-top: 1.2rem; }

/* móvil */
@media (max-width: 760px) {
  .blog-body .qz-hero .qz-kicker { font-size: 0.75rem; }
  .qz-brand { display: none; }
  .qz-opts, .qz-opts.qz-5 { grid-template-columns: 1fr; gap: 0.6rem; }
  .qz-opts.qz-5 .qz-opt, .qz-opts.qz-5 .qz-opt:nth-child(4) { grid-column: auto; }
  .qz-opt { flex-direction: row; align-items: center; min-height: 56px; padding: 0.8rem 2.6rem 0.8rem 0.9rem; }
  .qz-ico { width: 3rem; height: 3rem; font-size: 1.45rem; flex: none; }
  .qz-opt kbd { display: none; }
  .qz-card { grid-template-columns: 1fr; }
  .qz-card img { max-width: 220px; margin: 0 auto; }
  .qz-ctas .qz-btn { flex: 1 1 100%; }
  .qz-alts { grid-template-columns: 1fr; }
}

/* sin movimiento: solo fundidos */
@media (prefers-reduced-motion: reduce) {
  .qz-hero-icons span, .qz-num b, .qz-opt, .qz-card img, .qz-price { animation: none; }
  .qz-stage.qz-in, .qz-stage.qz-out { animation-duration: .2s; animation-name: qzFade; }
  @keyframes qzFade { from { opacity: 0; } to { opacity: 1; } }
  .qz-opt:hover, .qz-opt:focus-visible, .qz-start:hover { transform: none; }
  .qz-caret { display: none; }
}
