/* ==========================================================================
   De la vid al agave — design system
   Palette + layout language sampled from DLVAA-Productores-Morelos-V3.pdf
   ========================================================================== */

:root {
  --cream: #F8F3E7;
  --cream-deep: #F0E6D1;
  --forest: #3A503D;
  --forest-dark: #2C3E2F;
  --teal: #17443C;
  --gold: #C99E40;
  --gold-soft: #DCBB6C;
  --gold-ink: #7A5A16;   /* gold that passes AA as text on cream */
  --on-gold: #241B08;    /* text placed on a gold fill */
  --ink: #1B1B1B;
  --ink-soft: #4A4A46;
  --line: rgba(58, 80, 61, 0.18);
  --white: #FFFFFF;

  --font: 'Poppins', 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow: 0 12px 32px rgba(28, 40, 30, 0.10);
  --shadow-lg: 0 24px 60px rgba(28, 40, 30, 0.16);
  --wrap: 1180px;
  --pad: clamp(20px, 5vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--teal);
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.4rem, 6vw, 4.1rem); }
h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.45rem); }

p { margin: 0 0 1.1em; }
a { color: var(--forest); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.center { text-align: center; }
.lead { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--ink-soft); }
.lead-italic { font-style: italic; color: var(--forest); }

/* Skip link -------------------------------------------------------------- */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--forest); color: var(--cream);
  padding: 12px 20px; border-radius: 0 0 var(--radius) 0;
}
.skip:focus { left: 0; }

/* Eyebrow ---------------------------------------------------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--forest); margin-bottom: 18px;
}
.eyebrow::before {
  content: ''; width: 34px; height: 9px;
  background: var(--forest); border-radius: 2px;
}
.eyebrow.on-dark { color: var(--gold-soft); }
.eyebrow.on-dark::before { background: var(--gold); }

/* Header ----------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(248, 243, 231, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; min-height: 76px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand img { height: 46px; width: auto; }
.brand span { display: none; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  padding: 9px 14px; border-radius: 999px; text-decoration: none;
  font-size: 0.92rem; font-weight: 600; color: var(--forest);
  white-space: nowrap; transition: background 0.18s, color 0.18s;
}
.nav a:hover { background: rgba(58, 80, 61, 0.09); }
.nav a[aria-current="page"] { background: var(--forest); color: var(--cream); }

.header-tools { display: flex; align-items: center; gap: 12px; }

.lang-toggle {
  display: inline-flex; border: 1.5px solid var(--forest);
  border-radius: 999px; overflow: hidden; background: transparent;
}
.lang-toggle button {
  font: inherit; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em;
  padding: 7px 13px; border: 0; background: transparent;
  color: var(--forest); cursor: pointer; transition: background 0.18s, color 0.18s;
}
.lang-toggle button[aria-pressed="true"] { background: var(--forest); color: var(--cream); }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 1.5px solid var(--forest);
  border-radius: 12px; background: transparent; cursor: pointer;
  align-items: center; justify-content: center; flex-direction: column; gap: 5px;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--forest); border-radius: 2px; }

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 30px; border-radius: 999px; border: 2px solid transparent;
  font-size: 0.98rem; font-weight: 700; text-decoration: none; cursor: pointer;
  font-family: inherit; line-height: 1.2;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s, color 0.18s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn-gold { background: var(--gold); color: var(--on-gold); }
.btn-gold:hover { background: #D8AC50; }
.btn-forest { background: var(--forest); color: var(--cream); }
.btn-forest:hover { background: var(--forest-dark); }
.btn-ghost { border-color: var(--forest); color: var(--forest); background: transparent; }
.btn-ghost:hover { background: var(--forest); color: var(--cream); }
.btn-ghost-light { border-color: var(--cream); color: var(--cream); background: transparent; }
.btn-ghost-light:hover { background: var(--cream); color: var(--forest); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.btn-row.center { justify-content: center; }

/* Sections --------------------------------------------------------------- */
.section { padding: clamp(64px, 9vw, 118px) 0; position: relative; }
.section-cream { background: var(--cream); }
.section-forest { background: var(--forest); color: var(--cream); }
.section-forest h2, .section-forest h3 { color: var(--cream); }
.section-forest .lead, .section-forest p { color: rgba(248, 243, 231, 0.86); }
.section-tint { background: var(--cream-deep); }

/* Agave watermark backdrop */
.watermark { position: relative; overflow: hidden; }
.watermark::after {
  content: ''; position: absolute; right: -6%; bottom: -18%;
  width: min(620px, 60%); aspect-ratio: 1400 / 949;
  background: url('../images/agave-watermark.png') center/contain no-repeat;
  opacity: 0.5; pointer-events: none; z-index: 0;
}
.watermark > * { position: relative; z-index: 1; }

