/* ==========================================================================
   Swiss Horizon Group — Sistema de branding compartido
   Paleta y tipografía del brandboard (Rafa)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Montserrat:wght@300;400;500;600;700&display=swap');

:root {
  /* Paleta oficial SHG */
  --burgundy:   #80050D; /* principal  */
  --wine:       #4A0308; /* oscuro / contraste */
  --cream:      #F1E5D9; /* fondo claro */
  --slateblue:  #6898B0; /* azul pizarra */
  --terracotta: #E8C0A8; /* acento cálido */
  --ink:        #2B1416; /* texto oscuro */

  --cream-soft: #FBF7F2; /* crema muy suave para fondos */
  --line:       rgba(43, 20, 22, 0.10);

  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-sans:    'Montserrat', system-ui, -apple-system, sans-serif;
}

/* --- Salvavidas anti-scroll horizontal (no rompe sticky: clip, no hidden) --- */
html, body { max-width: 100%; overflow-x: clip; }

/* --- Base tipográfica ------------------------------------------------------ */
body {
  font-family: var(--font-sans);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

/* --- Fondo con gradiente animado (tonos crema) ---------------------------- */
.bg-gradient-animate {
  background: linear-gradient(-45deg, #FBF7F2, #F5ECE2, #FBF7F2, #F1E5D9);
  background-size: 400% 400%;
  animation: gradientBG 16s ease infinite;
}
@keyframes gradientBG {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* --- Reveal on scroll ----------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* --- Blobs decorativos y flotantes (heredado del diseño premium) ---------- */
@keyframes blob {
  0%   { transform: translate(0px, 0px) scale(1); }
  33%  { transform: translate(30px, -50px) scale(1.1); }
  66%  { transform: translate(-20px, 20px) scale(0.9); }
  100% { transform: translate(0px, 0px) scale(1); }
}
.animate-blob { animation: blob 8s infinite; }
.animation-delay-2000 { animation-delay: 2s; }

@keyframes float-slow    { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }
@keyframes float-delayed { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.animate-float-slow    { animation: float-slow 6s ease-in-out infinite; }
.animate-float-delayed { animation: float-delayed 5s ease-in-out infinite 1s; }

/* --- Glass card ----------------------------------------------------------- */
.glass-card {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.55);
}

/* --- Botones -------------------------------------------------------------- */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--burgundy); color: #fff;
  font-weight: 600; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.9rem 1.75rem; border-radius: 4px;
  transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.btn-primary:hover { background: var(--wine); box-shadow: 0 10px 30px rgba(128,5,13,0.28); }

.btn-dark {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink); color: #fff;
  font-weight: 600; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.75rem 1.35rem; border-radius: 4px;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.btn-dark:hover { background: var(--wine); box-shadow: 0 8px 24px rgba(43,20,22,0.25); }

/* --- Barra superior (top-bar) --------------------------------------------- */
.top-bar {
  background: var(--wine);
  color: rgba(255,255,255,0.85);
  font-size: 0.78rem;
}
.top-bar a { color: rgba(255,255,255,0.85); transition: color 0.2s ease; }
.top-bar a:hover { color: #fff; }

/* --- Selector de idioma ---------------------------------------------------
   La burbuja flotante se pinta y se estila desde assets/js/i18n.js
   (componente autónomo, para no repetir estilos en las 8 páginas). --------- */

/* --- Modal / popup -------------------------------------------------------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(43, 20, 22, 0.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.is-open { opacity: 1; visibility: visible; }
.modal-box {
  background: #fff; border-radius: 14px;
  width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 30px 80px rgba(43,20,22,0.35);
  transform: translateY(24px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay.is-open .modal-box { transform: translateY(0) scale(1); }

/* --- Inputs de formulario ------------------------------------------------- */
.field {
  width: 100%; font-family: var(--font-sans); font-size: 0.9rem;
  padding: 0.7rem 0.9rem; border: 1px solid rgba(43,20,22,0.15); border-radius: 6px;
  background: #FBF7F2; color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.field:focus {
  outline: none; background: #fff;
  border-color: var(--burgundy);
  box-shadow: 0 0 0 3px rgba(128,5,13,0.12);
}
.field-label {
  display: block; font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: rgba(43,20,22,0.65); margin-bottom: 0.35rem;
}

/* --- Estado de formularios (AJAX) ----------------------------------------- */
.form-status { display: none; font-size: 0.85rem; padding: 0.7rem 0.9rem; border-radius: 8px; }
.form-status.is-ok  { display: block; background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.form-status.is-err { display: block; background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }

/* --- Honeypot antispam (oculto) ------------------------------------------- */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --- Menú móvil ----------------------------------------------------------- */
.mobile-menu {
  position: fixed; inset: 0; z-index: 90;
  background: var(--wine);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.75rem;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.mobile-menu a {
  color: #fff; font-family: var(--font-display); font-size: 1.75rem; font-weight: 500;
}
.mobile-menu a:hover { color: var(--terracotta); }

/* --- Navbar --------------------------------------------------------------- */
.site-nav {
  background: rgba(251, 247, 242, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.site-nav.nav-scrolled {
  background: rgba(251, 247, 242, 0.97);
  box-shadow: 0 4px 22px rgba(43, 20, 22, 0.07);
}

/* --- Utilidad: subrayado animado de nav ----------------------------------- */
.nav-link {
  position: relative; color: var(--ink); transition: color 0.2s ease;
}
.nav-link::after {
  content: ''; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--burgundy); transition: width 0.3s ease;
}
.nav-link:hover::after, .nav-link.is-current::after { width: 100%; }
.nav-link.is-current { color: var(--burgundy); }

/* --- Carrusel del equipo: barra de scroll oculta (se navega con las flechas) --- */
.equipo-scroll { scrollbar-width: none; -ms-overflow-style: none; }
.equipo-scroll::-webkit-scrollbar { display: none; }

/* --- Botón fantasma: para CTA secundario sobre fondo oscuro (hero con vídeo) --- */
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: #fff;
  border: 1px solid rgba(255,255,255,0.45);
  font-weight: 600; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.9rem 1.75rem; border-radius: 4px;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.btn-ghost:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.8); }

/* --- Hero con vídeo: si el visitante pide menos movimiento, se queda el póster --- */
@media (prefers-reduced-motion: reduce) {
  #hero-video { display: none !important; }
}
