/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  /* Paleta corporativa oficial — extraída directamente de los operadores de
     color del PDF vectorial "PaletaColores" (Logos/PaletaColores.pdf).
     Estos 4 valores son los códigos exactos: no alterar. */
  --cream: #FDFEFC;   /* más claro de la paleta: fondos y contenedores */
  --ink:   #1D0E03;   /* más oscuro de la paleta: tipografía principal y superficies oscuras (cabecera, footer) */
  --wine:  #66113A;   /* borgoña: reservado para los CTA principales (botones de conversión) */
  --green: #CFE2B4;   /* verde: CTA/elementos secundarios — WhatsApp y estados de confirmación */
  --paper: var(--cream);

  /* Mismos 4 colores en componentes RGB, para tintes con transparencia (rgba) sin alterar el tono */
  --cream-rgb: 253, 254, 252;
  --ink-rgb: 29, 14, 3;
  --wine-rgb: 102, 17, 58;
  --green-rgb: 207, 226, 180;

  /* Tonos derivados matemáticamente de los 4 colores base (mezclas), solo para
     jerarquía tipográfica y superficies alternas — verificados con contraste WCAG AA/AAA */
  --ink-soft: #453930;    /* ink 82% + cream 18% · contraste 11.0:1 sobre --cream */
  --ink-mute: #6B625A;    /* ink 65% + cream 35% · contraste 5.9:1 sobre --cream (AA texto normal) */
  --cream-deep: #F6FAF0;  /* cream 84% + green 16% · fondo de secciones alternas */
  --wine-soft: #EBE2E5;   /* wine 12% + cream 88% · fondo de chips/etiquetas, texto wine 9.7:1 */

  --line: rgba(var(--ink-rgb), 0.14);
  --shadow-sm: 0 1px 2px rgba(var(--ink-rgb), 0.06), 0 8px 20px -14px rgba(var(--ink-rgb), 0.3);
  --shadow-lg: 0 24px 60px -30px rgba(var(--ink-rgb), 0.45);

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --script: "Alex Brush", "Segoe Script", cursive;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --nav-h: 72px; /* móvil: cabecera de una sola fila, el menú se pliega en el botón hamburguesa */
  color-scheme: light;
}

@media (min-width: 1024px) {
  :root { --nav-h: 76px; }
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
p { text-wrap: pretty; }
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  text-wrap: balance;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--ink);
}
::selection { background: var(--wine); color: var(--cream); }
:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* =============================================================
   3. Utilities
   ============================================================= */
.skip-link {
  position: fixed;
  top: -100px; left: 1rem;
  padding: .7rem 1.1rem;
  background: var(--wine);
  color: var(--cream);
  z-index: 9999;
  border-radius: 8px;
  font-weight: 600;
  transition: top .2s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--wine);
}
/* Variante para eyebrows sobre fondo oscuro (p. ej. el bloque borgoña de contacto) */
.eyebrow--on-dark {
  color: rgba(var(--cream-rgb), .85);
}

.section {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}
.section--alt { background: var(--cream-deep); }
.section-head {
  max-width: 640px;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); margin-top: .5rem; }
.section-head p { color: var(--ink-mute); font-size: 1.05rem; margin-top: .9rem; }

.legal-page .container { max-width: 780px; }
.legal-page h3 {
  font-size: 1.2rem;
  margin-top: 2.4rem;
  margin-bottom: .6rem;
}
.legal-page p { color: var(--ink-mute); line-height: 1.7; }
.legal-page p + h3 { margin-top: 2.4rem; }
.legal-updated {
  margin-top: 2.8rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: .85rem;
  font-style: italic;
}

.footer-legal-links { display: flex; gap: .5rem; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* =============================================================
   4. Buttons & links
   ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  transition: transform .18s var(--ease-out), background-color .25s var(--ease-out), color .25s var(--ease-out), box-shadow .25s var(--ease-out), filter .25s var(--ease-out);
  white-space: nowrap;
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-2px); }
}
.btn:active { transform: scale(0.97); }

