/* ============================================================
   AGRÍCOLA LAS TORRECILLAS, S.C. — Estilos principales
   Diseño: Sattya Business Consulting · Kit Digital 2026
   ============================================================
   Paleta agrícola:
   --color-primary:      #5B8C3E   verde hoja
   --color-primary-dark: #3D6128   verde oscuro (hover)
   --color-accent:       #C8963E   oro cosecha
   --color-earth:        #8B6914   marrón tierra
   --color-bg:           #FFFDF8   blanco cálido
   --color-dark:         #2D2824   texto principal
   --color-muted:        #6B6560   texto secundario
   --color-light:        #F5F2EA   fondo secciones
   --color-white:        #FFFFFF
   --color-border:       #E5E0D5
   ============================================================ */

/* ── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 400;
  color: var(--color-dark);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-primary-dark); }

.container { max-width: 1140px; margin: 0 auto; padding: 0 1.5rem; }

h1, h2, h3 { font-weight: 700; line-height: 1.25; color: var(--color-dark); }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: 1.25rem; }

.section { padding: 5rem 0; }
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

/* ── Skip Link (accesibilidad) ──────────────────────────── */
.skip-link {
  position: absolute; top: -100px; left: 0;
  background: var(--color-primary); color: #fff;
  padding: 8px 16px; z-index: 200; font-weight: 700;
  border-radius: 0 0 4px 0;
}
.skip-link:focus { top: 0; }

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1140px; margin: 0 auto; padding: 0.75rem 1.5rem;
}
.site-branding {
  display: flex; align-items: center; gap: 0.75rem;
  font-size: 1.15rem; font-weight: 700; color: var(--color-dark);
}
.site-branding .logo-icon {
  width: 40px; height: 40px; background: var(--color-primary);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.25rem;
}
.main-nav ul { display: flex; list-style: none; gap: 1.75rem; align-items: center; }
.main-nav a {
  font-size: 0.875rem; font-weight: 500; color: var(--color-dark);
  padding: 0.35rem 0; transition: color 0.2s;
}
.main-nav a:hover, .main-nav a.active { color: var(--color-primary); }
.nav-cta {
  background: var(--color-primary); color: #fff !important;
  padding: 0.5rem 1.25rem !important; border-radius: 6px; font-weight: 700 !important;
}
.nav-cta:hover { background: var(--color-primary-dark); }
.mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #3D6128 0%, #5B8C3E 50%, #7AAA4F 100%);
  color: #fff; padding: 6rem 0; position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.4;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { color: #fff; margin-bottom: 1.25rem; max-width: 700px; }
