/* ===========================================
   La Cafetera Cubana — Cuban/Miami Design System
   Colors: Cuban flag (#002776 blue, #CE1126 red, white)
   Typography: Playfair Display (editorial), Oswald (motorsport), Inter (body)
   Motifs: Cuban tiles, checkered racing stripes, neon, Art Deco
   =========================================== */

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ===== VARIABLES ===== */
:root {
  /* Cuban Flag Core */
  --azul: #002776;
  --rojo: #CE1126;
  --blanco: #FFFFFF;

  /* Coffee Tones */
  --cafe-oscuro: #1a0f0a;
  --cafe: #3c1f14;
  --cafe-latte: #8B5E3C;
  --crema: #FDF8F0;
  --crema-oscura: #F5E6D3;
  --oro: #D4A76A;

  /* Miami Accents */
  --neon-pink: #FE6DC6;
  --neon-blue: #16E3F9;
  --teal: #2A9D8F;
  --sunset-orange: #E76F51;

  /* Neutrals */
  --charcoal: #1a1a1a;
  --gris: #8a8a8a;
  --gris-claro: #e0d8cc;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-condensed: 'Oswald', 'Impact', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --section-pad: 100px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--crema);
  color: var(--cafe);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== SECTION LABELS ===== */
.section-label {
  font-family: var(--font-condensed);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--rojo);
  display: inline-block;
  margin-bottom: 12px;
  border-left: 3px solid var(--rojo);
  padding-left: 12px;
}

.section-label.light {
  color: var(--oro);
  border-left-color: var(--oro);
}

.text-accent {
  color: var(--rojo);
}

/* ===========================================
   NAVIGATION
   =========================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(0, 39, 118, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid rgba(206, 17, 38, 0.3);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--blanco);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo-cup {
  font-size: 1.3rem;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-family: var(--font-condensed);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--blanco);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--rojo);
  transition: width 0.25s;
}

.nav-links a:hover::after {
  width: 100%;
}

/* ===========================================
   HERO
   =========================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--azul);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 40px,
      rgba(206, 17, 38, 0.06) 40px,
      rgba(206, 17, 38, 0.06) 41px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 40px,
      rgba(206, 17, 38, 0.06) 40px,
      rgba(206, 17, 38, 0.06) 41px
    );
}

.hero-bg-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 40%, rgba(206, 17, 38, 0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 60%, rgba(0, 39, 118, 0.5) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(212, 167, 106, 0.15) 0%, transparent 40%);
}

/* Racing stripes */
.hero-stripe {
  position: absolute;
  left: 0;
  right: 0;
  height: 6px;
  background: repeating-linear-gradient(
    90deg,
    var(--blanco) 0px,
    var(--blanco) 30px,
    var(--rojo) 30px,
    var(--rojo) 60px
  );
  top: 0;
}

.hero-stripe.bottom {
  top: auto;
  bottom: 0;
}

.hero-content {
  position: relative;
  text-align: center;
  padding: 100px 24px 80px;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-condensed);
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--oro);
  text-transform: uppercase;
  letter-spacing: 0.25em;
  margin-bottom: 32px;
  padding: 8px 20px;
  border: 1px solid rgba(212, 167, 106, 0.3);
  background: rgba(0, 0, 0, 0.2);
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--rojo);
  border-radius: 50%;
  display: inline-block;
}

.hero-title {
  margin-bottom: 20px;
}

.hero-title-line {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 12vw, 8rem);
  font-weight: 900;
  color: var(--blanco);
  line-height: 1;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 60px rgba(0, 0, 0, 0.4);
}

.hero-title-line.condensed {
  font-family: var(--font-condensed);
  font-size: clamp(4rem, 14vw, 9rem);
  font-weight: 700;
  color: var(--rojo);
  line-height: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-shadow: 0 4px 60px rgba(206, 17, 38, 0.3);
}

.hero-subtitle {
  font-family: var(--font-condensed);
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 400;
  color: var(--blanco);
  text-transform: uppercase;
  letter-spacing: 0.4em;
  margin-bottom: 16px;
  opacity: 0.9;
}

