/* ============================================================
   cervezas.css — «Tu cerveza»: el test y la carta de cervezas
   Menos texto, más dibujo: cada cerveza se cuenta con el vaso de
   su color, los lúpulos de su amargor y las barras de su cuerpo
   (los dibuja main.js). El espaciado es el de los entornos.
   ============================================================ */

/* ---------- Espaciado: un solo hueco entre apartados, como en el Restaurante y el Quiosco ---------- */
.pagina-cervezas { --hueco: clamp(28px, 4.5vh, 40px); }
.pagina-cervezas main { padding-top: clamp(76px, 10vh, 96px); } /* lo que ocupa el menú fijo */
.pagina-cervezas main > section { scroll-margin-top: 48px; }
.pagina-cervezas .ante { padding-top: var(--hueco); }
.pagina-cervezas .ante + .titulo-xl { padding-top: clamp(6px, 1.2vh, 12px); padding-bottom: clamp(16px, 2.6vh, 24px); }
.pagina-cervezas .tarjeta { margin-bottom: 0; }
.pagina-cervezas .cervezas { padding-bottom: calc(var(--hueco) * 2); }
.pagina-cervezas .carta__otro { display: flex; width: fit-content; margin: var(--hueco) auto 0; }
.tu-cerveza, .cervezas { padding-left: var(--gutter); padding-right: var(--gutter); }

/* ---------- Los dibujos ---------- */
.vaso { display: block; }
.lupulos { display: inline-flex; gap: .08em; }
.lupulo { display: block; width: 1em; height: 1.25em; }
.lupulo__cono { fill: transparent; }
.lupulo:not(.lleno) { opacity: .3; }
.lupulo.lleno .lupulo__cono { fill: #8DBF4A; }
.barras { display: block; }
.barras rect { fill: transparent; }
.barras rect:not(.lleno) { opacity: .35; }
.barras rect.lleno { fill: var(--dorado); }

/* ============================================================
   El test
   ============================================================ */
.quiz { max-width: 980px; text-align: center; }
.quiz [hidden] { display: none !important; }

/* Los cuatro pasos: vaso, lúpulo, barras y espiga, unidos por una línea */
.quiz__pasos { list-style: none; margin: 0 0 clamp(18px, 3vh, 28px); padding: 0; display: flex; justify-content: center; }
.quiz__pasos li {
  position: relative; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%;
  border: 2px solid rgba(245, 239, 230, .35); color: var(--crema); opacity: .55;
  transition: background .3s, border-color .3s, opacity .3s;
}
.quiz__pasos li + li { margin-left: 44px; }
.quiz__pasos li + li::before { content: ""; position: absolute; right: calc(100% + 2px); top: 50%; width: 44px; height: 2px; background: rgba(245, 239, 230, .3); }
.quiz__pasos li.actual, .quiz__pasos li.hecho { opacity: 1; border-color: var(--dorado); }
.quiz__pasos li.actual { background: var(--dorado); color: var(--negro); }
.quiz__pasos li.hecho::before, .quiz__pasos li.actual::before { background: var(--dorado); }
.quiz__pasos .vaso { height: 30px; width: auto; }
.quiz__pasos .lupulo { width: 22px; height: 28px; }
.quiz__pasos .barras { width: 26px; height: auto; }
.quiz__pasos li > svg:not([class]) { width: 28px; height: 28px; }

.pregunta { border: 0; margin: 0; padding: 0; min-width: 0; }
.pregunta legend { padding: 0; width: 100%; }
.pregunta__titulo { font-family: var(--f-display); font-weight: 400; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.05; }
.pregunta__titulo:focus { outline: none; }
.pregunta__titulo:focus-visible { outline: 3px solid var(--dorado); outline-offset: 6px; }

/* Las respuestas: tres fichas grandes, cada una con su dibujo y una o dos palabras */
.opciones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 18px); margin-top: clamp(20px, 3.4vh, 32px); }
.opcion { position: relative; display: block; cursor: pointer; }
.opcion input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opcion__caja {
  display: grid; justify-items: center; align-content: center; gap: 14px; height: 100%; min-height: clamp(150px, 22vh, 200px);
  padding: 18px 10px; border-radius: 22px; border: 3px solid var(--crema);
  background: var(--crema); color: var(--verde);
  font-weight: 700; font-size: clamp(15px, 1.5vw, 19px); text-transform: uppercase; letter-spacing: .05em; line-height: 1.15;
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), background .2s, border-color .2s;
}
@media (hover: hover) and (pointer: fine) { .opcion:hover .opcion__caja { transform: translateY(-4px); } }
.opcion input:focus-visible + .opcion__caja { outline: 3px solid var(--dorado); outline-offset: 4px; }
.opcion input:checked + .opcion__caja { background: var(--dorado); border-color: var(--dorado); color: var(--negro); transform: translateY(-4px) rotate(-1.5deg); }
.opcion input:checked + .opcion__caja .barras rect.lleno { fill: var(--negro); }
.opcion__dibujo { display: flex; align-items: flex-end; justify-content: center; height: clamp(64px, 9vh, 88px); }
.opcion__dibujo .vaso { height: 100%; width: auto; }
.opcion__dibujo .lupulos { font-size: clamp(34px, 4.2vw, 50px); }
.opcion__dibujo .barras { height: 78%; width: auto; }
.opcion__icono { display: flex; align-items: center; height: 100%; }
.opcion__icono svg { height: 82%; width: auto; }

