/* ============================================================
   FINCA ANDURIÑAS — style-upgrade.css  v1
   OS Quiet Luxury · carga DESPUÉS de style.css
   Dorado #c08830 · Tierra · Camino de Santiago
   ============================================================ */

/* ── ROOT — UPGRADES ─────────────────────────────────────────── */
:root {
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --space-section: clamp(6.5rem, 13vh, 10rem);
}

/* ── TIPOGRAFÍA — ANTIALIASING + PESO ───────────────────────── */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 300;
  line-height: 1.82;
}

/* ── GRAIN TEXTURE ───────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.065;
  pointer-events: none;
  z-index: 99990;
  mix-blend-mode: overlay;
}

/* ── SECTION SPACING ─────────────────────────────────────────── */
.section {
  padding: var(--space-section) 2.5rem;
}
@media (max-width: 768px) {
  .section {
    padding: clamp(4.5rem, 10vh, 6.5rem) 1.5rem;
  }
}

/* ── SCROLL REVEALS — PREMIUM ────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity 0.95s var(--ease),
    transform 0.95s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-32px);
  transition:
    opacity 0.95s var(--ease),
    transform 0.95s var(--ease);
}
.reveal-right {
  opacity: 0;
  transform: translateX(32px);
  transition:
    opacity 0.95s var(--ease),
    transform 0.95s var(--ease);
}
.reveal-left.visible,
.reveal-right.visible {
  opacity: 1;
  transform: translate(0);
}
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.22s; }
.reveal-d3 { transition-delay: 0.36s; }

/* ── HEADER — SCROLLED STATE ─────────────────────────────────── */
.header {
  transition:
    background 0.45s var(--ease),
    box-shadow 0.45s var(--ease),
    border-color 0.45s var(--ease),
    backdrop-filter 0.45s;
}
.header.scrolled {
  background: rgba(9, 7, 5, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 1px 0 rgba(192, 136, 48, 0.12);
}

/* ── SCROLL PROGRESS BAR ─────────────────────────────────────── */
#scrollProgress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), rgba(192, 136, 48, 0.55));
  z-index: 99998;
  pointer-events: none;
  transition: width 0.08s linear;
}

/* ── CUSTOM CURSOR ───────────────────────────────────────────── */

/* cursor:none — el JS inyecta esto también vía <style>, doble seguro */
@media (hover: hover) and (pointer: fine) {
  * { cursor: none !important; }
}

/* ── CARDS — transición base + hover lift CSS (el tilt rotación lo gestiona JS) ── */
/* ── TODAS LAS CARDS — transición base unificada ── */
.offer-card, .product-card, .apoya-card,
.value-card, .ruta-card, .tip-card, .act-card, .method-card,
.gastro-item, .review-card {
  transition:
    transform 0.55s cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow 0.55s cubic-bezier(0.23, 1, 0.32, 1),
    background 0.35s var(--ease),
    border-color 0.35s var(--ease);
}

@media (hover: hover) {
  .offer-card:hover, .product-card:hover, .apoya-card:hover,
  .value-card:hover, .ruta-card:hover, .tip-card:hover,
  .act-card:hover, .method-card:hover, .gastro-item:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 28px 55px -10px rgba(0,0,0,0.45), inset 0 0 0 1px rgba(192,136,48,0.35);
    z-index: 2;
  }
  .review-card:hover {
    transform: translateY(-10px) scale(1.015);
    box-shadow: 0 20px 44px -8px rgba(0,0,0,0.35), inset 0 0 0 1px rgba(192,136,48,0.35);
    border-color: rgba(192, 136, 48, 0.3);
    z-index: 2;
  }
}

/* ── BOTONES — LIFT SUAVE ────────────────────────────────────── */
.btn-primary,
.btn-secondary,
.btn-outline {
  transition:
    background 0.32s var(--ease),
    color 0.32s var(--ease),
    border-color 0.32s var(--ease),
    transform 0.22s var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover,
  .btn-secondary:hover {
    transform: translateY(-2px);
  }
}

/* Ticker — sin pausa en hover para evitar efecto de aceleración */

/* ── REVIEWS MARQUEE — VELOCIDAD + HOVER PAUSE ───────────────── */
.marquee-track {
  animation-duration: 110s !important;
}
@media (hover: hover) and (pointer: fine) {
  .reviews-wrap:hover .marquee-track {
    animation-play-state: paused !important;
  }
}

