/* ════════════════════════════════════════════════════════════════════
   VILLA CAUTÍN — Huevos de campo · La Araucanía
   Estilo editorial cálido (inspirado en Vital Farms)
   ════════════════════════════════════════════════════════════════════ */

:root {
  --cream:        #f4ece0;
  --cream-soft:   #faf6ee;
  --cream-deep:   #ece1d0;
  --ink:          #1d1813;
  --ink-soft:     #4a423a;
  --ink-mute:     #6f655a;
  --white:        #ffffff;

  --red:          #d8402e;
  --red-dark:     #b8331f;
  --green:        #4a6a2a;
  --green-dark:   #3a5420;
  --gold:         #c9b98a;

  --line:         rgba(29, 24, 19, 0.12);
  --line-light:   rgba(250, 247, 242, 0.14);

  --nav-h:        92px;
  --radius:       14px;
  --radius-lg:    22px;
  --maxw:         1240px;

  --ease-out:     cubic-bezier(0.22, 1, 0.36, 1);

  --serif:        'Zilla Slab', Georgia, serif;
  --sans:         'Inter', system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--red); color: #fff; }

/* ── Layout helpers ──────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 2rem;
}

.section { padding: 7rem 0; }
.section-sm { padding: 5rem 0; }

.eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1.25rem;
}
.eyebrow-light { color: var(--gold); }

.title {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.title-light { color: var(--cream-soft); }

.lead {
  font-size: 1.125rem;
  color: var(--ink-soft);
  line-height: 1.75;
}
.lead-light { color: rgba(250, 247, 242, 0.78); }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1.05rem 2.25rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), background 0.25s, box-shadow 0.25s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }

.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 8px 22px rgba(216, 64, 46, 0.28);
}
.btn-primary:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(216, 64, 46, 0.36);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--cream); transform: translateY(-2px); }

.btn-outline-light {
  background: transparent;
  color: var(--cream-soft);
  box-shadow: inset 0 0 0 2px rgba(250, 247, 242, 0.5);
}
.btn-outline-light:hover { background: var(--cream-soft); color: var(--ink); transform: translateY(-2px); }

.btn-lg { padding: 1.2rem 2.75rem; font-size: 1rem; }

/* ── Splash ──────────────────────────────────────────────────────────── */
.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.7s var(--ease-out), visibility 0.7s;
}
.splash.is-out { opacity: 0; visibility: hidden; }

.splash-mark { text-align: center; }
.splash-letters {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 3.5rem;
  color: var(--cream);
  letter-spacing: 0.1em;
}
.splash-bar {
  height: 3px;
  width: 0;
  background: var(--red);
  margin: 1rem auto 0;
  animation: splashBar 1.6s var(--ease-out) forwards;
}
@keyframes splashBar { to { width: 80px; } }

/* ── Navigation ──────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(29, 24, 19, 0);
  transition: background 0.4s var(--ease-out), height 0.4s var(--ease-out), box-shadow 0.4s;
}
.nav.is-scrolled {
  background: var(--ink);
  height: 72px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}
/* dark base behind transparent nav so logo reads on hero */
.nav::before {
  content: '';
  position: absolute;
  inset: 0;
  height: 180%;
  background: linear-gradient(to bottom, rgba(18, 13, 8, 0.78) 0%, rgba(18, 13, 8, 0.4) 45%, transparent 100%);
  pointer-events: none;
  transition: opacity 0.4s;
}
.nav.is-scrolled::before { opacity: 0; }

.nav .container { display: flex; align-items: center; }
.nav-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.nav-logo { display: flex; align-items: center; gap: 0.75rem; cursor: pointer; }
.nav-logo-img {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--cream-soft);
  padding: 3px;
  transition: width 0.4s, height 0.4s;
}
.nav.is-scrolled .nav-logo-img { width: 46px; height: 46px; }
.nav-logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.nav-logo-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--cream-soft);
  letter-spacing: 0.01em;
  text-shadow: 0 1px 10px rgba(12, 8, 4, 0.55);
}
.nav-logo-sub {
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(250, 247, 242, 0.7);
  text-shadow: 0 1px 10px rgba(12, 8, 4, 0.55);
}

