/* =========================================================
   Snafrut — hoja de estilos
   Paleta: tonos cálidos de frutos secos y frutas deshidratadas
   ========================================================= */

:root {
  --cream: #FFF8EF;
  --cream-soft: #FFFDF9;
  --card: #FFF1DC;
  --brown-dark: #3B2A1A;
  --brown: #6B4226;
  --terracotta: #E07A3F;
  --terracotta-dark: #C9642D;
  --olive: #7A8450;
  --olive-dark: #5E6A38;
  --gold: #D9A441;

  --icon-bg-a: #F3E3C8;
  --icon-bg-b: #F6E7D0;
  --icon-bg-c: #EAF0DC;

  --font-body: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-heading: Georgia, "Times New Roman", serif;

  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(59, 42, 26, 0.08);
  --shadow-hover: 0 16px 40px rgba(59, 42, 26, 0.14);
  --max-width: 1180px;
}

/* ---------- Reset básico ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--brown-dark);
  background: var(--cream-soft);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-heading); margin: 0 0 0.5em; line-height: 1.2; color: var(--brown-dark); }
p { margin: 0 0 1em; }
button { font-family: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--terracotta);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 8px 0;
  z-index: 1000;
}
.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary {
  background: var(--terracotta);
  color: #fff;
  box-shadow: 0 8px 20px rgba(224, 122, 63, 0.35);
}
.btn-primary:hover {
  background: var(--terracotta-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(224, 122, 63, 0.4);
}
.btn-outline {
  background: transparent;
  color: var(--brown-dark);
  border-color: var(--brown-dark);
}
.btn-outline:hover {
  background: var(--brown-dark);
  color: #fff;
  transform: translateY(-2px);
}
.btn-sm { padding: 10px 20px; font-size: 0.9rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 248, 239, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(59, 42, 26, 0.06);
  transition: box-shadow 0.2s ease;
}
.site-header.scrolled { box-shadow: 0 4px 20px rgba(59, 42, 26, 0.08); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--brown-dark);
}

.main-nav ul {
  display: flex;
  gap: 32px;
}
.main-nav a {
  font-weight: 600;
  font-size: 0.98rem;
  padding: 8px 2px;
  position: relative;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--terracotta);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}
.main-nav a:hover::after,
.main-nav a.active::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--brown-dark);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 80px 0 60px;
}
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.5;
  z-index: 0;
}
.hero-blob-1 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, var(--icon-bg-a), transparent 70%);
  top: -120px; right: -100px;
}
.hero-blob-2 {
  width: 340px; height: 340px;
  background: radial-gradient(circle, var(--icon-bg-c), transparent 70%);
  bottom: -140px; left: -80px;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  color: var(--terracotta-dark);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.82rem;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  margin-bottom: 20px;
}
.hero h1 span { color: var(--terracotta); }

.hero-lead {
  font-size: 1.08rem;
  color: var(--brown);
  max-width: 46ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 28px 0;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--olive-dark);
}
.hero-badges li { display: flex; align-items: center; gap: 6px; }
.hero-badges svg { width: 18px; height: 18px; fill: var(--olive); flex-shrink: 0; }

.hero-visual {
  position: relative;
  height: 380px;
}
.hero-card {
  position: absolute;
  width: 190px;
  border-radius: var(--radius);
  background: var(--cream);
  box-shadow: var(--shadow);
  padding: 18px;
  animation: float 5s ease-in-out infinite;
}
.hero-card-1 { top: 0; left: 30px; width: 210px; animation-delay: 0s; }
.hero-card-2 { top: 160px; right: 0; width: 170px; animation-delay: 1.2s; }
.hero-card-3 { bottom: 0; left: 90px; width: 150px; animation-delay: 2.4s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

/* ---------- Trust bar ---------- */
.trust-bar {
  background: var(--brown-dark);
  padding: 22px 0;
}
.trust-bar-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--cream);
  font-weight: 600;
  font-size: 0.92rem;
}
.trust-item svg { width: 22px; height: 22px; fill: var(--gold); flex-shrink: 0; }

/* ---------- Sections ---------- */
.section { padding: 90px 0; }
.section-alt { background: var(--card); }

