/* ═══════════════════════════════════════════════════════════
   DescontracturaMe — Intro / Entry Animation
   La M crece y se sobrepone sobre el nombre de la marca.
   "by María Mercedes Navarrete" aparece debajo.
   prefers-reduced-motion safe · Mobile-first · Responsive
   ═══════════════════════════════════════════════════════════ */

/* ── ESCENA ──────────────────────────────────────────────── */
/* .loader base y .loader.hide viven en styles.css / coctails.css */

.intro-scene {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}

/* Brillo ambiental sutil detrás de la composición */
.intro-scene::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  width: min(90vw, 700px);
  height: min(60vh, 480px);
  background: radial-gradient(
    ellipse at center,
    rgba(200, 168, 106, 0.07) 0%,
    transparent 68%
  );
  pointer-events: none;
  animation: glow-pulse 3.2s ease-in-out 0.4s infinite;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1; }
}

/* ── COMPOSICIÓN CENTRAL ─────────────────────────────────── */
.intro-core {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
}

/* ── BLOQUE DEL NOMBRE ───────────────────────────────────── */
/* Contiene el wordmark + la M gigante superpuesta */
.intro-wordblock {
  position: relative;
  display: flex;
  align-items: center;
}

/* ── M GIGANTE (overlay) ─────────────────────────────────── */
/* Crece desde el centro del bloque y se sobrepone sobre el nombre */
.intro-m-giant {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -52%) scale(0.04);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(8rem, 34vw, 28rem);
  font-weight: 600;
  line-height: 0.82;
  color: #C8A86A;
  opacity: 0;
  pointer-events: none;
  user-select: none;
  z-index: 2;  /* encima del nombre */
  animation: intro-m-grow 1050ms cubic-bezier(0.16, 1, 0.3, 1) 1.15s both;
}

@keyframes intro-m-grow {
  0%   { transform: translate(-50%, -52%) scale(0.04); opacity: 0; }
  20%  { opacity: 0.28; }
  100% { transform: translate(-50%, -52%) scale(1);    opacity: 0.18; }
}

/* ── NOMBRE "DescontracturaMe" ────────────────────────────── */
.intro-brandname {
  position: relative;
  z-index: 1; /* debajo de la M gigante */
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.65rem, 5.6vw, 5rem);
  font-weight: 500;
  color: #F0EAD8;
  letter-spacing: 0.09em;
  line-height: 1;
  white-space: nowrap;
  margin: 0;
  padding: 0.35em 0;
}

/* Prefijo "Descontractura" */
.ib-prefix {
  display: inline-block;
  opacity: 0;
  animation: ib-rise 680ms cubic-bezier(0.22, 0.61, 0.36, 1) 130ms both;
}

/* La "M" en el nombre — dorado como la M gigante */
.ib-m {
  display: inline-block;
  color: #C8A86A;
  opacity: 0;
  animation: ib-rise 680ms cubic-bezier(0.22, 0.61, 0.36, 1) 270ms both;
}

/* La "e" final */
.ib-e {
  display: inline-block;
  color: #DFC28A;
  opacity: 0;
  animation: ib-rise 680ms cubic-bezier(0.22, 0.61, 0.36, 1) 360ms both;
}

@keyframes ib-rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── FIRMA "by María Mercedes Navarrete" ─────────────────── */
.intro-signature {
  position: relative;
  z-index: 3; /* encima de la M gigante → siempre legible */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1.75rem;
  opacity: 0;
  animation: sig-appear 700ms cubic-bezier(0.22, 0.61, 0.36, 1) 2.05s both;
}

/* Línea decorativa dorada */
.intro-sig-line {
  display: block;
  width: 54px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #C8A86A 50%, transparent);
}

/* Texto de la firma */
.intro-sig-text {
  margin: 0;
  font-family: 'Nunito Sans', system-ui, sans-serif;
  font-size: clamp(0.6rem, 1.5vw, 0.82rem);
  font-weight: 300;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #A89878;
  white-space: nowrap;
}

@keyframes sig-appear {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── PREFERS-REDUCED-MOTION ──────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .intro-scene::before { animation: none; }
  .intro-m-giant {
    animation: none;
    opacity: 0.18;
    transform: translate(-50%, -52%) scale(1);
  }
  .ib-prefix, .ib-m, .ib-e {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .intro-signature {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ── RESPONSIVE ──────────────────────────────────────────── */

/* Tablet apaisada — ajuste mínimo */
@media (max-width: 820px) {
  .intro-m-giant { font-size: clamp(7rem, 38vw, 22rem); }
}

/* Móvil — evitar overflow del nombre */
@media (max-width: 520px) {
  .intro-brandname {
    white-space: normal;
    text-align: center;
    max-width: 90vw;
  }
  .intro-sig-text {
    white-space: normal;
    text-align: center;
    letter-spacing: 0.2em;
  }
}

/* Móvil muy pequeño */
@media (max-width: 360px) {
  .intro-sig-text { letter-spacing: 0.12em; font-size: 0.6rem; }
}