/* «Sin gluten» y «sin alcohol»: dos casillas pequeñas, en la primera pantalla */
.pregunta__acciones { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: clamp(20px, 3.4vh, 30px); }
.quiz__atras {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; cursor: pointer;
  border: 2px solid rgba(245, 239, 230, .6); background: transparent; color: var(--crema); font-size: 22px;
  transition: background .2s;
}
@media (hover: hover) and (pointer: fine) { .quiz__atras:hover { background: rgba(245, 239, 230, .12); } }

/* ---------- El resultado: la botella, el nombre, su perfil en dibujos y el precio ---------- */
.quiz__resultado:focus { outline: none; }
.resultado { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: clamp(22px, 4vw, 48px); align-items: center; text-align: left; }
.resultado__visual { display: flex; justify-content: center; align-items: center; height: clamp(300px, 46vh, 400px); padding: clamp(18px, 3vw, 30px); border-radius: 22px; background: var(--crema); overflow: hidden; }
.resultado__visual img { max-height: 100%; max-width: 100%; width: auto; height: auto; object-fit: contain; filter: drop-shadow(0 14px 16px rgba(0, 0, 0, .25)); }
.resultado__antetitulo { font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: 14px; color: var(--dorado-hover); }
.resultado__nombre { font-family: var(--f-display); font-weight: 400; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.02; margin-top: 6px; }
.resultado__nombre:focus { outline: none; }
.resultado__nombre:focus-visible { outline: 3px solid var(--dorado); outline-offset: 6px; }
.resultado__meta { margin-top: 8px; font-weight: 600; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; opacity: .8; }
.resultado__perfil { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.resultado__perfil li { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 10px; border-radius: 14px; background: rgba(245, 239, 230, .12); font-weight: 700; font-size: 15px; }
.resultado__icono { display: flex; align-items: center; height: 30px; }
.resultado__icono .vaso { height: 30px; width: auto; }
.resultado__icono .lupulos { font-size: 21px; }
.resultado__icono .barras { height: 24px; width: auto; }
.resultado__precio { display: flex; align-items: center; gap: 12px; margin-top: 20px; font-family: var(--f-display); font-size: 2.1rem; line-height: 1; }
.resultado__acciones { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.resultado__otras { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; padding-top: 20px; border-top: 1.5px solid rgba(245, 239, 230, .25); }
.resultado__otras ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.resultado__otras a {
  display: inline-flex; align-items: center; gap: 10px; padding: 5px 18px 5px 5px; border-radius: 999px;
  background: rgba(245, 239, 230, .12); color: inherit; font-weight: 700; text-decoration: none; transition: background .2s;
}
@media (hover: hover) and (pointer: fine) { .resultado__otras a:hover { background: rgba(245, 239, 230, .24); } }
.resultado__mini { display: grid; place-items: center; width: 40px; height: 52px; border-radius: 999px; background: var(--crema); overflow: hidden; }
.resultado__mini img { height: 44px; width: auto; }
/* La botella recortada, como en la carta: sin recuadro, de pie sobre su balda y con
   el brillo del cristal pasando una vez al salir */
.resultado__visual--botella { position: relative; align-items: flex-end; padding: 0 0 clamp(14px, 2vh, 22px); background: none; border-radius: 0; overflow: visible; }
.resultado__visual--botella::after {
  content: ""; position: absolute; left: 50%; bottom: clamp(14px, 2vh, 22px); width: min(260px, 80%); height: 1px; transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(245, 239, 230, .45), transparent);
}
.resultado__visual--botella .botella {
  --alto: clamp(260px, 40vh, 350px); z-index: 1;
  filter: drop-shadow(0 18px 14px rgba(0, 0, 0, .45)) drop-shadow(0 2px 2px rgba(0, 0, 0, .5));
  animation: botella-sale .9s cubic-bezier(.2, .8, .2, 1) both;
}
.resultado__visual--botella .botella__vidrio::after { animation: botella-brillo 1.4s cubic-bezier(.4, 0, .2, 1) .5s both; }
@keyframes botella-sale { from { opacity: 0; transform: translateY(26px); } }
/* Hasta 700 %: en las botellas altas la franja va inclinada y, a 420 %, su pie aún se ve */
@keyframes botella-brillo { 85% { opacity: 1; } to { transform: skewX(-12deg) translateX(700%); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  html:not(.animar) .resultado__visual--botella .botella, html:not(.animar) .resultado__visual--botella .botella__vidrio::after { animation: none; }
}
.resultado--gurriata .resultado__nombre { color: var(--g-coral-suave); }

/* ============================================================
   La carta de cervezas
   ============================================================ */
.nevera { padding: clamp(20px, 3vw, 40px); }
.nevera__cabecera { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 24px; margin-bottom: clamp(24px, 4vh, 36px); }
.filtros { display: flex; flex-wrap: wrap; gap: 8px; }
.filtro {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  border: 2px solid var(--verde); background: transparent; color: var(--verde);
  font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .04em;
  transition: background .2s, color .2s;
}
.filtro:has(.filtro__icono) { padding-left: 9px; }
@media (hover: hover) and (pointer: fine) { .filtro:hover { background: rgba(42, 82, 77, .1); } }
.filtro[aria-pressed="true"] { background: var(--verde); color: var(--crema); }
.filtro__icono { display: grid; place-items: center; width: 26px; height: 28px; }
.filtro__icono svg { height: 100%; width: auto; }
.filtro__icono svg:not(.vaso) { height: 24px; }

/* Qué es cada dibujo */
.leyenda { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--verde-elevado); }
.leyenda > span { display: inline-flex; align-items: center; gap: 7px; }
.leyenda .vaso { height: 22px; width: auto; }
.leyenda .lupulos { font-size: 14px; }
.leyenda .barras { height: 16px; width: auto; }

.lista-cervezas { display: grid; gap: clamp(26px, 4vh, 40px); }
.grupo-cerveza h4 { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; padding-bottom: 8px; border-bottom: 2px solid var(--verde); margin-bottom: 14px; }
.grupo-cerveza__lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }

