/* ============================================================
   CAMBRA CEREALES — Estilos
   Paleta: verde agrícola, ocre tierra, crema.
   Tipografías: Fraunces (display) + Source Serif 4 (body).
   ============================================================ */

:root {
  --cream: #f6f1e3;
  --background: #f6f1e3;
  --foreground: #2a2d22;

  --field: #5a7a4a;
  --field-deep: #2f4628;

  --earth: #b8854a;
  --earth-dark: #8a5e2f;

  --secondary: #ece5d0;
  --card: #efe9d6;
  --border: #d9cfb4;
  --muted-fg: #6b6a5a;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Source Serif 4", Georgia, serif;
}

/* Reset básico */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }

body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "kern";
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
}

/* Layout helpers */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.narrow { max-width: 720px; }
.center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.section { padding: 7rem 0; }
.section-alt { background: var(--secondary); }
.section-dark { background: var(--field-deep); color: var(--cream); }

.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--earth-dark);
  margin: 0 0 1rem;
}
.eyebrow.light { color: rgba(246, 241, 227, 0.8); letter-spacing: 0.35em; }
.eyebrow-dark { color: rgba(246, 241, 227, 0.6); }

.h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--field-deep);
  line-height: 1.1;
}
.h2.light { color: var(--cream); }

.lead { font-size: 1.125rem; line-height: 1.7; color: rgba(42, 45, 34, 0.85); }
.muted { color: rgba(42, 45, 34, 0.75); }
.muted-light { color: rgba(246, 241, 227, 0.75); }

.rule {
  height: 1px;
  width: 6rem;
  background: rgba(184, 133, 74, 0.8);
  margin: 2rem auto;
}
.rule-dark { background: rgba(184, 133, 74, 0.7); }

.divider-wheat {
  height: 1px;
  width: 8rem;
  background: linear-gradient(90deg, transparent, var(--earth) 20%, var(--earth) 80%, transparent);
  opacity: 0.5;
  margin: 2rem auto;
}

/* ============== NAVBAR ============== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: transparent;
  transition: background-color .3s ease, border-color .3s ease, box-shadow .3s ease;
  border-bottom: 1px solid transparent;
}
.navbar.scrolled {
  background: rgba(246, 241, 227, 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: baseline; gap: .5rem; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: .04em;
  color: var(--cream);
  transition: color .3s ease;
}
.brand-tag {
  display: none;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: rgba(246, 241, 227, 0.7);
  transition: color .3s ease;
}
@media (min-width: 640px) { .brand-tag { display: inline; } }

.navbar.scrolled .brand-name { color: var(--field-deep); }
.navbar.scrolled .brand-tag { color: var(--muted-fg); }

.nav-links { display: none; gap: 2rem; }
@media (min-width: 768px) { .nav-links { display: flex; } }
.nav-links a {
  font-size: .9rem;
  color: rgba(246, 241, 227, 0.9);
  transition: color .2s ease;
}
.nav-links a:hover { color: var(--earth); }
.navbar.scrolled .nav-links a { color: var(--foreground); }
.navbar.scrolled .nav-links a:hover { color: var(--earth-dark); }

/* ============== HERO ============== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom,
    rgba(47, 70, 40, 0.7),
    rgba(47, 70, 40, 0.5),
    rgba(47, 70, 40, 0.85));
}
.grain-overlay {
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: .18;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 0.3 0 0 0 0 0.25 0 0 0 0 0.15 0 0 0 0.35 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.5'/></svg>");
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  padding: 0 1.5rem;
  color: var(--cream);
}
.hero-title {
  font-family: var(--font-display);
  color: var(--cream);
  font-size: clamp(4rem, 14vw, 9rem);
  line-height: .95;
  margin: 0;
}
.hero-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.25rem, 2.4vw, 1.5rem);
  color: rgba(246,241,227,.95);
  max-width: 640px;
  margin: 0 auto;
}
.hero-sub {
  font-size: .95rem;
  color: rgba(246,241,227,.75);
  max-width: 540px;
  margin: 1rem auto 0;
}
.cta-row {
  margin-top: 3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}
.btn {
  display: inline-block;
  padding: .85rem 1.75rem;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  border-radius: 2px;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
  cursor: pointer;
}
.btn-primary {
  background: var(--cream);
  color: var(--field-deep);
}
.btn-primary:hover { background: var(--earth); color: var(--cream); }
.btn-ghost {
  background: transparent;
  color: var(--cream);
  border: 1px solid rgba(246,241,227,.6);
}
.btn-ghost:hover { background: rgba(246,241,227,.1); }

.scroll-hint {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: .3em;
  color: rgba(246,241,227,.6);
  z-index: 2;
}

/* ============== SERVICIOS ============== */
.services-grid {
  margin-top: 4rem;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .services-grid { grid-template-columns: repeat(4, 1fr); } }