/* Hero ------------------------------------------------------------------- */
.hero { padding: clamp(48px, 7vw, 90px) 0 0; background: var(--cream); }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 5vw, 60px); align-items: center;
}
.hero h1 { color: var(--forest); margin-bottom: 22px; }
.hero .lead { max-width: 34ch; }
.hero-badges {
  display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 0;
  list-style: none; padding: 0;
}
.hero-badges li {
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 8px 16px; border: 1.5px solid var(--line); border-radius: 999px; color: var(--forest);
}
.hero-art { position: relative; }
.hero-art img { width: 100%; filter: drop-shadow(0 26px 44px rgba(28, 40, 30, 0.24)); }
.hero-authors {
  margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line);
  font-size: 0.94rem; font-weight: 600; color: var(--forest);
}
.hero-strip {
  margin-top: clamp(40px, 6vw, 70px); background: var(--forest); color: var(--cream);
  padding: 26px 0;
}
.hero-strip .wrap { display: flex; flex-wrap: wrap; gap: 14px 34px; align-items: center; justify-content: center;
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }

/* Split blocks ----------------------------------------------------------- */
.split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 64px); align-items: center;
}
.split.narrow-art { grid-template-columns: 1.15fr 0.85fr; }
.split-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; }
.split-media.contain img { box-shadow: none; border-radius: 0; }

/* Cards ------------------------------------------------------------------ */
.card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: clamp(24px, 3.4vw, 38px); box-shadow: var(--shadow);
}
.card-forest { background: var(--forest); color: var(--cream); box-shadow: none; }
.card-forest h3 { color: var(--cream); }
.card-forest p, .card-forest li { color: rgba(248, 243, 231, 0.86); }
.card-gold { background: var(--gold); color: var(--on-gold); box-shadow: none; }
.card-gold h3 { color: var(--on-gold); }
.card-gold p, .card-gold li { color: var(--on-gold); }
.card-teal { background: var(--teal); color: var(--cream); box-shadow: none; }
.card-teal h3 { color: var(--cream); }
.card-teal p, .card-teal li { color: rgba(248, 243, 231, 0.86); }
.card-outline { background: transparent; border: 1.5px solid var(--line); box-shadow: none; }

.grid { display: grid; gap: clamp(18px, 2.4vw, 26px); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Stat cards (deck slide 3) ---------------------------------------------- */
.stat { text-align: center; padding: clamp(30px, 4vw, 46px); border-radius: var(--radius-lg); }
.stat .num {
  display: block; font-size: clamp(2.8rem, 6vw, 4.2rem); font-weight: 800;
  line-height: 1; letter-spacing: -0.03em; margin-bottom: 12px;
}
.stat .label { font-weight: 700; font-size: 1.08rem; display: block; margin-bottom: 8px; }
.stat .note { font-size: 0.92rem; font-style: italic; margin: 0; }

/* Numbered rows (deck slides 7 & 10) ------------------------------------- */
.numbered { display: grid; gap: 16px; }
.numbered-item {
  display: flex; gap: 22px; align-items: flex-start;
  background: var(--forest); color: var(--cream);
  border-radius: var(--radius-lg); padding: 26px clamp(22px, 3vw, 34px);
}
.numbered-item .n {
  flex: 0 0 62px; height: 62px; border-radius: 50%;
  background: var(--cream); color: var(--gold-ink);
  display: grid; place-items: center;
  font-size: 1.5rem; font-weight: 800;
}
.numbered-item h3 { color: var(--cream); margin-bottom: 6px; font-size: 1.05rem;
  letter-spacing: 0.1em; text-transform: uppercase; }
.numbered-item ul { margin: 0; padding-left: 18px; color: rgba(248, 243, 231, 0.86); }
.numbered-item p { margin: 0; }

/* Icon list (deck slide 9) ----------------------------------------------- */
.pill-list { display: grid; gap: 16px; }
.pill {
  background: var(--forest); color: var(--cream);
  border-radius: 999px; padding: 22px clamp(24px, 3vw, 34px);
}
.pill h3 { color: var(--cream); font-size: 1rem; letter-spacing: 0.1em;
  text-transform: uppercase; margin-bottom: 4px; }
.pill p { margin: 0; font-size: 0.95rem; }

/* Checklist -------------------------------------------------------------- */
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.check-list li { position: relative; padding-left: 30px; }
.check-list li::before {
  content: ''; position: absolute; left: 0; top: 0.55em;
  width: 12px; height: 12px; border-radius: 50%; background: var(--gold-ink);
}
.card-gold .check-list li::before { background: var(--on-gold); }
.check-list.on-dark li::before { background: var(--gold-soft); }

/* Tours ------------------------------------------------------------------ */
.tour { display: flex; gap: 18px; align-items: flex-start; padding: 22px 0; border-bottom: 1px solid var(--line); }
.tour:last-child { border-bottom: 0; }
.tour .marker { flex: 0 0 44px; height: 44px; border-radius: 50%; background: var(--gold);
  color: var(--on-gold); display: grid; place-items: center; font-weight: 800; }
.tour h3 { margin-bottom: 4px; font-size: 1.1rem; }
.tour p { margin: 0; color: var(--ink-soft); }

/* Authors ---------------------------------------------------------------- */
.author-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 54px); }
.author-photo {
  border-radius: var(--radius-lg); overflow: hidden; background: var(--forest);
  aspect-ratio: 4 / 5; box-shadow: var(--shadow-lg); margin-bottom: 26px;
}
.author-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.author-role { font-weight: 700; color: var(--gold-ink); margin-bottom: 14px; display: block; }

