/* =============================================
   EL SAPO CANCIONERO — Estilos principales
   ============================================= */

/* --- Fuentes locales --- */
@font-face {
  font-family: 'NewSpirit';
  src: url('../fonts/NewSpirit-SemiBoldCondensed.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'BNCyclone';
  src: url('../fonts/BNCyclone.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* --- Tokens de diseño --- */
:root {
  /* Colores */
  --verde-logo:    #005722;
  --verde-oscuro:  #1a5218;
  --verde-boton:   #005722;
  --crema:         #f2e0c6;
  --blanco:        #ffffff;
  --negro-suave:   #1a1a1a;

  /* Tipografías */
  --fuente-titulo: 'NewSpirit', Georgia, serif;
  --fuente-nav:    'BNCyclone', system-ui, sans-serif;
  --fuente-serif:  'NewSpirit', Georgia, serif;
  --fuente-sans:   'Inter', system-ui, -apple-system, sans-serif;

  /* Layout */
  --nav-h:         70px;
  --max-width:     1280px;
}

/* =============================================
   RESET
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--verde-oscuro);
}

body {
  font-family: var(--fuente-sans);
  color: var(--negro-suave);
  line-height: 1.6;
  background-color: var(--verde-oscuro);
}

img   { max-width: 100%; display: block; }
a     { text-decoration: none; color: inherit; }
ul    { list-style: none; }

/* =============================================
   UTILIDADES
   ============================================= */
.container {
  width: 92%;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* =============================================
   TIPOGRAFÍA — evitar palabras huérfanas al final de párrafo
   (Adrián, 9 sep 2026). Sin soporte, degrada al wrap normal.
   ============================================= */
p, li, h1, h2, h3 {
  text-wrap: pretty;
}

/* =============================================
   BOTONES
   ============================================= */
.btn {
  display: inline-block;
  padding: 0.55rem 1.5rem;
  border-radius: 50px;
  font-family: var(--fuente-nav);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.btn--outline-verde {
  border: 2px solid var(--verde-boton);
  color: var(--verde-boton);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
}
.btn--outline-verde:hover {
  background: var(--verde-boton);
  color: var(--blanco);
  backdrop-filter: none;
}

.btn--outline-blanco {
  border: 1.5px solid rgba(242, 224, 198, 0.85);
  color: var(--crema);
  background: transparent;
}
.btn--outline-blanco:hover {
  background: var(--crema);
  color: var(--verde-oscuro);
}

/* =============================================
   HEADER / NAV
   ============================================= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  box-shadow: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
  /* Respeta la barra de estado / notch en iOS (solo activo con viewport-fit=cover) */
  padding-top: env(safe-area-inset-top, 0px);
}

.header--hidden {
  transform: translateY(-110%);
  opacity: 0;
  pointer-events: none;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  gap: 1rem;
}

/* Logo */
.nav__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo__img {
  height: 42px;
  width: auto;
  display: block;
}

/* Links */
.nav__links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav__link {
  font-family: var(--fuente-nav);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--verde-logo);
  position: relative;
  transition: opacity 0.2s;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--verde-logo);
  transition: width 0.2s;
}

.nav__link:hover::after,
.nav__link--active::after {
  width: 100%;
}

.nav__link:hover { opacity: 0.75; }

/* Hamburguesa — oculto en desktop */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem;
  z-index: 101;
  flex-shrink: 0;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--verde-logo);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =============================================
   HERO
   ============================================= */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;

  background-image: url('../img/hero/hero-home.webp');
  background-size: cover;
  background-position: center 40%;
  background-color: #5a9a40;
}

/* Sin overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  z-index: 0;
}

/* Gradiente inferior hacia verde-oscuro */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to bottom, transparent 0%, var(--verde-oscuro) 100%);
  z-index: 0;
  pointer-events: none;
}

/* hero__content centra el contenido principal */
.hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: calc(var(--nav-h) + 3rem) 2rem 3rem;
  min-height: 100vh;
  min-height: 100dvh;
}

/* Bloque central: título + subtítulo + CTAs */
.hero__main {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__titulo {
  font-family: var(--fuente-titulo);
  font-weight: 900;
  font-size: clamp(2.4rem, 7.2vw, 8rem);
  color: var(--crema);
  line-height: 1.05;
  letter-spacing: -0.015em;   /* Adrián 9 sep 2026: tracking más cerrado */
  white-space: nowrap;
  margin-bottom: 1.2rem;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.18);
}

