/* ==========================================================================
   Verónica Bermeo Luna · Terravest — Estilos compartidos del sitio
   Contiene solo lo reutilizable: variables de marca, base, tipografía,
   componentes (botones, redes sociales, utilidades), header y footer.
   Enfoque mobile-first: estilos base para móvil y min-width para pantallas mayores.
   Breakpoints: 640px (tablet) · 1024px (desktop) · 1280px (desktop grande)
   ========================================================================== */

/* ---------- 1. Variables de marca ---------- */
:root {
  /* Colores corporativos Terravest: azul marino + dorado champán */
  --ink: oklch(0.17 0.04 256);
  --ivory: oklch(0.96 0.03 88);
  --background: oklch(0.21 0.045 256);
  --foreground: oklch(0.96 0.03 88);
  --card: oklch(0.25 0.048 256);
  --primary: oklch(0.8 0.095 80);
  --primary-glow: oklch(0.93 0.065 88);
  --primary-foreground: oklch(0.2 0.045 256);
  --muted-foreground: oklch(0.78 0.025 250);
  --border: oklch(0.8 0.095 80 / 20%);

  /* Degradados y sombras */
  --gradient-gold: linear-gradient(120deg, oklch(0.72 0.1 75) 0%, var(--primary-glow) 45%, var(--primary) 70%, oklch(0.72 0.1 75) 100%);
  --gradient-side: linear-gradient(90deg, oklch(0.17 0.04 256 / 94%) 0%, oklch(0.17 0.04 256 / 65%) 55%, oklch(0.17 0.04 256 / 15%) 100%);
  --gradient-champagne: radial-gradient(ellipse at 50% 30%, oklch(0.8 0.07 82) 0%, oklch(0.74 0.075 78) 55%, oklch(0.6 0.07 72) 100%);
  --shadow-gold: 0 20px 60px -20px oklch(0.8 0.095 80 / 45%);
  --shadow-deep: 0 40px 80px -30px oklch(0.08 0.03 256 / 80%);

  /* Tipografías */
  --font-display: "Cormorant Garamond", ui-serif, Georgia, serif;
  --font-sans: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Espaciados */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;
  --container: 80rem;
  --gutter: 1.5rem;
  --section-y: 6rem;

  /* Radios */
  --radius-sm: 0.375rem;
  --radius-full: 9999px;

  /* Movimiento */
  --ease-cinema: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 640px) {
  :root {
    --gutter: 2.5rem;
    --section-y: 9rem;
  }
}

/* Tema claro para secciones "de respiro" (fondo blanco/marfil, texto azul marino) */
.theme-light {
  --background: oklch(0.99 0.006 85);
  --foreground: oklch(0.24 0.05 256);
  --card: oklch(0.955 0.02 85);
  --muted-foreground: oklch(0.46 0.035 256);
  --primary: oklch(0.62 0.105 72);
  --primary-glow: oklch(0.72 0.1 78);
  --primary-foreground: oklch(0.99 0.006 85);
  --border: oklch(0.62 0.105 72 / 28%);
  --gradient-gold: linear-gradient(120deg, oklch(0.55 0.1 68) 0%, oklch(0.72 0.11 78) 45%, oklch(0.62 0.105 72) 70%, oklch(0.55 0.1 68) 100%);
  background-color: var(--background);
  color: var(--foreground);
}
.theme-light.surface-ivory { background-color: var(--card); }

/* ---------- 2. Reset / normalización ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  min-height: 100vh;
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg, picture, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--primary); color: var(--primary-foreground); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

/* ---------- 3. Tipografía global ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
h2 { font-size: clamp(3rem, 1.6rem + 4.4vw, 4.5rem); line-height: 1; }
h3 { font-size: clamp(1.5rem, 1.3rem + 0.6vw, 1.875rem); line-height: 1.25; }
em { font-style: italic; }

.font-display { font-family: var(--font-display); }

/* Etiqueta pequeña en mayúsculas sobre los títulos */
.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--primary);
}

/* Texto con degradado dorado animado */
.text-gold {
  background: var(--gradient-gold);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 8s linear infinite;
}

/* ---------- 4. Utilidades reutilizables ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.hairline {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0.6;
}
.icon { width: 1rem; height: 1rem; flex-shrink: 0; }

/* Textura de grano cinematográfico */
.grain { position: relative; }
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.09;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.cinema-grade { filter: saturate(0.9) contrast(1.06) brightness(0.95) sepia(0.08); }
.ken-burns { animation: kenburns 24s var(--ease-cinema) infinite alternate; }
.fade-up { animation: fadeUp 1.6s var(--ease-cinema) both; animation-delay: var(--delay, 0s); }

