/* ════════════════════════════════════════════
   TIENDA VELA — ropa y accesorios
   Canvas: marfil cálido · Acento: terracota
   Type: Cormorant Garamond (display) · Manrope (body)
   ════════════════════════════════════════════ */
:root {
  --bg: #f6f1ea;
  --raise: #ede6dc;
  --line: rgba(30, 27, 24, 0.10);
  --text: #1e1b18;
  --muted: #7c7268;
  --accent: #b85c38;
  --accent-hover: #a04f2f;
  --ivory: #f6f1ea;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --container: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius: 4px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--accent); color: var(--ivory); }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

.label {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--accent);
}
.display {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(3.2rem, 8vw, 6.4rem); line-height: 0.98; letter-spacing: -0.015em;
}
.display em, .title em { font-style: italic; font-weight: 400; color: var(--accent); }
.title {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(2.2rem, 4.8vw, 3.6rem); line-height: 1.05; letter-spacing: -0.01em;
}
.lead { color: var(--muted); font-size: clamp(1.05rem, 1.5vw, 1.2rem); max-width: 30em; line-height: 1.6; }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.2, 0.6, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ══════════ NAV ══════════ */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 100; transition: background 0.3s, border-color 0.3s; border-bottom: 1px solid transparent; }
.nav::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(246, 241, 234, 0.86); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); opacity: 0; transition: opacity 0.3s; }
.nav.scrolled::before { opacity: 1; }
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter);
  height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 32px;
}
.logo {
  font-family: var(--font-display); font-weight: 600; font-size: 1.45rem;
  text-decoration: none; letter-spacing: 0.005em; line-height: 1;
}
.logo em { font-style: italic; font-weight: 500; color: var(--accent); }
.nav-links { display: flex; gap: 34px; }
.nav-links a {
  text-decoration: none; font-size: 0.88rem; font-weight: 500; color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  text-decoration: none; font-size: 0.84rem; font-weight: 600;
  color: var(--ivory); background: var(--accent);
  padding: 11px 22px; border-radius: 999px; transition: background 0.2s; white-space: nowrap;
}
.nav-cta:hover { background: var(--accent-hover); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 40px; height: 40px; z-index: 102; }
.nav-toggle span { display: block; width: 22px; height: 1.5px; background: var(--text); margin: 5px auto; transition: transform 0.3s, opacity 0.3s; }
.nav.open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; inset: 0; background: var(--bg);
    flex-direction: column; align-items: center; justify-content: center; gap: 6vh;
    transform: translateY(-100%); transition: transform 0.4s cubic-bezier(0.7, 0, 0.2, 1); z-index: 101;
  }
  .nav.open .nav-links { transform: none; }
  .nav-links a { font-size: 2rem; font-family: var(--font-display); font-weight: 500; color: var(--text); }
  .nav-cta { display: none; }
}