/* CTA principal — siempre borgoña, según la directriz de marca */
.btn-primary {
  background: var(--wine);
  color: var(--cream);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { filter: brightness(0.85); box-shadow: var(--shadow-lg); }

/* CTA secundario — verde, reservado para WhatsApp y confirmaciones */
.btn-secondary {
  background: var(--green);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { filter: brightness(0.92); box-shadow: var(--shadow-lg); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn-ghost:hover { border-color: var(--wine); color: var(--wine); }
.btn-on-dark {
  background: rgba(var(--cream-rgb), 0.14);
  color: var(--cream);
  border: 1.5px solid rgba(var(--cream-rgb), 0.4);
  backdrop-filter: blur(6px);
}
.btn-on-dark:hover { background: rgba(var(--cream-rgb), 0.24); border-color: var(--cream); }

.link-underline {
  position: relative;
  padding-bottom: 2px;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1.5px;
  background-repeat: no-repeat;
  background-position: left bottom;
  transition: background-size .35s var(--ease-out);
}
.link-underline:hover { background-size: 100% 1.5px; }

/* =============================================================
   5. Header / Nav
   ============================================================= */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: var(--ink);
  transition: box-shadow .35s var(--ease-out);
}
.site-header.is-scrolled {
  box-shadow: var(--shadow-sm);
}
.site-header .container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  height: 100%;
}

/* Botón hamburguesa — visible en móvil y tablet (ver media query 1024px) */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle-bar {
  display: block;
  width: 21px;
  height: 2px;
  border-radius: 2px;
  background: var(--cream);
  transition: transform .3s var(--ease-out), opacity .2s var(--ease-out);
}
.site-header.is-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header.is-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.site-header.is-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Menú desplegable — panel a pantalla completa de ancho bajo la cabecera */
.nav-main {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  max-height: calc(100svh - var(--nav-h));
  overflow-y: auto;
  background: var(--ink);
  border-top: 1px solid rgba(var(--cream-rgb), .12);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .25s var(--ease-out), transform .25s var(--ease-out), visibility 0s linear .25s;
}
.site-header.is-open .nav-main {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity .25s var(--ease-out), transform .25s var(--ease-out);
}
html.nav-open, html.nav-open body {
  overflow: hidden;
}

.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--cream);
}
.brand-logo {
  height: 42px;
  width: auto;
  filter: brightness(0) invert(1);
}
.brand-logo--footer { height: 66px; }

.nav-main ul {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: .25rem 1.5rem 1.5rem;
}
.nav-main li { width: 100%; }
.nav-main a {
  font-size: .95rem;
  font-weight: 500;
  color: var(--cream);
  display: flex;
  align-items: center;
  padding: .9rem 0;
  border-bottom: 1px solid rgba(var(--cream-rgb), .1);
}
.nav-soon {
  font-size: .95rem;
  font-weight: 500;
  color: rgba(var(--cream-rgb), 0.62);
  display: flex;
  align-items: center;
  gap: .45rem;
  cursor: default;
  padding: .9rem 0;
  border-bottom: 1px solid rgba(var(--cream-rgb), .1);
}
.nav-main li:last-child a,
.nav-main li:last-child .nav-soon {
  border-bottom: none;
}
.nav-soon .tag {
  font-size: .6rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--cream);
  background: rgba(var(--cream-rgb), 0.18);
  padding: .18rem .5rem;
  border-radius: 999px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.nav-call {
  display: none;
  align-items: center;
  gap: .5rem;
  font-weight: 600;
  font-size: .88rem;
  color: var(--cream);
}
.nav-call svg { width: 17px; height: 17px; color: var(--cream); }

/* =============================================================
   6. Hero
   ============================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding-top: var(--nav-h);
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(var(--ink-rgb),.55) 0%, rgba(var(--ink-rgb),.32) 38%, rgba(var(--ink-rgb),.78) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  color: var(--cream);
  padding-block: clamp(2.5rem, 8vw, 5rem);
  max-width: 760px;
  animation: heroRise .8s var(--ease-out) both;
}
.hero .eyebrow { color: rgba(var(--cream-rgb), 0.85); }
.hero-content h1 {
  color: var(--cream);
  font-size: clamp(2.2rem, 5.4vw, 3.75rem);
  margin-top: .8rem;
  max-width: 16ch;
}
.hero-content .lede {
  margin-top: 1.25rem;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: rgba(var(--cream-rgb), 0.88);
  max-width: 52ch;
  line-height: 1.6;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  margin-top: 2rem;
}
.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 2.25rem;
}
.hero-chips span {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--cream);
  border: 1px solid rgba(var(--cream-rgb),.4);
  padding: .4rem .85rem;
  border-radius: 999px;
}

@keyframes heroRise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =============================================================
   7. Manifesto strip
   ============================================================= */
