/* ════════════════════════════════════════════════
   FAMILIA LLINARES — Enhancements 2026
   Lenis · Reveals · Cursor · Bento · Fraunces · Buttons
   ════════════════════════════════════════════════ */

/* Tipografía display */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,wght@0,400;0,600;0,700;1,400;1,600&display=swap');

:root {
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
}

/* Aplicar Fraunces a títulos clave */
.hero-title,
.hero-title em,
.section-header h2,
.section-header .section-title,
h1.display,
.timeline-year,
.historia-title {
  font-family: var(--font-display);
  font-feature-settings: 'ss01', 'ss02';
  letter-spacing: -0.01em;
}

/* ──────────── Lenis smooth-scroll ──────────── */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* ──────────── Reveal on scroll ──────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .9s cubic-bezier(.16,1,.3,1), transform .9s cubic-bezier(.16,1,.3,1);
  will-change: opacity, transform;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal-delay="1"].is-visible { transition-delay: .08s; }
[data-reveal-delay="2"].is-visible { transition-delay: .16s; }
[data-reveal-delay="3"].is-visible { transition-delay: .24s; }
[data-reveal-delay="4"].is-visible { transition-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ──────────── Cursor personalizado ──────────── */
@media (hover: hover) and (pointer: fine) {
  .fl-cursor {
    position: fixed;
    top: 0; left: 0;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: rgba(196, 163, 90, .85);
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    transition: width .25s cubic-bezier(.16,1,.3,1),
                height .25s cubic-bezier(.16,1,.3,1),
                background .25s ease,
                border .25s ease;
    mix-blend-mode: normal;
  }
  .fl-cursor.is-hover {
    width: 56px; height: 56px;
    background: rgba(196, 163, 90, .15);
    border: 1.5px solid rgba(196, 163, 90, .9);
  }
  .fl-cursor.is-hover::after {
    content: 'Ver';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #3E2723;
  }
  .fl-cursor.is-click { transform: translate(-50%, -50%) scale(.8); }
  body.has-fl-cursor a, body.has-fl-cursor button { cursor: none; }
  body.has-fl-cursor { cursor: none; }
}
@media (prefers-reduced-motion: reduce) {
  .fl-cursor { display: none !important; }
}

/* ──────────── Botones con relleno dorado ──────────── */
.btn-primary,
.cta-primary,
a.btn,
button.btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: color .4s ease;
}
.btn-primary::before,
.cta-primary::before,
a.btn::before,
button.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #C4A35A, #d4b87a);
  transform: translateX(-101%);
  transition: transform .5s cubic-bezier(.65,0,.35,1);
  z-index: -1;
}
.btn-primary:hover::before,
.cta-primary:hover::before,
a.btn:hover::before,
button.btn:hover::before {
  transform: translateX(0);
}
.btn-primary:hover,
.cta-primary:hover,
a.btn:hover,
button.btn:hover {
  color: #3E2723 !important;
}

/* ──────────── Hero title letter-by-letter ──────────── */
.fl-split-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(80%) rotate(6deg);
  transition: opacity .9s cubic-bezier(.16,1,.3,1),
              transform .9s cubic-bezier(.16,1,.3,1);
  will-change: opacity, transform;
}
.fl-split-char.is-in {
  opacity: 1;
  transform: translateY(0) rotate(0);
}

/* ──────────── Galería bento de productos ──────────── */
.products-grid.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(220px, auto);
  gap: 18px;
}
.products-grid.bento .product-card:nth-child(1) {
  grid-column: span 2;
  grid-row: span 2;
}
.products-grid.bento .product-card:nth-child(4) {
  grid-column: span 2;
}
.products-grid.bento .product-card:nth-child(7) {
  grid-column: span 2;
}
@media (max-width: 900px) {
  .products-grid.bento {
    grid-template-columns: repeat(2, 1fr);
  }
  .products-grid.bento .product-card:nth-child(1) {
    grid-column: span 2;
    grid-row: span 1;
  }
  .products-grid.bento .product-card:nth-child(4),
  .products-grid.bento .product-card:nth-child(7) {
    grid-column: span 2;
  }
}

/* ──────────── Pinned obrador section ──────────── */
.fl-pinned-obrador {
  position: relative;
  background: #1f1410;
  color: #FAF7F2;
  padding: 0;
  overflow: hidden;
}
.fl-pinned-obrador .pin-wrap {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.fl-pinned-obrador .pin-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, #3E2723 0%, #1f1410 70%);
  opacity: .9;
}
.fl-pinned-obrador .pin-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  text-align: center;
  padding: 0 24px;
}
.fl-pinned-obrador .pin-eyebrow {
  font-size: 12px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: #C4A35A;
  margin-bottom: 24px;
}
.fl-pinned-obrador .pin-step {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .6s ease;
  padding: 0 24px;
}
.fl-pinned-obrador .pin-step.is-active { opacity: 1; }
.fl-pinned-obrador .pin-step .num {
  font-family: var(--font-display);
  font-size: clamp(80px, 14vw, 200px);
  line-height: 1;
  color: rgba(196,163,90,.18);
  font-weight: 700;
}
.fl-pinned-obrador .pin-step h3 {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 56px);
  margin: 12px 0 16px;
  color: #FAF7F2;
}
.fl-pinned-obrador .pin-step p {
  font-size: 18px;
  max-width: 520px;
  margin: 0 auto;
  opacity: .85;
  line-height: 1.6;
}
.fl-pinned-obrador .pin-progress {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}
.fl-pinned-obrador .pin-dot {
  width: 32px; height: 3px;
  background: rgba(255,255,255,.2);
  transition: background .4s ease;
}
.fl-pinned-obrador .pin-dot.is-active { background: #C4A35A; }
