/* ============================================================
   DEVIANO — styles.css
   Fuentes: Plus Jakarta Sans (headline) · Manrope (body)
   ============================================================ */

/* ── Variables ───────────────────────────────────────────── */
:root {
  --primary:            #904800;
  --primary-dim:        #7e3e00;
  --primary-container:  #f28c38;
  --on-primary:         #fff0e8;
  --on-primary-container: #4c2300;

  --secondary-container:    #e4e2e1;
  --on-secondary-container: #525251;
  --surface-variant:        #dfdcdc;

  --surface:                #f9f6f5;
  --surface-container-low:  #f3f0ef;
  --surface-container-lowest: #ffffff;
  --surface-container-high: #e4e2e1;
  --surface-container:      #eae7e7;

  --on-surface:         #2f2f2e;
  --on-surface-variant: #5c5b5b;
  --outline-variant:    #afadac;

  --whatsapp:           #25D366;

  --font-headline: 'Plus Jakarta Sans', sans-serif;
  --font-body:     'Manrope', sans-serif;

  --shadow-card:  0 32px 64px -12px rgba(47,47,46,.06);
  --shadow-hover: 0 40px 80px -16px rgba(47,47,46,.12);
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
body  { font-family: var(--font-body); background: var(--surface); color: var(--on-surface); -webkit-font-smoothing: antialiased; }
a     { text-decoration: none; color: inherit; }
img   { display: block; max-width: 100%; }
::selection { background: var(--primary-container); color: var(--on-primary-container); }

/* Material Symbols */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-variation-settings: 'FILL' 0,'wght' 400,'GRAD' 0,'opsz' 24;
  font-style: normal; line-height: 1;
  display: inline-block; white-space: nowrap;
  -webkit-font-smoothing: antialiased;
}

/* Utilidad */
.editorial-shadow { box-shadow: var(--shadow-card); }
.glass-nav { backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  background: rgba(249,246,245,.97);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 20px 40px -8px rgba(47,47,46,.05);
}
.nav__inner {
  display: flex; justify-content: space-between; align-items: center;
  max-width: 80rem; margin: 0 auto; padding: 1rem 1.5rem;
}
.nav__logo {
  display: inline-flex; align-items: center;
}
.nav__logo-img {
  height: 60px;
  max-height: 60px;
  width: auto;
  display: block;
  object-fit: contain;
}
.nav__links { display: none; align-items: center; gap: 2rem; }
.nav__link {
  font-family: var(--font-headline); font-weight: 700; font-size: .875rem;
  letter-spacing: -.02em; color: var(--on-surface-variant);
  position: relative; transition: color .2s;
}
.nav__link::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px; background: var(--primary); transition: width .2s;
}
.nav__link:hover, .nav__link--active { color: var(--primary); }
.nav__link:hover::after, .nav__link--active::after { width: 100%; }

/* Hamburger */
.nav__hamburger { display: flex; flex-direction: column; gap: 6px; background: none; border: none; cursor: pointer; padding: .5rem; }
.nav__hamburger span { display: block; width: 1.5rem; height: 2px; background: var(--on-surface); transition: transform .3s, opacity .3s; }