.manifesto {
  padding-block: clamp(3.5rem, 8vw, 6rem);
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.manifesto-content {
  max-width: 620px;
  margin-inline: auto;
}
.manifesto h2 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-style: italic;
  font-weight: 500;
  margin-top: .6rem;
}
.manifesto p {
  color: var(--ink-mute);
  font-size: 1.05rem;
  margin-top: 1.15rem;
}

.video-slot {
  margin: clamp(2.5rem, 6vw, 3.5rem) auto 0;
  max-width: 860px;
  aspect-ratio: 16 / 9;
  border: 2px dashed rgba(var(--wine-rgb), 0.35);
  border-radius: 20px;
  background: repeating-linear-gradient(135deg, var(--cream-deep), var(--cream-deep) 14px, var(--paper) 14px, var(--paper) 28px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: 1.5rem;
}
.video-slot-icon {
  width: 44px;
  height: 44px;
  color: var(--wine);
  opacity: .5;
}
.video-slot-label {
  font-weight: 600;
  color: var(--ink-soft);
  font-size: 1rem;
}
.video-slot-label span {
  font-weight: 500;
  color: var(--ink-mute);
}
.video-slot-note {
  font-size: .82rem;
  color: var(--ink-mute);
}

/* Estado "relleno": el vídeo real de dron sustituye el marco de espera.
   Los dos clips se superponen (position:absolute) y se funden entre sí
   con una transición de opacidad en vez de cambiar de golpe. */
.video-slot--filled {
  position: relative;
  border: none;
  background: var(--ink);
  padding: 0;
  display: block;
  overflow: hidden;
}
.video-slot--filled video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s linear;
}
.video-slot--filled video.is-active {
  opacity: 1;
  z-index: 1;
}
.video-slot--filled video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* =============================================================
   8. Feature (Ajo Morado)
   ============================================================= */
.feature {
  display: grid;
  gap: clamp(2rem, 6vw, 4rem);
  align-items: center;
}
.feature-media {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}
.feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease-soft);
}
@media (hover: hover) and (pointer: fine) {
  .feature-media:hover img { transform: scale(1.035); }
}

.feature-text h2 { font-size: clamp(1.9rem, 3.8vw, 2.6rem); margin-top: .6rem; }
.feature-text > p {
  margin-top: 1.1rem;
  color: var(--ink-soft);
  font-size: 1.08rem;
  max-width: 54ch;
}

.fact-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}
.fact {
  border-left: 2px solid var(--wine);
  padding-left: 1rem;
}
.fact dt {
  font-weight: 600;
  font-size: .98rem;
  color: var(--ink);
}
.fact dd {
  color: var(--ink-mute);
  font-size: .92rem;
  margin-top: .2rem;
}

/* Comparativa frente a otras variedades — misma sección, datos ya usados en el fact-grid,
   sin ninguna mención a certificación/IGP */
.compare-head { margin-top: 1.75rem; }
.compare-head h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.02rem;
  margin: 0;
  letter-spacing: -0.01em;
}
.compare-table-wrap {
  margin-top: .75rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}
.compare-table th, .compare-table td {
  padding: .5rem .6rem;
  text-align: left;
  white-space: nowrap;
}
.compare-table thead th {
  font-family: var(--serif);
  font-weight: 600;
  font-size: .8rem;
  color: var(--ink-mute);
  border-bottom: 1px solid var(--line);
}
.compare-table thead th.is-ours { color: var(--wine); }
.compare-table tbody th {
  font-weight: 600;
  font-size: .72rem;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.compare-table tbody tr + tr th,
.compare-table tbody tr + tr td {
  border-top: 1px solid var(--line);
}
.compare-table td.is-ours {
  background: rgba(var(--wine-rgb), .06);
  font-weight: 600;
  color: var(--ink);
}

/* =============================================================
   8.5 Carrusel 360 en anillo (Nuestros formatos)
   ============================================================= */
.ring360-outer {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ring360-3d {
  position: relative;
  width: 100%;
  height: 100%;
}
.ring360-item {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
  transition: transform .6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ring360-item-inner {
  position: relative;
  width: clamp(56px, 12vw, 180px);
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(var(--ink-rgb), .18);
}
.ring360-item-inner img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .92; }

.ring360-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  pointer-events: none;
}
.ring360-center-frame {
  position: relative;
  width: clamp(200px, 32vw, 480px);
  aspect-ratio: 1;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--ink);
}
.ring360-center-frame img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0;
  transition: opacity .45s cubic-bezier(0.22, 1, 0.36, 1);
}
.ring360-center-frame img.is-active { opacity: 1; z-index: 1; }

