/* ============================================
   CAFÉ — Sección 6 · Dark cinematic
   3 bloques: fincas (mapa radar pulse) · métodos (stroke-draw) · venta (bag mockup)
   ============================================ */

.cafe {
  position: relative;
  background-color: #0E1620;
  color: var(--color-cream-off);
  padding: clamp(5rem, 9vw, 8.5rem) var(--space-gutter);
  overflow: hidden;
  isolation: isolate;
}

/* Textura sutil: ruido + halo dorado descentrado */
.cafe::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 30% 20%, rgba(184,132,47,0.10), transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 80%, rgba(74,122,153,0.08), transparent 65%);
  pointer-events: none;
  z-index: 0;
}
.cafe::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 0.95 0 0 0 0 0.85 0 0 0 0.6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.04;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 0;
}

.cafe__inner {
  position: relative;
  z-index: 1;
  max-width: var(--container-max);
  margin: 0 auto;
}

/* ────────── Header ────────── */
.cafe__header {
  max-width: 64ch;
  margin: 0 auto clamp(3rem, 5vw, 4.5rem);
  text-align: center;
}
.cafe__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-coffee-light);
  margin-bottom: 0.85rem;
}
.cafe__eyebrow-mark { font-size: 0.65em; color: var(--color-coffee); }
.cafe__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 2.8vw + 0.6rem, 3.3rem);
  font-weight: 300;
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: var(--color-cream-off);
  font-variation-settings: 'opsz' 120;
  text-wrap: balance;
  margin: 0 0 1.15rem;
}
.cafe__title em { font-style: italic; font-weight: 400; color: var(--color-coffee-light); }
.cafe__lead {
  font-family: var(--font-body);
  font-size: 1.02rem;
  line-height: 1.6;
  color: rgba(250, 246, 238, 0.72);
  margin: 0;
  text-wrap: pretty;
}

/* ────────── Bloques ────────── */
.cafe__blocks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.cafe-block {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.75rem, 2.5vw, 2.5rem);
  background: linear-gradient(160deg,
    rgba(255, 255, 255, 0.025) 0%,
    rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(229, 183, 104, 0.10);
  border-radius: 10px;
  overflow: hidden;
  backdrop-filter: blur(6px);
}

.cafe-block__num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(2rem, 1.8vw + 1.2rem, 2.6rem);
  font-weight: 300;
  line-height: 1;
  color: var(--color-coffee-light);
  opacity: 0.5;
  margin-bottom: 1rem;
}

.cafe-block__title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.018em;
  color: var(--color-cream-off);
  margin: 0 0 0.85rem;
  font-variation-settings: 'opsz' 72;
}

.cafe-block__desc {
  font-family: var(--font-body);
  font-size: 0.93rem;
  line-height: 1.55;
  color: rgba(250, 246, 238, 0.68);
  margin: 0 0 1.5rem;
  text-wrap: pretty;
}

.cafe-block__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.cafe-block__list li {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: rgba(250, 246, 238, 0.72);
  padding-left: 1rem;
  position: relative;
}
.cafe-block__list li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--color-coffee);
  font-weight: bold;
}

.cafe-block__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 1rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: var(--fw-semibold);
  color: var(--color-coffee-light);
  text-decoration: none;
  transition: color var(--dur-mid) var(--ease-out), gap var(--dur-mid) var(--ease-out);
}
.cafe-block__link:hover {
  color: var(--color-cream-off);
  gap: 0.65rem;
}

/* ════════════════════════════════════════════
   MAPA — radar pulse markers
   ════════════════════════════════════════════ */
.cafe-map {
  width: 100%;
  height: auto;
  max-height: 200px;
  margin: 0.5rem 0 1.5rem;
  display: block;
}
.cafe-map__land {
  fill: rgba(184, 132, 47, 0.04);
  stroke: rgba(184, 132, 47, 0.22);
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: cafe-map-draw 2.4s ease-out 0.6s forwards;
}
@keyframes cafe-map-draw { to { stroke-dashoffset: 0; } }