.nav-links { display: flex; align-items: center; gap: 2.25rem; }
.nav-links a {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--cream-soft);
  letter-spacing: 0.02em;
  text-shadow: 0 1px 10px rgba(12, 8, 4, 0.55);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--red); }

.nav-cta { display: flex; align-items: center; }
.nav-cta .btn { padding: 0.7rem 1.5rem; font-size: 0.8125rem; }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-hamburger span {
  width: 26px; height: 2px;
  background: var(--cream-soft);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* Mobile menu */
.nav-mobile {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity 0.4s var(--ease-out), visibility 0.4s, transform 0.4s var(--ease-out);
}
.nav-mobile.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-mobile a:not(.btn) {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 600;
  color: rgba(250, 247, 242, 0.9);
  padding: 0.5rem 1rem;
}
.nav-mobile a:not(.btn):hover { color: var(--red); }
.nav-mobile .btn { margin-top: 1.5rem; }

/* ── Hero ────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 45%;
  transform: scale(1.06);
  transition: transform 9s var(--ease-out);
}
.hero.is-loaded .hero-bg img { transform: scale(1); }
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(to top, rgba(18, 13, 8, 0.78) 0%, rgba(18, 13, 8, 0.25) 42%, rgba(18, 13, 8, 0.32) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: calc(var(--nav-h) + 2rem);
  padding-bottom: 5rem;
  text-align: center;
}
.hero-eyebrow {
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 14px rgba(12, 8, 4, 0.85);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.hero-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.5rem, 5.5vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.015em;
  color: var(--cream-soft);
  text-transform: uppercase;
  text-shadow: 0 3px 24px rgba(12, 8, 4, 0.5);
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.hero-title em {
  font-style: normal;
  color: var(--red);
}
.hero-sub {
  margin-top: 1.5rem;
  font-size: 1.1875rem;
  color: rgba(250, 247, 242, 0.9);
  max-width: 52ch;
  margin-inline: auto;
  line-height: 1.6;
  text-shadow: 0 2px 16px rgba(12, 8, 4, 0.7);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s var(--ease-out) 0.1s, transform 0.9s var(--ease-out) 0.1s;
}
.hero-actions {
  margin-top: 2.25rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.hero-eyebrow.is-visible,
.hero-title.is-visible,
.hero-sub.is-visible,
.hero-actions.is-visible { opacity: 1; transform: translateY(0); }

.hero-scroll { display: none; }
.hero-scroll svg { width: 18px; height: 18px; animation: scrollBounce 2s var(--ease-out) infinite; }
@keyframes scrollBounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* ── Intro (overlap framed image, cream) ─────────────────────────────── */
.intro { background: var(--cream); position: relative; }
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.intro-text .title { font-size: clamp(2.25rem, 4.5vw, 3.5rem); margin-bottom: 1.5rem; }
.intro-text .lead { margin-bottom: 1.25rem; }
.intro-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.375rem;
  color: var(--green-dark);
  line-height: 1.4;
  border-left: 3px solid var(--red);
  padding-left: 1.25rem;
  margin: 2rem 0 2.25rem;
}
.intro-img {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(29, 24, 19, 0.18);
}
.intro-img img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.intro-badge {
  position: absolute;
  bottom: 1.5rem; left: 1.5rem;
  background: var(--red);
  color: #fff;
  padding: 1rem 1.4rem;
  border-radius: var(--radius);
  font-family: var(--serif);
  line-height: 1.05;
}
.intro-badge strong { display: block; font-size: 1.75rem; font-weight: 700; }
.intro-badge span { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.9; }

/* ── Value props ─────────────────────────────────────────────────────── */
.values { background: var(--cream-deep); }
.values-head { text-align: center; max-width: 640px; margin: 0 auto 3.5rem; }
.values-head .title { font-size: clamp(2rem, 4vw, 3rem); }
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
.value-card {
  background: var(--cream-soft);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: 0 2px 0 rgba(29,24,19,0.04);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s;
}
.value-card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(29, 24, 19, 0.12); }
.value-icon {
  width: 72px; height: 72px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: var(--red);
  display: flex; align-items: center; justify-content: center;
}
.value-icon svg { width: 34px; height: 34px; stroke: #fff; fill: none; stroke-width: 1.6; }
.value-card h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.375rem;
  margin-bottom: 0.75rem;
  color: var(--ink);
}
.value-card p { font-size: 0.9375rem; color: var(--ink-mute); line-height: 1.65; }