.ring360-nav {
  display: flex;
  justify-content: center;
  gap: .75rem;
  margin-top: .75rem;
}
.ring360-arrow {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(var(--cream-rgb), .5);
  background: linear-gradient(180deg, rgba(var(--cream-rgb), .55), rgba(var(--cream-rgb), .15));
  backdrop-filter: blur(10px) saturate(150%);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.6), inset 0 -1px 2px rgba(0,0,0,.06);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--ink);
  transition: transform .18s var(--ease-out);
}
.ring360-arrow:active { transform: scale(0.92); }
.ring360-arrow svg { width: 16px; height: 16px; }

/* Sección "formatos" con línea superior para separarla de "Nuestra Historia" */
#formatos.section {
  padding-block: clamp(1.5rem, 3vw, 2.25rem);
  border-top: 1px solid var(--line);
}
#formatos .section-head { margin-bottom: 1rem; }

/* =============================================================
   9. Pillars (Por qué Ramírez)
   ============================================================= */
.pillars {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}
.pillar {
  padding-block: 2rem;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: baseline;
  transition: background-color .3s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .pillar:hover { background: rgba(var(--wine-rgb), 0.04); }
}
.pillar-num {
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--wine);
  font-style: italic;
}
.pillar h3 {
  font-size: 1.2rem;
  font-family: var(--sans);
  font-weight: 700;
}
.pillar p {
  color: var(--ink-mute);
  margin-top: .4rem;
  max-width: 56ch;
}

/* =============================================================
   10. Historia
   ============================================================= */
.historia {
  display: grid;
  gap: clamp(2rem, 6vw, 4rem);
  align-items: center;
}
.historia-media {
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow-sm);
}
.historia-media img { width: 100%; height: 100%; object-fit: cover; }
.historia-text h2 { font-size: clamp(1.9rem, 3.8vw, 2.6rem); }
.historia-text p {
  margin-top: 1.1rem;
  color: var(--ink-soft);
  font-size: 1.06rem;
  max-width: 54ch;
}
.historia-text p + p { margin-top: 1rem; }
.historia-sign {
  margin-top: 1.75rem;
  font-family: var(--script);
  font-size: 1.6rem;
  color: var(--wine);
}

/* =============================================================
   11. Visit / trust (map + hours)
   ============================================================= */
.visit-grid {
  display: grid;
  gap: 2rem;
  border-radius: 22px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}
.visit-info {
  padding: clamp(1.75rem, 4vw, 2.75rem);
}
.visit-info h2 { font-size: clamp(1.6rem, 3vw, 2rem); }
.visit-list {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.visit-item {
  display: flex;
  gap: .9rem;
}
.visit-item svg {
  width: 20px; height: 20px;
  color: var(--wine);
  flex-shrink: 0;
  margin-top: 2px;
}
.visit-item .label {
  font-size: .78rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 600;
}
.visit-item .value { font-size: 1rem; margin-top: .15rem; overflow-wrap: anywhere; }
.visit-item .value a:hover { color: var(--wine); }

.visit-map {
  min-height: 320px;
  background: var(--cream-deep);
}
.visit-map iframe {
  width: 100%;
  height: 100%;
  min-height: 320px;
  border: 0;
  display: block;
  filter: grayscale(.15) contrast(1.02);
}

/* =============================================================
   12. Contact CTA
   ============================================================= */
.contact-cta {
  background: var(--wine);
  color: var(--cream);
  border-radius: 26px;
  padding: clamp(2.25rem, 6vw, 4rem);
  display: grid;
  gap: 2rem;
  align-items: center;
}
.contact-cta h2 { color: var(--cream); font-size: clamp(1.8rem, 3.6vw, 2.4rem); }
.contact-cta p { color: rgba(var(--cream-rgb), 0.82); margin-top: .8rem; max-width: 46ch; font-size: 1.05rem; }
.contact-cta .btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
}
/* "Llamar" es la acción principal dentro de este bloque borgoña: se invierte a claro para destacar */
.contact-cta .btn-primary { background: var(--cream); color: var(--wine); }

