/* Ozortiz Marroquinería — Demo C: Lookbook horizontal
   Light-first, artesanal premium. Tokens según DESIGN.md (color-lock). */

@font-face {
  font-family: 'Fraunces';
  src: url('../fonts/fraunces-latin.woff2') format('woff2');
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/space-grotesk-latin.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #F7F2EA;
  --bg-2: #EFE6D8;
  --bg-3: #E7DCCB;
  --card: #FFFFFF;
  --ink: #2A1A0E;
  --ink-soft: #6E5C48;
  --ink-dim: #A99A87;
  --accent: #A8703F;
  --accent-deep: #8B5A2B;
  --gold: #C9A227;
  --border: rgba(42,26,14,0.14);
  --border-strong: rgba(42,26,14,0.28);
  --ok: #3F7D54;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'Space Grotesk', system-ui, sans-serif;
  --shadow-card: 0 1px 0 rgba(255,255,255,0.5), 0 24px 60px rgba(42,26,14,0.14);
  --ease: cubic-bezier(0.83, 0, 0.17, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: auto; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

/* Navegación */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 4vw, 48px);
  background: linear-gradient(to bottom, rgba(247,242,234,0.92), rgba(247,242,234,0));
  backdrop-filter: blur(6px);
}
.nav-brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
}
.nav-links { display: flex; gap: clamp(16px, 3vw, 36px); font-size: 0.9rem; }
.nav-links a { color: var(--ink-soft); transition: color .25s var(--ease); }
.nav-links a:hover { color: var(--accent-deep); }
.nav-cart {
  position: relative;
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--card);
  cursor: pointer;
  color: var(--ink);
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.nav-cart:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.cart-count {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: var(--accent-deep); color: #fff;
  font-size: 0.65rem; font-family: var(--font-mono);
  padding: 0 4px;
}

/* Track horizontal */
.track {
  display: flex;
  height: 100vh;
  width: 100%;
}

.panel {
  flex: 0 0 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Portada */
.panel-cover { background: var(--bg); }
.cover-inner {
  padding: 0 clamp(24px, 6vw, 96px);
  max-width: 760px;
  text-align: left;
}
.cover-title {
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 10vw, 8rem);
  font-weight: 650;
  line-height: 0.96;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 18px 0 22px;
  display: block;
}
.title-line { display: block; }
.title-line-sub { font-weight: 380; color: var(--accent-deep); }
.cover-tag {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.4vw, 1.7rem);
  font-weight: 380;
  color: var(--ink-soft);
  margin-bottom: 36px;
}
.cover-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.cover-hint {
  position: absolute;
  right: clamp(24px, 5vw, 72px);
  bottom: 44px;
  display: flex; flex-direction: column;
  align-items: center; gap: 10px;
  color: var(--accent-deep);
  animation: hintFloat 2.2s ease-in-out infinite;
}
.hint-line { width: 1px; height: 44px; background: var(--accent-deep); }
.hint-text { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; }
@keyframes hintFloat { 0%,100% { transform: translateY(0);} 50% { transform: translateY(8px);} }
.cover-meta {
  position: absolute;
  left: clamp(24px, 5vw, 72px);
  bottom: 44px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--ink-dim);
}

/* Producto */
.panel-product { background: var(--bg); }
.product-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
  padding: 0 clamp(24px, 6vw, 96px);
  width: 100%;
  max-width: 1440px;
}
.product-media { position: relative; }
.product-img {
  width: min(52vh, 100%);
  max-width: 560px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  margin: 0 auto;
}
.product-info { max-width: 480px; }
.product-index { margin-bottom: 18px; }
.product-name {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 620;
  line-height: 1.04;
  margin-bottom: 8px;
}
.product-cat { margin-bottom: 22px; }
.product-desc {
  color: var(--ink-soft);
  font-size: 1.02rem;
  margin-bottom: 26px;
}
.product-facts {
  display: grid; gap: 10px;
  margin-bottom: 28px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}
