@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&family=Instrument+Sans:ital,wght@0,400..700;1,400..700&display=swap');

:root {
  /* Colors from Official Logo */
  --primary: #1B3E5F; 
  /* Deep Navy Blue from logo */
  --primary-light: #2A5A85;
  --secondary: #BA7F1B; 
  /* Gold/Ochre from logo */
  --secondary-light: #D49D3A;
  --accent: #1B3E5F; 
  /* Keep blue consistent */
  --surface: #FFFFFF; 
  /* Pure white for minimalism */
  --surface-alt: #F9F7F2; 
  /* Subtle cream for sections */
  --text-dark: #1B3E5F; 
  /* Blue for contrast headings */
  --text-muted: #536477; 
  /* Soft blue-gray for body text */
  --white: #FFFFFF;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.05); 
  /* Softer shadows */
  --glass: rgba(255, 255, 255, 0.9);

  /* Spacing - Scaled Up */
  --spacing-sm: 1.5rem;
  --spacing-md: 3rem;
  --spacing-lg: 6rem;
  --spacing-xl: 12rem;

  /* Transitions */
  --transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 18px; /* Slightly larger base for modern screens */
}

body {
  font-family: 'Instrument Sans', sans-serif;
  background-color: var(--surface);
  color: var(--text-dark);
  line-height: 1.5; /* Standard readable interlineado */
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em; /* Tighter tracking for headings */
  line-height: 1.2; /* Tighter headings */
}

p {
  color: var(--text-muted);
}

/* Layout Utilities */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

.section {
  padding: var(--spacing-lg) 0;
}

.grid {
  display: grid;
  gap: var(--spacing-md);
}

.flex {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

/* Navigation */
.main-nav {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1rem 0;
  z-index: 1000;
  transition: var(--transition);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo img {
  height: 100px; /* Controlled size */
  width: auto;
  transition: var(--transition);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links-desktop {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

/* Mobile Menu Toggle (Hamburger) */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 2000;
  padding: 0;
}

.mobile-menu-toggle span {
  width: 100%;
  height: 3px;
  background-color: var(--primary);
  border-radius: 10px;
  transition: all 0.3s var(--anim-ease);
}

/* Mobile Nav Drawer */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--white);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transform: translateY(-100%);
  transition: transform 0.5s var(--anim-ease);
}

.mobile-nav-drawer.open {
  transform: translateY(0);
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  text-align: center;
}

.mobile-nav-link {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  text-transform: uppercase;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 1.1rem 2.5rem;
  border-radius: 10px; /* Refined radius */
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: none;
  font-family: 'Outfit', sans-serif;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  position: relative;
  z-index: 1;
}

.btn-premium {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn-premium:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.nav-link-premium {
  text-decoration: none;
  color: var(--primary);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  position: relative;
  transition: var(--transition);
}

.nav-link-premium::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--secondary);
  transition: var(--transition);
}

.nav-link-premium:hover::after {
  width: 100%;
}

.cart-icon-wrapper {
  background: var(--primary);
  color: var(--white);
  padding: 0.8rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  border-radius: 10px; /* Matching the new button radius */
  cursor: pointer;
  position: relative;
  font-size: 1.1rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  transition: all 0.3s var(--anim-ease);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.cart-icon-wrapper:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(27, 62, 95, 0.3);
  background-color: var(--primary-light);
}

.btn-secondary {
  background-color: var(--white);
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-secondary:hover {
  background-color: var(--surface-alt);
  color: var(--primary-light);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url('assets/pictures/5.jpg') no-repeat center center/cover;
  position: relative;
  text-align: center;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(255,255,255,0.85) 0%, rgba(255,255,255,0.95) 100%);
  z-index: 1;
}

.hero-center-content {
  position: relative;
  z-index: 10;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-brand-logo {
  height: 420px; /* Even more presence, perfectly centered */
  width: auto;
  margin-bottom: 2rem;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.15));
  animation: logoFloat 6s ease-in-out infinite;
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.slogan-text {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  color: var(--secondary);
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
}

.hero-title {
  font-size: clamp(3.5rem, 10vw, 6.5rem);
  line-height: 1;
  font-weight: 900;
  margin-bottom: 1rem;
  color: var(--primary);
}

.hero-subtitle {
  font-size: 1.4rem;
  color: var(--text-muted);
  max-width: 700px;
  margin-bottom: 3.5rem;
}

.hero-actions {
  display: flex;
  gap: 1.5rem;
}

/* Localized Pattern Accent - Modern & Clean */
.pattern-accent {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 120px;
  background: url('assets/patterns/patt1.png') repeat-x center bottom;
  background-size: contain;
  opacity: 0.15;
  /* Very subtle */
  z-index: 2;
  mask-image: linear-gradient(to top, black, transparent);
  -webkit-mask-image: linear-gradient(to top, black, transparent);
}

