/* ═══════════════════════════════════════════════════════════
   Abasto.net — Landing editorial
   Paleta cálida cremosa + coral CTA + azul de marca (acento)
   Inspirado en layouts editoriales: hero centrado, scroll de cards
   ═══════════════════════════════════════════════════════════ */

:root {
  /* Fondo cálido */
  --cream:        #f7ecd5;
  --cream-soft:   #faf2e0;
  --cream-deep:   #efe2c4;

  /* Coral / CTA */
  --coral:        #e85a3a;
  --coral-hover:  #d44a2c;
  --coral-soft:   #fbe1d8;

  /* Azul de marca (acento) */
  --brand-900:    #0b406d;
  --brand-700:    #0159a0;
  --brand-500:    #36a9f6;

  /* Texto */
  --ink:          #2b1d10;
  --ink-soft:     #5c4a3a;
  --ink-mute:     #8a7a68;

  /* Cards pastel */
  --pastel-olive: #a8a45a;
  --pastel-sky:   #b9d8e0;
  --pastel-butter:#e8c870;
  --pastel-coral: #d96b4a;
  --pastel-navy:  #1c3d5a;

  --shadow-sm: 0 2px 8px rgba(43, 29, 16, 0.06);
  --shadow-md: 0 12px 32px rgba(43, 29, 16, 0.08);
  --shadow-lg: 0 24px 60px rgba(43, 29, 16, 0.12);

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;
  --radius-xl: 32px;

  --container: 1200px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ── Reset ── */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ── Reveal animations ── */
.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
.reveal-d4 { transition-delay: 0.32s; }

/* ── Layout ── */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
section { position: relative; padding: 56px 24px; }

/* ── Header ── */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(247, 236, 213, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid rgba(43, 29, 16, 0.06);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px;
}
.site-header .logo { height: 30px; width: 122px; }
.site-header .header-cta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: 999px;
  background: var(--ink); color: var(--cream);
  font-size: 14px; font-weight: 500;
  transition: background 0.2s, transform 0.15s;
}
.site-header .header-cta:hover { background: var(--coral); }
.site-header .header-cta svg { width: 14px; height: 14px; }

/* ── Hero (estilo editorial) ── */
.hero {
  text-align: center;
  padding: 56px 24px 24px;
  max-width: 720px;
  margin: 0 auto;
}
.hero h1 {
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 24px;
}
.hero .lede {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 540px;
  margin: 0 auto 36px;
  line-height: 1.65;
}
.hero .cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px; border-radius: 999px;
  background: var(--coral); color: #fff;
  font-size: 15px; font-weight: 500;
  box-shadow: 0 6px 20px rgba(232, 90, 58, 0.35);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.hero .cta:hover {
  background: var(--coral-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(232, 90, 58, 0.45);
}
.hero .cta svg { width: 16px; height: 16px; transition: transform 0.2s; }
.hero .cta:hover svg { transform: translate(2px, -2px); }

/* ── Section heads (más sutiles) ── */
.section-head { text-align: center; max-width: 640px; margin: 0 auto 24px; }
.section-head .kicker {
  display: inline-block; font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--coral); margin-bottom: 12px;
}
.section-head h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.4rem); font-weight: 700;
  margin-bottom: 12px; color: var(--ink); letter-spacing: -0.025em;
  line-height: 1.15;
}
.section-head p { color: var(--ink-soft); font-size: 1.05rem; }

