/* ==========================================================================
   SPALMAT BOLSAS — Design tokens
   ========================================================================== */

:root {
  /* Color */
  --c-black: #0E1116;
  --c-dark: #161B22;
  --c-blue: #1B4D8C;
  --c-blue-bright: #3F7FAE;
  --c-blue-mist: #E6ECF2;
  --c-white: #FFFFFF;
  --c-grey-50: #F5F6F8;
  --c-grey-100: #E7E9EC;
  --c-grey-400: #8A909B;
  --c-grey-700: #3C4149;

  /* Type */
  --font-display: 'Rajdhani', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;

  /* Layout */
  --container: 1180px;
  --nav-height: 100px;
  --gutter: 24px;

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Reset
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--c-black);
  background: var(--c-white);
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.55;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, p, ul { margin: 0; }

ul { padding: 0; list-style: none; }

button { font-family: inherit; cursor: pointer; }

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

:focus-visible {
  outline: 2px solid var(--c-blue-bright);
  outline-offset: 3px;
}

/* ==========================================================================
   Layout helpers
   ========================================================================== */

.section__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: 112px 0;
}

.section__head {
  margin-bottom: 56px;
  max-width: 640px;
}

.section__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 3.4vw, 2.75rem);
  letter-spacing: 0.005em;
  line-height: 1.12;
  color: var(--c-black);
}

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 34px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.btn--primary {
  background: var(--c-blue);
  color: var(--c-white);
  border-color: var(--c-blue);
}
.btn--primary:hover {
  background: var(--c-blue-bright);
  border-color: var(--c-blue-bright);
}

.btn--block { width: 100%; }

/* ==========================================================================
   Navigation
   ========================================================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 100;
  background: transparent;
  transition: background-color 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}

.nav.is-scrolled {
  background: rgba(14, 17, 22, 0.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.nav__inner {
  max-width: var(--container);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__brand { display: flex; align-items: center; height: 100%; }

.nav__logo {
  height: 48px;
  width: auto;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav__link {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--c-white);
  padding: 8px 0;
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--c-blue-bright);
  transition: width 0.25s var(--ease);
}

.nav__link:hover::after { width: 100%; }

.nav__link--cta {
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 8px 18px;
  border-radius: 2px;
}
.nav__link--cta::after { display: none; }
.nav__link--cta:hover {
  border-color: var(--c-blue-bright);
  background: var(--c-blue-bright);
  color: var(--c-white);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  padding: 0;
}

.nav__toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--c-white);
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

.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;
  height: 100vh;
  min-height: 560px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--c-black);
}

.hero__media {
  position: absolute;
  inset: 0;
}

.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(14,17,22,0.55) 0%, rgba(14,17,22,0.35) 40%, rgba(14,17,22,0.85) 100%);
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter) 96px;
  color: var(--c-white);
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  line-height: 1.04;
  letter-spacing: 0.005em;
  max-width: 14ch;
  margin-bottom: 24px;
}

.hero__subtitle {
  font-size: 1.4rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
  max-width: 46ch;
  margin-bottom: 36px;
}

/* ==========================================================================
   Products
   ========================================================================== */

.products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 46px;
}

#productos .section__inner {
  max-width: 1600px;
}

@media (min-width: 901px) {
  #productos .section__inner {
    padding-left: 16px;
    padding-right: 16px;
  }
}

.product-card {
  background: var(--c-white);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--c-grey-100);
}

.product-card__media {
  aspect-ratio: 5 / 3;
  overflow: hidden;
  background: var(--c-grey-50);
}

.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.product-card:hover .product-card__media img {
  transform: scale(1.045);
}

.product-card__body {
  padding: 28px 32px 36px;
}

.product-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.65rem;
  letter-spacing: 0.01em;
  margin-bottom: 10px;
  color: var(--c-black);
}

.product-card__text {
  color: var(--c-grey-700);
  font-size: 0.96rem;
  line-height: 1.6;
  max-width: 42ch;
}

/* ==========================================================================
   About
   ========================================================================== */

.about-video {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--c-black);
  padding: 96px 0;
}

.about-video__media {
  position: absolute;
  inset: 0;
}

.about-video__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-video__overlay {
  position: absolute;
  inset: 0;
  background: rgba(14, 17, 22, 0.72);
}

.about-video .section__inner {
  max-width: 1440px;
  width: 100%;
}

.about-video__content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin-bottom: 32px;
}

.section-eyebrow {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-blue-bright);
  margin-bottom: 14px;
}

.about-video__content .section__title {
  color: var(--c-white);
  font-size: clamp(2.05rem, 3.1vw, 2.65rem);
  max-width: 32ch;
}

/* ---------- Dos columnas de texto ---------- */

.about-video__columns {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 48px;
  margin-bottom: 40px;
}

.about-video__col {
  position: relative;
}

.about-video__col + .about-video__col {
  padding-left: 48px;
  border-left: 1px solid rgba(63, 127, 174, 0.4);
}

.about-video__content .about__text,
.about-video__col .about__text {
  color: rgba(255, 255, 255, 0.96);
  font-weight: 500;
}

.about__text {
  font-size: 1.5rem;
  line-height: 1.6;
  margin-bottom: 0;
  max-width: 52ch;
}

/* ---------- Indicadores / estadísticas ---------- */

.about-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.about-stats__item {
  background: rgba(14, 17, 22, 0.55);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(63, 127, 174, 0.35);
  border-radius: 4px;
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.about-stats__item:hover {
  border-color: var(--c-blue-bright);
  box-shadow: 0 8px 22px rgba(63, 127, 174, 0.24);
  transform: translateY(-3px);
}

.about-stats__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 12px;
  color: var(--c-blue-bright);
}

