/* ================================
   Alto Origen Café - Styles
   ================================ */

/* Variables CSS - Paleta de colores y diseño */
:root {
  /* Colores principales */
  --green-900: #0f1a14;
  --green-800: #15221b;
  --green-700: #1e2d25;
  --green-600: #27372e;
  --green: #373F36;
  
  --gold: #C2A765;
  --ivory: #F1EADA;
  --text: #E7E3D6;
  --muted: #B2B7AC;
  
  /* Sistema de diseño */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  
  --shadow-sm: 0 2px 8px rgba(15, 26, 20, 0.1);
  --shadow-md: 0 4px 16px rgba(15, 26, 20, 0.15);
  --shadow-lg: 0 8px 32px rgba(15, 26, 20, 0.2);
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
  
  /* Espaciado */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  --spacing-3xl: 6rem;
  
  /* Tipografía */
  --font-display: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
}

/* Reset y Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--green-900);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul {
  list-style: none;
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ivory);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
}

p {
  margin-bottom: var(--spacing-sm);
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* Header y Navegación */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(15, 26, 20, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(194, 167, 101, 0.1);
  transition: var(--transition);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-sm) 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  z-index: 1001;
}

.brand-logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ivory);
  white-space: nowrap;
}

/* Navegación Desktop */
.site-nav {
  display: flex;
}

.nav-list {
  display: flex;
  gap: var(--spacing-lg);
  align-items: center;
}

.nav-list a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  position: relative;
  padding: var(--spacing-xs) 0;
}

.nav-list a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.3s ease;
}

.nav-list a:hover,
.nav-list a:focus {
  color: var(--gold);
  outline: none;
}

.nav-list a:hover::after,
.nav-list a:focus::after {
  width: 100%;
}

/* Menu hamburger (oculto en desktop) */
.nav-toggle {
  display: none;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: var(--spacing-xs);
  z-index: 1001;
}

.hamburger-line {
  width: 28px;
  height: 3px;
  background: var(--ivory);
  border-radius: 2px;
  transition: var(--transition);
}

/* Botones */
.btn {
  display: inline-block;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  white-space: nowrap;
}

.btn:focus {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--gold);
  color: var(--green-900);
  border-color: var(--gold);
}

.btn-primary:hover,
.btn-primary:focus {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(194, 167, 101, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--muted);
}

.btn-outline:hover,
.btn-outline:focus {
  background: rgba(194, 167, 101, 0.1);
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(15, 26, 20, 0.7) 0%,
    rgba(15, 26, 20, 0.85) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  padding: 0 var(--spacing-md);
}

.hero-title {
  font-size: clamp(2.25rem, 6vw, 4rem);
  margin-bottom: var(--spacing-md);
  color: var(--ivory);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.35rem);
  color: var(--text);
  margin-bottom: var(--spacing-xl);
  font-weight: 300;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* Sections */
.section {
  padding: var(--spacing-3xl) 0;
}

.section-alt {
  background: var(--green-800);
}

.section-header {
  text-align: center;
  margin-bottom: var(--spacing-2xl);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.section-title {
  margin-bottom: var(--spacing-md);
  color: var(--ivory);
}

.section-intro {
  font-size: 1.125rem;
  color: var(--muted);
  font-weight: 300;
}

/* Cards */
.card {
  background: linear-gradient(135deg, var(--green-800) 0%, var(--green-700) 100%);
  border: 1px solid rgba(194, 167, 101, 0.15);
  border-radius: var(--radius);
  padding: var(--spacing-lg);
  transition: var(--transition);
  height: 100%;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(194, 167, 101, 0.3);
}

/* Productos Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-lg);
}

.product-card {
  display: flex;
  flex-direction: column;
}

.product-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: var(--spacing-md);
}

.product-content {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  flex-grow: 1;
}

.product-name {
  font-size: 1.5rem;
  color: var(--ivory);
  margin-bottom: var(--spacing-xs);
}

.product-altitude {
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
}

.product-specs {
  list-style: none;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.8;
}

.product-specs li {
  margin-bottom: 0.25rem;
}

.product-specs strong {
  color: var(--text);
}

.product-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  margin-top: auto;
  padding-top: var(--spacing-sm);
}

.product-weight {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--muted);
}

.product-actions {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
}

.product-actions .btn {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
}

/* Process Grid */
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
}

.process-card {
  text-align: center;
  padding: var(--spacing-xl) var(--spacing-lg);
}

.process-number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--gold);
  opacity: 0.3;
  margin-bottom: var(--spacing-sm);
}

.process-title {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-sm);
  color: var(--ivory);
}

.process-description {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Personaliza */
.customize-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.customize-text {
  font-size: 1.125rem;
  color: var(--text);
  margin-bottom: var(--spacing-xl);
}

.customize-steps {
  list-style: none;
  counter-reset: step-counter;
  margin-bottom: var(--spacing-xl);
  text-align: left;
}

.customize-steps li {
  counter-increment: step-counter;
  position: relative;
  padding-left: 3rem;
  margin-bottom: var(--spacing-md);
  font-size: 1.05rem;
  color: var(--text);
}

.customize-steps li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: -2px;
  width: 2rem;
  height: 2rem;
  background: var(--gold);
  color: var(--green-900);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

/* About (Nosotros) */
.about-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-2xl);
  align-items: center;
}

