/* Mooki · Coming soon (teaser). Guía "Atelier High End": crema, vino #5B1A23, Playfair Display + Jost.
   Copia recortada de landing-v3: solo la intro del armario, el logo y "Coming soon to New York". Tokens: memoria/marca.md */
:root {
  --paper: #FAF7F2;
  --ink: #1F1B16;
  --muted-text: #6F685F; /* texto chico sobre crema (AA) */
  --line: #ECE6DD;
  --oxblood: #5B1A23;    /* acento, <5% de la página */
  --sand: #E6DACA;
  --card: #FFFDF9;
  --serif: "Playfair Display", "Times New Roman", serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
  --gutter: 24px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh; min-height: 100svh;
  display: grid; grid-template-rows: 1fr auto;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; }
a { color: inherit; }
p, h1 { margin: 0; }
em { font-style: italic; }
:focus-visible { outline: 1.5px solid var(--oxblood); outline-offset: 4px; border-radius: 2px; }

/* ---------- Escenario ----------
   Alturas de línea fijas y saltos explícitos: el bloque mide lo mismo con la fuente de respaldo y con Playfair,
   así el logo no se mueve cuando carga la fuente (la intro mide su posición al cargar). */
.stage {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: calc(40px + env(safe-area-inset-top)) var(--gutter) 24px;
}
.brand { margin: 0; line-height: 0; font-size: 0; }
.wordmark { display: block; line-height: 0; }
.wordmark .logo { height: clamp(66px, 18vw, 112px); width: auto; }

.rule {
  width: 36px; height: 1px; background: var(--oxblood);
  margin: clamp(30px, 5svh, 44px) 0 clamp(24px, 4svh, 34px);
}
/* ---------- Coming soon ⇄ lista de espera ----------
   Las dos vistas comparten la misma celda de grid: la caja mide siempre lo mismo (la vista más alta),
   así el logo no se mueve al abrir el formulario ni cuando carga la fuente. Alturas fijas en px/em. */
[hidden] { display: none !important; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.swap {
  position: relative;
  display: grid; justify-items: center; align-items: start;
  width: min(100%, 440px);
}
.view { grid-area: 1 / 1; width: 100%; display: flex; flex-direction: column; align-items: center; }
.view[aria-hidden="true"] { visibility: hidden; }

.soon {
  appearance: none; -webkit-appearance: none; background: none; border: 0; padding: 4px 8px; margin: 0;
  color: var(--ink); cursor: pointer; -webkit-tap-highlight-color: transparent; border-radius: 4px;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(36px, 10vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.soon-text { display: block; height: 2.08em; transform-origin: var(--ox, 90%) var(--oy, 80%); }
.soon em { letter-spacing: -0.025em; }
/* El punto de "York." es la bolita vino: late suave para decir "tócame". */
.dot {
  position: relative; display: inline-block;
  width: .15em; height: .15em; margin-left: .07em; border-radius: 50%;
  background: var(--oxblood); vertical-align: .02em;
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
.dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid var(--oxblood); opacity: 0;
  animation: latido 2.6s cubic-bezier(.2,.7,.2,1) 3.2s infinite;
}
@keyframes latido {
  0% { transform: scale(1); opacity: .55; }
  60%, 100% { transform: scale(3.4); opacity: 0; }
}
.soon:hover .dot, .soon:focus-visible .dot { transform: scale(1.35); }
.is-open .dot::after { animation: none; }

.tag {
  margin-top: clamp(20px, 3.4svh, 30px);
  font-size: 11px; font-weight: 400; line-height: 16px; height: 16px;
  letter-spacing: .26em; text-transform: uppercase;
  color: var(--muted-text);
  white-space: nowrap;
}
.tag span { color: var(--oxblood); padding: 0 .5em; }

.bolita {
  position: absolute; left: 0; top: 0; width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border-radius: 50%; background: var(--oxblood);
  opacity: 0; pointer-events: none;
}

/* Vista "Let's Mooki." + formulario */
.view-join { position: relative; }
.join-form, .done { width: 100%; display: flex; flex-direction: column; align-items: center; }
.done { position: absolute; inset: 0 0 auto 0; }
.join-title, .done-sign {
  margin: 0; font-family: var(--serif); font-weight: 400;
  font-size: clamp(40px, 11vw, 68px); line-height: 1.04; height: 1.04em;
  letter-spacing: -0.03em; white-space: nowrap;
}
.join-title em, .done-sign em { color: var(--oxblood); letter-spacing: -0.025em; }

.waitlist { width: 100%; margin-top: 22px; }
.field { display: flex; flex-direction: column; gap: 10px; }
.waitlist input {
  width: 100%; height: 52px; padding: 0 20px; margin: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--sans); font-size: 16px; font-weight: 300; color: var(--ink);
  outline: none; text-align: center;
  transition: border-color .25s;
}
.waitlist input::placeholder { color: #8C857B; }
.waitlist input:focus { border-color: var(--ink); }
.waitlist input[aria-invalid="true"] { border-color: var(--oxblood); }
.waitlist button {
  height: 52px; padding: 0 28px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--ink); color: var(--paper);
  font-family: var(--sans); font-size: 12px; font-weight: 400; letter-spacing: .2em; text-transform: uppercase;
  white-space: nowrap;
  transition: background .25s, opacity .25s;
}
.waitlist button:hover { background: var(--oxblood); }
.waitlist button[disabled] { opacity: .55; cursor: progress; }
.form-msg { height: 18px; margin-top: 10px; font-size: 12px; line-height: 18px; color: var(--oxblood); white-space: nowrap; }
.legal { margin-top: 6px; font-size: 11px; line-height: 17px; height: 34px; color: var(--muted-text); white-space: nowrap; }
.legal a { color: inherit; text-decoration: underline; text-decoration-color: var(--oxblood); text-underline-offset: 3px; }

.done { padding-top: 6px; }
.done-title { margin: 0; font-family: var(--serif); font-size: clamp(26px, 7.4vw, 38px); line-height: 1.1; letter-spacing: -0.02em; outline: none; }
.done-sign { margin-top: 18px; }

.back {
  position: absolute; top: -6px; right: -10px; z-index: 2;
  width: 44px; height: 44px; display: grid; place-items: center;
  background: none; border: 0; border-radius: 50%; cursor: pointer; color: var(--muted-text);
  -webkit-tap-highlight-color: transparent; transition: color .25s;
}
.back:hover { color: var(--ink); }
.back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }

@media (min-width: 600px) {
  .field { flex-direction: row; gap: 8px; }
  .waitlist input { flex: 1; text-align: left; padding-left: 24px; }
  .legal { height: 17px; }
  .legal br { display: none; }
}

/* ---------- Pie mínimo ---------- */
.foot {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 12px var(--gutter) calc(18px + env(safe-area-inset-bottom));
  font-size: 11px; font-weight: 400; letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted-text);
}
.ig {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  color: var(--ink); text-decoration: none;
  transition: color .3s ease;
}
.ig:hover { color: var(--oxblood); }
.ig svg { width: 20px; height: 20px; }

