/* ==========================================================
   Antigua Cervecería — hoja de estilos principal
   ========================================================== */

:root {
  --papel: #F7F0E3;
  --papel-2: #EFE4CF;
  --papel-3: #FFFBF3;
  --tinta: #2B1B11;
  --tinta-2: #5A4332;
  --linea: #DCCAA8;
  /* Colores tomados del logo: café del águila y cobre del lema */
  --terracota: #955A2E;
  --terracota-osc: #74421F;
  --oro: #C4935F;
  --oro-claro: #E6C49A;
  --cafe: #231913;
  --cafe-2: #37271D;
  --crema-texto: #E9DCC4;
  --wa: #25D366;
  --radio: 16px; /* contenedores 16px, botones en píldora, campos 10px */
  --ancho: 1120px;
  --sombra: 0 18px 40px rgba(74, 44, 22, .13);
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
}

/* Textura de papel sutil: capa fija que no recibe clics */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 55; pointer-events: none;
  opacity: .07; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

body.bloqueado { overflow: hidden; }

img, svg { max-width: 100%; display: block; }

a { color: var(--terracota); text-underline-offset: 3px; }
a:hover { color: var(--terracota-osc); }

h1, h2, h3 {
  font-family: var(--serif);
  line-height: 1.15;
  margin: 0 0 .5em;
  color: var(--tinta);
  font-weight: 700;
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 6vw, 4rem); letter-spacing: -.015em; line-height: 1.08; }
h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); letter-spacing: -.01em; }
h3, .h3 { font-size: 1.45rem; line-height: 1.35; }
p { margin: 0 0 1em; text-wrap: pretty; }

.contenedor { max-width: var(--ancho); margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .contenedor { padding: 0 32px; } }