.product-facts div {
  display: flex; justify-content: space-between; gap: 16px;
  font-size: 0.92rem;
}
.product-facts dt { color: var(--ink-dim); font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; align-self: center; }
.product-facts dd { color: var(--ink); text-align: right; }
.fact-price { font-family: var(--font-display); font-weight: 650; font-size: 1.2rem; color: var(--accent-deep); }
.product-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.92rem; font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.btn-solid { background: var(--ink); color: #F7F2EA; }
.btn-solid:hover { background: var(--accent-deep); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(42,26,14,0.22); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--accent-deep); color: var(--accent-deep); transform: translateY(-2px); }

/* Outro */
.panel-outro { background: var(--bg-2); }
.outro-inner {
  padding: 0 clamp(24px, 6vw, 96px);
  max-width: 720px;
}
.outro-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 5rem);
  font-weight: 600;
  line-height: 1.0;
  margin: 16px 0 26px;
}
.outro-text { color: var(--ink-soft); font-size: 1.08rem; margin-bottom: 30px; max-width: 540px; }
.outro-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.outro-address { color: var(--ink-dim); }

/* Progreso lateral */
.lookbook-progress {
  position: fixed;
  left: 0; top: 50%;
  transform: translateY(-50%);
  z-index: 55;
  width: 3px; height: 26vh;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  display: block;
}
.lookbook-progress span {
  display: block;
  width: 100%;
  height: 0%;
  background: var(--accent-deep);
}

/* Modal */
.modal {
  position: fixed; inset: 0;
  z-index: 80;
  display: grid; place-items: center;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(42,26,14,0.55); backdrop-filter: blur(4px); }
.modal-card {
  position: relative;
  background: var(--card);
  border-radius: 18px;
  box-shadow: 0 40px 120px rgba(42,26,14,0.4);
  max-width: 920px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  padding: clamp(20px, 4vw, 40px);
}
.modal-close, .drawer-close {
  position: absolute; top: 14px; right: 16px;
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--card);
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--ink);
  z-index: 2;
}
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; }
.modal-media img { border-radius: 14px; width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.modal-name { font-family: var(--font-display); font-size: 1.9rem; font-weight: 620; margin: 6px 0 12px; }
.modal-desc { color: var(--ink-soft); margin-bottom: 18px; }
.modal-body .product-facts { margin-bottom: 22px; }
.modal-add { width: 100%; }

/* Drawer carrito */
.drawer { position: fixed; inset: 0; z-index: 85; }
.drawer[hidden] { display: none; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(42,26,14,0.5); }
.drawer-panel {
  position: absolute; top: 0; right: 0;
  width: min(420px, 100vw);
  height: 100%;
  background: var(--bg);
  display: flex; flex-direction: column;
  padding: 22px;
  box-shadow: -30px 0 80px rgba(42,26,14,0.25);
}
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.drawer-head h3 { font-family: var(--font-display); font-size: 1.5rem; }
.drawer-items { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 14px; }
.cart-item {
  display: grid; grid-template-columns: 64px 1fr auto;
  gap: 12px; align-items: center;
  background: var(--card);
  border-radius: 12px;
  padding: 10px;
  border: 1px solid var(--border);
}
.cart-item img { width: 64px; height: 80px; object-fit: cover; border-radius: 8px; }
.cart-item-name { font-weight: 600; font-size: 0.92rem; }
.cart-item-meta { font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-dim); }
.cart-item-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.qty-row { display: flex; gap: 8px; align-items: center; }
.qty-btn {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--border-strong); background: var(--bg);
  cursor: pointer; color: var(--ink); font-size: 1rem;
}
.cart-item-price { font-family: var(--font-display); font-weight: 650; color: var(--accent-deep); }
.cart-empty { color: var(--ink-dim); text-align: center; padding: 40px 0; font-size: 0.95rem; }
.drawer-foot { border-top: 1px solid var(--border); padding-top: 18px; }
.drawer-total { display: flex; justify-content: space-between; font-size: 1.05rem; margin-bottom: 14px; }
.drawer-total strong { font-family: var(--font-display); color: var(--accent-deep); }
.drawer-checkout { width: 100%; }
.drawer-note { text-align: center; font-size: 0.75rem; color: var(--ink-dim); margin-top: 10px; font-family: var(--font-mono); }

