/* ===========================
   CSS Reset & Variables
   =========================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Fondos */
  --background: 0 0% 100%; /* #FFFFFF blanco puro */
  --background-alt: 240 5% 97%; /* #F7F7F8 gris muy claro */
  --background-hero: 30 20% 98%; /* cálido muy sutil */

  /* Texto */
  --foreground: 0 0% 7%; /* #111111 casi negro */
  --muted-foreground: 0 0% 42%; /* #6B6B6B gris medio */

  /* Marca (rojo BIV) */
  --primary: 356 95% 45%; /* #E30613 rojo principal */
  --primary-foreground: 0 0% 100%; /* #FFFFFF */
  --primary-dark: 354 94% 35%; /* hover oscuro */
  --primary-light: 354 80% 95%; /* fondo suave rojo */

  /* Bordes */
  --border: 220 13% 91%; /* #E5E7EB */
  --border-strong: 220 13% 82%; /* más visible */
  --ring: 356 95% 45%; /* foco = rojo */

  /* Acento */
  --accent: 354 80% 95%;
  --accent-foreground: 356 95% 45%;

  /* Typography */
  --font-family: "Inter", system-ui, -apple-system, sans-serif;
  --font-size-base: 16px;
  --line-height-base: 1.5;

  /* Spacing */
  --spacing-xs: 0.5rem; /* 8px */
  --spacing-sm: 1rem; /* 16px */
  --spacing-md: 2rem; /* 32px */
  --spacing-lg: 3rem; /* 48px */
  --spacing-xl: 4rem; /* 64px */
  --spacing-2xl: 6rem; /* 96px */
  --spacing-section: 7rem; /* 112px */

  /* Border Radius */
  --radius: 0.75rem; /* 12px */
  --radius-sm: 0.5rem; /* 8px */
  --radius-md: 0.75rem; /* 12px */
  --radius-lg: 1rem; /* 16px */
  --radius-xl: 1.5rem; /* 24px */
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-xs: none;
  --shadow-card: none;
  --shadow-card-hover: none;
  --shadow-soft: none;
  --shadow-primary: none;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --container-max-width: 1152px;
  --container-hero: 1280px;
  --header-height: 70px;
  --padding-x-mobile: 20px;
  --padding-x-desktop: 80px;
}

/* ===========================
   Base Styles
   =========================== */

html {
  scroll-behavior: smooth;
  font-size: var(--font-size-base);
}

body {
  font-family: var(--font-family);
  line-height: var(--line-height-base);
  color: hsl(var(--foreground));
  background-color: hsl(var(--background));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Focus visible accesible */
:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-base);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ===========================
   Utility Classes
   =========================== */

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

@media (min-width: 768px) {
  .container {
    padding: 0 var(--padding-x-desktop);
  }
}

.container-hero {
  max-width: var(--container-hero);
  margin: 0 auto;
  padding: 0 var(--padding-x-mobile);
}

@media (min-width: 768px) {
  .container-hero {
    padding: 0 var(--padding-x-desktop);
  }
}

.text-primary {
  color: hsl(var(--primary));
}

/* ===========================
   Header & Navigation
   =========================== */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid hsl(var(--border));
  transition: border-color var(--transition-base);
}

.header.scrolled {
  border-bottom-color: hsl(var(--border-strong));
}

