/* MILORIA · the original boutique welcome photograph, monogram and one clear entrance. */
html.entry-intro-open,
html.entry-intro-open body { overflow: hidden; }

.entry-intro {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fffaf2;
  background: #d9c5a9;
  opacity: 1;
  transition: opacity .52s ease;
}
.entry-intro[hidden] { display: none; }
.entry-intro.is-closing { opacity: 0; pointer-events: none; }
.entry-intro-backdrop,
.entry-intro-shade { position: absolute; inset: 0; }
.entry-intro-backdrop {
  background-color: #d9c5a9;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.entry-intro-shade {
  background: radial-gradient(ellipse at center, transparent 25%, rgb(55 36 26 / 10%) 100%);
}
.entry-intro-content {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: clamp(20px, 4vh, 36px);
  width: min(92vw, 620px);
  padding: 30px 24px 40px;
  text-align: center;
  opacity: 0;
  transform: translateY(15px);
}
.entry-intro.is-ready .entry-intro-content { animation: entry-intro-rise .72s .08s cubic-bezier(.22,.68,.2,1) forwards; }
.entry-intro-monogram-wrap {
  display: grid;
  place-items: center;
  width: min(440px, 46vw, 62vh);
  aspect-ratio: 174 / 124;
  perspective: 1000px;
  perspective-origin: center;
  filter: drop-shadow(0 3px 2px rgb(41 25 10 / 65%)) drop-shadow(0 12px 18px rgb(41 25 10 / 35%));
}
.entry-intro-rotor {
  position: relative;
  width: 100%;
  transform-origin: center;
  transform-style: preserve-3d;
  backface-visibility: visible;
  animation: entry-monogram-spin 9s linear infinite;
  will-change: transform;
}
.entry-intro-monogram {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: sepia(1) saturate(2.4) brightness(.8) contrast(1.35)
    drop-shadow(1px 0 #684212) drop-shadow(-1px 0 #684212)
    drop-shadow(0 1px #684212) drop-shadow(0 -1px #f8df9e);
}
.entry-intro-rotor::before,
.entry-intro-rotor::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-mask: url('/assets/miloria-monogram-hd.png') center / 100% 100% no-repeat;
  mask: url('/assets/miloria-monogram-hd.png') center / 100% 100% no-repeat;
}
.entry-intro-rotor::before {
  background: linear-gradient(115deg, #684212, #c7952e 22%, #ffe5a2 44%,
    #9e6e23 58%, #d6ad4d 80%, #78501c);
  transform: translateZ(-3px);
}
.entry-intro-rotor::after {
  background: linear-gradient(110deg, transparent 34%, rgb(255 238 179 / 15%) 43%,
    rgb(255 248 209 / 90%) 49%, rgb(255 226 139 / 45%) 53%, transparent 63%);
  background-size: 280% 100%;
  transform: translateZ(.5px);
  animation: entry-monogram-shine 6.5s linear infinite;
}
.entry-intro-enter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 270px;
  max-width: 100%;
  min-height: 76px;
  margin: 0;
  padding: 14px 24px;
  border: 2px solid #f5e4b4;
  border-radius: 17px;
  background: linear-gradient(180deg, #f4d88a, #c89b45);
  color: #33231c;
  box-shadow: 0 6px 0 #80612d, 0 12px 24px -12px rgb(24 17 13 / 50%), inset 0 1px rgb(255 255 255 / 85%);
  font: 700 1.6rem/1.2 var(--serif);
  letter-spacing: .06em;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .2s ease, filter .2s ease;
}
.entry-intro-enter:hover { transform: translateY(-2px); filter: brightness(1.04); }
.entry-intro-enter:focus-visible { outline: 2px solid #4f3547; outline-offset: 5px; }
.entry-intro-enter:active { transform: translateY(2px); }
@keyframes entry-monogram-shine {
  0%, 50%, 100% { background-position: 150% 0; }
  24%, 74% { background-position: -50% 0; }
}
@keyframes entry-intro-rise {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 600px) {
  .entry-intro-content { padding: 24px 20px 32px; gap: 24px; }
  .entry-intro-monogram-wrap { width: min(250px, 64vw); }
  .entry-intro-enter { width: 210px; min-height: 62px; font-size: 1.25rem; }
}
@media (max-height: 500px) {
  .entry-intro-content { gap: 16px; padding-block: 20px 28px; }
  .entry-intro-monogram-wrap { width: min(220px, 38vh); }
  .entry-intro-enter { min-height: 48px; padding-block: 10px; font-size: 1.15rem; }
}
@media (prefers-reduced-motion: reduce) {
  .entry-intro, .entry-intro-content, .entry-intro-enter, .entry-intro-rotor,
  .entry-intro-rotor::after { animation: none; transition: none; }
  .entry-intro-rotor { transform: none; }
  .entry-intro-content { opacity: 1; transform: none; }
}

/* Depth lives on wrappers so the original logo rotation stays independent. */
.entry-intro { perspective: 1200px; --depth-x: 0; --depth-y: 0; }
.entry-intro-backdrop {
  inset: -3%;
  transform: translate3d(calc(var(--depth-x) * -10px), calc(var(--depth-y) * -8px), 0) scale(1.04);
  transition: scale 1.8s cubic-bezier(.2,.7,.2,1);
  scale: 1.05;
}
.entry-intro.is-ready .entry-intro-backdrop { scale: 1; }
.entry-intro-monogram-wrap {
  transform: translate3d(calc(var(--depth-x) * 9px), calc(var(--depth-y) * 7px), 28px)
    rotateX(calc(var(--depth-y) * -4deg)) rotateY(calc(var(--depth-x) * 5deg));
}
.entry-intro-rotor { animation: entry-monogram-spin 9s linear infinite; }
.entry-intro-monogram { transform: translateZ(0px); }
.entry-intro-rotor::before, .entry-intro-rotor::after { animation-duration: 9s; }
.entry-intro.is-closing .entry-intro-content { opacity: 0; transition: opacity .4s; }
.entry-intro.is-closing .entry-intro-backdrop { scale: 1.1; transition: scale .55s ease; }
@keyframes entry-logo-float {
  0%, 100% { translate: 0 -3px; }
  50% { translate: 0 3px; }
}
@media (prefers-reduced-motion: reduce) {
  .entry-intro-backdrop { scale: 1; transform: none; transition: none; }
  .entry-intro-monogram-wrap { transform: none; }
  .entry-intro-monogram, .entry-intro-rotor { animation: none; }
  .entry-intro.is-closing .entry-intro-backdrop { scale: 1; }
}

/* Opus 5.5: sculpted gold edges and a readable, restrained turn. */
.entry-intro-monogram-wrap {
  filter: none;
  perspective: 900px;
}
.entry-intro-rotor { transform-style: preserve-3d; }
.entry-intro-edge {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(125deg, #50300c, #9c6b20 25%, #e4bb60 48%, #775019 75%, #c99c40);
  -webkit-mask: url('/assets/miloria-monogram-hd.png') center / 100% 100% no-repeat;
  mask: url('/assets/miloria-monogram-hd.png') center / 100% 100% no-repeat;
  transform: translateZ(calc(-.25px - var(--edge) * .25px));
}
.entry-intro-rotor::before { transform: translateZ(-10px); }
.entry-intro-rotor::after { transform: translateZ(.15px); }
@keyframes entry-monogram-spin {
  from { transform: rotateX(4deg) rotateY(0deg); }
  to { transform: rotateX(4deg) rotateY(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .entry-intro-rotor { animation: none; transform: rotateY(-10deg); }
}

/* Continuous quarter-pixel edge slices avoid separated silhouettes. */
.entry-intro-content, .entry-intro-monogram-wrap { transform-style: preserve-3d; }
.entry-intro-monogram-wrap { aspect-ratio: 780 / 560; }
.entry-intro-rotor::before { display: none; }
.entry-intro-monogram { filter: sepia(1) saturate(2.4) brightness(.8) contrast(1.35); }

/* One gold material across front, reverse and continuous edge slices. */
.entry-intro-rotor {
  --logo-gold: linear-gradient(115deg, #a66d19 0%, #d9a638 18%, #fff0a5 36%, #e6b94c 48%, #ba8220 65%, #ffe295 83%, #c99530 100%);
}
.entry-intro-monogram { opacity: 0; filter: none; }
.entry-intro-rotor::before,
.entry-intro-gold-back,
.entry-intro-edge { background: var(--logo-gold); }
.entry-intro-rotor::before { display: block; transform: translateZ(.1px); }
.entry-intro-gold-back,
.entry-intro-back-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-mask: url('/assets/miloria-monogram-hd.png') center / 100% 100% no-repeat;
  mask: url('/assets/miloria-monogram-hd.png') center / 100% 100% no-repeat;
}
.entry-intro-gold-back { transform: translateZ(-10.25px); }
.entry-intro-rotor::after,
.entry-intro-back-shine {
  background: linear-gradient(110deg, transparent 34%, rgb(255 238 179 / 15%) 43%, rgb(255 248 209 / 85%) 49%, rgb(255 226 139 / 40%) 53%, transparent 63%);
  background-size: 280% 100%;
  animation: entry-monogram-shine 9s linear infinite;
}
.entry-intro-back-shine { transform: translateZ(-10.4px); }
@media (prefers-reduced-motion: reduce) {
  .entry-intro-rotor::after, .entry-intro-back-shine { animation: none; }
}

.entry-intro-rotor { transform-origin: 50% 50% -5px; }

/* OPUS_55_THICKNESS_DESIGN */
/* MILORIA · sólido dorado compacto: volumen proporcional, centrado y con un solo material. */
.entry-intro-monogram-wrap {
  --logo-w: min(440px, 46vw, 62vh);
  --logo-d: clamp(5px, calc(var(--logo-w) * .024), 11px);
  --spin: 9s;
  position: relative;
  width: var(--logo-w);
  aspect-ratio: 780 / 560;
  perspective: calc(var(--logo-w) * 3);
  transform-style: preserve-3d;
  filter: none;
}
.entry-intro-monogram-wrap::after {
  content: '';
  position: absolute;
  left: 16%;
  right: 16%;
  bottom: -8%;
  height: 12%;
  pointer-events: none;
  background: radial-gradient(closest-side, rgb(41 25 10 / 30%), rgb(41 25 10 / 12%) 55%, transparent);
  animation: entry-gold-shadow var(--spin) linear infinite;
}
.entry-intro-rotor {
  --gold-stops: #8f5c12 0%, #c8922c 18%, #f6dc8a 36%, #d4a43f 50%, #a36f1a 66%, #ecc86e 84%, #b07c20 100%;
  --shine-stops: transparent 34%, rgb(255 238 179 / 15%) 43%, rgb(255 248 209 / 85%) 49%, rgb(255 226 139 / 40%) 53%, transparent 63%;
  transform-style: preserve-3d;
  transform-origin: 50% 50% 0;
  animation: entry-monogram-spin var(--spin) linear infinite;
  will-change: transform;
}
.entry-intro-monogram {
  opacity: 0;
  filter: none;
  transform: none;
}
.entry-intro-rotor::before {
  display: block;
  background: linear-gradient(115deg, var(--gold-stops));
  transform: translateZ(calc(var(--logo-d) / 2));
}
.entry-intro-gold-back {
  background: linear-gradient(65deg, var(--gold-stops));
  transform: translateZ(calc(var(--logo-d) / -2));
}
.entry-intro-edge {
  --rim: calc(max(var(--edge) - 19.5, 19.5 - var(--edge)) / 19.5);
  background: linear-gradient(115deg,
    hsl(34 72% calc(25% + var(--rim) * 10%)) 0%,
    hsl(38 76% calc(39% + var(--rim) * 11%)) 36%,
    hsl(34 70% calc(29% + var(--rim) * 9%)) 66%,
    hsl(39 74% calc(37% + var(--rim) * 11%)) 100%);
  transform: translateZ(calc(var(--logo-d) * (.5 - (var(--edge) + 1) / 41)));
}
.entry-intro-rotor::after,
.entry-intro-back-shine {
  background-size: 280% 100%;
  background-repeat: no-repeat;
}
.entry-intro-rotor::after {
  background-image: linear-gradient(110deg, var(--shine-stops));
  background-position: -50% 0;
  transform: translateZ(calc(var(--logo-d) / 2 + .2px));
  animation: entry-gold-shine-front var(--spin) linear calc(var(--spin) * -.17) infinite;
}
.entry-intro-back-shine {
  background-image: linear-gradient(70deg, var(--shine-stops));
  background-position: 150% 0;
  transform: translateZ(calc(var(--logo-d) / -2 - .2px));
  animation: entry-gold-shine-back var(--spin) linear calc(var(--spin) * -.67) infinite;
}
@keyframes entry-monogram-spin {
  from { transform: rotateX(3deg) rotateY(0deg); }
  to { transform: rotateX(3deg) rotateY(360deg); }
}
@keyframes entry-gold-shine-front {
  0% { background-position: 150% 0; }
  34%, 100% { background-position: -50% 0; }
}
@keyframes entry-gold-shine-back {
  0% { background-position: -50% 0; }
  34%, 100% { background-position: 150% 0; }
}
@keyframes entry-gold-shadow {
  0%, 50%, 100% { transform: scaleX(1); }
  25%, 75% { transform: scaleX(.6); }
}
@media (max-width: 600px) {
  .entry-intro-monogram-wrap { --logo-w: min(250px, 64vw); }
}
@media (max-height: 500px) {
  .entry-intro-monogram-wrap { --logo-w: min(220px, 38vh); }
}
@media (prefers-reduced-motion: reduce) {
  .entry-intro-monogram-wrap::after,
  .entry-intro-rotor::after,
  .entry-intro-back-shine { animation: none; }
  .entry-intro-rotor {
    animation: none;
    transform: rotateX(3deg) rotateY(-18deg);
    will-change: auto;
  }
}

/* MILORIA · entrada viva, solo código. El contenedor de cámara compone su
   transform con el parallax y el scale de entrada/cierre del fondo original.
   Todas las capas quedan detrás del contenido: el botón conserva su contraste. */
.entry-intro-camera,
.entry-intro-sweep,
.entry-intro-warmth,
.entry-intro-dust { position: absolute; inset: 0; pointer-events: none; }
.entry-intro-camera {
  transform-origin: 50% 44%;
  animation: entry-scene-camera 18s ease-in-out infinite alternate;
}
.entry-intro-sweep {
  inset: 30% -35% -15%;
  background: linear-gradient(115deg, transparent 36%, rgb(255 218 145 / 38%) 48%, transparent 60%);
  mix-blend-mode: soft-light;
  opacity: 0;
  animation: entry-scene-sweep 11s ease-in-out infinite;
}
.entry-intro-warmth {
  background: radial-gradient(ellipse at 50% 65%, rgb(255 197 113 / 24%), transparent 72%);
  opacity: 0;
  animation: entry-scene-warmth 8s ease-in-out infinite alternate;
}
.entry-intro-dust { overflow: hidden; }
.entry-intro-particle {
  position: absolute;
  left: var(--x);
  top: 100%;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: radial-gradient(circle, #fffbea, #ffe39a 30%, rgb(240 191 102 / 55%) 50%, transparent 72%);
  box-shadow: 0 0 calc(var(--size) * 1.6) rgb(255 214 130 / 55%);
  opacity: 0;
  animation: entry-scene-dust var(--duration) linear var(--delay) infinite;
}
@keyframes entry-scene-camera {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(0, -.5%, 0) scale(1.06); }
}
@keyframes entry-scene-sweep {
  0% { transform: translate3d(-55%, 0, 0); opacity: 0; }
  35%, 60% { opacity: .16; }
  90%, 100% { transform: translate3d(55%, 0, 0); opacity: 0; }
}
@keyframes entry-scene-warmth {
  from { opacity: .08; }
  to { opacity: .24; }
}
@keyframes entry-scene-dust {
  0% { transform: translate3d(0, 0, 0); opacity: 0; }
  18%, 70% { opacity: .85; }
  100% { transform: translate3d(var(--drift), -85vh, 0); opacity: 0; }
}
.entry-intro.is-scene-paused :is(.entry-intro-camera, .entry-intro-sweep, .entry-intro-warmth, .entry-intro-particle) {
  animation-play-state: paused;
}
.entry-intro:is(.is-closing, [hidden]) :is(.entry-intro-camera, .entry-intro-sweep, .entry-intro-warmth, .entry-intro-particle) {
  animation: none;
}
@media (max-width: 600px) {
  .entry-intro-particle:nth-child(n + 11) { display: none; animation: none; }
}
@media (prefers-reduced-motion: reduce) {
  .entry-intro-camera, .entry-intro-sweep, .entry-intro-warmth, .entry-intro-particle { animation: none; }
  .entry-intro-sweep, .entry-intro-warmth, .entry-intro-dust { display: none; }
}
