/* ==========================================================================
   Joana Lee · Protocolos de élite — base común a los tres diseños.
   Los colores y letras de cada diseño viven en fichas-*.css.
   ========================================================================== */

/* ---------- Paleta de marca (fija) ---------- */
:root {
  --negro: #0B0B0B;
  --carbon: #1B1B1B;
  --grafito: #2C2C2C;
  --marfil: #F8F5F1;
  --perla: #EBE5DD;
  --arena: #D4B185;
  --oro: #C8A95E;
  --oro-luz: #F1DE9E;
  --oro-sombra: #8C6B2E;
  --oro-hondo: #7A5C26;
  --diamante: #A8A8A8;
  --blanco: #FFFFFF;

  --oro-metal: linear-gradient(135deg, #8C6B2E 0%, #C8A95E 30%, #F1DE9E 50%, #C8A95E 70%, #8C6B2E 100%);

  /* Espacios en escala de 8 px */
  --e-1: 4px;  --e-2: 8px;  --e-3: 12px; --e-4: 16px; --e-5: 24px;
  --e-6: 32px; --e-7: 48px; --e-8: 64px; --e-9: 96px; --e-10: 128px;

  --ancho-max: 1200px;
  --ancho-texto: 62ch;
  --margen: clamp(20px, 5vw, 64px);
  --seccion: clamp(72px, 11vw, 152px);

  /* Escala de letra */
  --t-h1: clamp(2.6rem, 1.5rem + 4.8vw, 6rem);
  --t-h2: clamp(1.85rem, 1.35rem + 2vw, 3.1rem);
  --t-h3: clamp(1.45rem, 1.2rem + 0.9vw, 2rem);
  --t-manuscrita: clamp(2.2rem, 1.6rem + 2.4vw, 3.6rem);
  --t-p: 1.0625rem;
  --t-peq: 0.9375rem;
  --t-etiqueta: 0.6875rem;

  --curva: cubic-bezier(0.22, 0.61, 0.36, 1);
  --lento: 700ms;
  --medio: 400ms;

  --alto-boton: 40px;
}

/* ---------- Reinicio suave ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; color-scheme: light; }
body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font-family: var(--f-texto);
  font-weight: 300;
  font-size: var(--t-p);
  line-height: 1.75;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, video, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1.1em; max-width: var(--ancho-texto); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
::selection { background: var(--oro); color: var(--negro); }
:focus-visible { outline: 1px solid var(--acento); outline-offset: 4px; }

/* ---------- Títulos ---------- */
h1, h2, h3, .titulo-1, .titulo-2, .titulo-3 {
  margin: 0 0 var(--e-5);
  font-family: var(--f-titulo);
  font-weight: var(--peso-titulo);
  color: var(--titulo);
  text-wrap: balance;
}
h1, .titulo-1 { font-size: var(--t-h1); line-height: 1.04; letter-spacing: -0.012em; }
h2, .titulo-2 { font-size: var(--t-h2); line-height: 1.12; }
/* Los títulos cortos y centrados van en mayúsculas espaciadas (según el diseño); las frases largas, no. */
.centrado h2, .titulo-mayus { text-transform: var(--h2-mayus); letter-spacing: var(--h2-espaciado); }
h2 .manuscrita, h1 .manuscrita { margin-right: 0.08em; }
h3, .titulo-3 { font-size: var(--t-h3); line-height: 1.2; font-weight: var(--peso-titulo-3); }

/* Palabra de adorno: manuscrita (Gala, Seda) o itálica de revista (Editorial) */
.manuscrita {
  font-family: var(--f-manuscrita);
  font-style: var(--estilo-manuscrita);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--color-manuscrita);
  line-height: 1;
}
h1 .manuscrita, .titulo-1 .manuscrita { font-size: 1.12em; padding-inline: 0.04em; }
h1 .destello, .titulo-1 .destello { width: 0.4em; height: 0.4em; vertical-align: 0.12em; margin-left: 0.08em; }
.firma { font-family: var(--f-manuscrita); font-style: var(--estilo-manuscrita); font-size: var(--t-manuscrita); color: var(--color-manuscrita); line-height: 1.1; }