.navbar {
  max-width: var(--container-hero);
  margin: 0 auto;
  padding: 0 var(--padding-x-mobile);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

@media (min-width: 768px) {
  .navbar {
    padding: 0 var(--padding-x-desktop);
  }
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  transition: opacity var(--transition-base);
}

.logo:hover {
  opacity: 0.75;
  transition: opacity var(--transition-fast);
}

.logo-img {
  height: 46px;
  width: auto;
  display: block;
  transition: transform var(--transition-base);
}

.logo:hover .logo-img {
  transform: scale(1.04);
}

.logo-tagline {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
  white-space: nowrap;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  gap: 0;
  width: 30px;
  height: 24px;
  padding: 0;
}

.menu-toggle span {
  width: 100%;
  height: 2px;
  background-color: hsl(var(--foreground));
  transition: all 0.3s ease;
  border-radius: 2px;
}

.menu-toggle.active {
  gap: 0;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(11px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-11px) rotate(-45deg);
}

/* ===========================
   Buttons
   =========================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 30px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  transition:
    background-color var(--transition-base),
    transform var(--transition-base),
    opacity var(--transition-fast);
  white-space: nowrap;
  cursor: pointer;
  border: none;
  line-height: 1;
  letter-spacing: 0.01em;
}

.btn:active {
  transform: scale(0.97) !important;
}

.btn-primary {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.btn-primary:hover {
  background-color: hsl(var(--primary-dark));
  transform: translateY(-2px) scale(1.02);
}

.btn-white {
  background-color: transparent;
  color: hsl(var(--primary-foreground));
  border: 2px solid rgba(255, 255, 255, 0.85);
  padding: 13px 28px;
}

.btn-white:hover {
  background-color: hsl(var(--primary-foreground));
  color: hsl(var(--primary));
  transform: translateY(-2px) scale(1.02);
  border-color: hsl(var(--primary-foreground));
}

.btn-large {
  padding: 1.125rem 2.5rem;
  font-size: 1.0625rem;
}

.whatsapp-icon {
  width: 20px;
  height: 20px;
}

.btn-large .whatsapp-icon {
  width: 24px;
  height: 24px;
}

/* ===========================
   Hero Section
   =========================== */

.hero {
  padding-top: calc(var(--header-height) + 56px);
  padding-bottom: 72px;
  background-color: hsl(var(--background));
  overflow: hidden;
  position: relative;
}

@media (min-width: 768px) {
  .hero {
    padding-top: calc(var(--header-height) + 96px);
    padding-bottom: 96px;
  }
}

.hero .container-hero {
  max-width: var(--container-hero);
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-label {
  display: inline-block;
  font-size: 0.875rem; /* 14px */
  font-weight: 700;
  letter-spacing: 0.18em; /* tracking muy ancho */
  text-transform: uppercase;
  color: hsl(var(--primary));
  margin-bottom: var(--spacing-md);
}

.hero-title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 0;
  color: hsl(var(--foreground));
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 64px;
  }
}

.hero-divider {
  width: 64px;
  height: 4px;
  background-color: hsl(var(--primary));
  margin: 20px 0;
}

.hero-description {
  font-size: 1rem;
  line-height: 1.6;
  color: hsl(var(--muted-foreground));
  margin-bottom: var(--spacing-lg);
  font-weight: 400;
}

@media (min-width: 768px) {
  .hero-description {
    font-size: 1.125rem; /* 18px */
  }
}

.hero-cta {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  align-items: flex-start;
}

.hero-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  background-color: hsl(var(--background-alt));
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid hsl(var(--border));
}

.check-icon {
  width: 16px;
  height: 16px;
  color: hsl(var(--primary));
}

.hero-image {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.hero-image::before {
  display: none;
}

.hero-image img {
  position: relative;
  z-index: 1;
  width: 115%;
  height: auto;
  display: block;
  transition: transform var(--transition-slow);
}

.hero-image:hover img {
  transform: translateY(-4px);
}

/* Patrón de puntos decorativos rojo */
.hero-pattern {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 220px;
  height: 220px;
  background-image: radial-gradient(
    hsl(var(--primary) / 0.25) 1.5px,
    transparent 1.5px
  );
  background-size: 14px 14px;
  pointer-events: none;
  z-index: 0;
}

/* ===========================
   Trust Section
   =========================== */

.trust {
  padding: 0;
  background-color: hsl(var(--background-alt));
  border-top: 1px solid hsl(var(--border));
  border-bottom: 1px solid hsl(var(--border));
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.trust-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  text-align: left;
  gap: 14px;
  padding: 24px var(--spacing-md);
  border-right: 1px solid hsl(var(--border));
  transition: background-color var(--transition-base);
}

.trust-item:last-child {
  border-right: none;
}

.trust-item:hover {
  background-color: hsl(var(--border));
}

.trust-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border-radius: 0;
  box-shadow: none;
  transition: transform var(--transition-base);
}