.cafe-map__dot {
  fill: var(--color-coffee-light);
  filter: drop-shadow(0 0 4px rgba(229, 183, 104, 0.6));
}
.cafe-map__pulse {
  fill: rgba(229, 183, 104, 0.4);
  transform-origin: center;
  transform-box: fill-box;
  animation: cafe-map-pulse 2.6s ease-out infinite;
}
@keyframes cafe-map-pulse {
  0%   { transform: scale(1);   opacity: 0.55; }
  100% { transform: scale(4.5); opacity: 0;    }
}

/* ════════════════════════════════════════════
   MÉTODOS — stroke-draw animation
   ════════════════════════════════════════════ */
.cafe-methods {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem 0.6rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.cafe-method {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.85rem 0.4rem;
  border: 1px solid rgba(229, 183, 104, 0.08);
  border-radius: 6px;
  transition: border-color var(--dur-mid) var(--ease-out), background-color var(--dur-mid) var(--ease-out);
}
@media (hover: hover) {
  .cafe-method:hover {
    border-color: rgba(229, 183, 104, 0.32);
    background-color: rgba(229, 183, 104, 0.05);
  }
}
.cafe-method__icon {
  width: 28px;
  height: 28px;
  color: var(--color-coffee-light);
}
.cafe-method__icon path,
.cafe-method__icon rect,
.cafe-method__icon circle,
.cafe-method__icon line {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
/* Cuando el bloque entra en viewport (data-reveal.is-revealed), dibujar strokes */
.cafe-block--metodos.is-revealed .cafe-method__icon path,
.cafe-block--metodos.is-revealed .cafe-method__icon rect,
.cafe-block--metodos.is-revealed .cafe-method__icon circle,
.cafe-block--metodos.is-revealed .cafe-method__icon line {
  animation: cafe-stroke-draw 1.2s ease-out forwards;
}
.cafe-block--metodos.is-revealed .cafe-method:nth-child(1) .cafe-method__icon * { animation-delay: 200ms; }
.cafe-block--metodos.is-revealed .cafe-method:nth-child(2) .cafe-method__icon * { animation-delay: 320ms; }
.cafe-block--metodos.is-revealed .cafe-method:nth-child(3) .cafe-method__icon * { animation-delay: 440ms; }
.cafe-block--metodos.is-revealed .cafe-method:nth-child(4) .cafe-method__icon * { animation-delay: 560ms; }
.cafe-block--metodos.is-revealed .cafe-method:nth-child(5) .cafe-method__icon * { animation-delay: 680ms; }
.cafe-block--metodos.is-revealed .cafe-method:nth-child(6) .cafe-method__icon * { animation-delay: 800ms; }
@keyframes cafe-stroke-draw { to { stroke-dashoffset: 0; } }

.cafe-method__label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: var(--fw-medium);
  color: rgba(250, 246, 238, 0.78);
  letter-spacing: 0.01em;
  text-align: center;
}

/* ════════════════════════════════════════════
   COFFEE BAG mockup CSS
   ════════════════════════════════════════════ */
.cafe-bag {
  position: relative;
  margin: 0.5rem auto 1.5rem;
  width: 130px;
  height: 170px;
  transform-style: preserve-3d;
  animation: cafe-bag-float 6s ease-in-out infinite;
}
@keyframes cafe-bag-float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-6px) rotate(2deg); }
}
.cafe-bag__body {
  width: 100%;
  height: 100%;
  background:
    linear-gradient(135deg, #2A1F18 0%, #1A130D 100%);
  border-radius: 4px 4px 6px 6px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 1rem 0.5rem;
  box-shadow:
    0 18px 36px -8px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(229, 183, 104, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(229, 183, 104, 0.2);
}
/* Pliegue superior */
.cafe-bag__body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 75%;
  height: 8px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(0,0,0,0.5), transparent);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.cafe-bag__seal {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-coffee-light);
  letter-spacing: -0.01em;
  font-variation-settings: 'opsz' 48;
}
.cafe-bag__origin {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(229, 183, 104, 0.7);
}
.cafe-bag__weight {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: rgba(250, 246, 238, 0.45);
  margin-top: auto;
  letter-spacing: 0.05em;
}
.cafe-bag__valve {
  position: absolute;
  top: 28px;
  right: 12px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #8a6d3a, #3a2c18);
  box-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* ────────── Responsive ────────── */
@media (max-width: 920px) {
  .cafe__blocks {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .cafe-methods { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .cafe-methods { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