/* Oro metálico en títulos grandes */
.oro-metal {
  background: var(--degradado-titulo);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Textos pequeños ---------- */
.etiqueta {
  display: inline-block;
  font-family: var(--f-texto);
  font-size: var(--t-etiqueta);
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--acento-texto);
  line-height: 1.6;
}
.texto-suave { color: var(--texto-suave); }
.capitulo {
  display: flex; align-items: center; gap: var(--e-3); margin-bottom: var(--e-4);
  font-size: var(--t-etiqueta); letter-spacing: 0.28em; text-transform: uppercase; color: var(--texto-suave);
}
.capitulo b { font-family: var(--f-titulo); font-weight: 400; font-size: 1.5em; letter-spacing: 0.05em; color: var(--acento-texto); }
.capitulo b::after { content: ""; display: inline-block; width: 28px; height: 1px; margin-left: var(--e-3); vertical-align: 0.3em; background: var(--acento); opacity: 0.7; }

/* ---------- Diseño de página ---------- */
.contenedor { width: min(100% - 2 * var(--margen), var(--ancho-max)); margin-inline: auto; }
.seccion { padding-block: var(--seccion); background: var(--fondo); color: var(--texto); }
.seccion--alt { background: var(--fondo-alt); }
.centrado { text-align: center; }
.centrado p { margin-inline: auto; }
.rejilla-2 { display: grid; gap: clamp(32px, 6vw, 96px); align-items: center; }
@media (min-width: 900px) { .rejilla-2 { grid-template-columns: 1fr 1fr; } }

/* ---------- Adornos ---------- */
.destello { display: inline-block; width: 0.7em; height: 0.7em; color: var(--color-destello); vertical-align: 0.05em; }
.destello svg { width: 100%; height: 100%; }
.separador {
  display: flex; align-items: center; justify-content: center; gap: var(--e-4);
  margin: var(--e-6) auto; color: var(--color-destello); max-width: 220px;
}
.separador::before, .separador::after { content: ""; flex: 1; height: 1px; background: var(--linea); }
.separador .destello { width: 12px; height: 12px; }
.linea-corta { width: 40px; height: 1px; background: var(--acento); border: 0; margin: var(--e-5) 0; }
.centrado .linea-corta { margin-inline: auto; }

/* ---------- Marca (logo) ---------- */
.monograma { width: 100%; height: auto; overflow: visible; }
.monograma .trazo { fill: none; stroke: currentColor; stroke-width: 9; }
.monograma .estrella { fill: var(--color-destello); }
.logo { display: inline-flex; flex-direction: column; align-items: center; color: var(--titulo); text-align: center; }
.logo .monograma { width: 92px; margin-bottom: var(--e-4); }
.logo-nombre { font-family: "Jost", sans-serif; font-weight: 400; font-size: 1.9rem; letter-spacing: 0.02em; line-height: 1.1; }
.logo-lema { font-family: "Pinyon Script", cursive; font-size: 2rem; line-height: 1.3; color: var(--color-manuscrita); }
.logo--linea { flex-direction: row; gap: var(--e-3); }
.logo--linea .monograma { width: 22px; margin: 0; }
.logo--linea .logo-nombre { font-size: 0.8rem; letter-spacing: 0.3em; text-transform: uppercase; }

/* El monograma se dibuja solo al aparecer */
.js .monograma.dibujar .trazo { stroke-dasharray: 400; stroke-dashoffset: 400; }
.js .monograma.dibujar .estrella { opacity: 0; transform: scale(0.4); transform-origin: 170px 252px; }
.js .monograma.dibujar.visible .trazo { animation: trazar 1.6s var(--curva) forwards; }
.js .monograma.dibujar.visible .trazo:nth-child(2) { animation-delay: 0.25s; }
.js .monograma.dibujar.visible .trazo:nth-child(3) { animation-delay: 0.5s; }
.js .monograma.dibujar.visible .estrella { animation: brillar 0.9s var(--curva) 1.3s forwards; }
@keyframes trazar { to { stroke-dashoffset: 0; } }
@keyframes brillar { to { opacity: 1; transform: scale(1); } }