/* Cada cerveza: su botella, el nombre, el estilo, el perfil en dibujos y el precio */
.cerveza {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 14px;
  padding: 12px 16px 12px 12px; border-radius: 18px; background: var(--blanco); border: 1.5px solid rgba(42, 82, 77, .14);
  scroll-margin-top: 140px; transition: transform .25s var(--ease), box-shadow .25s;
}
@media (hover: hover) and (pointer: fine) { .cerveza:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(30, 40, 35, .1); } }
.cerveza__foto { display: grid; place-items: center; width: 62px; height: 108px; border-radius: 12px; background: var(--crema-2); overflow: hidden; }
.cerveza__foto img { height: 96px; width: auto; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .18)); }
.cerveza--casa .cerveza__foto img { width: 100%; height: 100%; object-fit: cover; filter: none; }
.cerveza__foto--medallon { width: 76px; height: 76px; border-radius: 50%; background: var(--blanco); border: 2px solid rgba(42, 82, 77, .14); }
.cerveza__foto--medallon img { width: 100%; height: 100%; object-fit: cover; filter: none; }
.cerveza__logo {
  width: 44px; height: 46px; background: var(--verde);
  -webkit-mask: url("../img/logoDf.webp") center / contain no-repeat;
          mask: url("../img/logoDf.webp") center / contain no-repeat;
}
.cerveza__info { display: grid; gap: 4px; justify-items: start; min-width: 0; }
.cerveza__nombre { font-weight: 700; font-size: 16px; line-height: 1.2; text-transform: uppercase; letter-spacing: .02em; }
.cerveza__meta { font-size: 13px; font-weight: 600; color: var(--verde-elevado); }
.cerveza__precio { align-self: start; font-family: var(--f-display); font-size: 1.35rem; line-height: 1.2; white-space: nowrap; }
.perfil { display: inline-flex; align-items: center; gap: 10px; margin-top: 4px; }
.perfil__vaso .vaso { height: 24px; width: auto; }
.perfil .lupulos { font-size: 15px; }
.perfil .barras { height: 17px; width: auto; }
.cerveza__etiquetas { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.cerveza .etiqueta { font-size: 10.5px; padding: 2px 8px; }
.cerveza--casa { border-color: var(--g-coral); }
.cerveza--casa .cerveza__nombre { color: var(--g-coral); }
.cerveza:target, .cerveza.destacada { outline: 3px solid var(--dorado); outline-offset: 2px; background: #FFF6E2; }

/* De grifo: las tres medidas, con su vaso de su tamaño */
.cerveza--grifo { grid-template-columns: auto minmax(0, 1fr); }
.medidas { list-style: none; margin: 6px 0 0; padding: 0; display: flex; align-items: flex-end; gap: clamp(14px, 2vw, 24px); }
.medidas li { display: grid; justify-items: center; gap: 2px; }
.medidas__vaso .vaso { height: calc(46px * var(--t)); width: auto; }
.medidas__nombre { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--verde-elevado); }
.medidas__precio { font-weight: 700; font-size: 15px; }
.lista-vacia { font-weight: 600; }

/* ---------- Móvil ---------- */
@media (max-width: 760px) {
  .resultado { grid-template-columns: 1fr; }
  .resultado__visual { height: 280px; }
  .resultado__visual--botella .botella { --alto: 240px; }
}
@media (max-width: 600px) {
  .quiz__pasos li { width: 46px; height: 46px; }
  .quiz__pasos li + li { margin-left: 26px; }
  .quiz__pasos li + li::before { width: 26px; }
  .opciones { gap: 8px; }
  .opcion__caja { min-height: 132px; gap: 10px; padding: 14px 4px; border-radius: 16px; font-size: 13px; letter-spacing: .03em; }
  .opcion__dibujo { height: 58px; }
  .opcion__dibujo .lupulos { font-size: 24px; }
  .filtro { min-height: 42px; padding: 0 12px; font-size: 12.5px; }
  .cerveza { gap: 4px 12px; padding: 10px 12px 10px 10px; }
  .cerveza__foto { width: 54px; height: 92px; }
  .cerveza__foto img { height: 82px; }
}

@media (prefers-reduced-motion: reduce) {
  html:not(.animar) .opcion__caja, html:not(.animar) .cerveza, html:not(.animar) .quiz__pasos li { transition: none; }
  @media (hover: hover) and (pointer: fine) { html:not(.animar) .opcion:hover .opcion__caja, html:not(.animar) .cerveza:hover { transform: none; } }
}

/* La carta en texto que lleva el HTML (herramientas/carta-en-html.mjs): para quien lee sin
   JavaScript. Con JavaScript, casa.js pinta la de las botellas en su sitio y esta no se ve. */
html.js .cv__estatica { display: none; }
.cv__estatica { max-width: 60ch; margin: 0 auto; line-height: 1.6; }
.cv__estatica h3 { margin: 1.4em 0 .4em; font-family: var(--f-rotulo); font-size: 1.3rem; }