.hero__subtitulo {
  font-family: var(--fuente-nav);
  font-size: clamp(1.2rem, 2.2vw, 1.4rem);
  font-weight: 400;
  color: var(--crema);
  line-height: 0.875;
  margin-bottom: 2.2rem;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
  max-width: 700px;
}

.hero__ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Claim — anclado al fondo del hero sobre el gradiente */
.hero__claim {
  position: absolute;
  z-index: 1;
  bottom: 3.8rem;
  left: 2rem;
  right: 2rem;
  font-family: var(--fuente-titulo);
  font-size: clamp(1.4rem, 3.2vw, 2.8rem);
  font-weight: 400;
  color: var(--crema);
  line-height: 0.95;          /* Adrián 9 sep 2026: 1.35 x 0.7 */
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

/* Copyright integrado en el hero */
.hero__copy {
  position: absolute;
  z-index: 1;
  bottom: 1.2rem;
  left: 0;
  right: 0;
  font-family: var(--fuente-sans);
  font-size: 0.84rem;          /* 10 sep 2026: era 0.72rem (11,5px) */
  font-weight: 400;
  color: rgba(242, 224, 198, 0.9);  /* era 0.45 → contraste 1,59:1, ilegible */
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
  letter-spacing: 0.04em;
  text-align: center;
}

/* Header sobre fondo oscuro (galería y páginas sin hero-foto) */
.header--galeria {
  background: rgba(26, 82, 24, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.header--galeria .nav__link {
  color: var(--crema);
}

.header--galeria .nav__link::after {
  background: var(--crema);
}

.header--galeria .nav__toggle span {
  background: var(--crema);
}

.header--galeria .nav__cta {
  border-color: var(--crema);
  color: var(--crema);
  background: transparent;
}

.header--galeria .nav__cta:hover {
  background: var(--crema);
  color: var(--verde-oscuro);
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  background: var(--negro-suave);
  padding: 2rem;
}

.footer__inner {
  text-align: center;
}

.footer__copy {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.02em;
}

/* Variante verde — páginas con fondo verde (ej. galerías) */
.footer--verde {
  background: var(--verde-logo);
}

.footer--verde .footer__copy {
  color: rgba(242, 224, 198, 0.45);
}

/* =============================================
   GALERÍA — página Fiestas Aluche
   (estilos en fiestas-aluche.html <style>)
   ============================================= */

/* =============================================
   RESPONSIVE — Mobile
   ============================================= */
@media (max-width: 768px) {
  :root { --nav-h: 60px; }

  /* Mostrar hamburguesa, ocultar links y CTA desktop */
  .nav__toggle { display: flex; }
  .nav__links  { display: none; }
  .nav__cta    { display: none; }

  /* Menú desplegable móvil */
  .nav__links.is-open {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
    padding: 2rem;
    z-index: 99;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  }

  .nav__links.is-open .nav__link {
    font-size: 1.15rem;
    color: var(--verde-logo);
  }

  .nav__links.is-open .btn {
    margin-top: 0.5rem;
  }

  /* Hero en móvil */
  .hero__titulo {
    font-size: clamp(2rem, 8.5vw, 3.5rem);
    white-space: normal;
  }

  .hero__claim {
    font-size: clamp(1.2rem, 4.5vw, 1.8rem);
  }
}

/* ===== Botón Volver (provisional: texto + flecha; se sustituirá por el diseño de Adrián) ===== */
.salida-volver {
  position: absolute;
  top: calc(var(--nav-h) + 0.9rem);
  /* Alineado con el borde izquierdo del logo (mismo borde que el contenedor: 92% centrado, máx 1280px) */
  left: max(4vw, (100vw - var(--max-width)) / 2);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  box-sizing: border-box;
  width: 86px; /* ensanchado al subir la tipografía */
  font-family: var(--fuente-nav);
  font-size: 0.82rem;          /* 10 sep 2026: era 0.7rem (11,2px) */
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--crema);
  background: rgba(26, 82, 24, 0.72);   /* más opaco: va sobre foto */
  border: 1.5px solid rgba(242, 224, 198, 0.85);
  backdrop-filter: blur(4px);
  border-radius: 50px;
  padding: 0.34rem 0.4rem;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.salida-volver:hover {
  background: var(--crema);
  color: var(--verde-logo);
  border-color: var(--crema);
}
.salida-volver__flecha {
  font-size: 1.05em;
  line-height: 1;
  transition: transform 0.2s;
}
.salida-volver:hover .salida-volver__flecha { transform: translateX(-3px); }

/* ===== Pie legal (créditos + enlaces legales) ===== */
.site-legal {
  background-color: var(--verde-oscuro);
  border-top: 1px solid rgba(242, 224, 198, 0.18);
  padding: 1.1rem clamp(1rem, 4vw, 2.5rem);
  font-family: var(--fuente-nav);
}
.site-legal__inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.6rem 1.5rem;
}
.site-legal__copy {
  margin: 0;
  justify-self: start;
  font-size: 0.86rem;          /* 10 sep 2026: era 0.76rem (12,2px) */
  letter-spacing: 0.02em;
  color: rgba(242, 224, 198, 0.85);  /* era 0.6 → 3,65:1 */
}
/* Crédito central: protagonista (mayor presencia) */
.site-legal__credito {
  margin: 0;
  justify-self: center;
  text-align: center;
  font-size: clamp(0.9rem, 1.4vw, 1.02rem);
  letter-spacing: 0.02em;
  color: rgba(242, 224, 198, 0.92);
}
.site-legal__credito a {
  color: var(--crema);
  text-decoration: none;
  border-bottom: 1px solid rgba(242, 224, 198, 0.4);
  padding-bottom: 1px;
  transition: border-color 0.2s;
}
.site-legal__credito a:hover { border-color: var(--crema); }
.site-legal__links {
  justify-self: end;
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.site-legal__links a {
  font-size: 0.84rem;          /* 10 sep 2026: era 0.74rem (11,8px) */
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(242, 224, 198, 0.85);  /* era 0.6 → 3,65:1 */
  text-decoration: none;
  transition: color 0.2s;
}
.site-legal__links a:hover { color: var(--crema); }
@media (max-width: 820px) {
  .site-legal__inner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 0.8rem;
  }
  .site-legal__copy, .site-legal__links { justify-self: center; }
  .site-legal__links { justify-content: center; }
  .site-legal__credito { order: -1; }
}

/* ===== Páginas legales (documento) ===== */
.legal-header {
  background-color: var(--verde-oscuro);
  padding: calc(var(--nav-h) + 3rem) clamp(1.2rem, 5vw, 2rem) 2.5rem;
  text-align: center;
}
.legal-header__titulo {
  font-family: var(--fuente-titulo);
  font-weight: 900;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.05;
  color: var(--crema);
}
.legal-header__sub {
  font-family: var(--fuente-nav);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(242, 224, 198, 0.7);
  margin-top: 0.6rem;
}
.legal {
  background-color: var(--crema);
  padding: 3rem clamp(1.2rem, 5vw, 2rem) 4rem;
}
.legal__inner { max-width: 820px; margin: 0 auto; }
.legal__inner h2 {
  font-family: var(--fuente-titulo);
  font-weight: 900;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  color: var(--verde-logo);
  margin: 2.2rem 0 0.8rem;
}
.legal__inner p,
.legal__inner li {
  font-family: var(--fuente-nav);
  font-size: clamp(1rem, 1.6vw, 1.1rem);
  line-height: 1.6;
  color: #2a2a2a;
}
.legal__inner p { margin-bottom: 1rem; }
.legal__inner ul { margin: 0 0 1rem 1.2rem; }
.legal__inner li { margin-bottom: 0.4rem; }
.legal__inner a { color: var(--verde-logo); text-decoration: underline; }
.legal__datos {
  background-color: rgba(0, 87, 34, 0.06);
  border: 1px solid rgba(0, 87, 34, 0.18);
  border-radius: 12px;
  padding: 1.2rem 1.4rem;
  margin-bottom: 1rem;
}
.legal__datos p { margin-bottom: 0.4rem; }
.legal__datos p:last-child { margin-bottom: 0; }
