/* g27f · Reseñas, versione sobria: specchio ad arco con cornice d'oro sottile e opaca,
   stessi fondi e ori della card «Reserva tu cita» e del ritratto (rgb(17 12 8 / .88), #bb9259, #aa8750).
   Si toglie con questo file, js/resenas.js e la <section id="resenas">. Il titolo usa css/titoli.css. */

/* corsivo vero dell'EB Garamond per il testo delle recensioni (stessa famiglia del sito) */
@font-face {
  font-family: "EB Garamond";
  src: url("../font/EBGaramond-italic-400_600-latin.woff2") format("woff2");
  font-style: italic;
  font-weight: 400 800;
  font-display: swap;
}

html.pagina-f #resenas {
  --larghezza-specchio: min(86vw, 400px);
  --altezza-specchio: clamp(340px, 50vh, 480px);
  --cornice: #bb9259;
  position: relative;
  padding-block: clamp(48px, 9vw, 96px) clamp(32px, 6vw, 72px);
  color: #f7efe1;
  text-align: center;
}
@supports (height: 1svh) {
  html.pagina-f #resenas { --altezza-specchio: clamp(340px, 50svh, 480px); }
}
@media (min-width: 1024px) and (min-aspect-ratio: 1/1) {
  html.pagina-f #resenas {
    --altezza-specchio: clamp(460px, 100vh - 360px, 600px);
    --larghezza-specchio: calc(var(--altezza-specchio) * .915);
    padding-block-start: 24px;
  }
  @supports (height: 1svh) {
    html.pagina-f #resenas { --altezza-specchio: clamp(460px, 100svh - 360px, 600px); }
  }
}

html.pagina-f #resenas .resenas-simboli { position: absolute; inline-size: 0; block-size: 0; overflow: hidden; }
html.pagina-f #resenas .resenas-titolo {
  display: block;
  max-inline-size: none;
  margin: 0 auto;
  font: 600 var(--titolo-sezione)/1.02 var(--titoli);
  letter-spacing: -.03em;
  color: #f7efe1;
  text-align: center;
}
html.pagina-f #resenas .resenas-titolo:focus { outline: none; }

/* ---------- voto: la moneta fotografata dello scrigno, il numero in serif ---------- */
html.pagina-f #resenas .resenas-voto {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-block: 14px 18px;
}
html.pagina-f #resenas .voto-moneta {
  display: block;
  inline-size: 40px;
  block-size: 40px;
  user-select: none;
  -webkit-user-select: none;
}
html.pagina-f #resenas .voto-numero {
  margin: 2px 0 0;
  max-inline-size: none;
  font: 600 2rem/1 var(--titoli);
  letter-spacing: -.01em;
  color: #f7efe1;
}
html.pagina-f #resenas .voto-riga {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 0;
  max-inline-size: none;
  font: 500 .8125rem/1.3 var(--testo);
  color: #c8c0b5;
}
html.pagina-f #resenas .voto-stelle { inline-size: 57px; block-size: 10px; fill: var(--oro-f, #d9bc83); flex: none; }
@media (min-width: 1024px) and (min-aspect-ratio: 1/1) {
  html.pagina-f #resenas .resenas-voto { flex-direction: row; justify-content: center; gap: 12px; margin-block: 12px 16px; }
  html.pagina-f #resenas :is(.voto-numero, .voto-riga) { margin: 0; }
}
@media (max-width: 339.98px) {
  html.pagina-f #resenas { padding-block-start: 12px; }
  html.pagina-f #resenas .resenas-titolo { font-size: 1.625rem; }
  html.pagina-f #resenas .resenas-voto { flex-flow: row wrap; justify-content: center; column-gap: 8px; row-gap: 2px; margin-block: 8px 10px; }
  html.pagina-f #resenas .voto-moneta { inline-size: 28px; block-size: 28px; }
  html.pagina-f #resenas .voto-numero { margin: 0; font-size: 1.5rem; }
  html.pagina-f #resenas .voto-riga { display: contents; }
  html.pagina-f #resenas .voto-testo { flex-basis: 100%; font: 500 .75rem/1.3 var(--testo); color: #c8c0b5; }
}