/* =============================================================
   13. Footer
   ============================================================= */
.site-footer {
  background: var(--ink);
  color: var(--cream);
  padding-block: clamp(2.5rem, 6vw, 4rem) 2rem;
}
.footer-top {
  display: grid;
  gap: 2.5rem;
}
.footer-tagline {
  margin-top: 1rem;
  color: rgba(var(--cream-rgb),.68);
  max-width: 34ch;
  font-size: .95rem;
}
.footer-col h4 {
  font-family: var(--sans);
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(var(--cream-rgb),.55);
  margin-bottom: 1rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: .65rem; }
.footer-col a, .footer-col p { color: rgba(var(--cream-rgb),.88); font-size: .95rem; overflow-wrap: anywhere; }
.footer-col a:hover { color: var(--cream); }
.footer-social {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: .5rem;
}
.footer-social svg { width: 18px; height: 18px; }

.footer-bottom {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(var(--cream-rgb),.14);
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  justify-content: space-between;
  font-size: .82rem;
  color: rgba(var(--cream-rgb),.5);
}

/* =============================================================
   14. Mobile fixed contact bar
   ============================================================= */
.mobile-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  display: flex;
  background: var(--paper);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px -12px rgba(var(--ink-rgb),.25);
}
.mobile-cta a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .95rem .5rem;
  font-weight: 600;
  font-size: .88rem;
  transition: transform .18s var(--ease-out);
}
.mobile-cta a:active { transform: scale(0.97); }
.mobile-cta a:first-child { color: var(--ink); border-right: 1px solid var(--line); }
/* WhatsApp = CTA secundario, en verde con texto oscuro (misma pareja que .btn-secondary) */
.mobile-cta a:last-child { background: var(--green); color: var(--ink); }
.mobile-cta svg { width: 18px; height: 18px; }

/* Enlace de vuelta en las páginas de comparación de variantes (noindex) */
.v2-back {
  text-align: center;
  padding: 1.5rem;
  font-size: .9rem;
  color: var(--ink-mute);
}

@media (max-width: 1023px) {
  body { padding-bottom: 62px; }
}

/* =============================================================
   15. Responsive
   ============================================================= */
@media (min-width: 540px) {
  .fact-grid { grid-template-columns: 1fr 1fr; }
  .hero-actions { flex-wrap: nowrap; }
}