/* ---------- Botones (pequeños y finos) ---------- */
.boton {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--e-3);
  height: var(--alto-boton);
  padding: 0 var(--e-6);
  border: 1px solid var(--boton-borde);
  background: var(--boton-fondo);
  color: var(--boton-texto);
  font-family: var(--f-texto);
  font-size: 0.6875rem; font-weight: 500;
  letter-spacing: 0.26em; text-transform: uppercase;
  cursor: pointer;
  overflow: hidden; isolation: isolate;
  transition: color var(--medio) var(--curva), border-color var(--medio) var(--curva);
}
.boton::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--boton-relleno);
  transform: translateY(101%);
  transition: transform var(--medio) var(--curva);
}
.boton:hover::before, .boton:focus-visible::before { transform: translateY(0); }
.boton:hover, .boton:focus-visible { color: var(--boton-texto-hover); border-color: var(--boton-borde-hover); }

.boton--enlace {
  height: auto; padding: 0 0 6px; border: 0; background: none; color: var(--titulo);
  border-bottom: 1px solid var(--linea);
}
.boton--enlace::before { display: none; }
.boton--enlace::after { content: "→"; font-size: 1.1em; letter-spacing: 0; transition: transform var(--medio) var(--curva); }
.boton--enlace:hover { color: var(--acento-texto); border-color: var(--acento); }
.boton--enlace:hover::after { transform: translateX(4px); }

/* ---------- Tarjeta de valor (I · II · III · IV) ---------- */
.valores { display: grid; gap: 1px; background: var(--linea); border: 1px solid var(--linea); }
@media (min-width: 700px) { .valores { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .valores { grid-template-columns: repeat(4, 1fr); } }
.valor { background: var(--superficie); padding: var(--e-7) var(--e-6); }
.valor-numero { display: flex; align-items: center; gap: var(--e-3); margin-bottom: var(--e-5); font-family: var(--f-titulo); font-size: 1.6rem; color: var(--acento-texto); line-height: 1; }
.valor-numero .destello { width: 10px; height: 10px; }
.valor h3 { font-size: 1.5rem; margin-bottom: var(--e-3); }
.valor p { font-size: var(--t-peq); color: var(--texto-suave); }

/* ---------- Marco de foto ---------- */
.marco-foto { position: relative; margin: 0; overflow: hidden; background: var(--fondo-alt); }
.marco-foto img, .marco-foto video {
  width: 100%; height: 100%; object-fit: cover;
  object-position: var(--enfoque, 50% 35%);
  filter: var(--filtro-foto);
  transition: filter 900ms var(--curva), transform 1600ms var(--curva);
}
.marco-foto:hover img { filter: var(--filtro-foto-hover); transform: scale(1.025); }
.marco-foto::after {
  content: ""; position: absolute; inset: var(--marco-interior-margen);
  border: var(--marco-interior); pointer-events: none;
}
.r-4-5 { aspect-ratio: 4 / 5; }
.r-9-16 { aspect-ratio: 9 / 16; }
.r-3-2 { aspect-ratio: 3 / 2; }
.r-1-1 { aspect-ratio: 1 / 1; }
.marco-foto figcaption { position: absolute; left: var(--e-4); bottom: var(--e-3); font-size: var(--t-etiqueta); letter-spacing: 0.24em; text-transform: uppercase; color: var(--marfil); text-shadow: 0 1px 8px rgb(0 0 0 / 0.4); }

/* ---------- Línea de tiempo (¿Cómo te acompañamos?) ---------- */
.linea-tiempo { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--e-6); counter-reset: paso; }
.linea-tiempo li { position: relative; padding-left: var(--e-7); counter-increment: paso; }
.linea-tiempo li::before {
  content: counter(paso, decimal-leading-zero);
  position: absolute; left: 0; top: 0.2em;
  font-family: var(--f-titulo); font-size: 0.95rem; color: var(--acento-texto); letter-spacing: 0.08em;
}
.linea-tiempo li::after { content: ""; position: absolute; left: 0; top: 2.3em; bottom: calc(-1 * var(--e-6) + 6px); width: 1px; background: var(--linea); }
.linea-tiempo li:last-child::after { display: none; }
@media (min-width: 900px) {
  .linea-tiempo--horizontal { grid-auto-flow: column; grid-auto-columns: 1fr; gap: var(--e-6); padding-top: var(--e-6); border-top: 1px solid var(--linea); }
  .linea-tiempo--horizontal li { padding: 0; }
  .linea-tiempo--horizontal li::before { position: static; display: block; margin-bottom: var(--e-3); }
  .linea-tiempo--horizontal li::after { left: 0; top: calc(-1 * var(--e-6) - 4px); bottom: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--acento); }
  .linea-tiempo--horizontal li:last-child::after { display: block; }
}
.linea-tiempo p { font-size: var(--t-peq); color: var(--texto-suave); }

