/* ==========================================
   Cerro de Sangre - Estilos CSS
   Versión 1.1 (fusionado starter + hero)
   ========================================== */

/* ------------------------------
   Paleta de colores (variables)
   ------------------------------ */
:root {
  --offwhite: #F8F5F0;
  --guinda: #7A1C23;
  --guinda-oscuro: #4C1015;
  --gris-claro: #9A8C82;
  --gris-oscuro: #5C524B;
  --negro: #1C1A19;
  --ocre: #D6A64F;
}

/* ------------------------------
   Reset mínimo
   ------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  height: 100%;
  background: var(--offwhite); /* mantiene off-white global */
}
img { max-width: 100%; display: block; }

/* ------------------------------
   Tipografía y base
   ------------------------------ */
body {
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--negro);
  line-height: 1.6;
  letter-spacing: 0.2px;
}

.container { max-width: 1100px; margin-inline: auto; padding: 1.25rem; }




/* ------------------------------
   Header / Nav
   ------------------------------ */
header {
  width:100vw;
  background: var(--guinda);
  color: var(--offwhite);
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 3px solid var(--guinda-oscuro);
}
header .brand { margin: 0; font-size: 1.6rem; letter-spacing: 1px; }
header nav { display: flex; gap: 1rem; margin: .5rem 0 0 0; flex-wrap: wrap; }
header nav a { color: var(--offwhite); text-decoration: none; font-weight: 700; }
header nav a:hover { text-decoration: underline; }

/* ------------------------------
   Hero (full screen con fondo negro + tu CSS)
   ------------------------------ */
.hero {
  position: relative;
  width: 100%;
  height: 100dvh;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background: #000; /* negro solo en el hero */
  color: var(--offwhite);
}
.bg-image,
.bg-image picture,
.bg-image img {
  display: block;
  width: 100%;
  height: 100%;
}
.bg-image img {
  object-fit: cover;
  object-position: 50% 68%;
  -webkit-user-drag: none;
}
.overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  padding: 2rem;
}
.overlay > * { pointer-events: auto; }
.overlay-img {
  max-width: min(80%, 1080px);
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 30px rgba(0,0,0,.45));
  will-change: transform;
  transition: transform 160ms cubic-bezier(.22,.61,.36,1);
}
.overlay-img:hover { transform: translateY(-2px); }
@media (max-width: 768px) {
  .overlay-img { max-width: 90%; }
  .bg-image img { object-position: center 30%; }
}
@supports (-webkit-touch-callout: none) {
  html, body { height: -webkit-fill-available; }
  .hero { height: -webkit-fill-available; min-height: -webkit-fill-available; }
}
.vintage-grain::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .12;
  mix-blend-mode: screen;
  background-image:
    radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    radial-gradient(rgba(0,0,0,.08) 1px, transparent 1px);
  background-size: 3px 3px, 4px 4px;
  background-position: 0 0, 1px 1px;
  z-index: 2;
}

/* ------------------------------
   Botones
   ------------------------------ */
.btn-primary, .btn-secondary {
  appearance: none;
  border: 0;
  border-radius: 10px;
  padding: .75rem 1.25rem;
  cursor: pointer;
  transition: transform .06s ease, box-shadow .2s ease, background .2s ease;
  font-weight: 700;
  letter-spacing: .3px;
}
.btn-primary { background: var(--guinda); color: var(--offwhite); }
.btn-primary:hover { background: var(--guinda-oscuro); }
.btn-primary:active { transform: translateY(1px); }
.btn-secondary { background: var(--ocre); color: #2b1d0a; }
.btn-secondary:hover { filter: brightness(.95); }

.pwa-install {
  position: fixed;
  inset: auto 1rem 1rem auto;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  border: 0;
  background: var(--guinda);
  color: var(--offwhite);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  cursor: pointer;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  z-index: 50;
}

.pwa-install:hover,
.pwa-install:focus-visible {
  background: var(--guinda-oscuro);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.pwa-install:active {
  transform: translateY(1px);
}

.pwa-install > span[aria-hidden="true"] {
  line-height: 1;
}

.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;
}

@media (min-width: 768px) {
  .pwa-install {
    display: none !important;
  }
}

/* ------------------------------
   Cards
   ------------------------------ */
.card {
  background: #fff;
  border: 1px solid color-mix(in oklab, var(--gris-claro) 30%, white);
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0,0,0,.05);
}
.card-body { padding: 1.25rem; }
.row { display: flex; gap: .75rem; align-items: center; margin-top: .75rem; }

/* ------------------------------
   Secciones
   ------------------------------ */
section { padding-block: 2rem; }
section h3 { color: var(--guinda); margin-top: 0; }
#quote { margin-top: .75rem; color: var(--gris-oscuro); }

/* ------------------------------
   Footer
   ------------------------------ */
footer {
  background: var(--gris-oscuro);
  color: var(--offwhite);
  padding-block: .5rem;
  text-align: center;
}
.link { color: var(--guinda); text-underline-offset: 3px; }
.link:hover { color: var(--guinda-oscuro); }

/* ------------------------------
   Accesibilidad / Motion
   ------------------------------ */
:focus-visible {
  outline: 2px solid rgba(255, 187, 120, .9);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