@media (min-width: 720px) {
  .feature { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .historia { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .historia-media { order: 2; }
  .visit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-cta { grid-template-columns: 1.4fr minmax(0, 1fr); }
  .contact-cta .btn-row { justify-content: flex-end; }
  .footer-top { grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .site-header .container {
    gap: 1rem;
  }
  .brand-logo { height: 50px; }
  .nav-toggle { display: none; }
  .nav-main {
    position: static;
    max-height: none;
    overflow: visible;
    background: transparent;
    border-top: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .nav-main ul { flex-direction: row; flex-wrap: nowrap; gap: 2rem; padding: 0; }
  .nav-main a, .nav-soon {
    display: inline-flex;
    padding: 0;
    border-bottom: none;
    font-size: .95rem;
  }
  .nav-call { display: inline-flex; }
  .mobile-cta { display: none; }
  .pillars { grid-template-columns: 1fr 1fr; }
  .pillar:nth-child(odd) { border-right: 1px solid var(--line); padding-right: 2rem; }
  .pillar:nth-child(even) { padding-left: 2rem; }
}

@media (min-width: 1280px) {
  .hero-content { padding-block: clamp(3rem, 8vw, 6rem); }
}

/* =============================================================
   16.5 Productos y carrito
   ============================================================= */
.product-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
.product-card {
  display: flex;
  flex-direction: column;
  background: var(--cream);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.product-media {
  position: relative;
  aspect-ratio: 1;
  background: var(--paper);
}
.product-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-media--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 2px dashed rgba(var(--wine-rgb), 0.3);
  background: repeating-linear-gradient(135deg, var(--cream-deep), var(--cream-deep) 14px, var(--paper) 14px, var(--paper) 28px);
  color: var(--ink-mute);
  font-size: .85rem;
  font-weight: 600;
  padding: 1rem;
}
.product-body {
  padding: 1.1rem 1.25rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.product-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}
.product-price {
  font-weight: 600;
  color: var(--wine);
  font-size: 1.02rem;
}
.product-add { align-self: flex-start; }
.product-add.is-added { background: var(--green); color: var(--ink); }

@media (min-width: 540px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Botón de carrito en la cabecera */
.cart-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--cream);
  flex-shrink: 0;
}
.cart-toggle svg { width: 21px; height: 21px; }
.cart-count {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--wine);
  color: var(--cream);
  font-size: .68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Carrito lateral */
.cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 199;
  background: rgba(var(--ink-rgb), .45);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s var(--ease-out), visibility 0s linear .3s;
}
.cart-overlay.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity .3s var(--ease-out);
}
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  width: min(400px, 100vw);
  background: var(--cream);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .35s var(--ease-out);
}
.cart-drawer.is-open { transform: translateX(0); }
.cart-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--line);
}
.cart-drawer-head h2 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
}
.cart-close {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-mute);
}
.cart-close svg { width: 18px; height: 18px; }
.cart-empty {
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--ink-mute);
  font-size: .95rem;
}
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: .5rem 1.5rem;
}
.cart-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-weight: 600; font-size: .95rem; }
.cart-item-price { color: var(--ink-mute); font-size: .82rem; margin-top: .15rem; }
.cart-item-qty {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 600;
  font-size: .9rem;
}
.qty-btn {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  line-height: 1;
}
.cart-item-remove {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-mute);
  font-size: 1.1rem;
  flex-shrink: 0;
}
.cart-footer {
  padding: 1.25rem 1.5rem 1.5rem;
  border-top: 1px solid var(--line);
}
.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-weight: 600;
  font-size: 1.15rem;
  margin-bottom: 1rem;
}
.cart-checkout { width: 100%; justify-content: center; }
.cart-checkout:disabled { opacity: .55; cursor: not-allowed; }
.cart-checkout:disabled:hover { transform: none; }

html.cart-open, html.cart-open body { overflow: hidden; }
html.checkout-open, html.checkout-open body { overflow: hidden; }

.cart-view { flex: 1; display: flex; flex-direction: column; overflow-y: auto; }

/* =============================================================
   Pantalla completa de checkout — se abre al pulsar "Finalizar pedido"
   ============================================================= */
.checkout-screen {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--cream);
  overflow-y: auto;
}
.checkout-screen[hidden] { display: none; }
.checkout-screen-inner {
  position: relative;
  max-width: 960px;
  margin-inline: auto;
  padding: clamp(4rem, 8vw, 5rem) 1.5rem clamp(3rem, 6vw, 4rem);
}
.checkout-screen-close {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 2;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--cream);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}
.checkout-screen-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 860px) {
  .checkout-screen-body { grid-template-columns: 1fr 1.1fr; align-items: start; }
}
.checkout-screen-body[hidden] { display: none; }
.checkout-order h2, .checkout-form-panel h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
}

.checkout-order-list { display: flex; flex-direction: column; }
.checkout-order-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.checkout-order-item-media {
  width: 64px; height: 64px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--paper);
}
.checkout-order-item-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.checkout-order-item-media--placeholder {
  display: flex; align-items: center; justify-content: center;
  border: 1.5px dashed rgba(var(--wine-rgb), .3);
  background: repeating-linear-gradient(135deg, var(--cream-deep), var(--cream-deep) 6px, var(--paper) 6px, var(--paper) 12px);
}
.checkout-order-item-info { flex: 1; min-width: 0; }
.checkout-order-item-name { font-weight: 600; font-size: .98rem; }
.checkout-order-item-price { color: var(--ink-mute); font-size: .84rem; margin-top: .15rem; }
.checkout-order-item-qty {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 600;
  font-size: .9rem;
  flex-shrink: 0;
}
.checkout-order-item-remove {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-mute);
  flex-shrink: 0;
}
.checkout-order-item-remove svg { width: 16px; height: 16px; }
@media (hover: hover) and (pointer: fine) {
  .checkout-order-item-remove:hover { color: var(--wine); }
}
.checkout-order-empty {
  padding: 1.5rem 0;
  color: var(--ink-mute);
  font-size: .95rem;
}
.checkout-order-empty a { color: var(--wine); text-decoration: underline; }
.checkout-order-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px solid var(--ink);
  font-weight: 600;
  font-size: 1.2rem;
}
.checkout-order-total[hidden] { display: none; }