/* ── Categorías: carrusel 3D full-width con efecto hemiciclo ── */
#que-hacemos { padding: 40px 24px; }
.categories-wrap {
  position: relative;
  margin-top: 8px;
  width: 100vw;
  margin-left: calc(50% - 50vw); /* break out of container */
}
.carousel-3d {
  position: relative;
  perspective: 2400px;
  perspective-origin: 50% 50%;
  padding: 16px 0 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 360px;
  width: 100%;
}
.categories {
  position: relative;
  width: 220px;
  height: 300px;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.cat-card {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              filter 0.6s ease,
              opacity 0.6s ease;
  overflow: hidden;
}
.cat-card img {
  width: 78%;
  height: 78%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  margin-bottom: 26px; /* leave room for label */
}
.cat-card .cat-label {
  position: absolute;
  left: 0; right: 0; bottom: 14px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  padding: 0 8px;
  transition: opacity 0.4s ease, font-size 0.4s ease;
}
/* Hide label only on extreme outer cards (rotated too much) */
.cat-card[data-pos="-3"] .cat-label,
.cat-card[data-pos="3"] .cat-label {
  opacity: 0;
}
/* Slightly smaller labels on side cards */
.cat-card[data-pos="-2"] .cat-label,
.cat-card[data-pos="2"] .cat-label,
.cat-card[data-pos="-1"] .cat-label,
.cat-card[data-pos="1"] .cat-label {
  font-size: 15px;
}
/* Enlarge central label */
.cat-card[data-pos="0"] .cat-label {
  font-size: 20px;
}

/* Posiciones hemiciclo (calculadas por JS, aplicadas como inline styles)
   Defaults para cuando JS aún no corrió:
   Scale mucho más uniforme — efecto hemiciclo sutil, no "lejos". */
.cat-card[data-pos="0"]  { transform: translateX(0)      translateZ(0)    rotateY(0deg)   scale(1);    z-index: 4; }
.cat-card[data-pos="-1"] { transform: translateX(-260px) translateZ(-30px)  rotateY(15deg)  scale(0.95); z-index: 3; filter: brightness(0.95); }
.cat-card[data-pos="1"]  { transform: translateX(260px)  translateZ(-30px)  rotateY(-15deg) scale(0.95); z-index: 3; filter: brightness(0.95); }
.cat-card[data-pos="-2"] { transform: translateX(-460px) translateZ(-60px)  rotateY(22deg)  scale(0.9);  z-index: 2; filter: brightness(0.9); }
.cat-card[data-pos="2"]  { transform: translateX(460px)  translateZ(-60px)  rotateY(-22deg) scale(0.9);  z-index: 2; filter: brightness(0.9); }
.cat-card[data-pos="-3"] { transform: translateX(-580px) translateZ(-100px) rotateY(28deg)  scale(0.85); z-index: 1; filter: brightness(0.85); opacity: 0.9; }
.cat-card[data-pos="3"]  { transform: translateX(580px)  translateZ(-100px) rotateY(-28deg) scale(0.85); z-index: 1; filter: brightness(0.85); opacity: 0.9; }

/* Fondos pastel */
.cat-card.c-olive  { background: #c2be7e; }
.cat-card.c-sky    { background: #b9d8e0; }
.cat-card.c-butter { background: #ecd084; }
.cat-card.c-coral  { background: #e08570; }
.cat-card.c-navy   { background: #365271; }
.cat-card.c-rose   { background: #e0a094; }
.cat-card.c-terra  { background: #d49478; }
.cat-card.c-mauve  { background: #c4a3b4; }
.cat-card.c-mint   { background: #b0c8ae; }
.cat-card.c-slate  { background: #8aa0ad; }

/* Dots indicator (centered, dentro del wrap) */
.cat-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 8px;
  position: relative;
  z-index: 5;
}
.cat-dots .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cream-deep);
  border: none; padding: 0;
  cursor: pointer;
  transition: background 0.2s, width 0.2s;
}
.cat-dots .dot.active {
  background: var(--coral);
  width: 22px;
  border-radius: 4px;
}

/* ── Chips debajo del carrusel ── */
.cat-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  padding: 0 24px;
  position: relative;
  z-index: 5;
}
.cat-chips .chip-label {
  font-size: 13px;
  color: var(--ink-mute);
  margin-right: 4px;
}
.cat-chips .chip {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--cream-soft);
  border: 1px solid var(--cream-deep);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: background 0.2s, color 0.2s;
}
.cat-chips .chip:hover {
  background: var(--coral-soft);
  color: var(--coral);
}

/* ── Quiénes somos — texto editorial ancho ── */
.about-block {
  max-width: 640px; margin: 0 auto; text-align: center;
}
.about-block p {
  font-size: 1.05rem; color: var(--ink-soft); line-height: 1.7;
}
.about-block strong { color: var(--ink); font-weight: 600; }

/* ── Cómo trabajamos — pasos en línea ── */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 960px; margin: 0 auto;
}
.step {
  background: var(--cream-soft);
  border: 1px solid var(--cream-deep);
  border-radius: var(--radius);
  padding: 22px 20px;
}
.step .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--coral); color: #fff;
  font-weight: 600; font-size: 14px; margin-bottom: 18px;
}
.step h3 { font-size: 18px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--ink-soft); line-height: 1.6; }

/* ── Etapa inicial — card cálida ── */
.etapa-card {
  max-width: 640px; margin: 0 auto;
  background: var(--cream-soft);
  border: 1px solid var(--cream-deep);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  text-align: center;
}
.etapa-card .badge-inline {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--coral-soft); color: var(--coral);
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 20px;
}
.etapa-card .badge-inline .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--coral);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}
.etapa-card p {
  font-size: 1.05rem; color: var(--ink-soft); line-height: 1.75;
  margin-bottom: 12px;
}
.etapa-card p:last-child { margin-bottom: 0; }
.etapa-card strong { color: var(--ink); font-weight: 600; }