/* ---------- Formulario ---------- */
.campo { display: grid; gap: var(--e-2); margin-bottom: var(--e-6); }
.campo > label, .campo > legend { font-size: var(--t-etiqueta); letter-spacing: 0.24em; text-transform: uppercase; color: var(--texto-suave); padding: 0; }
.campo input, .campo textarea {
  width: 100%; border: 0; border-bottom: 1px solid var(--linea-fuerte);
  background: transparent; padding: var(--e-2) 0; font-size: 1.05rem; font-weight: 300;
  border-radius: 0; transition: border-color var(--medio) var(--curva);
}
.campo textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
.campo input:focus, .campo textarea:focus { outline: none; border-bottom-color: var(--acento); }
.campo input::placeholder, .campo textarea::placeholder { color: var(--texto-suave); opacity: 0.7; }
fieldset.campo { border: 0; margin-inline: 0; padding: 0; min-width: 0; }
.opciones { display: flex; flex-wrap: wrap; gap: var(--e-2); }
.opcion input { position: absolute; opacity: 0; pointer-events: none; }
.opcion span {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 var(--e-4);
  border: 1px solid var(--linea-fuerte); font-size: 0.8125rem; cursor: pointer;
  transition: background var(--medio) var(--curva), color var(--medio) var(--curva), border-color var(--medio) var(--curva);
}
.opcion input:checked + span { background: var(--titulo); color: var(--fondo); border-color: var(--titulo); }
.opcion input:focus-visible + span { outline: 1px solid var(--acento); outline-offset: 3px; }
.casilla { display: flex; gap: var(--e-3); align-items: flex-start; font-size: var(--t-peq); color: var(--texto-suave); cursor: pointer; }
.casilla input { appearance: none; flex: none; width: 16px; height: 16px; margin-top: 5px; border: 1px solid var(--linea-fuerte); display: grid; place-content: center; cursor: pointer; }
.casilla input::after { content: ""; width: 8px; height: 8px; background: var(--acento); transform: scale(0); transition: transform 200ms var(--curva); }
.casilla input:checked::after { transform: scale(1); }
.casilla a { border-bottom: 1px solid var(--linea); }

/* ---------- Botón flotante de WhatsApp ---------- */
.whatsapp {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 40;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--oro); background: rgb(11 11 11 / 0.72); color: var(--oro);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: background var(--medio) var(--curva), color var(--medio) var(--curva), transform var(--medio) var(--curva);
}
.whatsapp:hover { background: var(--oro); color: var(--negro); transform: translateY(-2px); }
.whatsapp svg { width: 18px; height: 18px; }

/* ---------- Aparecer al bajar ---------- */
.js .revelar { opacity: 0; transform: translateY(24px); transition: opacity var(--lento) var(--curva), transform var(--lento) var(--curva); transition-delay: calc(var(--orden, 0) * 80ms); }
.js .revelar.visible { opacity: 1; transform: none; }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0ms !important; }
  .js .revelar { opacity: 1; transform: none; }
  .js .monograma.dibujar .trazo { stroke-dashoffset: 0; }
  .js .monograma.dibujar .estrella { opacity: 1; transform: none; }
}

/* ---------- Solo para lectores de pantalla ---------- */
.solo-lector { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