/* ── Split feature ───────────────────────────────────────────────────── */
.feature { background: var(--cream); }
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(29, 24, 19, 0.14);
}
.feature-img { min-height: 460px; }
.feature-img img { width: 100%; height: 100%; object-fit: cover; }
.feature-text {
  background: var(--cream-deep);
  padding: 4rem 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.feature-text .title { font-size: clamp(1.9rem, 3.5vw, 2.75rem); margin-bottom: 1.25rem; }
.feature-text .lead { margin-bottom: 2rem; }

/* ── Gallery (el campo) ──────────────────────────────────────────────── */
.gallery { background: var(--ink); }
.gallery-head { text-align: center; max-width: 640px; margin: 0 auto 3.5rem; }
.gallery-head .title { font-size: clamp(2rem, 4vw, 3rem); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  height: 240px;
}
.gallery-item.feature { grid-column: 1 / -1; height: 440px; }
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out);
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-cap {
  position: absolute;
  left: 1rem; bottom: 1rem;
  color: #fff;
  font-family: var(--serif);
  font-size: 1.0625rem;
  font-weight: 600;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}

/* ── CTA final ───────────────────────────────────────────────────────── */
.cta-final {
  position: relative;
  background: var(--green-dark);
  overflow: hidden;
}
.cta-final::before {
  content: '';
  position: absolute; inset: 0;
  background: url('assets/img/vf-pasture.jpg') center/cover;
  opacity: 0.18;
}
.cta-final-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}
.cta-final .title { font-size: clamp(2.25rem, 5vw, 3.75rem); margin-bottom: 1.25rem; }
.cta-final .lead { margin-bottom: 2.5rem; }
.cta-final-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── Footer ──────────────────────────────────────────────────────────── */
.footer { background: var(--ink); color: rgba(250, 247, 242, 0.7); padding: 4.5rem 0 2.5rem; }
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--line-light);
}
.footer-brand { max-width: 320px; }
.footer-logo { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; }
.footer-logo img { width: 54px; height: 54px; border-radius: 50%; background: var(--cream-soft); padding: 3px; }
.footer-logo span { font-family: var(--serif); font-weight: 700; font-size: 1.25rem; color: var(--cream-soft); }
.footer-brand p { font-size: 0.9375rem; line-height: 1.7; }

.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
}
.footer-col a, .footer-col p { display: block; font-size: 0.9375rem; margin-bottom: 0.75rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--red); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 2rem;
  font-size: 0.8125rem;
  color: rgba(250, 247, 242, 0.45);
}

/* ── Reveal animations ───────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal-right { opacity: 0; transform: translateX(40px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
.reveal.is-visible, .reveal-right.is-visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════════ */
@media (max-width: 980px) {
  .intro-grid { grid-template-columns: 1fr; gap: 3rem; }
  .intro-img { order: -1; }
  .intro-img img { aspect-ratio: 16/10; }
  .values-grid { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-img { min-height: 320px; }
  .feature-text { padding: 3rem 2.25rem; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-brand { grid-column: 1 / -1; max-width: none; }
}

@media (max-width: 767px) {
  :root { --nav-h: 76px; }

  .section { padding: 5rem 0; }
  .section-sm { padding: 3.5rem 0; }
  .container { padding-inline: 1.5rem; }

  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }

  .hero { align-items: flex-end; }
  .hero-content { padding-top: 0; padding-bottom: 4rem; text-align: left; }
  .hero-sub { margin-inline: 0; font-size: 1.0625rem; }
  .hero-actions { justify-content: flex-start; }
  .hero-actions .btn { width: 100%; }

  .feature-text .btn { width: 100%; }
  .intro-text .btn { width: 100%; }

  .intro-grid { gap: 2.5rem; }

  .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 240px; }
  .gallery-item.feature { height: 240px; }
  .gallery-item.wide, .gallery-item.tall { grid-column: auto; grid-row: auto; }

  .cta-final-actions .btn { width: 100%; }

  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  .hero-title { font-size: 2.5rem; }
  .container { padding-inline: 1.25rem; }
}