/* Ocultar texto "pausa" — obsoleto */
.reviews-pause-hint {
  display: none !important;
}

/* ── MOBILE NAV — STAGGER ────────────────────────────────────── */
.mobile-nav {
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.mobile-nav li {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.4s var(--ease),
    transform 0.4s var(--ease);
}
.mobile-nav.open li {
  opacity: 1;
  transform: translateY(0);
}
.mobile-nav.open li:nth-child(1) { transition-delay: 0.05s; }
.mobile-nav.open li:nth-child(2) { transition-delay: 0.10s; }
.mobile-nav.open li:nth-child(3) { transition-delay: 0.16s; }
.mobile-nav.open li:nth-child(4) { transition-delay: 0.22s; }
.mobile-nav.open li:nth-child(5) { transition-delay: 0.28s; }
.mobile-nav:not(.open) li {
  transition-delay: 0s !important;
}

/* ── GALLERY — ZOOM ORGÁNICO (contenido, sin overflow) ──────── */
.gallery-item {
  /* overflow:hidden ya en style.css — garantiza que el zoom no escape */
  border-color: transparent;
  transition: border-color 0.35s var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .gallery-item:hover {
    border-color: rgba(192, 136, 48, 0.22) !important;
  }
  .gallery-item:hover img {
    transform: scale(1.07);
    transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  }
}

/* ── LIGHTBOX — PREMIUM ──────────────────────────────────────── */
@keyframes lbImgIn {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
/* Apertura más suave y lujosa */
.fa-lb {
  transition:
    opacity 0.38s cubic-bezier(0.23, 1, 0.32, 1),
    backdrop-filter 0.38s !important;
}
.fa-lb.open {
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
}
/* La imagen entra con scale-in al abrir el lightbox */
.fa-lb.open .fa-lb-img-wrap img {
  animation: lbImgIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}
/* Imagen siempre contenida en el viewport */
.fa-lb-img-wrap img {
  max-width: min(92vw, 1200px) !important;
  max-height: 88vh !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}
/* Botón cerrar premium */
.fa-lb-close {
  transition:
    border-color 0.25s var(--ease),
    color 0.25s var(--ease),
    transform 0.25s var(--ease) !important;
}
@media (hover: hover) and (pointer: fine) {
  .fa-lb-close:hover {
    transform: rotate(90deg) scale(1.1) !important;
  }
}

/* ── HERO BG PARALLAX — OVERFLOW ────────────────────────────── */
.hero {
  overflow: hidden;
}
.hero-bg {
  will-change: transform;
}

/* ── WA FLOAT — PULSE PREMIUM ────────────────────────────────── */
@keyframes waPremiumAndurina {
  0%   { box-shadow: 0 4px 20px rgba(37,211,102,.2), 0 0 0 0   rgba(37,211,102,0);    }
  35%  { box-shadow: 0 4px 20px rgba(37,211,102,.2), 0 0 0 10px rgba(37,211,102,.16); }
  70%  { box-shadow: 0 4px 20px rgba(37,211,102,.2), 0 0 0 22px rgba(37,211,102,.05); }
  100% { box-shadow: 0 4px 20px rgba(37,211,102,.2), 0 0 0 28px rgba(37,211,102,0);   }
}
.wa-float {
  animation: waPremiumAndurina 3.5s cubic-bezier(0.23, 1, 0.32, 1) infinite !important;
}
@media (hover: hover) and (pointer: fine) {
  .wa-float:hover {
    animation-play-state: paused !important;
    transform: scale(1.1) translateY(-3px) !important;
  }
}

/* ── MAGNETIC BUTTONS ────────────────────────────────────────── */
.btn-magnetic {
  will-change: transform;
}

/* ── FOTO PILAR — HOVER ZOOM ─────────────────────────────────── */
@media (hover: hover) and (pointer: fine) {
  .pilar-img:hover img {
    transform: scale(1.04);
    transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  }
}
.pilar-img img {
  transition: transform 0.7s var(--ease);
}

/* ── NAV LINKS — HOVER REFINADO ──────────────────────────────── */
.nav-links a {
  transition: color 0.28s var(--ease);
}
.nav-links a::after {
  transition: width 0.42s var(--ease);
}

/* ── FOOTER LINKS ────────────────────────────────────────────── */
.footer-col a {
  transition: color 0.25s var(--ease), letter-spacing 0.35s var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .footer-col a:hover {
    letter-spacing: 0.01em;
  }
}

/* ── SECTION TAG LINE ────────────────────────────────────────── */
.section-tag {
  position: relative;
}

/* ── TICKER INVERSO ──────────────────────────────────────────── */
@keyframes tickerReverseAnd {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}
.ticker-reverse {
  background: #0c0a07;
  border-top: 1px solid rgba(192, 136, 48, 0.1);
  border-bottom: 1px solid rgba(192, 136, 48, 0.1);
  overflow: hidden;
}
.ticker-track-reverse {
  display: flex;
  width: max-content;
  animation: tickerReverseAnd 40s linear infinite;
  will-change: transform;
}
.ticker-reverse .ticker-item {
  color: rgba(192, 136, 48, 0.52);
  letter-spacing: 0.14em;
  font-size: 0.68rem;
  padding: 0 2.2rem;
  white-space: nowrap;
}
/* Ticker inverso — sin pausa en hover */

/* ── HERO H1 — BLUR REVEAL ───────────────────────────────────── */
@keyframes heroBlurReveal {
  from {
    opacity: 0;
    filter: blur(14px);
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}
@keyframes heroFade {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Cascada de entrada hero — quirúrgica */
.hero-finca   { animation: heroFade 0.9s cubic-bezier(0.23,1,0.3,1) 0.10s both; }
.hero-eyebrow { animation: heroFade 0.9s cubic-bezier(0.23,1,0.3,1) 0.28s both; }
.hero h1      { animation: heroBlurReveal 1.2s cubic-bezier(0.23,1,0.3,1) 0.48s both; }
.hero-rule    { animation: heroFade 0.8s cubic-bezier(0.23,1,0.3,1) 0.72s both; }
.hero-sub     { animation: heroFade 0.9s cubic-bezier(0.23,1,0.3,1) 0.88s both; }
.hero-km      { animation: heroFade 0.9s cubic-bezier(0.23,1,0.3,1) 1.02s both; }

/* ── SECTION TAG — LÍNEA DORADA ANIMADA ──────────────────────── */
.section-tag {
  position: relative;
}
.section-tag::before {
  content: '';
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 1px;
  background: var(--accent, #c08830);
  transition: width 0.65s var(--ease) 0.18s;
}
.reveal.visible .section-tag::before,
.reveal-left.visible .section-tag::before,
.reveal-right.visible .section-tag::before {
  width: 28px;
}

/* ── LINEN NOISE — SEGUNDA CAPA ──────────────────────────────── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='l'%3E%3CfeTurbulence type='turbulence' baseFrequency='0.45' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23l)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.048;
  pointer-events: none;
  z-index: 99989;
  mix-blend-mode: soft-light;
}

/* ── INTRO ANIMATION ─────────────────────────────────────────── */
#andurinas-intro {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  background: #090705;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: all;
  transition: opacity 0.55s cubic-bezier(0.23, 1, 0.32, 1);
}
#andurinas-intro.fade-out {
  opacity: 0;
  pointer-events: none;
}
#andurinas-intro .intro-seal {
  width: clamp(90px, 13vw, 130px);
  opacity: 0;
  transform: scale(0.85);
  mix-blend-mode: screen;
  animation: introSeal 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}
@keyframes introSeal {
  to { opacity: 0.55; transform: scale(1); }
}
#andurinas-intro .intro-name {
  font-family: var(--font-d, 'Cinzel Decorative', serif);
  font-size: clamp(0.8rem, 2.5vw, 1.2rem);
  letter-spacing: 0.38em;
  color: #c08830;
  text-transform: uppercase;
  opacity: 0;
  margin-top: 1.8rem;
  animation: introName 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.85s both;
}
@keyframes introName {
  from { opacity: 0; filter: blur(10px); letter-spacing: 0.55em; }
  to   { opacity: 1; filter: blur(0);    letter-spacing: 0.38em; }
}
#andurinas-intro .intro-line {
  height: 1px;
  width: 0;
  background: linear-gradient(90deg, transparent, rgba(192,136,48,0.8), transparent);
  margin-top: 1.1rem;
  animation: introLine 0.6s cubic-bezier(0.23, 1, 0.32, 1) 1.35s both;
}
@keyframes introLine {
  to { width: 64px; }
}