.hero h1 span { color: #F0D78C; }
.hero p {
  font-size: 1.15rem; color: rgba(255,255,255,0.85); max-width: 560px;
  margin-bottom: 2rem; line-height: 1.7;
}
.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.85rem 2rem; border-radius: 8px; font-weight: 700; font-size: 0.95rem; transition: all 0.25s; cursor: pointer; border: none; text-decoration: none; }
.btn-primary { background: #fff; color: var(--color-primary-dark); }
.btn-primary:hover { background: #F0D78C; color: #3D6128; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.5); }
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,0.1); }
.btn-accent { background: var(--color-accent); color: #fff; }
.btn-accent:hover { background: #B07E2E; transform: translateY(-1px); }

/* ── About / Quiénes somos ──────────────────────────────── */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.about-text h2 { margin-bottom: 1.5rem; }
.about-text p { color: var(--color-muted); margin-bottom: 1.25rem; line-height: 1.8; }
.about-features { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2rem; }
.about-features li {
  display: flex; align-items: center; gap: 0.5rem; font-weight: 500; color: var(--color-dark);
}
.about-features li .check {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--color-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; flex-shrink: 0;
}
.about-image {
  background: linear-gradient(135deg, var(--color-light), var(--color-border));
  border-radius: 16px; min-height: 380px;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.about-image .icon-large {
  font-size: 8rem; opacity: 0.3; color: var(--color-primary);
}

/* ── Services ───────────────────────────────────────────── */
.section-alt { background: var(--color-light); }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.service-card {
  background: var(--color-white); border: 1px solid var(--color-border);
  border-radius: 12px; padding: 2rem; transition: transform 0.2s, box-shadow 0.2s;
}
.service-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.08); }
.service-icon {
  width: 52px; height: 52px; border-radius: 12px;
  background: var(--color-light); display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 1.25rem;
}
.service-card h3 { margin-bottom: 0.6rem; }
.service-card p { color: var(--color-muted); font-size: 0.95rem; line-height: 1.7; }

/* ── Contact ─────────────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 4rem; }
.contact-info h2 { margin-bottom: 1.25rem; }
.contact-info > p { color: var(--color-muted); margin-bottom: 2rem; }
.contact-detail { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; }
.contact-detail .detail-icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--color-light); display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.contact-detail strong { display: block; font-size: 0.85rem; margin-bottom: 0.2rem; }
.contact-detail span { color: var(--color-muted); font-size: 0.95rem; }

.contact-form-card {
  background: var(--color-white); border: 1px solid var(--color-border);
  border-radius: 16px; padding: 2.5rem; box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block; font-size: 0.85rem; font-weight: 600; color: var(--color-dark);
  margin-bottom: 0.4rem;
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 0.75rem 1rem; border: 1px solid var(--color-border);
  border-radius: 8px; font-size: 0.95rem; font-family: inherit; color: var(--color-dark);
  background: var(--color-bg); transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(91,140,62,0.15);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-consent {
  display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.8rem; color: var(--color-muted);
}
.form-consent input { margin-top: 0.25rem; flex-shrink: 0; }
.form-consent a { text-decoration: underline; }
.form-submit { margin-top: 1.5rem; }
.honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  background: var(--color-dark); color: rgba(255,255,255,0.7);
  padding: 3rem 0 2rem; font-size: 0.9rem;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; margin-bottom: 2rem; }
.footer-col h3 { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.footer-col p { line-height: 1.7; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul a { color: rgba(255,255,255,0.7); font-size: 0.875rem; }
.footer-col ul a:hover { color: #fff; }
.footer-bottom {
  padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  font-size: 0.8rem; color: rgba(255,255,255,0.5);
}
.footer-kit {
  display: flex; align-items: center; gap: 1rem;
  font-size: 0.8rem; color: rgba(255,255,255,0.6);
}
.footer-kit img { height: 28px; width: auto; opacity: 0.8; }

/* ── Cookie Banner ───────────────────────────────────────── */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
  background: var(--color-white); border-top: 1px solid var(--color-border);
  padding: 1.25rem 0; box-shadow: 0 -4px 24px rgba(0,0,0,0.1);
  display: none;
}
.cookie-banner.active { display: block; }
.cookie-inner {
  max-width: 1140px; margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; gap: 2rem; flex-wrap: wrap;
}
.cookie-inner p { flex: 1; font-size: 0.85rem; color: var(--color-muted); min-width: 260px; }
.cookie-inner a { text-decoration: underline; }
.cookie-buttons { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.btn-sm { padding: 0.5rem 1.25rem; font-size: 0.8rem; border-radius: 6px; font-weight: 600; cursor: pointer; border: none; }
.btn-accept { background: var(--color-primary); color: #fff; }
.btn-accept:hover { background: var(--color-primary-dark); }
.btn-reject { background: var(--color-light); color: var(--color-dark); }
.btn-reject:hover { background: var(--color-border); }
.btn-config { background: transparent; color: var(--color-dark); border: 1px solid var(--color-border); }
.btn-config:hover { background: var(--color-light); }

/* ── Cookie Config Modal ─────────────────────────────────── */
.cookie-modal {
  display: none; position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,0.5); justify-content: center; align-items: center;
}
.cookie-modal.active { display: flex; }
.cookie-modal-content {
  background: var(--color-white); border-radius: 16px;
  max-width: 540px; width: 90%; padding: 2rem; max-height: 80vh; overflow-y: auto;
}
.cookie-modal-content h3 { margin-bottom: 1rem; }
.cookie-modal-content .cookie-option {
  display: flex; align-items: flex-start; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--color-border);
}
.cookie-option label { font-weight: 600; font-size: 0.9rem; }
.cookie-option p { font-size: 0.8rem; color: var(--color-muted); margin-top: 0.2rem; }
.cookie-option input[type="checkbox"] { margin-top: 0.2rem; flex-shrink: 0; }

/* ── Legal Pages ──────────────────────────────────────────── */
.legal-page { max-width: 780px; margin: 3rem auto 5rem; padding: 0 1.5rem; }
.legal-page h1 { font-size: 1.75rem; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 2px solid var(--color-primary); }
.legal-page h2 { font-size: 1.15rem; color: var(--color-primary); margin: 2rem 0 0.75rem; }
.legal-page p, .legal-page li { color: var(--color-muted); margin-bottom: 0.75rem; line-height: 1.8; }
.legal-page ul, .legal-page ol { margin-left: 1.5rem; margin-bottom: 1rem; }

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .main-nav ul { display: none; }
  .main-nav.open ul {
    display: flex; flex-direction: column; position: absolute;
    top: 100%; left: 0; right: 0; background: var(--color-white);
    border-bottom: 1px solid var(--color-border); padding: 1rem 1.5rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }
  .mobile-toggle { display: block; }
  .hero { padding: 4rem 0; text-align: center; }
  .hero h1, .hero p { max-width: 100%; }
  .hero-buttons { justify-content: center; }
  .cookie-inner { flex-direction: column; text-align: center; }
  .cookie-buttons { justify-content: center; }
}

/* ── Animations ──────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.reveal { animation: fadeInUp 0.6s ease-out both; }
.reveal:nth-child(2) { animation-delay: 0.15s; }
.reveal:nth-child(3) { animation-delay: 0.3s; }
.reveal:nth-child(4) { animation-delay: 0.45s; }
