/* ============================================================
   BELLA FLOR · BODAS & EVENTOS — base
   Tokens, reset y tipografia. Ley visual: BF_MANUAL_DE_MARCA_LINEA_BODAS_v1
   Fondo SIEMPRE claro. El oscuro fue evaluado y descartado.
   ============================================================ */

/* ---------- Tipografia self-hosted. CERO fetches externos. ---------- */
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../fonts/cormorant-garamond-var.woff2') format('woff2-variations');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../fonts/cormorant-garamond-italic-var.woff2') format('woff2-variations');
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Jost';
  src: url('../fonts/jost-var.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ---------- Paleta oficial (Manual §3) ---------- */
  --marfil: #fdfcf7;
  --pergamino: #f4eee2;
  --oro-viejo: #a8863d;
  --oro-claro: #d6ba74;
  --oro-profundo: #6b521f;
  /* Oro para TEXTO pequeno. El oro viejo da 3.32:1 sobre marfil y los rotulos
     van a 10-12px, donde WCAG exige 4.5:1. Este da 4.83:1 y mantiene el tono. */
  --oro-texto: #8a6b2a;
  --tinta: #2a2118;
  --terracota: #c97c5d; /* acento UNICO: badge "LA MAS PEDIDA" */
  --hairline: #e4d8be;
  --vino: #722f37; /* hilo minimo con la marca madre */

  /* tinta a opacidades — nunca negro puro */
  /* 0.7 sobre marfil da 5.46:1 — el minimo que pasa AA a tamano de texto.
     Las opacidades de 0.5 y 0.32 que habia antes daban 2.9 y 1.96. */
  --tinta-70: rgb(42 33 24 / 0.7);

  /* ---------- Tipografia ---------- */
  --display: 'Cormorant Garamond', 'Times New Roman', serif;
  --util: 'Jost', -apple-system, 'Segoe UI', sans-serif;

  /* Escala fluida. El display respira grande — es lo que sostiene el lujo. */
  --t-hero: clamp(3.4rem, 11vw, 9.5rem);
  --t-h1: clamp(2.6rem, 6.4vw, 5.6rem);
  --t-h2: clamp(2rem, 4.2vw, 3.6rem);
  --t-h3: clamp(1.5rem, 2.4vw, 2.2rem);
  --t-cuerpo: clamp(1rem, 1.05vw, 1.125rem);
  --t-rotulo: clamp(0.66rem, 0.78vw, 0.78rem);

  /* letterspacing de rotulo — imita el "F l o r i s t e r i a" del logo real */
  --ls-rotulo: 0.38em;
  --ls-rotulo-corto: 0.3em;

  /* ---------- Ritmo ---------- */
  --borde: clamp(1.25rem, 5vw, 5.5rem);
  --seccion: clamp(6rem, 14vh, 11rem);
  --medida: 62ch;

  /* ---------- Movimiento ---------- */
  --ease-suave: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-sobrio: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: auto; /* el scroll suave lo maneja Lenis */
}
body {
  /* El tallo se posiciona contra el documento completo. Sin esto su bloque
     contenedor es el inicial (alto de viewport) y la linea nace con altura 0
     — la firma de la casa desaparecia de la pagina. */
  position: relative;
  background: var(--marfil);
  color: var(--tinta);
  font-family: var(--util);
  font-size: var(--t-cuerpo);
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* el desborde horizontal es fallo de layout, no algo que se esconde */
  overflow-x: clip;
}
img,
picture,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  background: none;
  border: none;
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}

/* ---------- Tipografia base ---------- */
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 300;
  line-height: 0.98;
  letter-spacing: -0.015em;
  color: var(--oro-profundo);
  text-wrap: balance;
}
p {
  text-wrap: pretty;
}

/* Rotulo: Jost mayuscula con letterspacing ancho. El sello del sistema. */
.rotulo {
  font-family: var(--util);
  font-size: var(--t-rotulo);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: var(--ls-rotulo);
  color: var(--oro-texto);
  /* el letterspacing del ultimo caracter empuja el centrado — se compensa */
  text-indent: var(--ls-rotulo);
}
.italica {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
}

/* ---------- Accesibilidad ---------- */
:focus-visible {
  outline: 2px solid var(--oro-viejo);
  outline-offset: 4px;
  border-radius: 2px;
}
.salta-al-contenido {
  position: absolute;
  left: var(--borde);
  top: -100vh;
  z-index: 9999;
  padding: 0.9rem 1.4rem;
  background: var(--marfil);
  border: 1px solid var(--oro-viejo);
  color: var(--oro-profundo);
}
.salta-al-contenido:focus {
  top: 1rem;
}
.solo-lectores {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- prefers-reduced-motion: apaga TODO sin romper layout ----------
   Los elementos animados nacen visibles por defecto (ver .revelar) y el JS
   solo los esconde si el movimiento esta permitido. Asi, sin JS o con
   reduced-motion, la pagina se lee completa. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