.about-stats__icon svg {
  width: 100%;
  height: 100%;
}

.about-stats__number {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 3.2vw, 3.05rem);
  line-height: 1;
  color: var(--c-white);
  margin-bottom: 10px;
  transition: color 0.3s var(--ease);
}

.about-stats__item:hover .about-stats__number {
  color: var(--c-blue-bright);
}

.about-stats__label {
  display: block;
  font-family: var(--font-body);
  font-size: 1.1rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.72);
}

/* Aparición progresiva de las tarjetas (reutiliza el sistema .reveal) */
.about-stats__item.reveal:nth-child(1) { transition-delay: 0s; }
.about-stats__item.reveal:nth-child(2) { transition-delay: 0.06s; }
.about-stats__item.reveal:nth-child(3) { transition-delay: 0.12s; }
.about-stats__item.reveal:nth-child(4) { transition-delay: 0.18s; }
.about-stats__item.reveal:nth-child(5) { transition-delay: 0.24s; }
.about-stats__item.reveal:nth-child(6) { transition-delay: 0.3s; }

/* ==========================================================================
   Contact
   ========================================================================== */

.contact {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 72px;
}

.contact__lead {
  color: var(--c-grey-700);
  font-size: 1.05rem;
  margin: 20px 0 40px;
  max-width: 40ch;
}

.contact__info {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--c-grey-100);
}

.contact__info li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--c-grey-100);
}

.contact__label {
  font-size: 0.88rem;
  color: var(--c-grey-400);
}

.contact__value {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--c-blue);
  transition: color 0.2s var(--ease);
}

a.contact__value:hover {
  color: var(--c-blue-bright);
}

.contact__form {
  background: var(--c-grey-50);
  padding: 40px;
  border: 1px solid var(--c-grey-100);
}

.field { margin-bottom: 22px; }

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--c-grey-700);
  margin-bottom: 8px;
}

.field input,
.field textarea {
  width: 100%;
  padding: 13px 16px;
  font-family: var(--font-body);
  font-size: 0.96rem;
  border: 1px solid var(--c-grey-100);
  background: var(--c-white);
  border-radius: 2px;
  transition: border-color 0.2s var(--ease);
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--c-blue-bright);
  outline: none;
}

.contact__status {
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--c-grey-700);
  min-height: 1.2em;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  background: var(--c-black);
  padding: 40px 0;
}

.footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer__logo {
  height: 26px;
  width: auto;
  opacity: 0.92;
}

.footer__copy {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .contact {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .products {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

  .about-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }

  .section { padding: 80px 0; }
}

@media (max-width: 760px) {
  .about-video__columns {
    grid-template-columns: 1fr;
    gap: 20px 0;
  }

  .about-video__col + .about-video__col {
    padding-left: 0;
    padding-top: 20px;
    border-left: none;
    border-top: 1px solid rgba(63, 127, 174, 0.4);
  }
}

@media (max-width: 560px) {
  .products {
    grid-template-columns: 1fr;
  }

  .about-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .about-stats__item { padding: 24px 16px; }
}

@media (max-width: 380px) {
  .about-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  :root { --gutter: 20px; }

  .nav__links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(14, 17, 22, 0.98);
    backdrop-filter: blur(8px);
    padding: 8px var(--gutter) 24px;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
  }

  .nav__links.is-open {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
  }

  .nav__link {
    width: 100%;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav__link--cta {
    margin-top: 12px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  }

  .nav__toggle { display: flex; }

  .hero__content { padding-bottom: 64px; }

  .about-video {
    min-height: 460px;
    padding: 64px 0;
  }

  .contact__form { padding: 28px 24px; }
}

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

.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
}

.whatsapp-float__button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25D366;
  color: var(--c-white);
  box-shadow: 0 4px 16px rgba(14, 17, 22, 0.28);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.whatsapp-float__button:hover {
  transform: scale(1.07);
  box-shadow: 0 6px 20px rgba(14, 17, 22, 0.34);
}

.whatsapp-bubble {
  position: absolute;
  right: 70px;
  bottom: 8px;
  width: max-content;
  max-width: 230px;
  background: var(--c-white);
  color: var(--c-black);
  padding: 12px 32px 12px 16px;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(14, 17, 22, 0.2);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.whatsapp-bubble::after {
  content: '';
  position: absolute;
  right: -6px;
  bottom: 20px;
  width: 12px;
  height: 12px;
  background: var(--c-white);
  transform: rotate(45deg);
  box-shadow: 3px -3px 6px rgba(14, 17, 22, 0.04);
}

.whatsapp-bubble.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.whatsapp-bubble__link {
  display: block;
}

.whatsapp-bubble__close {
  position: absolute;
  top: 4px;
  right: 6px;
  width: 22px;
  height: 22px;
  border: none;
  background: none;
  color: var(--c-grey-400);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.whatsapp-bubble__close:hover { color: var(--c-grey-700); }

@media (max-width: 480px) {
  .whatsapp-float {
    right: 16px;
    bottom: 16px;
  }

  .whatsapp-float__button {
    width: 52px;
    height: 52px;
  }

  .whatsapp-bubble {
    right: 0;
    bottom: 64px;
    max-width: 200px;
    font-size: 0.85rem;
    padding: 10px 28px 10px 14px;
  }

  .whatsapp-bubble::after {
    right: 16px;
    bottom: -6px;
    transform: rotate(135deg);
  }
}