.hero-tagline {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: rgba(255, 255, 255, 0.7);
  max-width: 520px;
  margin: 0 auto 48px;
  font-weight: 400;
  line-height: 1.6;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 48px;
  background: var(--rojo);
  color: var(--blanco);
  font-family: var(--font-condensed);
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-decoration: none;
  border: 2px solid var(--rojo);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform 0.5s;
}

.btn-primary:hover::before {
  transform: translateX(100%);
}

.btn-primary:hover {
  background: transparent;
  color: var(--rojo);
  border-color: var(--rojo);
}

.btn-arrow {
  font-size: 1.3rem;
  transition: transform 0.3s;
}

.btn-primary:hover .btn-arrow {
  transform: translateX(4px);
}

/* Cuban flag triangle + star motif */
.hero-flag-star {
  position: absolute;
  top: 80px;
  left: 40px;
  z-index: 2;
  width: 100px;
  height: 120px;
  opacity: 0.15;
  pointer-events: none;
}

.flag-triangle {
  width: 0;
  height: 0;
  border-left: 100px solid var(--rojo);
  border-top: 60px solid transparent;
  border-bottom: 60px solid transparent;
  position: absolute;
  top: 0;
  left: 0;
}

.flag-star {
  position: absolute;
  top: 50%;
  left: 30px;
  transform: translateY(-50%);
  font-size: 2.2rem;
  color: var(--blanco);
  line-height: 1;
}

/* ===========================================
   TILE DIVIDER
   =========================================== */
.tile-divider {
  height: 24px;
  background: var(--crema);
  position: relative;
  overflow: hidden;
}

.tile-divider-inner {
  position: absolute;
  inset: 0;
  background-image:
    /* Cuban ceramic octagonal tile - warm Spanish colonial */
    radial-gradient(circle at 25% 25%, var(--rojo) 2px, transparent 2px),
    radial-gradient(circle at 75% 75%, var(--rojo) 2px, transparent 2px);
  background-size: 40px 40px;
  opacity: 0.12;
}

/* ===========================================
   ABOUT
   =========================================== */
.about {
  padding: var(--section-pad) 0;
  background: var(--crema);
  position: relative;
}

.about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--azul), var(--rojo), var(--azul));
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-heading {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 700;
  color: var(--cafe);
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.about-text {
  font-size: 1.05rem;
  color: var(--cafe-latte);
  margin-bottom: 20px;
  line-height: 1.8;
}

.about-text em {
  color: var(--rojo);
  font-style: italic;
  font-weight: 600;
}

.about-stats {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-top: 40px;
  padding: 24px 0;
  border-top: 1px solid var(--crema-oscura);
}

.stat {
  text-align: center;
  flex: 1;
}

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--rojo);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-family: var(--font-condensed);
  font-size: 0.8rem;
  color: var(--gris);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--crema-oscura);
}

/* Right column — Tile panel */
.about-visual-col {
  position: relative;
}

.tile-panel {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: var(--cafe);
  overflow: hidden;
  border: 3px solid var(--crema-oscura);
}

.tile-panel-inner {
  position: absolute;
  inset: 0;
  background-image:
    /* Spanish colonial octagonal tile - warm terracotta & cream */
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 20px,
      rgba(212, 167, 106, 0.08) 20px,
      rgba(212, 167, 106, 0.08) 21px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 20px,
      rgba(212, 167, 106, 0.08) 20px,
      rgba(212, 167, 106, 0.08) 21px
    );
  background-size: 60px 60px;
  opacity: 0.3;
}

.tile-panel-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 50%, transparent 40%, rgba(0, 39, 118, 0.4) 100%);
}

/* Floating quote */
.floating-quote {
  position: absolute;
  bottom: -20px;
  right: -20px;
  background: var(--rojo);
  padding: 28px 32px;
  max-width: 220px;
  box-shadow: 8px 8px 0 var(--azul);
}

.quote-mark {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.3);
  line-height: 0.6;
  display: block;
}

.floating-quote p {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--blanco);
  line-height: 1.4;
  margin-top: 4px;
}

.floating-quote strong {
  font-weight: 700;
  font-style: normal;
}

/* ===========================================
   STRIPE DIVIDER
   =========================================== */