/* ── PREFERS REDUCED MOTION ──────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-left,
  .reveal-right {
    opacity: 1 !important;
    transition: none !important;
    transform: none; /* sin !important — los hover de cards pueden sobreescribirlo */
  }
  body::before,
  body::after {
    display: none;
  }
  .wa-float {
    animation: none !important;
  }
  .hero-finca,
  .hero-eyebrow,
  .hero h1,
  .hero-rule,
  .hero-sub,
  .hero-km {
    animation: none !important;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
  }
  #andurinas-intro {
    display: none !important;
  }
}

/* ══════════════════════════════════════════════════════════════
   LUXURY LAYER v4 — Fill slide · Tilt 3D · Accent line
   Selection · Focus · Logo · Footer · Scrollbar · Nav center
   ══════════════════════════════════════════════════════════════ */

/* ── SELECTION ───────────────────────────────────────────────── */
::selection {
  background: rgba(192, 136, 48, 0.22);
  color: var(--text);
  text-shadow: none;
}
::-moz-selection {
  background: rgba(192, 136, 48, 0.22);
  color: var(--text);
}

/* ── FOCUS-VISIBLE ───────────────────────────────────────────── */
:focus-visible {
  outline: 1px solid rgba(192, 136, 48, 0.55);
  outline-offset: 3px;
}