/* Phone frame (app page) -------------------------------------------------- */
.phone {
  width: min(320px, 78vw); margin: 0 auto; border-radius: 42px;
  background: #14170F; padding: 12px; box-shadow: var(--shadow-lg);
  border: 2px solid rgba(255, 255, 255, 0.12);
}
.phone video { width: 100%; border-radius: 32px; display: block; background: #000; }

/* Forms ------------------------------------------------------------------ */
.form-grid { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.04em; color: var(--forest); }
.field .opt { font-weight: 500; color: var(--ink-soft); text-transform: none; letter-spacing: 0; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 0.98rem; padding: 14px 16px;
  border: 1.5px solid var(--line); border-radius: 14px;
  background: var(--white); color: var(--ink); width: 100%;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 3px solid rgba(201, 158, 64, 0.35); outline-offset: 1px; border-color: var(--gold);
}
.field .error { font-size: 0.82rem; color: #A33A22; min-height: 1em; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: #A33A22; }
.form-note { font-size: 0.86rem; color: var(--ink-soft); }
.form-status { margin-top: 18px; padding: 16px 20px; border-radius: 14px; font-weight: 600; display: none; }
.form-status.ok { display: block; background: rgba(58, 80, 61, 0.12); color: var(--forest); }
.form-status.err { display: block; background: rgba(163, 58, 34, 0.12); color: #A33A22; }

/* Inline waitlist (hero) -------------------------------------------------- */
.waitlist {
  background: var(--white); border-radius: var(--radius-lg);
  padding: clamp(24px, 3.4vw, 40px); box-shadow: var(--shadow);
}
.waitlist-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
.waitlist .btn { padding: 15px 26px; height: 52px; }

/* Footer ----------------------------------------------------------------- */
.site-footer { background: var(--forest-dark); color: rgba(248, 243, 231, 0.82); padding: clamp(48px, 6vw, 76px) 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
.site-footer h4 { color: var(--cream); font-size: 0.82rem; letter-spacing: 0.16em;
  text-transform: uppercase; margin-bottom: 16px; }
.site-footer a { color: rgba(248, 243, 231, 0.82); text-decoration: none; }
.site-footer a:hover { color: var(--gold-soft); text-decoration: underline; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 0.94rem; }
.site-footer .brand img { height: 52px; }
.footer-bottom {
  margin-top: 42px; padding-top: 22px; border-top: 1px solid rgba(248, 243, 231, 0.18);
  display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between;
  font-size: 0.85rem;
}

/* Reveal animation -------------------------------------------------------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Responsive -------------------------------------------------------------- */
@media (max-width: 960px) {
  .hero-grid, .split, .split.narrow-art, .author-grid, .grid-3, .grid-4, .footer-grid {
    grid-template-columns: 1fr;
  }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero-art { order: -1; max-width: 460px; margin: 0 auto; }
  .waitlist-row { grid-template-columns: 1fr; }
  .waitlist .btn { width: 100%; }

  .nav-toggle { display: flex; }
  .nav {
    position: fixed; inset: 76px 0 auto; flex-direction: column; align-items: stretch;
    gap: 4px; background: var(--cream); padding: 18px var(--pad) 28px;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    transform: translateY(-120%); transition: transform 0.28s ease; z-index: 90;
  }
  .nav.open { transform: none; }
  .nav a { padding: 14px 16px; border-radius: 12px; font-size: 1rem; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .grid-2, .grid-4, .form-grid { grid-template-columns: 1fr; }
  .numbered-item { flex-direction: column; gap: 14px; }
  .btn { width: 100%; }
  .btn-row { flex-direction: column; }
  .hero-strip .wrap { font-size: 0.72rem; gap: 10px 18px; }
}

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

/* Print ------------------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .btn, .waitlist { display: none; }
  body { background: #FFF; }
}