@media (min-width: 900px) {
  .tag { font-size: 12px; }
  .foot { padding-bottom: 28px; }
}

/* Celular acostado o pantallas muy bajas */
@media (max-height: 520px) {
  .wordmark .logo { height: 56px; }
  .rule { margin: 18px 0 16px; }
  .soon { font-size: 32px; }
  .tag { margin-top: 14px; }
  .join-title, .done-sign { font-size: 34px; }
  .waitlist { margin-top: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .intro { display: none !important; }
  .dot::after { animation: none; }
  .dot { transition: none; }
}

/* ---------- Intro: armario (igual que landing-v3; la anima el script inline con Web Animations) ---------- */
.intro { display: none; }
.intro-on .intro {
  display: grid; place-items: center;
  position: fixed; inset: 0; z-index: 100;
  cursor: pointer; overflow: hidden;
}
.intro-papel, .intro-fondo { position: absolute; inset: 0; }
.intro-papel { background: var(--paper); }
.intro-fondo { background: var(--sand); opacity: 0; }
.intro-armario {
  --w: min(68vw, 52svh, 320px);
  position: relative; width: var(--w); aspect-ratio: 240 / 356;
  perspective: calc(var(--w) * 3.4);
  opacity: 0;
}
.intro-cuerpo, .intro-interior { position: absolute; inset: 0; width: 100%; height: 100%; }
.intro-puerta {
  position: absolute; top: 9.551%; height: 74.719%; width: 41.1%;
  transform-style: preserve-3d;
}
.intro-puerta-izq { left: 9.167%; transform-origin: 0 50%; }
.intro-puerta-der { left: 49.73%; transform-origin: 100% 50%; }
.intro-puerta .cara { position: absolute; inset: 0; width: 100%; height: 100%; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.intro-puerta .reverso { transform: rotateY(180deg); }
.intro-estrella { position: fixed; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; overflow: visible; transform-origin: 50% 50%; }
.intro-gancho { position: fixed; left: 0; top: 0; width: 1px; height: 1px; transform-origin: 0 0; opacity: 0; overflow: visible; }