.trust-item:hover .trust-icon {
  transform: scale(1.1);
  box-shadow: none;
}

.trust-icon svg {
  width: 24px;
  height: 24px;
  color: hsl(var(--primary));
  stroke-width: 1.75;
}

.trust-title {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: hsl(var(--foreground));
  margin-bottom: 2px;
}

.trust-text {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  font-weight: 400;
}

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

.products {
  padding: 72px 0;
  background-color: hsl(var(--background));
}

@media (min-width: 768px) {
  .products {
    padding: 96px 0;
  }
}

.section-title {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  margin-bottom: 16px;
  color: hsl(var(--foreground));
  letter-spacing: -0.02em;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 38px;
  }
}

.section-divider {
  width: 48px;
  height: 4px;
  background-color: hsl(var(--primary));
  border-radius: 2px;
  margin: 0 auto 52px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
}

.product-card {
  background-color: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition:
    transform var(--transition-slow),
    border-color var(--transition-base);
  cursor: pointer;
  position: relative;
}

.product-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: hsl(var(--primary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-slow);
  z-index: 1;
}

.product-card:hover {
  transform: translateY(-6px);
  border-color: hsl(var(--border-strong));
}

.product-card:hover::before {
  transform: scaleX(1);
}

.product-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background-color: hsl(var(--background-alt));
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-image img {
  transform: scale(1.06);
}

.product-content {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  border-top: 1px solid hsl(var(--border));
  text-align: center;
}

.product-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: hsl(var(--primary));
  border-radius: var(--radius-md);
  transition: transform var(--transition-base);
}

.product-card:hover .product-icon {
  transform: scale(1.08);
}

.product-icon svg {
  width: 20px;
  height: 20px;
  color: hsl(var(--primary-foreground));
  stroke-width: 2;
}

.product-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  margin: 0;
  line-height: 1.2;
}

.product-subtitle {
  font-size: 0.875rem;
  color: hsl(var(--primary));
  font-weight: 400;
  margin: 0;
}

/* ===========================
   CTA Section
   =========================== */

.cta {
  position: relative;
  padding: 72px 0;
  background: linear-gradient(
    135deg,
    hsl(356 95% 42%) 0%,
    hsl(354 94% 35%) 100%
  );
  overflow: hidden;
  border-radius: var(--radius-xl);
  margin: 0 var(--padding-x-mobile);
}

@media (min-width: 768px) {
  .cta {
    padding: 96px 0;
    margin: 0 var(--padding-x-desktop);
    border-radius: 1.5rem;
  }
}

/* Patrón de puntos decorativos blanco */
.cta-pattern {
  position: absolute;
  bottom: -20px;
  left: -20px;
  width: 300px;
  height: 300px;
  background-image: radial-gradient(
    rgba(255, 255, 255, 0.3) 1.5px,
    transparent 1.5px
  );
  background-size: 16px 16px;
  pointer-events: none;
  z-index: 0;
}

.cta-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-lg);
  padding: 0 var(--spacing-md);
}

.cta-text-group {
  flex: 1;
}

.cta-title {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
  color: hsl(var(--primary-foreground));
  margin-bottom: 8px;
}

@media (min-width: 768px) {
  .cta-title {
    font-size: 28px;
  }
}

.cta-text {
  font-size: 1rem;
  line-height: 1.5;
  color: #fff;
  margin-bottom: 0;
}

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