/* ---------- lo specchio ---------- */
html.pagina-f #resenas .resenas-scena {
  inline-size: var(--larghezza-specchio);
  margin: 0 auto;
}
html.pagina-f #resenas .specchio {
  position: relative;
  block-size: var(--altezza-specchio);
}
html.pagina-f #resenas .specchio-vetro {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 9999px 9999px 3px 3px;
  container-type: inline-size;
  background: rgb(17 12 8 / .88);
}
/* senza JavaScript la cornice è il bordo CSS */
html.pagina-f #resenas .specchio:not([data-stato]) .specchio-vetro { box-shadow: inset 0 0 0 1px var(--cornice); }
html.pagina-f #resenas .specchio:not([data-stato]) .specchio-cornice { display: none; }
html.pagina-f #resenas .specchio-cornice {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  overflow: visible;
  pointer-events: none;
}
html.pagina-f #resenas .cornice-linea {
  fill: none;
  stroke: var(--cornice);
  stroke-width: 1.2;
  stroke-dasharray: 1 1;
}
html.pagina-f #resenas .specchio:has(.resenas-binario:focus-visible) .cornice-linea { stroke: var(--oro-f, #d9bc83); stroke-width: 2; }

/* ---------- le recensioni ---------- */
html.pagina-f #resenas .resenas-binario {
  position: absolute;
  inset: 0;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  outline: none;
}
html.pagina-f #resenas .resenas-binario::-webkit-scrollbar { display: none; }
html.pagina-f #resenas .resena {
  flex: 0 0 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 16cqi 10.5cqi 8cqi;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}
html.pagina-f #resenas .resena-virgoletta {
  display: block;
  block-size: .42em;
  margin-block-end: .04em;
  font: 600 clamp(48px, 16cqi, 68px)/1 var(--titoli);
  color: var(--oro-f, #d9bc83);
}
html.pagina-f #resenas .resena-testo {
  margin: 0;
  max-inline-size: 22ch;
  font: italic 500 clamp(17px, 6.6cqi, 24px)/1.36 var(--titoli);
  color: #f7efe1;
  text-wrap: pretty;
}
html.pagina-f #resenas .resena-lunga .resena-testo {
  max-inline-size: 26ch;
  font-size: clamp(16px, 5.95cqi, 22px);
  line-height: 1.32;
}
html.pagina-f #resenas .resena-breve .resena-testo { font-size: clamp(25px, 9cqi, 34px); line-height: 1.15; }
html.pagina-f #resenas .resena figcaption {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-block-start: clamp(12px, 4.5cqi, 20px);
}
html.pagina-f #resenas .resena-stelle { inline-size: 62px; block-size: 11px; margin-block-end: 8px; fill: var(--oro-f, #d9bc83); }
html.pagina-f #resenas .resena-nome { font: 600 1.125rem/1.2 var(--titoli); color: #f3dfb9; }
html.pagina-f #resenas .resena-servizio {
  margin-block-start: 4px;
  font: 500 .75rem/1.3 var(--testo);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--oro-f, #d9bc83);
}

/* ---------- puntini ---------- */
html.pagina-f #resenas .resenas-monete { display: flex; justify-content: center; margin-block-start: 6px; }
html.pagina-f #resenas .resenas-monete[hidden] { display: none; }
html.pagina-f #resenas .moneta-punto {
  display: grid;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
html.pagina-f #resenas .moneta-punto::before {
  content: "";
  inline-size: 8px;
  block-size: 8px;
  border: 1px solid #aa8750;
  border-radius: 50%;
}
html.pagina-f #resenas .moneta-punto[aria-current="true"]::before { background: var(--oro-f, #d9bc83); border-color: var(--oro-f, #d9bc83); }
html.pagina-f #resenas .moneta-punto:focus-visible { outline: none; }
html.pagina-f #resenas .moneta-punto:focus-visible::before { outline: 2px solid var(--oro-f, #d9bc83); outline-offset: 4px; }

/* ---------- entrata discreta: la cornice si completa, il testo compare ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.pagina-f #resenas .specchio[data-stato="spento"] .cornice-linea { stroke-dashoffset: 1; }
  html.pagina-f #resenas .specchio[data-stato="spento"] .specchio-vetro { opacity: .4; }
  html.pagina-f #resenas .specchio[data-stato="spento"] .resena > * { opacity: 0; }
  html.pagina-f #resenas .specchio[data-stato="accende"] .cornice-linea { animation: rs-traccia 1100ms cubic-bezier(.45, .05, .3, 1) both; }
  html.pagina-f #resenas .specchio[data-stato="accende"] .specchio-vetro { transition: opacity 700ms ease-out 200ms; }
  html.pagina-f #resenas .specchio[data-stato="accende"] .resena > * { animation: rs-compare 500ms ease-out 850ms both; }
  @keyframes rs-traccia { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
  @keyframes rs-compare { from { opacity: 0; } to { opacity: 1; } }
}