/* Aparición al hacer scroll (la clase .js la añade el <head>; sin JS todo queda visible) */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(6px);
  transition:
    opacity 1.2s var(--ease-cinema),
    transform 1.2s var(--ease-cinema),
    filter 1.2s var(--ease-cinema);
  transition-delay: var(--delay, 0s);
}
.js .reveal.is-visible { opacity: 1; transform: none; filter: none; }

/* ---------- 5. Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 2.75rem; /* 44px: área táctil mínima */
  padding: 0 var(--space-4);
  border: 1px solid transparent;
  border-radius: 0;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.5s ease;
}
.btn .icon { pointer-events: none; }
.btn .icon--md { width: 1.25rem; height: 1.25rem; }

.btn--gold {
  background-color: var(--primary);
  color: var(--primary-foreground);
  box-shadow: var(--shadow-gold);
}
.btn--gold:hover { background-color: var(--primary-glow); transform: translateY(-2px); }

.btn--outline {
  background-color: transparent;
  color: var(--foreground);
  border-color: color-mix(in oklch, var(--primary) 50%, transparent);
}
.btn--outline:hover {
  border-color: var(--primary);
  background-color: color-mix(in oklch, var(--primary) 10%, transparent);
}

.btn--sm { padding-inline: var(--space-3); border-radius: var(--radius-sm); }
.btn--xl { min-height: 3.5rem; padding-inline: var(--space-8); }
.btn--block { width: 100%; }

@media (min-width: 640px) {
  .btn--xl { padding-inline: var(--space-10); }
  .btn--block { width: auto; }
}

/* ---------- 6. Redes sociales ---------- */
.social { display: flex; align-items: center; gap: var(--space-2); }
.social__link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid color-mix(in oklch, var(--primary) 40%, transparent);
  border-radius: var(--radius-full);
  color: var(--primary);
  transition: all 0.5s ease;
}
/* Amplía el área táctil a 44px sin cambiar el tamaño visual */
.social__link::before { content: ""; position: absolute; inset: -0.25rem; }
.social__link:hover {
  transform: scale(1.1);
  border-color: var(--primary);
  background-color: var(--primary);
  color: var(--primary-foreground);
}
.social__link .icon { width: 1rem; height: 1rem; }

.social--lg { gap: var(--space-4); }
.social--lg .social__link { width: 3rem; height: 3rem; }
.social--lg .social__link .icon { width: 1.5rem; height: 1.5rem; }

/* ---------- 7. Header ---------- */
.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: 1.25rem;
}
.site-header__logo img { width: auto; height: 5rem; }
.site-header__actions { display: flex; align-items: center; gap: var(--space-4); }
.site-header__cta { display: none; }

@media (min-width: 640px) {
  .site-header__logo img { height: 7rem; }
  .site-header__cta { display: inline-flex; }
}

/* ---------- 8. Footer ---------- */
.site-footer {
  position: relative;
  z-index: 10;
  border-top: 1px solid var(--border);
}
.site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-top: var(--space-8);
  padding-bottom: var(--space-24); /* deja espacio al botón flotante de WhatsApp */
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.site-footer__brand { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); }
.site-footer__brand img { width: auto; height: 4rem; }

@media (min-width: 640px) {
  .site-footer__inner {
    flex-direction: row;
    padding-bottom: var(--space-8);
    padding-right: 7rem;
    text-align: left;
  }
  .site-footer__brand { flex-direction: row; gap: 1.25rem; }
}

/* ---------- 9. Botón flotante de WhatsApp ---------- */
.whatsapp-float {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius-full);
  background-color: var(--primary);
  color: var(--primary-foreground);
  box-shadow: var(--shadow-gold);
  transition: transform 0.5s ease;
}
.whatsapp-float:hover { transform: scale(1.1); }
.whatsapp-float .icon { width: 1.75rem; height: 1.75rem; }

/* ---------- 10. Animaciones ---------- */
@keyframes kenburns {
  from { transform: scale(1.05) translate3d(0, 0, 0); }
  to { transform: scale(1.18) translate3d(-2%, -1.5%, 0); }
}
@keyframes shimmer { to { background-position: 200% center; } }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(40px); filter: blur(8px); }
  to { opacity: 1; transform: none; filter: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ken-burns, .text-gold, .fade-up { animation: none; }
  .js .reveal { opacity: 1; transform: none; filter: none; transition: none; }
}