/* Checkout */
.modal-checkout { max-width: 560px; }
.checkout-steps { display: flex; justify-content: center; gap: 14px; margin-bottom: 26px; }
.step {
  font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--ink-dim); padding-bottom: 6px; border-bottom: 2px solid var(--border);
}
.step.active { color: var(--accent-deep); border-color: var(--accent-deep); }
.step-pane { display: none; }
.step-pane.active { display: block; }
.step-pane label {
  display: block; margin-bottom: 14px; font-size: 0.85rem; font-weight: 600; color: var(--ink-soft);
}
.step-pane input {
  width: 100%; margin-top: 6px; padding: 12px 14px;
  border: 1px solid var(--border-strong); border-radius: 10px;
  background: var(--card); font-family: var(--font-body); font-size: 0.95rem; color: var(--ink);
}
.step-pane input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.step-pane .btn { width: 100%; margin-top: 8px; }
.checkout-sub { color: var(--ink-dim); font-size: 0.85rem; margin-bottom: 16px; }
.checkout-ok {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--ok); color: #fff;
  display: grid; place-items: center;
  font-size: 2rem; margin: 0 auto 18px;
}

/* Responsive: en móvil degrada a vertical */
@media (max-width: 860px) {
  .nav-links a:nth-child(1), .nav-links a:nth-child(2) { display: none; }
  .product-shell { grid-template-columns: 1fr; gap: 20px; }
  .product-img { width: min(52vw, 320px); }
  .modal-grid { grid-template-columns: 1fr; }
  .modal-media img { max-width: 320px; margin: 0 auto; }
  .lookbook-progress { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   Ronda mejora R1 — Preloader · Cursor lookbook · Índice dots
   ============================================================ */

/* --- Preloader --- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: var(--bg);
}
.preloader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: min(320px, 80vw);
}
.preloader__word {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 620;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.preloader__bar {
  width: 100%;
  height: 2px;
  background: var(--border);
  overflow: hidden;
  border-radius: 999px;
}
.preloader__bar span {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--accent-deep);
}
.preloader__pct {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--ink-dim);
}
html.is-preloading { overflow: hidden; }

/* --- Cursor lookbook --- */
.cursor {
  position: fixed;
  top: 0; left: 0;
  z-index: 210;
  pointer-events: none;
  display: none;
}
@media (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .cursor { display: block; }
  html.has-cursor, html.has-cursor * { cursor: none !important; }
}
.cursor__dot {
  position: absolute;
  width: 6px; height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: var(--ink);
}
.cursor__ring {
  position: absolute;
  width: 44px; height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  display: grid;
  place-items: center;
  opacity: 0.55;
  transition: transform .3s var(--ease), opacity .3s var(--ease), background .3s var(--ease);
}
.cursor__arrows {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  color: var(--accent-deep);
  display: none;
}
.cursor.is-horiz .cursor__ring { transform: scale(1.35); opacity: 0.95; }
.cursor.is-horiz .cursor__arrows { display: inline; }
.cursor.is-horiz .cursor__dot { display: none; }
.cursor.is-active .cursor__ring { background: var(--accent); opacity: 0.18; transform: scale(1.5); }

/* --- Índice de navegación (dots) --- */
.lookbook-index {
  position: fixed;
  right: clamp(18px, 2.5vw, 32px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 55;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(247,242,234,0.7);
  backdrop-filter: blur(6px);
}
.lookbook-index button {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border: 0; background: transparent;
  cursor: pointer; padding: 0;
}
.lookbook-index button span {
  display: block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--border-strong);
  transition: background .25s var(--ease), transform .25s var(--ease);
}
.lookbook-index button.is-active span {
  background: var(--accent-deep);
  transform: scale(1.45);
}
@media (max-width: 860px) {
  .lookbook-index { display: none; }
}

/* ============================================================
   Sin JS: todo visible, sin animación (fallback)
   ============================================================ */
html.no-js .preloader { display: none; }
html.no-js .track { display: block; height: auto; }
html.no-js .panel { flex: 0 0 auto; width: 100%; height: auto; padding: 90px 0 60px; }
html.no-js .cover-hint, html.no-js .lookbook-progress, html.no-js .lookbook-index { display: none; }
html.no-js .cursor { display: none; }
html.no-js [data-split] { opacity: 1 !important; transform: none !important; }
html.no-js .marquee__track { animation: none; }

/* ============================================================
   R3 · Ronda visual premium — referente Vélez/Bosi
   (marroquinería colombiana de lujo: cuero, herencia, editorial)
   ============================================================ */

/* --- Textura cálida de fondo (grano de cuero) --- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: radial-gradient(ellipse at 20% 30%, rgba(139, 90, 43, 0.35) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(201, 162, 39, 0.22) 0%, transparent 50%);
}
.track, .nav { position: relative; z-index: 1; }

/* --- Eyebrows con filete dorado --- */
.eyebrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  letter-spacing: 0.24em;
  font-size: 0.7rem;
}
.eyebrow::before {
  content: "";
  width: 1.4rem;
  height: 1px;
  background: var(--gold);
}

/* --- Portada editorial de lujo --- */
.cover-title .title-line:first-child {
  font-weight: 620;
  letter-spacing: -0.025em;
  background: linear-gradient(105deg, var(--ink) 35%, var(--accent-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.cover-title .title-line-sub {
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.04em;
}
.cover-tag { font-style: italic; color: var(--ink-soft); }

/* --- Precios serif con filete --- */
.fact-price {
  font-weight: 560;
  letter-spacing: 0.01em;
}
.fact-price::before {
  content: "";
  display: inline-block;
  width: 0.5rem;
  height: 1px;
  background: var(--gold);
  vertical-align: middle;
  margin-right: 0.45rem;
}

/* --- Índice de producto con numeración editorial --- */
.product-index {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--accent);
}

/* --- Outro con borde y filete --- */
.outro-inner {
  border-top: 1px solid var(--border-strong);
  padding-top: 2rem;
}

/* ============================================================
   R4 · Tienda con CTA — sellos, compra directa
   ============================================================ */
.outro-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1rem;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin: 1.5rem 0 1rem;
}
.outro-trust i { font-style: normal; color: var(--gold); }

/* ============================================================
   R5 · Galería real de Instagram (panel final)
   ============================================================ */
.outro-galeria {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin: 1.6rem 0;
  max-width: 420px;
}
.outro-galeria__item {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow-card);
}
.outro-galeria__item img { width: 100%; height: 100%; object-fit: cover; }

/* --- Ken Burns: las fotos del taller "viven" al hacer scroll --- */
@keyframes ozortiz-kenburns {
  0%   { transform: scale(1) translateY(0); }
  50%  { transform: scale(1.12) translateY(-2%); }
  100% { transform: scale(1) translateY(0); }
}
.outro-galeria__item img {
  animation: ozortiz-kenburns 14s ease-in-out infinite alternate;
  will-change: transform;
}
.outro-galeria__item:nth-child(2n) img { animation-delay: -4s; }
.outro-galeria__item:nth-child(3n) img { animation-delay: -8s; }
@media (prefers-reduced-motion: reduce) {
  .outro-galeria__item img { animation: none; }
}