.stripe-divider {
  height: 8px;
  background: repeating-linear-gradient(
    90deg,
    var(--azul) 0px,
    var(--azul) 20px,
    var(--blanco) 20px,
    var(--blanco) 25px,
    var(--rojo) 25px,
    var(--rojo) 45px,
    var(--blanco) 45px,
    var(--blanco) 50px
  );
}

/* ===========================================
   PRODUCTS
   =========================================== */
.products {
  padding: var(--section-pad) 0;
  background: var(--cafe-oscuro);
  position: relative;
}

.products::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--oro), var(--rojo), var(--oro));
}

.products-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 700;
  color: var(--blanco);
  line-height: 1.1;
  margin-bottom: 48px;
  letter-spacing: -0.02em;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 32px;
}

.product-card {
  background: #1a0f0a;
  border: 1px solid rgba(212, 167, 106, 0.15);
  padding: 32px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s;
  position: relative;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--azul), var(--rojo));
  opacity: 0;
  transition: opacity 0.3s;
}

.product-card:hover {
  border-color: rgba(212, 167, 106, 0.4);
  transform: translateY(-4px);
}

.product-card:hover::before {
  opacity: 1;
}

.product-card img {
  width: 100%;
  height: auto;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.product-card h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--blanco);
  margin-bottom: 8px;
  line-height: 1.2;
}

.product-card .desc {
  font-size: 0.9rem;
  color: var(--gris);
  margin-bottom: 16px;
  flex: 1;
  line-height: 1.6;
}

.product-card .price {
  font-family: var(--font-condensed);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--oro);
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}

.btn-buy {
  display: block;
  padding: 14px;
  background: transparent;
  color: var(--rojo);
  font-family: var(--font-condensed);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-align: center;
  border: 2px solid var(--rojo);
  transition: all 0.3s;
}

.btn-buy:hover {
  background: var(--rojo);
  color: var(--blanco);
}

.loading {
  color: var(--gris);
  text-align: center;
  grid-column: 1 / -1;
  padding: 60px 0;
  font-size: 1.1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.loading-cup {
  font-size: 2rem;
  animation: steam 1.5s ease-in-out infinite;
}

@keyframes steam {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.5; }
  50% { transform: translateY(-8px) scale(1.1); opacity: 1; }
}

/* ===========================================
   FLAG DIVIDER
   =========================================== */
.flag-divider {
  display: flex;
  height: 40px;
}

.flag-bar {
  flex: 1;
}

.flag-bar.blue { background: var(--azul); }
.flag-bar.white { background: var(--blanco); }
.flag-bar.red { background: var(--rojo); }

/* ===========================================
   FOOTER
   =========================================== */
.footer {
  padding: 80px 0 40px;
  background: var(--cafe-oscuro);
  text-align: center;
  position: relative;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--blanco);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.footer-tagline {
  font-family: var(--font-condensed);
  font-size: 0.95rem;
  color: var(--oro);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-links a {
  font-family: var(--font-condensed);
  font-size: 0.85rem;
  color: var(--gris);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--blanco);
}

.footer-flag {
  display: flex;
  width: 120px;
  height: 24px;
  margin: 0 auto 24px;
}

.footer-flag .flag-bar {
  flex: 1;
}

.footer-credit {
  font-size: 0.8rem;
  color: var(--cafe-latte);
  opacity: 0.6;
}

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 768px) {
  :root { --section-pad: 60px; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about-visual-col {
    order: -1;
  }

  .tile-panel {
    max-height: 300px;
  }

  .floating-quote {
    bottom: -16px;
    right: -12px;
    padding: 20px 24px;
    max-width: 180px;
  }

  .floating-quote p {
    font-size: 0.95rem;
  }

  .about-stats {
    flex-direction: column;
    gap: 20px;
  }

  .stat-divider {
    width: 60%;
    height: 1px;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    gap: 16px;
  }

  .hero-title-line {
    font-size: clamp(2.8rem, 15vw, 4.5rem);
  }
}

@media (max-width: 480px) {
  .nav-logo {
    font-size: 1rem;
  }

  .nav-links a {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
  }

  .hero-content {
    padding: 80px 16px 60px;
  }

  .btn-primary {
    padding: 14px 32px;
    font-size: 0.95rem;
  }
}