.footer {
  padding: 40px 0 24px;
  background-color: hsl(var(--background));
  border-top: 1px solid hsl(var(--border));
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-bottom: var(--spacing-md);
}

.footer-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px var(--spacing-md);
  border-right: 1px solid hsl(var(--border));
}

.footer-item:last-child {
  border-right: none;
}

.footer-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: hsl(var(--primary));
  border-radius: 50%;
}

.footer-icon svg {
  width: 18px;
  height: 18px;
  color: hsl(var(--primary-foreground));
  stroke-width: 2;
}

.footer-title {
  font-size: 1rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  margin-bottom: 2px;
}

.footer-link {
  font-size: 0.9375rem;
  font-weight: 400;
  color: hsl(var(--muted-foreground));
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: hsl(var(--primary));
}

.footer-text {
  font-size: 0.9375rem;
  color: hsl(var(--muted-foreground));
}

.footer-bottom {
  padding-top: 20px;
  border-top: 1px solid hsl(var(--border));
  text-align: center;
}

.footer-copyright {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  letter-spacing: 0.01em;
}

/* ===========================
   Animaciones de scroll
   =========================== */

[data-animate] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-animate][data-delay="1"] {
  transition-delay: 0.1s;
}
[data-animate][data-delay="2"] {
  transition-delay: 0.2s;
}
[data-animate][data-delay="3"] {
  transition-delay: 0.3s;
}
[data-animate][data-delay="4"] {
  transition-delay: 0.4s;
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

@media (max-width: 1024px) {
  :root {
    --header-height: 70px;
    --spacing-2xl: 4rem;
  }

  .hero-content {
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
  }

  .hero-description {
    font-size: 1.0625rem;
  }

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

@media (max-width: 768px) {
  :root {
    --header-height: 64px;
    --spacing-xl: 2.5rem;
    --spacing-2xl: 3rem;
  }

  .logo-img {
    height: 38px;
  }

  .logo-tagline {
    font-size: 0.75rem;
    display: none; /* Ocultar en mobile según design system */
  }

  .menu-toggle {
    display: flex;
  }

  .nav-actions {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background-color: hsl(var(--background));
    border-bottom: 1px solid hsl(var(--border));
    padding: var(--spacing-md);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
  }

  .nav-actions.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-actions .btn {
    width: 100%;
  }

  .hero {
    padding-top: calc(var(--header-height) + 40px);
    padding-bottom: 48px;
    background-image: none;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  .hero-text {
    order: 1;
    text-align: center;
  }

  .hero-divider {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-image {
    order: 2;
  }

  .hero-cta {
    align-items: center;
    flex-direction: column;
    width: 100%;
  }

  .hero-cta .btn {
    width: 100%;
    max-width: 360px;
  }

  .trust-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .trust-item {
    padding: 20px var(--spacing-md);
    border-right: none;
    border-bottom: 1px solid hsl(var(--border));
    justify-content: center;
    text-align: center;
    flex-direction: column;
    gap: 8px;
  }

  .trust-item:last-child {
    border-bottom: none;
  }

  .products-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    max-width: 400px;
    margin: 0 auto;
  }

  .product-card {
    max-width: 100%;
  }

  .cta-content {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-md);
  }

  .cta-content .btn {
    width: 100%;
    justify-content: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .footer-item {
    border-right: none;
    border-bottom: 1px solid hsl(var(--border));
    justify-content: center;
    text-align: center;
    flex-direction: column;
    gap: 12px;
  }

  .footer-item:last-child {
    border-bottom: none;
  }
}

@media (max-width: 480px) {
  .btn {
    padding: 14px 28px;
    font-size: 0.875rem; /* 14px */
  }
}

/* ===========================
   Loading States & Performance
   =========================== */

img[loading="lazy"] {
  background-color: transparent;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .btn-primary {
    border: 2px solid hsl(var(--primary-foreground));
  }

  .product-card {
    border: 2px solid hsl(var(--foreground));
  }
}