.checkout-form-panel { max-width: 460px; }

.checkout-confirm {
  max-width: 460px;
  margin-inline: auto;
  text-align: center;
  padding-block: clamp(3rem, 10vw, 5rem);
}
.checkout-confirm[hidden] { display: none; }

.form-field { margin-bottom: 1.1rem; }
.form-field label, .form-field legend {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  margin-bottom: .4rem;
}
.form-optional { font-weight: 500; color: var(--ink-mute); }
.form-field input[type="text"],
.form-field input[type="tel"],
.form-field input[type="email"],
.form-field textarea {
  width: 100%;
  padding: .7rem .85rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: .95rem;
  background: var(--cream);
  color: var(--ink);
}
.form-field textarea { resize: vertical; }
.form-field input:focus-visible, .form-field textarea:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 1px;
  border-color: var(--wine);
}
.form-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.checkout-address { margin-bottom: 1.1rem; }

fieldset.form-field { border: 0; padding: 0; margin-inline: 0; }
.radio-option {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 500;
  font-size: .92rem;
  padding-block: .45rem;
  cursor: pointer;
}
.radio-option input { accent-color: var(--wine); width: 17px; height: 17px; flex-shrink: 0; }

.checkout-error {
  margin-bottom: 1rem;
  padding: .7rem .9rem;
  border-radius: 10px;
  background: rgba(var(--wine-rgb), .08);
  color: var(--wine);
  font-size: .85rem;
  font-weight: 600;
}
.checkout-submit { width: 100%; justify-content: center; margin-top: .3rem; }
.checkout-note {
  margin-top: .9rem;
  font-size: .78rem;
  color: var(--ink-mute);
  text-align: center;
}

/* --- Confirmación --- */
.confirm-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--green);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}
.confirm-icon svg { width: 28px; height: 28px; }
.confirm-icon--ko { background: var(--wine); color: var(--cream); }
.checkout-confirm h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.6rem;
}
.confirm-order-num {
  margin-top: .6rem;
  font-weight: 600;
  color: var(--wine);
  font-size: 1rem;
}
.confirm-text {
  margin-top: .7rem;
  color: var(--ink-mute);
  font-size: .95rem;
  max-width: 32ch;
  margin-inline: auto;
}
.confirm-close { margin-top: 2rem; }

@media (prefers-reduced-motion: reduce) {
  .cart-overlay, .cart-drawer, .checkout-screen { transition: none; }
}

/* =============================================================
   16. Reduced motion — only intrusive effects
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .hero-content { animation: none; }
}

/* =============================================================
   17. Cookie banner
   ============================================================= */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 500;
  background: var(--ink);
  color: var(--cream);
  padding: 1rem 1.5rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, .18);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner-inner {
  max-width: 1180px;
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.cookie-banner-inner p {
  margin: 0;
  font-size: .9rem;
  color: rgba(var(--cream-rgb), .85);
  flex: 1 1 320px;
}
.cookie-banner-inner a { color: var(--cream); }
.cookie-banner-actions {
  display: flex;
  gap: .7rem;
  flex-shrink: 0;
}
.cookie-banner-actions button {
  padding: .6rem 1.2rem;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(var(--cream-rgb), .4);
}
.cookie-banner-actions button:active { transform: scale(.96); }
#cookieReject { background: transparent; color: var(--cream); }
#cookieAccept { background: var(--green); color: var(--ink); border-color: var(--green); }
@media (hover: hover) and (pointer: fine) {
  #cookieReject:hover { background: rgba(var(--cream-rgb), .12); }
  #cookieAccept:hover { filter: brightness(1.05); }
}