.section-head {
  max-width: 680px;
  margin: 0 auto 52px;
  text-align: center;
}
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.section-lead { color: var(--brown); font-size: 1.05rem; }

/* ---------- Productos ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 28px;
}
.product-card {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}
.product-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  padding: 10px;
  margin-bottom: 18px;
}
.icon-bg-a { background: var(--icon-bg-a); }
.icon-bg-b { background: var(--icon-bg-b); }
.icon-bg-c { background: var(--icon-bg-c); }

.product-card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.product-card p { color: var(--brown); font-size: 0.96rem; }
.product-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--terracotta-dark);
}
.product-link span { transition: transform 0.15s ease; }
.product-link:hover span { transform: translateX(4px); }

/* ---------- Nosotros ---------- */
.about-inner {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 56px;
  align-items: center;
}
.about-illustration { width: 100%; height: auto; border-radius: var(--radius); }
.about-content h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.about-content p { color: var(--brown); }

.about-stats {
  display: flex;
  gap: 36px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.stat-number {
  display: block;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--terracotta-dark);
}
.stat-label {
  font-size: 0.86rem;
  color: var(--brown);
}

/* ---------- Features ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.feature-card {
  text-align: center;
  padding: 32px 20px;
}
.feature-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--icon-bg-a);
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-icon svg { width: 28px; height: 28px; fill: var(--terracotta-dark); }
.feature-card h3 { font-size: 1.1rem; }
.feature-card p { color: var(--brown); font-size: 0.94rem; }

/* ---------- Contacto ---------- */
.contact-inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
}
.contact-info h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 28px 0;
}
.contact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}
.contact-list svg { width: 22px; height: 22px; fill: var(--terracotta); flex-shrink: 0; }

.contact-form {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
}
.contact-form h3 { margin-bottom: 20px; }

.form-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 18px;
}
.form-row label {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
}
.form-row input,
.form-row textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(59, 42, 26, 0.18);
  background: #fff;
  color: var(--brown-dark);
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-row input:focus,
.form-row textarea:focus {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(224, 122, 63, 0.18);
}
.form-row input:invalid[data-touched="true"],
.form-row textarea:invalid[data-touched="true"] {
  border-color: #c94848;
}
.field-error {
  color: #c94848;
  font-size: 0.82rem;
  min-height: 1.1em;
  margin-top: 4px;
}

/* Honeypot: oculto visualmente pero accesible a bots */
.hp-field {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.form-status {
  margin-top: 14px;
  font-weight: 600;
  font-size: 0.92rem;
  min-height: 1.2em;
}
.form-status.success { color: var(--olive-dark); }
.form-status.error { color: #c94848; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--brown-dark);
  color: var(--cream);
  padding: 56px 0 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 248, 239, 0.12);
}
.footer-brand { max-width: 320px; }
.footer-brand .logo { color: var(--cream); margin-bottom: 10px; }
.footer-brand p { color: rgba(255, 248, 239, 0.7); font-size: 0.92rem; }

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-nav a { color: rgba(255, 248, 239, 0.85); font-weight: 500; }
.footer-nav a:hover { color: var(--gold); }

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 248, 239, 0.1);
}
.footer-social svg { width: 18px; height: 18px; fill: var(--cream); }
.footer-social a:hover { background: var(--terracotta); }

.footer-bottom {
  padding: 20px 0;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 248, 239, 0.6);
}

/* ---------- Animaciones de entrada ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-card { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { height: 300px; margin-top: 20px; }
  .about-inner { grid-template-columns: 1fr; }
  .about-visual { max-width: 320px; margin: 0 auto; }
  .contact-inner { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .main-nav {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--cream);
    border-bottom: 1px solid rgba(59, 42, 26, 0.08);
    box-shadow: var(--shadow);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .main-nav.open { max-height: 320px; }
  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 20px;
  }
  .main-nav a { display: block; padding: 14px 0; }
  .header-actions .btn-sm { padding: 9px 14px; font-size: 0.82rem; }
  .nav-toggle { display: flex; }
  .trust-bar-inner { justify-content: center; text-align: center; }
  .section { padding: 64px 0; }
}