.hero-content {
  position: relative;
  z-index: 20;
  /* Keep text above chromosomes */
  max-width: 600px;
  animation: fadeIn 1.2s ease-out;
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 5rem); /* Responsive typography */
  line-height: 1;
  margin-bottom: 1.5rem;
  font-weight: 900;
}

.hero .slogan {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--secondary);
  font-weight: 600;
  margin-bottom: 1rem;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.hero .subtitle {
  font-size: 1.4rem; /* Upscaled */
  margin-bottom: 3.5rem;
  max-width: 90%;
}

.hero-btns {
  display: flex;
  gap: 1.5rem;
}

/* Chromosome Animation */
.chromosome-path {
  display: none;
  /* Removed floating particles to reduce noise */
}

.chromosome {
  position: absolute;
  pointer-events: none;
  z-index: 5;
  filter: blur(2px); /* Slightly more blur for depth */
}

@keyframes floatChromosome {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }

  33% {
    transform: translate(30px, 50px) rotate(10deg) scale(1.1);
  }

  66% {
    transform: translate(-20px, 80px) rotate(-10deg) scale(0.9);
  }

  100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
}

.floating-bean {
  position: absolute;
  width: 30px;
  height: 45px;
  opacity: 0.15;
  fill: var(--secondary);
  animation: floatBean 20s linear infinite;
}

@keyframes floatBean {
  from {
    transform: translate(-10%, 110%) rotate(0deg);
  }

  to {
    transform: translate(110%, -10%) rotate(360deg);
  }
}

/* Section 2: El Café */
.coffee-section {
  background-color: var(--white);
}

.coffee-grid {
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

.coffee-img-wrapper {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.coffee-img-wrapper img {
  width: 100%;
  display: block;
}

.coffee-details {
  padding-left: var(--spacing-lg);
}

.coffee-badge {
  display: inline-block;
  background-color: var(--secondary);
  color: var(--white);
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1.5rem;
}

.notes-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  list-style: none;
  margin-top: 1.5rem;
}

.note-item {
  background: var(--surface-alt);
  color: var(--primary);
  padding: 0.6rem 1.2rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  border-left: 3px solid var(--secondary);
}

/* Section 3 & 4: Social Impact */
.impact-section {
  background: var(--primary);
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.impact-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('assets/patterns/patt1.png') repeat;
  background-size: 300px;
  opacity: 0.03;
  /* Barely there texture */
  pointer-events: none;
}

.impact-header h2 {
  color: var(--white);
}

.impact-header p {
  color: rgba(255, 255, 255, 0.8);
  max-width: 700px;
  margin: 0 auto 3rem;
}

.impact-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.impact-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 1.5rem 2.5rem; /* Reduced vertical padding to compensate for larger icons */
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition);
  height: 100%; /* Ensure they fill the grid consistently */
}

.impact-card:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-10px);
}

.impact-icon {
  font-size: 4rem; /* Significantly larger */
  margin-bottom: 1rem;
  color: var(--secondary);
}

.impact-card h3 {
  color: var(--white);
  font-size: 1.4rem;
}

.impact-card p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

.impact-goal {
  margin-top: 4rem;
  padding: 3rem;
  background: var(--secondary);
  color: var(--white); /* High contrast white text */
  border-radius: 24px;
  display: inline-block;
  max-width: 800px;
  box-shadow: 0 20px 40px rgba(186, 127, 27, 0.2);
}

.impact-goal h4 {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 2.5rem;
  letter-spacing: -0.03em;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.impact-goal p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  font-weight: 500;
}

/* Section 5: Support */
.support-section {
  background-color: var(--surface);
}

.support-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.support-block {
  background: var(--white);
  padding: 3rem 2rem;
  border-radius: 24px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.support-icon {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 10px 15px rgba(0,0,0,0.05));
}

.support-block:hover {
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.support-block h3 {
  margin-bottom: 1.5rem;
}

/* Footer & Final CTA */
.footer-cta {
  background: linear-gradient(to bottom, var(--surface-alt), var(--white));
  text-align: center;
  padding: var(--spacing-xl) 1rem;
}

.footer-cta h2 {
  font-size: 3rem;
  max-width: 800px;
  margin: 0 auto 2.5rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* Shop & Cart Drawer Styles */
.navbar.scrolled {
  background: var(--glass);
  box-shadow: 0 2px 20px rgba(27, 62, 95, 0.05);
  backdrop-filter: blur(15px);
  padding: 0.8rem 0;
}
.cart-drawer {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background: var(--white);
  box-shadow: -10px 0 50px rgba(0, 0, 0, 0.1);
  z-index: 2000;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.cart-drawer.open {
  right: 0;
}

.cart-header {
  padding: 2rem;
  border-bottom: 1px solid var(--surface-alt);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.close-cart {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-muted);
}

.cart-items {
  flex-grow: 1;
  padding: 2rem;
  overflow-y: auto;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--surface-alt);
}

.cart-item-info h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  margin-bottom: 0.2rem;
  font-weight: 700;
}

.cart-footer {
  padding: 2rem;
  background: var(--surface-alt);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1500;
  display: none;
  backdrop-filter: blur(5px);
}

.cart-overlay.open {
  display: block;
}

/* Shop Modal */
.shop-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 26, 26, 0.95);
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(15px);
}

