/* ============================================================
   Alma Design — homenaje a LoveFrom. Una sola pantalla.
   Wordmark serif + jaguar que camina + manifiesto al clic.
   ============================================================ */

:root{
  --bg:        #faf8f3;          /* near-white cálido (no blanco puro) */
  --ink:       #161310;          /* tinta casi negra, cálida */
  --ink-soft:  rgba(22,19,16,.5);
  --ink-faint: rgba(22,19,16,.32);
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
}

*{ box-sizing:border-box; margin:0; padding:0; }

html,body{ height:100%; }

body{
  background: var(--bg);
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;                /* una sola pantalla, sin scroll (como LoveFrom) */
  cursor: pointer;                 /* todo el lienzo es clicable */
}

/* ===== Escena principal ===== */
.stage{
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.markwrap{
  position: relative;
  display: inline-block;
  opacity: 1;                  /* visible por defecto (robusto) */
  transition: opacity .6s var(--ease), filter .6s var(--ease);
}

/* cursor tipo máquina de escribir (intro) */
.caret{
  display: inline-block;
  width: max(1.5px, .022em);   /* rayita fina (no bold) */
  height: .78em;
  margin-left: .05em;
  background: var(--ink);
  vertical-align: -0.04em;
  animation: caretBlink 1.05s step-end infinite;
}
.caret.gone{ display: none; }
@keyframes caretBlink{ 0%,50%{ opacity: 1; } 50.01%,100%{ opacity: 0; } }
@media (prefers-reduced-motion: reduce){ .caret{ display: none; } }

.wordmark{
  font-weight: 600;
  font-size: clamp(2.6rem, 11vw, 8.5rem);
  line-height: 1;
  letter-spacing: -0.012em;
  white-space: nowrap;
  color: var(--ink);
  -webkit-user-select: none;
  user-select: none;
}

/* ===== Jaguar (video por encima, multiply) ===== */
.jaguar-layer{
  position: fixed;
  left: 0;
  top: 0;                       /* JS fija el top para alinear las patas con las letras */
  width: 100vw;
  z-index: 5;
  pointer-events: none;
  opacity: 0;                   /* oculto hasta que termina la intro de tipeo (JS) */
  mix-blend-mode: multiply;     /* el blanco del video desaparece; el jaguar negro ocluye */
  transition: opacity .8s var(--ease);
}
.jaguar-video,
.jaguar-static{
  display: block;
  width: 100%;
  height: auto;
}
.jaguar-static{ display: none; }   /* solo en reduced-motion */

/* ===== Botón info / cerrar ===== */
.info-btn{
  position: fixed;
  top: clamp(18px, 3vw, 34px);
  right: clamp(18px, 3vw, 34px);
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  z-index: 50;
  opacity: .72;
  transition: opacity .3s var(--ease), transform .5s var(--ease);
}
.info-btn:hover{ opacity: 1; }
.info-btn svg{ position: absolute; transition: opacity .4s var(--ease), transform .5s var(--ease); }
.info-btn .ic-close{ opacity: 0; transform: rotate(-45deg) scale(.8); }
.info-btn .ic-info { opacity: 1; transform: rotate(0)   scale(1); }
body.open .info-btn .ic-info { opacity: 0; transform: rotate(45deg)  scale(.8); }
body.open .info-btn .ic-close{ opacity: 1; transform: rotate(0)      scale(1); }

/* ===== Hint sutil ===== */
.hint{
  position: fixed;
  left: 0; right: 0;
  bottom: clamp(20px, 4vh, 40px);
  text-align: center;
  font-size: clamp(.78rem, 1.7vw, .95rem);
  letter-spacing: .14em;
  text-transform: lowercase;
  font-style: italic;
  color: var(--ink-faint);
  pointer-events: none;
  transition: opacity .6s var(--ease);
}
body.open .hint{ opacity: 0 !important; }

/* ===== Manifiesto (overlay) ===== */
.manifesto{
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(2.5vh, 5vh, 6vh) 7vw;
  background: var(--bg);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 30;
  overflow-y: auto;
  transition: opacity .55s var(--ease), visibility .55s var(--ease);
}
body.open .manifesto{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.manifesto-inner{
  text-align: center;
  max-width: min(92vw, 640px);
  margin-inline: auto;
}

.m-head{
  font-size: clamp(1.55rem, 4.2vw, 2.5rem);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -0.005em;
}
.m-soul{
  margin-top: clamp(1.2rem, 3vh, 2rem);
  font-size: clamp(1.25rem, 3.2vw, 1.85rem);
  font-weight: 400;
  line-height: 1.26;
  color: var(--ink);
}
.m-soul em{ font-style: italic; }

.m-crafts{
  list-style: none;
  margin-top: clamp(1.3rem, 3.2vh, 2.1rem);
}
.m-crafts li{
  font-size: clamp(1rem, 2.4vw, 1.4rem);
  font-weight: 400;
  line-height: 1.34;
  letter-spacing: .002em;
}

.m-close{
  margin-top: clamp(1.3rem, 3.2vh, 2.1rem);
  font-size: clamp(1.25rem, 3.2vw, 1.85rem);
  font-weight: 400;
  line-height: 1.26;
}
.m-close em{ font-style: italic; }

.m-contact{
  display: inline-block;
  margin-top: clamp(1.4rem, 3.5vh, 2.3rem);
  font-size: clamp(.95rem, 2vw, 1.15rem);
  font-style: italic;
  letter-spacing: .03em;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.m-contact:hover{ color: var(--ink); border-color: var(--ink-faint); }

/* reveal del manifiesto por CSS (robusto: si no anima, igual queda visible) */
.manifesto-inner [data-r]{
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
body.open .manifesto-inner [data-r]{ opacity: 1; transform: none; }
body.open .m-head{ transition-delay: .04s; }
body.open .m-crafts li:nth-child(1){ transition-delay: .12s; }
body.open .m-crafts li:nth-child(2){ transition-delay: .17s; }
body.open .m-crafts li:nth-child(3){ transition-delay: .22s; }
body.open .m-crafts li:nth-child(4){ transition-delay: .27s; }
body.open .m-crafts li:nth-child(5){ transition-delay: .32s; }
body.open .m-crafts li:nth-child(6){ transition-delay: .37s; }
body.open .m-crafts li:nth-child(7){ transition-delay: .42s; }
body.open .m-crafts li:nth-child(8){ transition-delay: .47s; }
body.open .m-crafts li:nth-child(9){ transition-delay: .52s; }
body.open .m-close{ transition-delay: .58s; }
body.open .m-contact{ transition-delay: .64s; }
@media (prefers-reduced-motion: reduce){
  .manifesto-inner [data-r]{ transition: none; transform: none; }
}

/* ===== bilingüe ES/EN ===== */
.t-en{ display: none; }
html[data-lang="en"] .t-es{ display: none; }
html[data-lang="en"] .t-en{ display: revert; }

/* switcher discreto (solo en el manifiesto / menú) */
.lang-switch{
  display: block;
  width: fit-content;
  margin: clamp(1.5rem, 3.6vh, 2.4rem) auto 0;
  background: none;
  border: 0;
  padding: 6px 8px;
  font-family: inherit;
  font-size: clamp(.8rem, 1.7vw, .95rem);
  font-style: italic;
  letter-spacing: .04em;
  color: var(--ink-faint);
  cursor: pointer;
  transition: color .3s var(--ease);
}
.lang-switch:hover{ color: var(--ink); }

/* estado de apertura: la escena se desvanece */
body.open .markwrap{ opacity: 0; filter: blur(6px); pointer-events: none; }
body.open .jaguar-layer{ opacity: 0; }

/* ===== Accesibilidad de movimiento ===== */
@media (prefers-reduced-motion: reduce){
  .jaguar-video{ display: none; }
  .jaguar-static{ display: block; }
  .info-btn, .hint, .manifesto, .info-btn svg{ transition-duration: .01ms !important; }
}

/* pantallas muy bajas / móvil apretado: el manifiesto se compacta */
@media (max-height: 620px){
  .m-crafts li{ line-height: 1.34; }
}