/* ── SCROLLBAR ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, var(--accent-2), var(--accent));
  border-radius: 2px;
}

/* ── LOGO HOVER ──────────────────────────────────────────────── */
.logo, .header-logo {
  transition: opacity 0.35s var(--ease);
}
.logo:hover, .header-logo:hover {
  opacity: 0.68;
}

/* ── NAV LINKS — underline desde el centro ───────────────────── */
.nav-links a {
  position: relative;
  padding-bottom: 3px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 1px;
  background: var(--accent);
  transform: translateX(-50%);
  transition: width 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* ── FOOTER LINKS — opacity hover ────────────────────────────── */
.footer-col a {
  opacity: 0.55;
  transition: opacity 0.3s var(--ease), color 0.3s var(--ease), letter-spacing 0.35s var(--ease) !important;
}
.footer-col a:hover {
  opacity: 1;
  color: var(--accent);
  letter-spacing: 0.015em;
}

/* ── BOTONES — FILL SLIDE desde la izquierda ─────────────────── */
.btn-primary,
.btn-secondary,
.btn-outline {
  position: relative !important;
  overflow: hidden !important;
  z-index: 1;
}
.btn-primary::after,
.btn-secondary::after,
.btn-outline::after {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: var(--accent) !important;
  transform: translateX(-101%) !important;
  transition: transform 0.38s cubic-bezier(0.23, 1, 0.32, 1) !important;
  z-index: -1 !important;
}
.btn-primary:hover::after,
.btn-secondary:hover::after {
  transform: translateX(0) !important;
}
.btn-primary:hover,
.btn-secondary:hover {
  color: #090705 !important;
}
.btn-outline::after {
  background: rgba(192, 136, 48, 0.12) !important;
}
.btn-outline:hover::after {
  transform: translateX(0) !important;
}
.btn-outline:hover {
  border-color: var(--accent) !important;
}
.btn-primary:active,
.btn-secondary:active,
.btn-outline:active {
  transform: translateY(1px) scale(0.99) !important;
  transition-duration: 0.08s !important;
}

/* ── CARDS — position base ───────────────────────────────────── */
.offer-card, .product-card, .apoya-card,
.value-card, .ruta-card, .tip-card, .act-card, .method-card,
.gastro-item, .review-card {
  position: relative;
}


/* ── TEXTURA — más presencia ──────────────────────────────────── */
/* Override del grain base — más visible */

/* ── MOBILE ───────────────────────────────────────────────────── */
@media (hover: none) {
  .offer-card:active,
  .product-card:active,
  .apoya-card:active {
    --cl: -4px;
    transition: transform 0.15s ease;
  }
}