.service-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 1.75rem;
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--earth);
  box-shadow: 0 12px 32px -12px rgba(74, 124, 63, 0.35);
}
.service-icon {
  width: 3rem; height: 3rem;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(90, 122, 74, .1);
  color: var(--field-deep);
  border-radius: 2px;
  margin-bottom: 1.25rem;
  transition: background-color .3s ease, color .3s ease;
}
.service-card:hover .service-icon {
  background: rgba(184, 133, 74, .15);
  color: var(--earth-dark);
}
.service-card h3 {
  font-size: 1.25rem;
  color: var(--field-deep);
}
.service-card p {
  font-size: .9rem;
  color: rgba(42, 45, 34, .75);
  margin: .75rem 0 0;
  line-height: 1.6;
}

/* ============== POR QUÉ ============== */
.reasons-grid {
  margin-top: 3rem;
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .reasons-grid { grid-template-columns: repeat(3, 1fr); } }

.reason {
  border-top: 1px solid rgba(184, 133, 74, .4);
  padding-top: 1.5rem;
}
.reason-num {
  font-family: var(--font-display);
  font-size: 1.875rem;
  color: var(--earth);
}
.reason h3 {
  margin-top: .75rem;
  font-size: 1.5rem;
  color: var(--field-deep);
}
.reason p {
  margin-top: .75rem;
  color: rgba(42, 45, 34, .75);
}

/* ============== CONTACTO ============== */
.contact-grid {
  margin-top: 3.5rem;
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .contact-grid { grid-template-columns: 1fr 1fr; } }

.contact-list { display: flex; flex-direction: column; gap: 2rem; }
.contact-item { display: flex; gap: 1.25rem; }
.contact-ico {
  flex-shrink: 0;
  width: 2.5rem; height: 2.5rem;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(246, 241, 227, .2);
  border-radius: 2px;
  color: var(--earth);
  margin-top: .25rem;
}
.contact-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .25em;
  color: rgba(246, 241, 227, .55);
  margin: 0;
}
.contact-value {
  font-family: var(--font-display);
  font-size: 1.125rem;
  color: var(--cream);
  margin: .25rem 0 0;
}
.contact-value a { transition: color .2s ease; }
.contact-value a:hover { color: var(--earth); }

.map-wrap {
  border: 1px solid rgba(246, 241, 227, .15);
  border-radius: 2px;
  overflow: hidden;
}
.map-wrap iframe {
  width: 100%;
  height: 320px;
  border: 0;
  display: block;
  filter: grayscale(20%);
}

/* ============== FOOTER ============== */
.footer {
  background: var(--field-deep);
  color: rgba(246, 241, 227, .6);
  border-top: 1px solid rgba(246, 241, 227, .1);
  padding: 2.5rem 0;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  font-size: .9rem;
}
@media (min-width: 640px) {
  .footer-inner { flex-direction: row; text-align: left; }
}
.footer-brand {
  font-family: var(--font-display);
  letter-spacing: .03em;
  margin: 0;
}
.footer-rights { font-size: .8rem; margin: 0; }
