/* =====================================================================
   3 GARRAFAS NEVERÍA — PÁGINA NOSOTROS (v3 editorial)
   Estilo tipo editorial magazine (referencia: aftermetoo.com)
   Basado en Layout_3-Garrafas-V4.jpg
   ===================================================================== */

/* ============================================
   FUENTES OFICIALES (declaradas localmente porque home.css no se carga en esta página)
   ============================================ */
@font-face {
  font-family: 'MidcentDisco';
  src: url('../fonts/MidcentDisco-Regular.woff2') format('woff2'),
       url('../fonts/MidcentDisco-Regular.woff')  format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Grift';
  src: url('../fonts/Grift-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Grift';
  src: url('../fonts/Grift-Medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Grift';
  src: url('../fonts/Grift-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --nos-cream: #fcf1d8;
  --nos-cream-soft: #fdf6e3;
  --nos-cream-deep: #f5e6c0;
  --nos-yellow: #ffd400;
  --nos-yellow-editorial: #f5c542;
  --nos-purple: #5448dd;
  --nos-purple-lit: #7b6de8;
  --nos-pink: #e95068;
  --nos-pink-soft: #f5c9d6;
  --nos-brown: #6b4023;
  --nos-brown-dark: #4a2a15;
}

/* ============================================
   LAYOUT BASE — reset del main
   ============================================ */
main#main.nos-editorial {
  padding: 0;
  overflow: hidden;
}

/* ============================================
   TIPOGRAFÍA EDITORIAL
   ============================================ */
.nos-title-l {
  font-family: 'MidcentDisco', serif;
  font-weight: 400;
  font-size: clamp(56px, 7vw, 108px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--nos-brown);
  margin: 0 0 40px;
}
.nos-title-l em {
  font-family: 'MidcentDisco', serif;
  font-style: normal;
  font-weight: 400;
}

.nos-body {
  font-family: 'Grift', serif;
  font-size: clamp(17px, 1.4vw, 22px);
  line-height: 1.5;
  color: var(--nos-brown);
  margin: 0 0 24px;
  max-width: 44ch;
}
.nos-body-list {
  font-family: 'Grift', serif;
  font-size: clamp(17px, 1.4vw, 22px);
  line-height: 1.7;
  color: var(--nos-brown);
  margin: 0 0 32px;
  max-width: 44ch;
}
.nos-body-small {
  font-family: 'Grift', serif;
  font-size: 15px;
  line-height: 1.4;
  color: var(--nos-brown);
  opacity: 0.7;
  margin: 0;
  letter-spacing: 0.02em;
}

/* ============================================
   ESTRUCTURA DE SECCIONES
   ============================================ */
.nos-sec {
  position: relative;
  padding: clamp(80px, 12vh, 160px) 0;
  overflow: hidden;
}
.nos-sec-inner {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 80px);
  position: relative;
}

.nos-sec--cream { background: var(--nos-cream); }
.nos-sec--mostaza { background: var(--nos-yellow-editorial); }
.nos-sec--purple {
  background: var(--nos-purple);
  color: var(--nos-cream);
}
.nos-sec--purple .nos-title-l,
.nos-sec--purple .nos-body,
.nos-sec--purple .nos-body-list,
.nos-sec--purple .nos-body-small { color: var(--nos-cream); }
.nos-sec--coral {
  background: var(--nos-pink);
}
.nos-sec--coral .nos-title-l,
.nos-sec--coral .nos-body,
.nos-sec--coral .nos-body-list { color: var(--nos-brown); }

/* ============================================
   REVEAL — estado inicial (JS activa .is-in)
   ============================================ */
.js-ready [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}
.js-ready [data-reveal].is-in {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   PLACEHOLDER DE FOTOS — mientras no hay reales
   ============================================ */
.nos-photo-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: 'Grift', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--nos-brown);
  opacity: 0.35;
  pointer-events: none;
  line-height: 1.4;
}

.nos-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 4/5;
  background: var(--nos-cream-deep);
  border: 2px dashed rgba(107, 64, 35, 0.25);
}
.nos-photo--garrafa {
  max-width: 460px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nos-photo--garrafa img {
  width: 100%;
  height: auto;
  display: block;
}
.nos-photo--cono {
  aspect-ratio: 1/1;
  max-width: 480px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nos-photo--cono img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ============================================
   DOT ACENTOS (círculos decorativos)
   ============================================ */
.nos-dot {
  position: absolute;
  border-radius: 50%;
  z-index: 2;
}
.nos-dot--coral {
  background: var(--nos-pink);
  width: clamp(70px, 8vw, 130px);
  aspect-ratio: 1/1;
  bottom: 10px;
  left: -20px;
  top: auto;
  right: auto;
}
.nos-dot--top-left {
  top: -20px;
  left: -20px;
  right: auto;
}

/* ============================================
   1) NOS-INICIO — Todo comenzó con una garrafa
   ============================================ */
.nos-inicio-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: center;
}
.nos-inicio-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

/* ============================================
   2) NOS-CRECER — El sabor nos hizo crecer
   ============================================ */
.nos-crecer-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: center;
}
.nos-crecer-visual {
  position: relative;
  display: flex;
  justify-content: center;
}
.nos-crecer .nos-title-l em { color: var(--nos-brown); }