/* Mobile drawer */
.mobile-overlay { position: fixed; inset: 0; z-index: 40; pointer-events: none; }
.mobile-overlay__bg { position: absolute; inset: 0; background: rgba(0,0,0,.4); opacity: 0; transition: opacity .3s; }
.mobile-menu {
  position: absolute; right: 0; top: 0; height: 100%; width: 18rem;
  background: var(--surface); box-shadow: -8px 0 40px rgba(47,47,46,.15);
  display: flex; flex-direction: column; padding: 5rem 2rem 2rem;
  gap: 1.5rem; transform: translateX(100%); transition: transform .3s;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu__link { font-family: var(--font-headline); font-weight: 700; font-size: 1.125rem; color: var(--on-surface-variant); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; min-height: 870px;
  display: flex; align-items: center; overflow: hidden;
  background: var(--surface);
}
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg-gradient {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to right, var(--surface) 0%, rgba(249,246,245,.85) 50%, rgba(249,246,245,.6) 100%);
}
.hero__bg-img { width: 100%; height: 100%; object-fit: cover; opacity: .9; transform: scale(1.05); }
.hero__content {
  position: relative; z-index: 2;
  max-width: 80rem; margin: 0 auto; width: 100%;
  padding: 6rem 1.5rem;
  display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center;
}
.hero__text { display: flex; flex-direction: column; gap: 2rem; }
.hero__badge {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .5rem 1rem; border-radius: 9999px;
  background: rgba(242,140,56,.2); color: var(--primary);
  font-family: var(--font-headline); font-weight: 700;
  font-size: .875rem; letter-spacing: .05em; text-transform: uppercase; width: fit-content;
}
.hero__title {
  font-family: var(--font-headline); font-weight: 900;
  font-size: clamp(3.5rem, 8vw, 5rem); line-height: 1.05; letter-spacing: -.04em;
  color: var(--on-surface);
}
.hero__title span { color: var(--primary); }
.hero__subtitle { font-size: 1.25rem; color: var(--on-surface-variant); max-width: 32rem; line-height: 1.7; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 1rem; padding-top: 1rem; }

/* Animaciones hero */
@keyframes fadeUp { from{opacity:0;transform:translateY(24px)} to{opacity:1;transform:none} }
.hero__badge    { animation: fadeUp .7s ease .1s  both; }
.hero__title    { animation: fadeUp .7s ease .25s both; }
.hero__subtitle { animation: fadeUp .7s ease .4s  both; }
.hero__ctas     { animation: fadeUp .7s ease .55s both; }

/* ── Botones ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: 1rem 2rem; border-radius: 9999px; border: none; cursor: pointer;
  font-family: var(--font-headline); font-weight: 700; font-size: 1.125rem;
  transition: background .2s, opacity .2s, transform .15s;
}
.btn--primary { background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow-card); }
.btn--primary:hover { background: var(--primary-dim); }
.btn--primary .material-symbols-outlined { transition: transform .2s; }
.btn--primary:hover .material-symbols-outlined { transform: translateX(4px); }
.btn--secondary { background: var(--secondary-container); color: var(--on-secondary-container); }
.btn--secondary:hover { background: var(--surface-variant); }
.btn--whatsapp {
  background: var(--whatsapp); color: #fff;
  font-size: 1.25rem; padding: 1.25rem 2.5rem;
  box-shadow: var(--shadow-card); position: relative;
}
.btn--whatsapp:hover { opacity: .9; }
.btn--whatsapp::before {
  content: ''; position: absolute; inset: -4px; border-radius: 9999px;
  background: var(--whatsapp); opacity: 0; z-index: -1;
  animation: wa-pulse 2.5s infinite;
}
@keyframes wa-pulse {
  0%   { opacity:0; transform:scale(1); }
  50%  { opacity:.2; transform:scale(1.06); }
  100% { opacity:0; transform:scale(1.12); }
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity .7s, transform .7s; }
.reveal.visible { opacity: 1; transform: none; }

/* ============================================================
   QUIENES SOMOS
   ============================================================ */
.section-nosotros { padding: 6rem 0; background: var(--surface-container-low); }
.section-nosotros .container { max-width: 80rem; margin: 0 auto; padding: 0 1.5rem; }
.nosotros__grid { display: grid; grid-template-columns: 1fr; gap: 5rem; align-items: center; }