.about-content p {
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: var(--spacing-md);
}

.about-image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 400px;
}

.badges-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-lg);
}

.badge {
  background: rgba(194, 167, 101, 0.15);
  color: var(--gold);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid rgba(194, 167, 101, 0.3);
}

/* Benefits List (Mayoreo) */
.benefits-list {
  max-width: 700px;
  margin: 0 auto var(--spacing-xl);
  list-style: none;
}

.benefits-list li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: var(--spacing-md);
  font-size: 1.05rem;
  color: var(--text);
}

.benefits-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
  font-size: 1.25rem;
}

.section .btn {
  display: block;
  width: fit-content;
  margin: 0 auto;
}

/* FAQ */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--green-700);
  border: 1px solid rgba(194, 167, 101, 0.15);
  border-radius: var(--radius);
  margin-bottom: var(--spacing-md);
  overflow: hidden;
  transition: var(--transition);
}

.faq-item:hover {
  border-color: rgba(194, 167, 101, 0.3);
}

.faq-question {
  padding: var(--spacing-md) var(--spacing-lg);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ivory);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.faq-question:hover {
  color: var(--gold);
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--gold);
  transition: transform 0.3s ease;
}

.faq-item[open] .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 var(--spacing-lg) var(--spacing-md);
  color: var(--muted);
  line-height: 1.7;
}

/* Contacto */
.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-xl);
  max-width: 900px;
  margin: 0 auto var(--spacing-xl);
  text-align: center;
}

.contact-item {
  padding: var(--spacing-lg);
}

.contact-label {
  font-size: 1.125rem;
  color: var(--gold);
  margin-bottom: var(--spacing-sm);
}

.contact-item p {
  font-size: 1.05rem;
  color: var(--text);
}

.contact-item a {
  color: var(--text);
}

.contact-item a:hover,
.contact-item a:focus {
  color: var(--gold);
}

/* Footer */
.site-footer {
  background: var(--green-900);
  border-top: 1px solid rgba(194, 167, 101, 0.1);
  padding: var(--spacing-xl) 0;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

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

.social-links {
  display: flex;
  gap: var(--spacing-sm);
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(194, 167, 101, 0.1);
  border: 1px solid rgba(194, 167, 101, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
  transition: var(--transition);
}

.social-link:hover,
.social-link:focus {
  background: var(--gold);
  color: var(--green-900);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(194, 167, 101, 0.3);
}

/* WhatsApp Flotante */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  background: #25D366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  transition: var(--transition);
  z-index: 999;
}

.whatsapp-float:hover,
.whatsapp-float:focus {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.6);
}

.whatsapp-float:focus {
  outline: 2px solid #25D366;
  outline-offset: 2px;
}

/* ================================
   RESPONSIVE - MOBILE
   ================================ */

@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* Navegación móvil */
  .hamburger {
    display: flex;
  }
  
  .site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 26, 20, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 6rem var(--spacing-lg) var(--spacing-2xl);
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(194, 167, 101, 0.2);
  }
  
  .nav-toggle:checked ~ .site-nav {
    transform: translateY(0);
  }
  
  .nav-list {
    flex-direction: column;
    gap: var(--spacing-md);
    align-items: stretch;
  }
  
  .nav-list a {
    font-size: 1.25rem;
    padding: var(--spacing-sm);
    text-align: center;
  }
  
  /* Hamburger animación */
  .nav-toggle:checked ~ .hamburger .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  
  .nav-toggle:checked ~ .hamburger .hamburger-line:nth-child(2) {
    opacity: 0;
  }
  
  .nav-toggle:checked ~ .hamburger .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  
  /* Secciones */
  .section {
    padding: var(--spacing-2xl) 0;
  }
  
  .products-grid,
  .process-grid {
    grid-template-columns: 1fr;
  }
  
  .about-split {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }
  
  .about-content {
    order: 2;
  }
  
  .about-image {
    order: 1;
  }
  
  .product-actions {
    flex-direction: column;
  }
  
  .contact-info {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .site-footer .container {
    flex-direction: column;
    text-align: center;
  }
  
  .whatsapp-float {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 56px;
    height: 56px;
  }
}

@media (max-width: 480px) {
  :root {
    --spacing-3xl: 3rem;
    --spacing-2xl: 2.5rem;
  }
  
  .brand-name {
    font-size: 1.05rem;
  }
  
  .hero {
    min-height: 500px;
  }
  
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .product-image {
    height: 200px;
  }
}

/* Estados de foco mejorados */
a:focus,
button:focus,
summary:focus,
input:focus {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Mejoras de accesibilidad */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Animaciones suaves */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
