/* ==========================================================================
   EFECTOS DE CAROLINE M. — solo los 4 efectos + el escalado responsive
   1) Cursor con etiqueta   2) Transición de cereza entre páginas
   3) Parpadeo del ojo      4) Brillo al pasar el cursor
   5) Lienzo que escala con la pantalla (responsive)
   6) Brillo dentro del líquido   7) Burbujas que suben
   Cambia los colores aquí arriba. No hace falta tocar nada más.
   ========================================================================== */
:root {
  --efx-cursor: #4a0a17;        /* color del punto del cursor */
  --efx-cursor-text: #4a0a17;   /* color del texto dentro del cursor grande */
  --efx-glint: rgba(255, 240, 235, .22); /* luz del brillo */
  --efx-ease: cubic-bezier(.7, 0, .3, 1);
}

/* ---- 5) LIENZO RESPONSIVE: la imagen y todo lo que hay encima escalan juntos ---- */
.canvas { position: relative; width: 100%; container-type: inline-size; overflow: hidden; }
.canvas > img { display: block; width: 100%; height: auto; }
.canvas [data-box] { position: absolute; display: block; }

/* ---- 4) BRILLO: una franja de luz cruza la zona al pasar el cursor o con el teclado ---- */
.glint { overflow: hidden; cursor: pointer; }
.glint::after { content: ""; position: absolute; inset: -20% -60%; pointer-events: none;
  background: linear-gradient(105deg, transparent 44%, var(--efx-glint) 50%, transparent 56%);
  transform: translateX(-60%); opacity: 0; transition: opacity .3s; }
.glint:hover::after, .glint:focus-visible::after { opacity: 1; animation: efx-glint 1.1s var(--efx-ease) forwards; }
@keyframes efx-glint { to { transform: translateX(60%); } }

/* ---- 3) OJO: un párpado (trozo de piel de la misma foto) que baja y sube ---- */
.eye { z-index: 3; pointer-events: none; }
.eye__lid { position: absolute; inset: 0; border-radius: 50%; transform: scaleY(0); transform-origin: 50% 0;
  box-shadow: inset 0 -2px 2px rgba(60, 20, 15, .55); }

.eye__shut { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; display: block; }

/* ---- 1) CURSOR (solo ratón; en móvil no aparece) ---- */
.efx-cursor { position: fixed; z-index: 95; left: 0; top: 0; pointer-events: none; width: 10px; height: 10px; margin: -5px 0 0 -5px;
  border-radius: 50%; background: var(--efx-cursor); opacity: 0; display: grid; place-items: center;
  transition: width .3s ease, height .3s ease, margin .3s ease, opacity .3s; mix-blend-mode: normal; }
.efx-cursor.show.label { opacity: 1; }
.efx-cursor.label { width: 84px; height: 84px; margin: -42px 0 0 -42px; background: rgba(255, 240, 232, .94); box-shadow: 0 6px 24px rgba(74, 10, 23, .18); }
.efx-cursor span { font: 500 9.5px/1.2 var(--sans, system-ui, sans-serif); letter-spacing: .14em; text-transform: uppercase; opacity: 0; color: var(--efx-cursor-text); text-align: center; }
.efx-cursor.label span { opacity: 1; }
@media (hover: none), (pointer: coarse) { .efx-cursor { display: none; } }

/* ---- 2) ETHEREAL DISSOLVE between pages: the page melts into a glowing haze, the next one comes up out of it ---- */
@view-transition { navigation: auto; }
::view-transition-group(root) { animation-duration: .9s; }
::view-transition-old(root) { animation: efx-dissolve .55s cubic-bezier(.4, 0, .6, 1) both; }
::view-transition-new(root) { animation: efx-emerge .95s cubic-bezier(.2, .7, .1, 1) .12s both; }
@keyframes efx-dissolve { to { opacity: 0; filter: blur(18px) brightness(1.22) saturate(1.15); transform: scale(1.018); } }
@keyframes efx-emerge { from { opacity: 0; filter: blur(16px) brightness(1.25) saturate(1.1); transform: scale(.988); } }
/* the same, for browsers without cross-page transitions */
html.efx-leave body { animation: efx-dissolve .42s cubic-bezier(.4, 0, .6, 1) forwards; pointer-events: none; }
html.efx-arrive body { animation: efx-emerge .95s cubic-bezier(.2, .7, .1, 1) both; }


/* ---- 6) BRILLO DENTRO DEL LÍQUIDO: una luz cruza SOLO la silueta del líquido (la define una máscara PNG) ---- */
.liquid { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden;
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.liquid i { position: absolute; top: -10%; bottom: -10%; left: 0; width: 18%;
  background: linear-gradient(100deg, rgba(255,230,236,0) 0%, rgba(255,236,240,.42) 50%, rgba(255,230,236,0) 100%);
  transform: translateX(-120%) skewX(-16deg); animation: efx-sheen 11s var(--efx-ease) infinite; }
@keyframes efx-sheen { 0% { transform: translateX(-120%) skewX(-16deg); } 45%, 100% { transform: translateX(640%) skewX(-16deg); } }

/* ---- 7) BURBUJAS que suben desde una zona (espuma, copa, líquido...) ---- */
.bubbles { z-index: 3; pointer-events: none; overflow: hidden; }
.bubble { position: absolute; bottom: -4%; border-radius: 50%; left: var(--x);
  width: calc(var(--s) * .0629cqw); height: calc(var(--s) * .0629cqw);
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.85) 0 7%, rgba(255,255,255,.12) 22%, rgba(243,157,174,.14) 62%, rgba(255,255,255,.4) 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.4); opacity: 0; animation: efx-rise var(--t) var(--d) ease-in infinite; }
@keyframes efx-rise { 0% { transform: translate(0,0); opacity: 0; } 12% { opacity: .9; } 70% { opacity: .75; } 100% { transform: translate(var(--dx), -330%); opacity: 0; } }
/* se pausan solas cuando el lienzo no se ve */
.canvas.paused .liquid i, .canvas.paused .bubble { animation-play-state: paused; }

/* ---- Movimiento reducido: sin parpadeo, sin cortina, sin brillos animados ---- */
@media (prefers-reduced-motion: reduce) {
  .eye, .liquid, .bubbles { display: none; }
  .glint::after { animation: none !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  html.efx-leave body, html.efx-arrive body { animation: none; }
}

/* ---- Caroline site: the scene hotspots sit above the effect layers ---- */
.scene__art { position: relative; }
.scene__art .hot { z-index: 4; }

/* the hero shine fades out at its edges (no hard circle, no hard line), and nothing on the hero reacts while the page is scrolling */
.scene__art .hot.glint { overflow: visible;
  -webkit-mask-image: radial-gradient(closest-side, #000 30%, transparent 100%); mask-image: radial-gradient(closest-side, #000 30%, transparent 100%); }
.scene__art .glint::after { background: linear-gradient(105deg, transparent 36%, rgba(255, 240, 235, .26) 50%, transparent 64%); }
html.is-scrolling .scene .hot, html.is-scrolling .scene .spot, html.is-scrolling .tile { pointer-events: none; }
html.is-scrolling .efx-cursor.label { width: 10px; height: 10px; margin: -5px 0 0 -5px; background: var(--efx-cursor); box-shadow: none; }
html.is-scrolling .efx-cursor.label span { opacity: 0; }