.shop-modal.open {
  display: flex;
}

/* Animations & Transitions */
:root {
  --anim-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --anim-speed: 0.6s;
}

/* Scroll Reveal Base */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s var(--anim-ease), transform 1s var(--anim-ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered Entrance for Hero */
.hero-brand-logo {
  opacity: 0;
  animation: logoEntrance 1.2s var(--anim-ease) forwards, logoFloat 6s ease-in-out infinite 1.2s;
}

.slogan-text {
  opacity: 0;
  animation: fadeInUp 0.8s var(--anim-ease) forwards 0.4s;
}

.hero-title {
  opacity: 0;
  animation: fadeInUp 0.8s var(--anim-ease) forwards 0.6s;
}

.hero-subtitle {
  opacity: 0;
  animation: fadeInUp 0.8s var(--anim-ease) forwards 0.8s;
}

.hero-actions {
  opacity: 0;
  animation: fadeInUp 0.8s var(--anim-ease) forwards 1s;
}

@keyframes logoEntrance {
  from { opacity: 0; transform: scale(0.8) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Card Hover Effects */
.impact-card, .support-block, .product-card {
  transition: transform 0.4s var(--anim-ease), box-shadow 0.4s var(--anim-ease);
}

.impact-card:hover, .support-block:hover, .product-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 30px 60px rgba(27, 62, 95, 0.12);
}

/* Modal Animation */
.shop-modal-content {
  transform: scale(0.9);
  opacity: 0;
  transition: transform 0.5s var(--anim-ease), opacity 0.5s var(--anim-ease);
}

.shop-modal.open .shop-modal-content {
  transform: scale(1);
  opacity: 1;
}

/* Image Hover Reveal */
.coffee-img-wrapper img, .gallery-section img {
  transition: transform 0.8s var(--anim-ease);
}

.coffee-img-wrapper:hover img, .gallery-section img:hover {
  transform: scale(1.05);
}

/* Navigation Links Hover */
.nav-link-premium {
  transition: color 0.3s var(--anim-ease);
}

.close-shop {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: none;
  border: none;
  font-size: 2.5rem;
  cursor: pointer;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

.product-card {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.product-card:hover {
  transform: translateY(-10px);
}

.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.product-info {
  padding: 1.5rem;
}

.product-info h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.product-info p {
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.product-info .price {
  font-weight: 700;
  color: var(--secondary);
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .cart-drawer {
    width: 100%;
    right: -100%;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Full Mobile Responsive Overhaul */
@media (max-width: 1024px) {
  .hero-brand-logo { height: 320px; }
  .nav-logo img { height: 80px; }
}

@media (max-width: 768px) {
  /* Navigation & Menu */
  .nav-links-desktop { display: none; }
  .mobile-menu-toggle { display: flex; }
  
  .nav-logo img { height: 70px; }
  .main-nav { padding: 0.8rem 0; }
  
  /* Hero Section - Fix Overlap */
  .hero { 
    min-height: auto; 
    padding: 120px 0 60px; 
    background-attachment: scroll;
  }
  
  .hero-brand-logo { 
    height: 200px; 
    margin-bottom: 1.5rem; 
  }
  
  .hero-title { 
    font-size: 3.2rem; 
    line-height: 1.1;
  }
  
  .hero-subtitle { 
    font-size: 1.1rem; 
    margin-bottom: 2.5rem;
    padding: 0 10px;
  }
  
  .hero-actions { 
    flex-direction: column; 
    width: 100%; 
    max-width: 320px;
    gap: 1rem; 
  }
  
  .hero-actions .btn { 
    width: 100%; 
    padding: 1rem;
  }

  /* Grid Layouts to Single Column */
  .coffee-grid, .impact-grid, .support-grid, .product-grid {
    grid-template-columns: 1fr !important;
    gap: 2.5rem;
  }

  .coffee-details { 
    padding-left: 0; 
    text-align: center; 
  }
  
  .notes-list { 
    justify-content: center; 
  }
  
  .section { 
    padding: 4rem 1.5rem; 
  }

  .impact-card {
    padding: 2.5rem 1.5rem;
  }
  
  /* Footer Adjustments */
  footer { padding: 3rem 0; }
  footer img { height: 220px !important; }
  .footer-links { 
    flex-direction: column; 
    gap: 1rem; 
  }
  
  /* Hamburger State Animation */
  .mobile-menu-toggle.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
  .mobile-menu-toggle.active span:nth-child(2) { opacity: 0; }
  .mobile-menu-toggle.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
}

@media (max-width: 480px) {
  .hero-brand-logo { height: 160px; }
  .hero-title { font-size: 2.6rem; }
  .nav-logo img { height: 55px; }
  .slogan-text { font-size: 0.9rem; letter-spacing: 0.2em; }
}