/* =============================================================================
   Vinodinámicos — 16° Encuentro Internacional de Vitivinicultura Biodinámica
   Estética papel + acuarela (continuidad con la edición 14°), paleta del flyer 16°.
   ============================================================================= */

@font-face {
  font-family: "Playfair Display";
  src: url("../assets/fonts/playfair-var.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("../assets/fonts/playfair-italic-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../assets/fonts/montserrat-var.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #2a2723;
  --ink-soft: #57524b;
  --paper: #f8f5ef;
  --paper-2: #efeae0;
  --verde: #3f6f62;
  --verde-claro: #dce8e2;
  --vino: #7a2a3a;
  --oro: #b8933f;
  --oro-osc: #9a7a30;
  --cielo: #d5dde6;
  --line: #ddd5c6;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(42, 39, 35, .08);
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper) url("../assets/ilustraciones/papel.webp") repeat;
  background-size: 960px auto;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--verde); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .6em; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.wrap { width: min(1140px, 100% - 2.5rem); margin-inline: auto; position: relative; z-index: 1; }
.center { text-align: center; margin-inline: auto; }
.eyebrow {
  font-size: .78rem; letter-spacing: .28em; text-transform: uppercase;
  color: var(--verde); font-weight: 600; margin-bottom: .8rem;
}
.lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 760px; }
.note { font-size: .92rem; color: var(--ink-soft); font-style: italic; }
.small { font-size: .9rem; color: var(--ink-soft); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 100; background: #fff; padding: .5rem 1rem; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: 600 .9rem/1 var(--sans); letter-spacing: .06em; text-transform: uppercase;
  padding: 1rem 1.6rem; border-radius: 999px; border: 2px solid var(--oro);
  background: var(--oro); color: #fff; text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s, transform .2s;
}
.btn:hover { background: var(--oro-osc); border-color: var(--oro-osc); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-small { padding: .65rem 1.1rem; font-size: .78rem; }
.btn-wa { background: var(--verde); border-color: var(--verde); }
.btn-wa:hover { background: #2f574c; border-color: #2f574c; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 3px solid var(--oro); outline-offset: 2px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248, 245, 239, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 4px 18px rgba(0,0,0,.05); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); }
.brand span { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; }
.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a:not(.btn) {
  color: var(--ink); text-decoration: none; font-size: .88rem; font-weight: 500;
  position: relative; padding: .3rem 0;
}
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--oro); transition: width .25s;
}
.nav a:not(.btn):hover::after { width: 100%; }
.nav-toggle { display: none; background: none; border: 0; padding: .5rem; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: transform .25s, opacity .25s; }

/* ---------- Decoraciones acuarela ---------- */
.deco { position: absolute; pointer-events: none; z-index: 0; opacity: .9; }
.deco-left { left: -30px; top: 40px; width: 150px; }
.deco-right { right: -20px; top: 30px; width: 160px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 3rem 0 5.5rem; text-align: center;
  background: linear-gradient(180deg, var(--cielo) 0%, rgba(233, 214, 196, .55) 55%, rgba(248,245,239,0) 100%);
}
.deco-hero-left { left: max(-40px, calc(50% - 720px)); bottom: 0; width: clamp(140px, 18vw, 250px); }
.deco-hero-right { right: max(-20px, calc(50% - 700px)); bottom: 1rem; width: clamp(120px, 15vw, 210px); }
.hero-inner { padding-top: 0; }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.hero-lema { font-family: var(--serif); font-size: clamp(1.2rem, 2.4vw, 1.6rem); color: var(--vino); margin-bottom: 1.2rem; }
.hero-org { padding: 3.5rem 0 6rem; }
.hero-logo { width: clamp(180px, 22vw, 260px); margin: 0 auto 1.4rem; }
.hero-org h1 { font-size: clamp(2.8rem, 7vw, 4.8rem); font-weight: 500; margin-bottom: .3rem; }
.hero-intro { max-width: 620px; margin: 0 auto 2rem; color: var(--ink-soft); font-size: 1.08rem; }

/* ---------- Secciones ---------- */
.section { position: relative; padding: 6rem 0; overflow: hidden; }
.section-tint { background: rgba(220, 232, 226, .45); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: center; }
.photo-card { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transform: rotate(-1deg); border: 8px solid #fff; }
.photo-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 2rem; }