/* Slider — opacity stack (funciona en todos los browsers mobile) */
.slider__outer {
  aspect-ratio: 4/5;
  border-radius: .75rem;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,.25);
  position: relative;
}
.slider__track {
  position: absolute;
  inset: 0;
  /* sin flex, sin transform — cada slide se apila sobre el otro */
}
.slider__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .55s ease;
  pointer-events: none;
}
.slider__slide.active {
  opacity: 1;
  pointer-events: auto;
}
.slider__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.slider__arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 2.5rem; height: 2.5rem; background: rgba(255,255,255,.8);
  border: none; border-radius: 9999px; display: flex; align-items: center; justify-content: center;
  color: var(--on-surface); box-shadow: 0 4px 16px rgba(0,0,0,.1);
  opacity: 0; transition: opacity .3s; cursor: pointer; z-index: 10;
}
.slider__outer:hover .slider__arrow { opacity: 1; }
@media (max-width: 767px) {
  .slider__arrow { opacity: 1; }
}
.slider__arrow--prev { left: 1rem; }
.slider__arrow--next { right: 1rem; }
.slider__dots { position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%); display: flex; gap: .5rem; z-index: 10; }
.slider__dot {
  width: .625rem; height: .625rem; border-radius: 9999px;
  background: rgba(255,255,255,.5); border: none; cursor: pointer;
  transition: background .3s, width .3s; padding: 0;
}
.slider__dot.active { background: var(--primary); width: 1.75rem; }

/* Texto */
.nosotros__text { display: flex; flex-direction: column; gap: 2rem; }
.nosotros__title { font-family: var(--font-headline); font-size: clamp(2rem,5vw,3rem); font-weight: 900; letter-spacing: -.03em; }
.nosotros__body { display: flex; flex-direction: column; gap: 1.5rem; }
.nosotros__body p { font-size: 1.125rem; color: var(--on-surface-variant); line-height: 1.75; }

/* ============================================================
   VIDEO
   ============================================================ */
.section-video { padding: 6rem 0; background: var(--surface); }
.section-video .container { max-width: 64rem; margin: 0 auto; padding: 0 1.5rem; display: flex; flex-direction: column; gap: 3rem; text-align: center; }
.video__title { font-family: var(--font-headline); font-size: clamp(1.75rem,4vw,2.5rem); font-weight: 900; letter-spacing: -.03em; margin-bottom: .75rem; }
.video__subtitle { color: var(--on-surface-variant); max-width: 42rem; margin: 0 auto; line-height: 1.7; }
.video__player { position: relative; aspect-ratio: 16/9; border-radius: .75rem; overflow: hidden; background: var(--on-surface); box-shadow: 0 25px 50px -12px rgba(0,0,0,.3); cursor: pointer; }
.video__overlay { position: absolute; inset: 0; background: rgba(47,47,46,.4); display: flex; align-items: center; justify-content: center; z-index: 10; transition: background .3s; }
.video__player:hover .video__overlay { background: rgba(47,47,46,.2); }
.video__play-btn { width: 6rem; height: 6rem; background: var(--primary); border-radius: 9999px; display: flex; align-items: center; justify-content: center; color: var(--on-primary); box-shadow: 0 20px 40px rgba(0,0,0,.3); transition: transform .3s; }
.video__player:hover .video__play-btn { transform: scale(1.1); }
.video__thumbnail { width: 100%; height: 100%; object-fit: cover; opacity: .8; }

/* ============================================================
   PRODUCTOS
   ============================================================ */
.section-productos { padding: 6rem 0; background: var(--surface-container-low); }
.section-productos .container { max-width: 80rem; margin: 0 auto; padding: 0 1.5rem; }
.productos__header { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: 1.5rem; margin-bottom: 4rem; }
.productos__title   { font-family: var(--font-headline); font-size: clamp(2rem,5vw,3rem); font-weight: 900; letter-spacing: -.03em; }
.productos__subtitle { color: var(--on-surface-variant); font-size: 1.25rem; margin-top: 1rem; }
.productos__filters { display: flex; gap: .5rem; flex-wrap: wrap; }
.filter-btn { padding: .5rem 1.5rem; border-radius: 9999px; font-family: var(--font-headline); font-weight: 700; font-size: .875rem; border: none; cursor: pointer; background: rgba(228,226,225,.5); color: var(--on-secondary-container); transition: background .2s, color .2s; }
.filter-btn:hover  { background: var(--secondary-container); }
.filter-btn.active { background: var(--primary-container); color: var(--on-primary-container); }
.productos__grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.product-card { background: var(--surface-container-lowest); padding: 1.5rem; border-radius: .75rem; box-shadow: var(--shadow-card); display: flex; flex-direction: column; align-items: center; text-align: center; transition: transform .3s cubic-bezier(.4,0,.2,1), box-shadow .3s, opacity .3s ease, scale .3s ease; }
.product-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover); }