/* ── Equipo ── */
.equipo {
  display: flex; gap: 24px; align-items: center;
  max-width: 560px; margin: 0 auto;
  background: var(--cream-soft);
  border: 1px solid var(--cream-deep);
  border-radius: var(--radius);
  padding: 28px;
}
.equipo .avatar { width: 88px; height: 88px; flex-shrink: 0; border-radius: 50%; }
.equipo h3 { font-size: 1.15rem; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.equipo .role { font-size: 14px; color: var(--coral); font-weight: 500; margin-bottom: 8px; }
.equipo .bio { font-size: 14px; color: var(--ink-soft); }

/* ── Cobertura — grid 2x2 de mini-cards ── */
.cobertura-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px; max-width: 800px; margin: 0 auto;
}
.cobertura-item {
  background: var(--cream-soft);
  border: 1px solid var(--cream-deep);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; align-items: flex-start; gap: 12px;
}
.cobertura-item svg {
  width: 20px; height: 20px; color: var(--coral);
  flex-shrink: 0; margin-top: 2px;
}
.cobertura-item h4 { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.cobertura-item p { font-size: 13px; color: var(--ink-soft); }

/* ── Contacto ── */
.contacto {
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 24px;
  max-width: 940px; margin: 0 auto;
}
.contact-info {
  background: var(--ink);
  color: var(--cream-soft);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
}
.contact-info h3 { font-size: 1.5rem; margin-bottom: 12px; color: #fff; letter-spacing: -0.02em; }
.contact-info p { color: rgba(247, 236, 213, 0.7); font-size: 14px; margin-bottom: 24px; }
.contact-info .email {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--cream-soft); font-weight: 500; font-size: 15px;
  transition: color 0.2s;
}
.contact-info .email:hover { color: var(--coral); }
.contact-info .email svg { width: 18px; height: 18px; }

.contact-form {
  background: var(--cream-soft);
  border: 1px solid var(--cream-deep);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.contact-form .field { margin-bottom: 16px; }
.contact-form label {
  display: block; font-size: 13px; font-weight: 500;
  color: var(--ink); margin-bottom: 6px;
}
.contact-form input,
.contact-form textarea {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--cream-deep); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 14px; color: var(--ink);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none; border-color: var(--coral);
  box-shadow: 0 0 0 3px var(--coral-soft);
}
.contact-form textarea { resize: vertical; min-height: 110px; }
.contact-form button {
  width: 100%; padding: 13px 20px;
  background: var(--coral); color: #fff; border: none;
  border-radius: var(--radius-sm); font-family: inherit;
  font-size: 15px; font-weight: 500; cursor: pointer;
  box-shadow: 0 4px 14px rgba(232, 90, 58, 0.3);
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
}
.contact-form button:hover { background: var(--coral-hover); box-shadow: 0 6px 18px rgba(232, 90, 58, 0.4); }
.contact-form button:active { transform: scale(0.98); }
.contact-form .fineprint {
  font-size: 12px; color: var(--ink-mute); text-align: center; margin-top: 14px;
}
.honeypot { display: none; }

/* ── Form success ── */
.form-success { text-align: center; padding: 40px 20px; }
.form-success svg { width: 48px; height: 48px; margin: 0 auto 16px; color: var(--coral); }
.form-success h3 { font-size: 1.2rem; color: var(--ink); margin-bottom: 8px; }
.form-success p { font-size: 14px; color: var(--ink-soft); }

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--cream-deep);
  padding: 32px 24px; text-align: center;
}
.site-footer p { font-size: 13px; color: var(--ink-mute); }
.site-footer .footer-links {
  display: flex; gap: 20px; justify-content: center;
  margin-bottom: 10px;
}
.site-footer .footer-links a {
  font-size: 14px; color: var(--ink-soft);
  transition: color 0.2s;
}
.site-footer .footer-links a:hover { color: var(--coral); }

/* ── Responsive ── */
@media (max-width: 768px) {
  section { padding: 48px 20px; }
  .hero { padding: 40px 20px 20px; }
  .steps { grid-template-columns: 1fr; }
  .contacto { grid-template-columns: 1fr; }
  .equipo { flex-direction: column; text-align: center; }
  .equipo .avatar { margin: 0 auto; }
  #que-hacemos { padding: 32px 20px; }
  .categories { width: 180px; height: 240px; }
  .carousel-3d { min-height: 300px; padding: 12px 0 18px; perspective: 1800px; }
  .cat-card[data-pos="-1"] { transform: translateX(-200px) translateZ(-30px) rotateY(15deg) scale(0.95); }
  .cat-card[data-pos="1"]  { transform: translateX(200px)  translateZ(-30px) rotateY(-15deg) scale(0.95); }
  .cat-card[data-pos="-2"] { transform: translateX(-340px) translateZ(-60px) rotateY(22deg) scale(0.9); }
  .cat-card[data-pos="2"]  { transform: translateX(340px)  translateZ(-60px) rotateY(-22deg) scale(0.9); }
  .cat-card[data-pos="-3"] { transform: translateX(-440px) translateZ(-100px) rotateY(28deg) scale(0.85); opacity: 0; }
  .cat-card[data-pos="3"]  { transform: translateX(440px)  translateZ(-100px) rotateY(-28deg) scale(0.85); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .etapa-card .badge-inline .dot { animation: none; }
  .cat-card, .cat-caption > div { transition: none; animation: none; }
}