/* ---------- Misión y visión (destacadas) ---------- */
.mv { background: var(--verde); color: #fff; padding: 7rem 0; }
.mv .eyebrow { color: #f1dca9; }
.mv h2 { color: #fff; font-size: clamp(2.2rem, 4.4vw, 3.2rem); margin-bottom: 3rem; }
.mv-watermark { position: absolute; right: -120px; top: 50%; transform: translateY(-50%); width: 560px; opacity: .07; pointer-events: none; z-index: 0; }
.mv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.mv-item { position: relative; padding: 2.6rem 2.4rem 2.4rem; border: 1px solid rgba(255,255,255,.28); border-radius: var(--radius); background: rgba(255,255,255,.05); }
.mv-item::before {
  content: "\201C"; position: absolute; top: -.35em; left: 1.6rem; font: 600 6rem/1 var(--serif); color: var(--oro);
}
.mv-label { display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: #f1dca9; margin-bottom: 1rem; }
.mv-item blockquote { margin: 0; font-family: var(--serif); font-style: italic; font-size: clamp(1.25rem, 2vw, 1.55rem); line-height: 1.55; }

/* ---------- Disertantes ---------- */
.speakers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin: 3rem 0 2rem; }
.speaker { text-align: center; padding: 0 .5rem; }
.speaker img {
  width: 190px; height: 190px; object-fit: cover; border-radius: 50%; margin: 0 auto 1.4rem;
  border: 6px solid #fff; box-shadow: var(--shadow);
}
.speaker h3 { font-size: 1.5rem; text-transform: uppercase; letter-spacing: .03em; margin-bottom: .3rem; }
.speaker-topic { font-family: var(--serif); font-style: italic; font-weight: 600; color: var(--vino); margin-bottom: .7rem; }
.speaker p:last-child { font-size: .93rem; color: var(--ink-soft); }

/* ---------- Quiénes somos ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-top: 4rem; }
.stat { text-align: center; padding: 1.5rem 1rem; border-top: 2px solid var(--oro); }
.stat strong { display: block; font-family: var(--serif); font-size: 2.3rem; color: var(--verde); line-height: 1.1; margin-bottom: .4rem; }
.stat span { font-size: .88rem; color: var(--ink-soft); line-height: 1.5; display: block; }
.values {
  list-style: none; padding: 0; margin: 1.5rem 0 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem;
}
.values li { background: rgba(255,255,255,.85); border-radius: 12px; padding: 1.2rem 1.3rem; font-size: .9rem; color: var(--ink-soft); line-height: 1.55; }
.values strong { display: block; font-family: var(--serif); font-size: 1.1rem; color: var(--ink); margin-bottom: .3rem; }

/* ---------- Orgánico / biodinámico ---------- */
.explain { margin-top: 3rem; align-items: stretch; }
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.4rem 0 0; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.mini-stats dt { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; color: var(--verde); }
.mini-stats dd { margin: 0; font-size: .82rem; color: var(--ink-soft); line-height: 1.45; }
.quote { margin: 4rem auto 0; max-width: 620px; text-align: center; }
.quote p { font-family: var(--serif); font-style: italic; font-size: 1.35rem; line-height: 1.6; color: var(--vino); }
.quote cite { font-style: normal; font-size: .82rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); }

/* ---------- Bodegas ---------- */
.logos {
  list-style: none; padding: 0; margin: 3rem 0 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.2rem;
}
.logos li {
  position: relative; background: #fff; border-radius: 12px; height: 130px;
  display: flex; align-items: center; justify-content: center; padding: 1.2rem;
  box-shadow: 0 4px 14px rgba(0,0,0,.04);
}
.logos img { max-height: 80px; width: auto; object-fit: contain; mix-blend-mode: multiply; filter: grayscale(1); opacity: .85; transition: filter .25s, opacity .25s; }
.logos li:hover img { filter: none; opacity: 1; }
/* ---------- Acompañan ---------- */
.supporters {
  list-style: none; padding: 0; margin: 2.5rem auto 2rem;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2rem 4rem;
}
.supporters li, .supporters > img { background: #fff; border-radius: 12px; padding: 1.4rem 2rem; box-shadow: 0 4px 14px rgba(0,0,0,.04); }
.supporters img { height: 90px; width: auto; box-sizing: content-box; }
.supporters li img { padding: 0; box-shadow: none; }

/* ---------- Última noticia / Novedades ---------- */
.news-card { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; padding: 0; overflow: hidden; margin-top: 1.5rem; }
.news-img img { width: 100%; height: 100%; aspect-ratio: 1200 / 630; object-fit: cover; }
.news-body { padding: 2.4rem; display: flex; flex-direction: column; justify-content: center; }
.news-body h2, .news-body h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.news-body h2 a, .news-body h3 a { color: var(--ink); text-decoration: none; }
.news-body h2 a:hover, .news-body h3 a:hover { color: var(--verde); }
.news-date { font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--oro-osc); font-weight: 600; margin-bottom: .6rem; display: block; }
.news-body p { color: var(--ink-soft); }
.news-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; margin-top: .4rem; }
.link-arrow { font-weight: 600; font-size: .9rem; text-decoration: none; }
.link-arrow::after { content: " →"; }
.section-list { padding-top: 2rem; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2rem; }
.news-tile { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.news-tile .news-body { padding: 1.6rem; justify-content: flex-start; flex: 1; }
.news-tile h2 { font-size: 1.35rem; }
.news-tile .link-arrow { margin-top: auto; }
.news-featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.15fr 1fr; }
.news-featured .news-body { padding: 2.4rem; justify-content: center; }
.news-featured h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.news-featured .link-arrow { margin-top: .6rem; }
.pager { display: flex; justify-content: center; align-items: center; gap: 2rem; margin-top: 3rem; font-size: .92rem; }
.pager a { font-weight: 600; text-decoration: none; }

/* ---------- Página de publicación ---------- */
.page-head { padding: 4rem 0 2rem; text-align: center; background: linear-gradient(180deg, var(--cielo) 0%, rgba(248,245,239,0) 100%); }
.page-head h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); max-width: 900px; margin-inline: auto; }
.breadcrumb { font-size: .85rem; margin-bottom: 1.4rem; color: var(--ink-soft); }
.breadcrumb a { text-decoration: none; }
.post { width: min(780px, 100% - 2.5rem); margin: 0 auto; padding: 1rem 0 5rem; position: relative; z-index: 1; }
.post figure { margin: 0 0 2.2rem; }
.post figure img { border-radius: var(--radius); box-shadow: var(--shadow); border: 8px solid #fff; }
.post h2 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); margin-top: 2.4rem; }
.post-cover { margin: 0 0 2.4rem; }
.post-cover img { width: 100%; }
.post-body { font-size: 1.05rem; }
.post-body > :first-child { margin-top: 0; }
.post-body h3 { margin-top: 1.8rem; }
.post-body img { height: auto; border-radius: 10px; }
.post-body figure img { border-radius: var(--radius); }
.post-body figcaption { font-size: .85rem; color: var(--ink-soft); text-align: center; margin-top: .6rem; }
.post-body blockquote { margin: 2rem 0; padding: .4rem 0 .4rem 1.4rem; border-left: 4px solid var(--oro); font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: var(--vino); }
.post-body table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .95rem; }
.post-body th, .post-body td { border: 1px solid var(--line); padding: .5rem .7rem; }
.post-body iframe { max-width: 100%; }
.post-body a.btn { color: #fff; }
.post-body .speakers { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin: 2rem 0 1rem; }
.post-body .speaker img { width: 140px; height: 140px; border-radius: 50%; }
.post-body .speaker h3 { font-size: 1.1rem; margin-top: 0; }
.post-body .speaker p { font-size: .88rem; }
.post-body .supporters { margin: 1.5rem 0 2rem; justify-content: flex-start; gap: 1.5rem; }
.post-body .supporters img { height: 70px; border-radius: 12px; }
.post-back { margin-top: 3rem; }
.preview-bar { background: var(--vino); color: #fff; text-align: center; padding: .7rem 1rem; font-size: .9rem; position: sticky; top: 72px; z-index: 40; }
.preview-bar a { color: #f1dca9; }
.page-404 { padding: 7rem 0; }
.post-meta { list-style: none; padding: 1.4rem 1.6rem; margin: 1.6rem 0; background: rgba(255,255,255,.7); border-left: 4px solid var(--oro); border-radius: 0 var(--radius) var(--radius) 0; }
.post-meta li { margin: .2rem 0; }
.post-cta { text-align: center; margin: 2.6rem 0; padding: 2.2rem; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.post-cta h2 { margin-top: 0 !important; }
.post-cta p { margin-bottom: 1.2rem; }
.post .map { margin-top: 1.2rem; }

/* ---------- Sede ---------- */
.map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 8px solid #fff; }
.map iframe { display: block; width: 100%; height: 380px; border: 0; }

/* ---------- Contacto ---------- */
.section-dark { background: var(--verde); color: #fff; }
.section-dark .eyebrow { color: #f1dca9; }
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.contact-list a {
  display: block; color: #fff; text-decoration: none; font-family: var(--serif); font-size: 1.35rem;
  padding: 1rem 1.3rem; border: 1px solid rgba(255,255,255,.35); border-radius: 12px; transition: background .2s;
}
.contact-list a:hover { background: rgba(255,255,255,.1); }

/* ---------- Footer ---------- */
.site-footer { background: #22332e; color: rgba(255,255,255,.75); padding: 4rem 0 3rem; font-size: .9rem; }
.footer-inner { display: flex; align-items: center; gap: 3rem; }
.footer-logo { width: 190px; height: 190px; flex: none; }
.footer-text p { margin: 0 0 .5rem; }
.footer-name { font-family: var(--serif); font-size: 1.8rem; color: #fff; }
.footer-links { list-style: none; padding: 0; margin: 1.2rem 0; display: flex; flex-wrap: wrap; gap: .6rem 1.8rem; }
.footer-small { font-size: .8rem; opacity: .75; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 2rem; margin-top: 1.4rem; }
.footer-bottom .footer-small { margin: 0; }
.footer-credit { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; font-size: .8rem; color: rgba(255,255,255,.6) !important; transition: opacity .2s; }
.footer-credit img { width: 80px; height: auto; opacity: .9; transition: opacity .2s; }
.footer-credit:hover img { opacity: 1; }
.site-footer a { color: #f1dca9; }

/* ---------- Animación de entrada ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .nav.open { max-height: 520px; }
  .nav a:not(.btn) { padding: .9rem 0; width: 100%; text-align: center; border-top: 1px solid var(--line); }
  .nav .btn { margin: 1rem 0 1.2rem; }
  .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); }
  .grid-2, .contact, .mv-grid, .news-card { grid-template-columns: 1fr; gap: 2.5rem; }
  .news-featured { grid-template-columns: 1fr; }
  .post-body .speakers { grid-template-columns: 1fr; }
  .mv { padding: 5rem 0; }
  .speakers { grid-template-columns: 1fr; gap: 3rem; max-width: 520px; margin-inline: auto; }
  .stats { grid-template-columns: 1fr 1fr; }
  .logos { grid-template-columns: repeat(3, 1fr); }
  .deco-left, .deco-right { width: 100px; opacity: .5; }
}
@media (max-width: 600px) {
  body { font-size: 15.5px; }
  .section { padding: 4.5rem 0; }
  .hero { padding-top: 2.5rem; }
  .deco-hero-left, .deco-hero-right { opacity: .35; }
  .deco-left, .deco-right { display: none; }
  .mini-stats { grid-template-columns: 1fr; }
  .news-card { gap: 0; }
  .news-body { padding: 1.6rem; }
  .supporters img { height: 72px; }
  .logos { grid-template-columns: 1fr 1fr; }
  .logos li { height: 110px; }
  .stats { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; gap: 1.5rem; }
  .footer-logo { width: 160px; height: 160px; }
  .footer-links { justify-content: center; }
  .footer-bottom { justify-content: center; flex-direction: column; }
  .mv-item { padding: 2.4rem 1.5rem 1.8rem; }
  .card { padding: 1.5rem; }
  .contact-list a { font-size: 1.1rem; overflow-wrap: anywhere; }
}