.saltar {
  position: absolute; left: -9999px; top: 0; z-index: 300;
  background: var(--tinta); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.saltar:focus, .saltar:hover { left: 8px; top: 8px; color: #fff; }

:focus-visible { outline: 3px solid var(--oro); outline-offset: 3px; }

.visualmente-oculto {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Encabezado ---------- */

.encabezado {
  position: sticky; top: 0; z-index: 50;
  background: rgba(36, 22, 16, .97);
  color: var(--papel);
  border-bottom: 1px solid rgba(231, 194, 122, .2);
}
.encabezado .contenedor {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 68px; gap: 16px; position: relative;
}
.marca {
  display: flex; align-items: center; gap: 10px;
  color: var(--papel); text-decoration: none;
  font-family: var(--serif); font-size: 1.25rem; font-weight: 700; letter-spacing: .02em;
}
.marca:hover { color: var(--oro-claro); }
.marca img { width: 46px; height: 46px; flex: none; border-radius: 50%; }
.pie .marca img { width: 56px; height: 56px; }

.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.nav a {
  display: block; color: var(--papel); text-decoration: none;
  padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: .98rem;
}
.nav a:hover, .nav a[aria-current="page"] { background: rgba(231, 194, 122, .16); color: var(--oro-claro); }

.menu-boton {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 10px;
  background: transparent; border: 1px solid rgba(231, 194, 122, .35);
  color: var(--papel); cursor: pointer;
}
.menu-boton svg { width: 22px; height: 22px; }

@media (max-width: 760px) {
  .menu-boton { display: inline-flex; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--cafe); border-bottom: 1px solid rgba(231, 194, 122, .2);
  }
  .nav.abierto { display: block; }
  .nav ul { flex-direction: column; padding: 8px 16px 16px; }
  .nav a { padding: 12px 14px; border-radius: 10px; }
}

/* ---------- Botones ---------- */

.botones { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.botones-centro { justify-content: center; }
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px;
  font-family: var(--sans); font-weight: 700; font-size: 1rem; line-height: 1.2;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.boton:hover { transform: translateY(-1px); }
.boton:active { transform: translateY(1px) scale(.98); }
.boton svg { width: 20px; height: 20px; flex: none; }
.boton-primario { background: var(--oro); color: var(--cafe); }
.boton-primario:hover { background: var(--oro-claro); color: var(--cafe); }
.boton-secundario { border-color: rgba(247, 240, 227, .55); color: var(--papel); }
.boton-secundario:hover { background: rgba(247, 240, 227, .1); color: var(--papel); }
.boton-oscuro { background: var(--terracota); color: var(--papel); }
.boton-oscuro:hover { background: var(--terracota-osc); color: var(--papel); }
.boton-contorno { border-color: var(--tinta-2); color: var(--tinta); background: transparent; }
.boton-contorno:hover { background: rgba(43, 27, 17, .06); color: var(--tinta); }
.boton-wa { background: var(--wa); color: #0B3D1F; }
.boton-wa:hover { background: #3fe07d; color: #0B3D1F; }

/* ---------- Hero ---------- */

.hero {
  position: relative; overflow: hidden;
  background-color: var(--cafe);
  background-image:
    radial-gradient(ellipse at 75% 15%, rgba(200, 147, 43, .28), transparent 55%),
    linear-gradient(180deg, var(--cafe) 0%, var(--cafe-2) 100%);
  color: var(--papel);
  padding: 72px 0 88px;
}
.hero .contenedor { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) { .hero .contenedor { grid-template-columns: 1.15fr .85fr; } }
.hero h1 { color: var(--papel); }
.hero h1 em { font-style: italic; color: var(--oro-claro); }
.lead { font-size: 1.2rem; color: var(--crema-texto); max-width: 34em; }

.hero-logo { display: flex; justify-content: center; }
.hero-logo img {
  width: min(78vw, 380px); height: auto; border-radius: 50%;
  box-shadow: 0 0 0 10px rgba(196, 147, 95, .18), 0 30px 60px rgba(0, 0, 0, .45);
}
@media (max-width: 899px) {
  .hero { padding-top: 40px; }
  .hero .contenedor { gap: 28px; }
  .hero-logo { order: -1; }
  .hero-logo img { width: 200px; }
}

.hero-sub { padding: 64px 0 56px; }
.hero-sub .contenedor { display: block; }
.hero-sub .lead { max-width: 40em; }

/* ---------- Secciones ---------- */

.seccion { padding: 80px 0; }
.seccion-alt { background: var(--papel-2); }
.encabezado-seccion { max-width: 720px; margin-bottom: 44px; }
.encabezado-seccion p { color: var(--tinta-2); font-size: 1.1rem; }
.centrado { text-align: center; margin-left: auto; margin-right: auto; }

.dos-columnas { display: grid; gap: 40px; align-items: start; }
@media (min-width: 900px) { .dos-columnas { grid-template-columns: 1.1fr .9fr; gap: 64px; } }

.enlace-flecha { font-weight: 700; text-decoration: none; }
.enlace-flecha:hover { text-decoration: underline; }

.tarjeta {
  background: var(--papel-3);
  border-radius: var(--radio); padding: 28px; box-shadow: var(--sombra);
}

.pilares-caja { border-top: 1px solid var(--linea); padding-top: 32px; }
@media (min-width: 900px) {
  .pilares-caja { border-top: 0; border-left: 1px solid var(--linea); padding: 12px 0 12px 48px; }
}

.pilares { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
.pilares li { display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: start; }
.pilares h3 { font-size: 1.15rem; margin-bottom: .2em; }
.pilares p { margin: 0; color: var(--tinta-2); font-size: 1rem; }
.icono-circulo {
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(149, 90, 46, .12); color: var(--terracota);
  display: grid; place-items: center;
}
.icono-circulo svg { width: 24px; height: 24px; }

/* ---------- Cervezas ---------- */

/* Carta de cervezas: filas horizontales, como una carta de bar */
.cervezas { display: grid; gap: 32px; }

.cerveza {
  background: var(--papel-3); border-radius: var(--radio);
  overflow: hidden; display: grid; box-shadow: var(--sombra);
}
@media (min-width: 860px) {
  .cerveza { grid-template-columns: minmax(280px, 36%) 1fr; }
}
/* Foto de la botella; al pasar el mouse aparece el detalle de la etiqueta */
.cerveza-arte { position: relative; overflow: hidden; aspect-ratio: 1 / 1; background: #E7E3DF; }
@media (min-width: 860px) { .cerveza-arte { aspect-ratio: auto; min-height: 380px; } }
.cerveza-arte img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.foto-detalle { opacity: 0; transition: opacity .6s ease; }
@media (hover: hover) {
  .cerveza:hover .foto-detalle, .cerveza:focus-within .foto-detalle { opacity: 1; }
}

.cerveza-cuerpo { padding: 30px 24px 32px; display: flex; flex-direction: column; }
@media (min-width: 860px) { .cerveza-cuerpo { padding: 44px 48px 46px; } }
.cerveza-estilo {
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--terracota); margin-bottom: 6px;
}
.cerveza h3 { font-size: clamp(2rem, 3.4vw, 2.5rem); margin-bottom: .1em; letter-spacing: -.01em; }
.cerveza-lema { font-family: var(--serif); font-style: italic; color: var(--tinta-2); margin-bottom: 14px; font-size: 1.1rem; }
.cerveza-cuerpo > p { font-size: 1.02rem; max-width: 62ch; }

.ficha {
  margin: 10px 0 28px; padding: 22px 0 0; border-top: 1px solid var(--linea);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; font-size: .95rem;
}
@media (min-width: 1100px) { .ficha { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ficha dt { font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--terracota); margin-bottom: 4px; }
.ficha dd { margin: 0; color: var(--tinta); line-height: 1.45; }
.cerveza .boton { margin-top: auto; align-self: flex-start; }

.nota-temporada {
  margin-top: 36px; padding: 18px 22px; border-radius: var(--radio);
  border: 1px dashed var(--oro); background: rgba(200, 147, 43, .08);
  text-align: center; color: var(--tinta-2);
}
.nota-temporada strong { color: var(--tinta); }

/* ---------- Nosotros ---------- */

.prosa { max-width: 720px; }
.prosa p { font-size: 1.1rem; }
.prosa p:first-of-type::first-letter {
  float: left; font-family: var(--serif); font-size: 3.6em; line-height: .85;
  padding: 6px 10px 0 0; color: var(--terracota); font-weight: 700;
}

.cita {
  position: relative; margin: 48px 0 40px; padding: 0;
  font-family: var(--serif); font-size: clamp(1.4rem, 2.6vw, 1.7rem); font-style: italic;
  line-height: 1.4; color: var(--terracota-osc); max-width: 30ch;
}
.cita::before {
  content: "\201C"; position: absolute; top: -.62em; left: -.08em;
  font-size: 3em; line-height: 1; font-style: normal; color: var(--oro); opacity: .55;
}

.linea-tiempo { list-style: none; margin: 0; padding: 0; position: relative; }
.linea-tiempo::before {
  content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px;
  width: 2px; background: var(--linea);
}
.linea-tiempo li { position: relative; padding: 0 0 30px 44px; }
.linea-tiempo li::before {
  content: ""; position: absolute; left: 4px; top: 6px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--papel); border: 3px solid var(--terracota);
}
.linea-tiempo .anio { font-family: var(--serif); font-weight: 700; font-size: 1.3rem; color: var(--terracota); display: block; }
.linea-tiempo h3 { font-size: 1.15rem; margin: 2px 0 4px; }
.linea-tiempo p { margin: 0; color: var(--tinta-2); font-size: 1rem; }

.valores { display: grid; gap: 40px 64px; max-width: 920px; margin: 0 auto; }
@media (min-width: 760px) { .valores { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.valor { border-top: 1px solid var(--linea); padding-top: 24px; }
.valores + .botones { margin-top: 56px; }
.valor h3 { font-size: 1.3rem; }
.valor p { margin: 0; color: var(--tinta-2); max-width: 40ch; }
.valor .icono-circulo { margin-bottom: 16px; }

/* Aparición al hacer scroll (solo si el usuario no pidió reducir movimiento) */
@media (prefers-reduced-motion: no-preference) {
  .revelar, .revelar-hijos > * {
    transition: opacity .7s cubic-bezier(.16, 1, .3, 1), transform .7s cubic-bezier(.16, 1, .3, 1);
  }
  .oculto-revelar { opacity: 0; transform: translateY(20px); }
}

/* ---------- Contacto ---------- */

.datos-contacto { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 18px; }
.datos-contacto li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.datos-contacto .icono-circulo { width: 44px; height: 44px; }
.datos-contacto strong { display: block; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--tinta-2); }
.datos-contacto a, .datos-contacto span { font-size: 1.05rem; color: var(--tinta); word-break: break-word; }

.formulario { display: grid; gap: 18px; }
.campo label { display: block; font-weight: 700; margin-bottom: 6px; font-size: .95rem; }
.campo input, .campo textarea {
  width: 100%; padding: 12px 14px; font: inherit; font-size: 1rem; color: var(--tinta);
  background: #fff; border: 1px solid var(--linea); border-radius: 10px;
}
.campo input:focus, .campo textarea:focus { border-color: var(--oro); outline: 2px solid rgba(200, 147, 43, .35); outline-offset: 0; }
.campo textarea { min-height: 140px; resize: vertical; }
.campo .ayuda { font-size: .85rem; color: var(--tinta-2); margin-top: 4px; }
.casilla { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: .95rem; }
.casilla input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--terracota); }
.oculto-bot { display: none; }
.error-campo { color: #A1261B; font-size: .9rem; font-weight: 600; margin: 6px 0 0; }
.campo [aria-invalid="true"], .casilla [aria-invalid="true"] { border-color: #A1261B; outline: 2px solid rgba(161, 38, 27, .25); outline-offset: 0; }
.formulario .boton { justify-self: start; }

/* ---------- Páginas legales ---------- */

.legal { max-width: 780px; }
.legal h2 { font-size: 1.5rem; margin-top: 1.8em; }
.legal ul { padding-left: 1.3em; }
.legal li { margin-bottom: .4em; }
.legal .actualizado { color: var(--tinta-2); font-size: .95rem; }

/* ---------- Pie de página ---------- */

.pie { background: var(--cafe); color: var(--crema-texto); padding: 64px 0 0; font-size: .98rem; }
.pie a { color: var(--crema-texto); text-decoration: none; }
.pie a:hover { color: var(--oro-claro); text-decoration: underline; }
.pie-columnas { display: grid; gap: 36px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); padding-bottom: 40px; }
.pie-titulo {
  font-family: var(--serif); font-size: 1.15rem; font-weight: 700;
  color: var(--oro-claro); margin: 0 0 14px;
}
.pie ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pie .marca { margin-bottom: 14px; }
.pie-legal-empresa { font-size: .92rem; line-height: 1.7; }

.leyendas {
  border-top: 1px solid rgba(231, 194, 122, .2); border-bottom: 1px solid rgba(231, 194, 122, .2);
  padding: 22px 0; text-align: center; font-weight: 700; font-size: .95rem; color: var(--papel);
}
.leyendas p { margin: 0 0 2px; }
.leyendas span { display: block; font-weight: 400; color: var(--crema-texto); font-size: .82rem; margin-bottom: 10px; }

.pie-final {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding: 20px 0 96px; font-size: .88rem; color: #BCA98C;
}

/* ---------- Botón flotante de WhatsApp ---------- */

.wa-flotante {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--wa); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
  transition: transform .2s;
}
.wa-flotante:hover { transform: scale(1.07); color: #fff; }
.wa-flotante svg { width: 32px; height: 32px; }
.wa-flotante::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--wa); animation: pulso 2.4s ease-out 1s 3;
}
@keyframes pulso {
  0% { transform: scale(1); opacity: .7; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* ---------- Verificación de edad ---------- */

.edad {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(20, 12, 8, .94);
  display: grid; place-items: center; padding: 16px;
}
.edad[hidden] { display: none; }
.edad-caja {
  width: 100%; max-width: 440px; text-align: center;
  background: var(--papel); border-radius: 18px; padding: 36px 28px;
  box-shadow: 0 30px 60px rgba(10, 6, 3, .45);
}
.edad-caja .logo { width: 96px; height: 96px; margin: 0 auto 14px; border-radius: 50%; }
.edad-caja h2 { font-size: 1.7rem; }
.edad-caja p { color: var(--tinta-2); }
.edad-caja .botones { justify-content: center; margin-top: 20px; }
.edad-caja .aviso { font-size: .82rem; margin: 20px 0 0; }
.edad-negado { color: var(--terracota); font-weight: 700; margin-top: 16px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