/* ── Filter states ───────────────────────────────────────── */
.product-item--hiding {
  opacity: 0 !important;
  scale: .92 !important;
  pointer-events: none;
}
.product-item--hidden {
  display: none !important;
}
.product-card__img-wrap { width: 100%; aspect-ratio: 1/1; background: var(--surface-container-low); border-radius: .5rem; overflow: hidden; margin-bottom: 1.5rem; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.product-card__img-wrap img { width: 100%; height: 100%; object-fit: contain; }
.product-card__name { font-family: var(--font-headline); font-weight: 700; font-size: 1.125rem; }

/* ============================================================
   DISTRIBUIDOR
   ============================================================ */
.section-distribuidor { padding: 6rem 0; background: var(--surface); }
.section-distribuidor .container { max-width: 80rem; margin: 0 auto; padding: 0 1.5rem; }
.distribuidor__card { background: rgba(242,140,56,.1); border-radius: 1.5rem; padding: 3rem; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2rem; position: relative; overflow: hidden; }
.distribuidor__orb { position: absolute; width: 16rem; height: 16rem; background: rgba(144,72,0,.1); border-radius: 9999px; filter: blur(3rem); pointer-events: none; }
.distribuidor__orb--tr { top: 0; right: 0; transform: translate(50%,-50%); }
.distribuidor__orb--bl { bottom: 0; left: 0; transform: translate(-50%,50%); }
.distribuidor__title    { font-family: var(--font-headline); font-size: clamp(1.75rem,5vw,3rem); font-weight: 900; max-width: 36rem; letter-spacing: -.03em; position: relative; z-index: 1; }
.distribuidor__subtitle { color: var(--on-surface-variant); font-size: 1.25rem; max-width: 32rem; line-height: 1.7; position: relative; z-index: 1; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 3rem 0;
  background: var(--surface-container-high);
  border-top: 1px solid rgba(175,173,172,.1);
}
.footer__inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
}
.footer__logo {
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
}
.footer__logo-img {
  height: 40px;
  max-height: 40px;
  width: auto;
  display: block;
  object-fit: contain;
}
.footer__nav {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem;
  margin-bottom: 1.75rem;
}
.footer__nav a { font-family: var(--font-headline); font-weight: 700; font-size: .875rem; color: var(--on-surface-variant); transition: color .2s; }
.footer__nav a:hover { color: var(--primary); }
.footer__social {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin: 0 auto 1.5rem auto;
  width: 100%;
}
.footer__social a { display: inline-flex; align-items: center; justify-content: center; color: var(--on-surface-variant); transition: opacity .2s, transform .2s, color .2s; }
.footer__social a:hover { opacity: .7; transform: translateY(-2px); color: var(--primary); }
.footer__social img { width: 28px; height: 28px; display: block; }
.footer__copy { color: var(--on-surface-variant); font-size: .875rem; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 768px) {
  .nav__links  { display: flex; }
  .nav__hamburger { display: none; }
  .nosotros__grid { grid-template-columns: 1fr 1fr; }
  .productos__header { flex-direction: row; align-items: flex-end; }
  .productos__grid { grid-template-columns: repeat(2, 1fr); }
  .distribuidor__card { padding: 5rem; }
  .footer__nav { gap: 2rem; }
}
@media (min-width: 1024px) {
  .hero__content { grid-template-columns: 1fr 1fr; }
  .hero__title   { font-size: 5rem; }
  .productos__grid { grid-template-columns: repeat(3, 1fr); }
}