/* ============================================
   3) NOS-TRES — Tres cosas que nos mueven
   ============================================ */
.nos-tres-title {
  text-align: center;
  margin-bottom: clamp(60px, 8vh, 100px);
}
.nos-tres-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(40px, 6vw, 80px);
}
.nos-tres-col {
  text-align: center;
}
.nos-tres-svg {
  display: block;
  width: 100%;
  max-width: 240px;
  height: auto;
  aspect-ratio: 1/1;
  margin: 0 auto 32px;
}
.nos-tres-eyebrow {
  font-family: 'Grift', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--nos-brown);
  margin: 0 0 12px;
  text-transform: uppercase;
}
.nos-tres-desc {
  font-family: 'Grift', serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--nos-brown);
  margin: 0;
  opacity: 0.85;
  max-width: 20ch;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   4) NOS-FACIL — Hacemos más fácil disfrutar
   ============================================ */
.nos-facil-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: center;
}
.nos-facil-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.nos-familia {
  width: 100%;
  max-width: 420px;
  height: auto;
  /* Si el SVG viene con líneas negras/oscuras y quieres tintarlas cream */
  /* filter: brightness(0) invert(1); */
}

/* ============================================
   5) NOS-DONDE — Queremos estar donde suceden
   ============================================ */
.nos-donde-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: center;
}
.nos-donde-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.nos-donde-circle {
  position: relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1/1;
  border-radius: 50%;
  background: var(--nos-purple);
  overflow: hidden;
}
.nos-donde-circle .nos-photo-placeholder { color: var(--nos-cream); opacity: 0.5; }

/* ============================================
   6) NOS-CIERRE — No hace falta una gran ocasión
   ============================================ */
.nos-cierre-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: center;
}
.nos-cierre-firma {
  display: flex;
  justify-content: center;
  align-items: center;
}
.nos-cierre-sello {
  width: clamp(234px, 28.6vw, 364px);
  height: auto;
  animation: nos-sello-spin 26s linear infinite;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.18));
  pointer-events: none;
}
@keyframes nos-sello-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .nos-cierre-sello { animation: none; }
}

/* ============================================
   RESPONSIVE — mobile primero
   ============================================ */
@media (max-width: 900px) {
  .nos-sec { padding: 80px 0; }
  .nos-title-l { font-size: clamp(44px, 10vw, 72px); }

  .nos-inicio-grid,
  .nos-crecer-grid,
  .nos-facil-grid,
  .nos-donde-grid,
  .nos-cierre-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .nos-crecer-grid .nos-crecer-visual { order: -1; }
  .nos-donde-grid .nos-donde-visual { order: -1; }

  .nos-tres-grid {
    grid-template-columns: 1fr;
    gap: 60px;
  }
  .nos-tres-circle { max-width: 200px; }

  .nos-cierre-firma { text-align: left; margin-top: 20px; }
}

@media (max-width: 560px) {
  .nos-sec { padding: 60px 0; }
  .nos-title-l { font-size: clamp(38px, 11vw, 56px); }
  .nos-body, .nos-body-list { font-size: 16px; }
}

/* =====================================================================
   LOADER FIX — el JS main.js no se carga en nosotros.php.
   Auto-ocultar loader con CSS puro después de 1.2s.
   Cuando implementemos main.js global, esta regla se puede quitar.
   ===================================================================== */
.loader {
  animation: nos-hide-loader 0.4s ease-out 1.2s forwards;
}
.loader .loader-inner {
  animation: nos-hide-loader-inner 0.4s ease-out 1.2s forwards;
}
@keyframes nos-hide-loader {
  to {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}
@keyframes nos-hide-loader-inner {
  to {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95);
  }
}
@media (prefers-reduced-motion: reduce) {
  .loader,
  .loader .loader-inner {
    animation-duration: 0.01s;
    animation-delay: 0.01s;
  }
}

/* =====================================================================
   SUCURSALES SLIDER — sección 5 (nos-donde)
   ===================================================================== */

.nos-suc-slider {
  position: relative;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}
.nos-suc-stack {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
}
.nos-suc-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 500ms ease-out;
  pointer-events: none;
}
.nos-suc-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}
.nos-suc-circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--nos-purple);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nos-suc-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.nos-suc-circle--empty .nos-photo-placeholder {
  color: var(--nos-cream);
  opacity: 0.55;
  font-family: 'Grift', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-align: center;
  line-height: 1.4;
}