/* ══════════ BOTONES ══════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  text-decoration: none; font-weight: 600; font-size: 0.92rem;
  color: var(--ivory); background: var(--accent); border: 0; cursor: pointer;
  padding: 16px 34px; border-radius: 999px;
  transition: background 0.2s; will-change: transform;
}
.btn:hover { background: var(--accent-hover); }
.btn--big { padding: 19px 42px; font-size: 1rem; }
.link-arrow { color: var(--text); text-decoration: none; font-weight: 500; font-size: 0.95rem; border-bottom: 1px solid var(--line); padding-bottom: 3px; transition: border-color 0.2s; }
.link-arrow:hover { border-color: var(--accent); }

/* ══════════ HERO ══════════ */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: 120px 0 60px; overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 6vw, 96px); align-items: center; width: 100%;
}
.hero-copy .label { display: block; margin-bottom: 26px; }
.hero-copy .lead { margin-top: 30px; }
.hero-actions { margin-top: 42px; display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.hero-figure { position: relative; justify-self: end; width: min(100%, 460px); margin-top: 6vh; }
.hero-img { aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius); }
.hero-img img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 30%;
  filter: saturate(1.04) sepia(0.06);
}
.hero-caption {
  display: flex; justify-content: space-between; gap: 16px;
  margin-top: 14px; font-size: 0.78rem; color: var(--muted); letter-spacing: 0.02em;
}
.hero-caption span:last-child { font-family: var(--font-display); font-style: italic; font-size: 1rem; color: var(--text); }
@media (max-width: 900px) {
  .hero { min-height: 0; padding: 130px 0 70px; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-figure { justify-self: start; width: min(100%, 420px); margin-top: 0; }
}
@media (max-width: 560px) {
  .hero-figure { width: 100%; }
}

/* ══════════ SECCIONES ══════════ */
.section { padding: 120px 0; }
.section--raise { background: var(--raise); }
.section-head { margin-bottom: 64px; display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.section-head .label { display: block; margin-bottom: 16px; }
.section-note { color: var(--muted); font-size: 0.86rem; letter-spacing: 0.02em; max-width: 22em; padding-bottom: 0.4em; }
@media (max-width: 760px) { .section { padding: 90px 0; } .section-head { margin-bottom: 44px; } }

/* ══════════ COLECCIÓN ══════════ */
.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(24px, 3vw, 40px) clamp(20px, 2.4vw, 32px); }
@media (max-width: 900px) { .products { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .products { grid-template-columns: 1fr; gap: 48px; } }
.product { display: flex; flex-direction: column; }
.product-img {
  aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius); margin-bottom: 18px; background: var(--raise);
}
.product-img img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(1.04) sepia(0.05);
  transition: transform 0.7s cubic-bezier(0.2, 0.6, 0.2, 1), clip-path 0.95s cubic-bezier(0.65, 0, 0.35, 1);
}
.product:hover .product-img img { transform: scale(1.045); }
.product-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.product h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.4rem; line-height: 1.15; letter-spacing: -0.005em; }
.product-price { font-family: var(--font-display); font-style: italic; font-weight: 500; color: var(--accent); font-size: 1.2rem; flex-shrink: 0; }
.product p { color: var(--muted); font-size: 0.88rem; margin-top: 6px; line-height: 1.55; }
.product-foot { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.add {
  background: var(--accent); color: var(--ivory); border: 0; cursor: pointer;
  font-weight: 600; font-size: 0.8rem; letter-spacing: 0.01em;
  padding: 10px 20px; border-radius: 999px; min-width: 7.2em;
  transition: background 0.2s, color 0.2s;
}
.add:hover { background: var(--accent-hover); }
.add.added { background: var(--text); }
.product-qty { font-size: 0.78rem; color: var(--muted); letter-spacing: 0.02em; }
.product-qty:empty { display: none; }
.collection-note { margin-top: 64px; text-align: center; color: var(--muted); font-size: 0.86rem; letter-spacing: 0.02em; }

/* ══════════ CARRITO → WHATSAPP ══════════ */
.cart-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  padding: 0 var(--gutter) 22px; pointer-events: none;
  transform: translateY(120%); transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.cart-bar.show { transform: none; pointer-events: auto; }
.cart-inner {
  max-width: var(--container); margin: 0 auto;
  background: var(--text); color: var(--ivory);
  border-radius: 999px; padding: 12px 12px 12px 30px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  box-shadow: 0 18px 50px -20px rgba(30, 27, 24, 0.45);
}
.cart-summary { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.cart-count { font-family: var(--font-display); font-size: 1.35rem; font-weight: 500; letter-spacing: -0.005em; white-space: nowrap; }
.cart-count em { font-style: italic; color: rgba(246, 241, 234, 0.62); }
.cart-clear {
  background: none; border: 0; cursor: pointer; color: rgba(246, 241, 234, 0.6);
  font-size: 0.8rem; font-weight: 500; text-decoration: none;
  border-bottom: 1px solid rgba(246, 241, 234, 0.25); padding: 0 0 1px; transition: color 0.2s, border-color 0.2s;
}
.cart-clear:hover { color: var(--ivory); border-color: var(--ivory); }
.cart-inner .btn { padding: 14px 28px; font-size: 0.88rem; }
@media (max-width: 760px) {
  .cart-bar { padding: 0; }
  .cart-inner { border-radius: 0; padding: 14px var(--gutter); box-shadow: 0 -10px 40px -20px rgba(30, 27, 24, 0.5); }
  .cart-count { font-size: 1.15rem; }
  .cart-inner .btn { padding: 12px 20px; font-size: 0.82rem; }
}
@media (max-width: 420px) {
  .cart-summary { flex-direction: column; gap: 4px; }
}
body.has-cart { padding-bottom: 96px; }

/* ══════════ CÓMO COMPRAR ══════════ */
.band { aspect-ratio: 21 / 9; overflow: hidden; border-radius: var(--radius); margin-bottom: 80px; }
.band img { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; filter: saturate(1.04) sepia(0.05); }
@media (max-width: 760px) { .band { aspect-ratio: 4 / 3; margin-bottom: 56px; } }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 56px); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 36px; } }
.step { border-top: 1px solid var(--line); padding-top: 26px; }
.step-num { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 2.6rem; line-height: 1; color: var(--accent); display: block; margin-bottom: 20px; }
.step h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.6rem; line-height: 1.15; margin-bottom: 12px; }
.step p { color: var(--muted); font-size: 0.93rem; max-width: 26em; }
.step p strong { color: var(--text); font-weight: 500; }