/* Flechas laterales — outline elegante */
.nos-suc-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid var(--nos-brown);
  background: transparent;
  color: var(--nos-brown);
  cursor: pointer;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}
.nos-suc-arrow:hover {
  background: var(--nos-brown);
  color: var(--nos-cream);
}
.nos-suc-arrow--prev { left: -60px; }
.nos-suc-arrow--next { right: -60px; }

/* Info debajo del círculo del slider */
.nos-suc-info-stack {
  position: relative;
  margin-top: 36px;
  min-height: 200px;
  width: 100%;
  max-width: 460px;
  text-align: center;
  padding: 0 20px;
  box-sizing: border-box;
}
.nos-suc-info {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 400ms ease-out, transform 400ms ease-out;
  pointer-events: none;
}
.nos-suc-info.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.nos-suc-nombre {
  font-family: 'MidcentDisco', serif;
  font-weight: 400;
  font-size: clamp(26px, 2.6vw, 34px);
  line-height: 1.05;
  color: var(--nos-brown);
  margin: 0 0 14px;
}
.nos-suc-direccion {
  font-family: 'Grift', serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--nos-brown);
  margin: 0 auto 6px;
  max-width: 34ch;
  text-wrap: balance;
}
.nos-suc-horario {
  font-family: 'Grift', serif;
  font-size: 14px;
  line-height: 1.4;
  color: var(--nos-brown);
  opacity: 0.7;
  margin: 0 0 22px;
  white-space: nowrap;
}
.nos-suc-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  background: var(--nos-pink);
  color: var(--nos-cream);
  font-family: 'Grift', sans-serif;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.2s ease;
}
.nos-suc-btn:hover {
  background: #d94054;
  transform: translateX(3px);
}

/* Responsive del slider */
@media (max-width: 900px) {
  .nos-suc-slider { max-width: 300px; }
  .nos-suc-arrow--prev { left: -20px; }
  .nos-suc-arrow--next { right: -20px; }
  .nos-suc-info-stack { min-height: 200px; }
}

/* =====================================================================
   ANIMACIONES EDITORIAL — 3 gestos
   Solo activas cuando .js-ready está en <html>
   ===================================================================== */

/* ============================================
   GESTO 1 — Fade-up al entrar al viewport
   ============================================ */
.js-ready [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.js-ready [data-reveal].is-in {
  opacity: 1;
  transform: translateY(0);
}

/* Escalonado interno: título aparece antes que el texto y la imagen */
.js-ready [data-reveal].is-in .nos-title-l {
  animation: nos-fade-in 700ms cubic-bezier(0.22, 1, 0.36, 1) 100ms both;
}
.js-ready [data-reveal].is-in .nos-body,
.js-ready [data-reveal].is-in .nos-body-list,
.js-ready [data-reveal].is-in .nos-body-small {
  animation: nos-fade-in 700ms cubic-bezier(0.22, 1, 0.36, 1) 300ms both;
}
.js-ready [data-reveal].is-in .nos-photo,
.js-ready [data-reveal].is-in .nos-facil-visual,
.js-ready [data-reveal].is-in .nos-donde-visual,
.js-ready [data-reveal].is-in .nos-tres-grid,
.js-ready [data-reveal].is-in .nos-cierre-firma {
  animation: nos-fade-in 800ms cubic-bezier(0.22, 1, 0.36, 1) 450ms both;
}

@keyframes nos-fade-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   GESTO 2 — Coral flotante (loop infinito sutil)
   ============================================ */
.nos-dot--coral {
  animation: nos-float 4s ease-in-out infinite;
}
@keyframes nos-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

/* ============================================
   GESTO 3 — Palabras clave del título con delay
   ============================================ */
.js-ready [data-reveal] .nos-title-l em {
  opacity: 0;
  transition: opacity 800ms ease-out 500ms;
}
.js-ready [data-reveal].is-in .nos-title-l em {
  opacity: 1;
}

/* ============================================
   MOTION REDUCIDO — respeto a preferencias del usuario
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .js-ready [data-reveal],
  .js-ready [data-reveal] .nos-title-l,
  .js-ready [data-reveal] .nos-body,
  .js-ready [data-reveal] .nos-body-list,
  .js-ready [data-reveal] .nos-body-small,
  .js-ready [data-reveal] .nos-photo,
  .js-ready [data-reveal] .nos-facil-visual,
  .js-ready [data-reveal] .nos-donde-visual,
  .js-ready [data-reveal] .nos-tres-grid,
  .js-ready [data-reveal] .nos-cierre-firma,
  .js-ready [data-reveal] .nos-title-l em {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
  }
  .nos-dot--coral { animation: none; }
}

/* Seccion cierre (coral) — texto en cream */
.nos-sec--coral .nos-title-l,
.nos-sec--coral .nos-title-l em,
.nos-sec--coral .nos-body,
.nos-sec--coral .nos-body-list,
.nos-sec--coral .nos-body-small {
  color: #fcf1d8;
}