/* ══════════ NOSOTRAS ══════════ */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 7vw, 120px); align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 48px; } }
.split-img { aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius); }
@media (max-width: 900px) { .split-img { aspect-ratio: 16 / 11; } }
.split-img img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.03) sepia(0.06); }
.split-text .label { display: block; margin-bottom: 18px; }
.split-text .title { margin-bottom: 26px; }
.split-text p { color: var(--muted); margin-bottom: 18px; max-width: 32em; font-size: 1.02rem; }
.facts { margin-top: 38px; border-top: 1px solid var(--line); max-width: 32em; }
.facts-row {
  display: flex; justify-content: space-between; gap: 20px;
  padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 0.93rem;
}
.facts-row span:first-child { color: var(--muted); }
.facts-row span:last-child { font-family: var(--font-display); font-style: italic; font-size: 1.1rem; }

/* ══════════ CTA FINAL ══════════ */
.closing { padding: 40px 0 130px; text-align: center; }
.closing .title { margin-bottom: 34px; }
.closing .foot-note { margin-top: 18px; color: var(--muted); font-size: 0.82rem; }

/* ══════════ FOOTER ══════════ */
.footer { border-top: 1px solid var(--line); padding: 44px 0 40px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.foot-label { color: var(--muted); font-size: 0.82rem; text-decoration: none; }
.foot-credit { border-bottom: 1px solid var(--line); padding-bottom: 2px; transition: color 0.2s, border-color 0.2s; }
.foot-credit:hover { color: var(--text); border-color: var(--accent); }
.foot-credits-photo { font-size: 0.7rem; opacity: 0.6; max-width: 70em; line-height: 1.6; }

/* ══════════ MOTION ══════════ */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.wi {
  display: inline-block; transform: translateY(115%); will-change: transform;
  transition: transform 0.85s cubic-bezier(0.65, 0, 0.35, 1);
  transition-delay: var(--wd, 0ms);
}
.words-in .wi { transform: none; }

/* El clip-path va en los hijos: si recorta al elemento observado, IntersectionObserver lo ve con área 0 y nunca lo revela */
.ir > * { clip-path: inset(100% 0 0 0); transition: clip-path 0.95s cubic-bezier(0.65, 0, 0.35, 1); }
.ir.in > * { clip-path: inset(0 0 0 0); }

/* Hero: la imagen asienta lentamente al cargar */
.hero-img img { transform: scale(1.06); transition: transform 1.8s cubic-bezier(0.2, 0.6, 0.2, 1), clip-path 0.95s cubic-bezier(0.65, 0, 0.35, 1); }
.hero-loaded .hero-img img { transform: scale(1); }

@media (prefers-reduced-motion: reduce) {
  .w, .wi { transform: none !important; transition: none !important; }
  .ir > * { clip-path: none !important; transition: none !important; }
  .hero-img img { transform: none !important; transition: none !important; }
  .cart-bar { transition: none; }
  .product-img img { transition: none, clip-path 0.95s cubic-bezier(0.65, 0, 0.35, 1); }
}
