/* ═══════════════════════════════════════════════════════════════════════════
   STORYLINE · Página individual de proyecto hero (scroll narrativo)
   Usado por /proyectos/lador.html, sugar-haus.html, maison-beautys.html, amaru.html
   ═══════════════════════════════════════════════════════════════════════════ */

/* Ajusta el nav para que se vea sobre el hero oscuro */
.storyline-page nav#nav.nav-multipage {
  position: fixed;
  background: transparent;
}
.storyline-page nav#nav.nav-multipage.scrolled {
  background: rgba(35,33,30,.95);
  backdrop-filter: blur(10px);
}

/* ── Hero del proyecto (fullscreen) ───────────────────────────────────────── */
.sl-hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
}
.sl-hero-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(.5) saturate(.92);
  animation: slHeroZoom 14s ease-out forwards;
}
@keyframes slHeroZoom {
  from { transform: scale(1.08); }
  to   { transform: scale(1); }
}
.sl-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,.1) 0%, rgba(0,0,0,.55) 100%),
    linear-gradient(180deg, rgba(35,33,30,.3) 0%, transparent 30%, rgba(35,33,30,.65) 100%);
}
.sl-hero-content {
  position: absolute;
  bottom: 12vh;
  left: 5%;
  right: 5%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.6rem;
  max-width: 900px;
}
.sl-back {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--mint);
  margin-bottom: 1rem;
}
.sl-back:hover { color: var(--white); }
.sl-back svg { width: 14px; height: 14px; }
.sl-eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: rgba(255,255,255,.7);
}
.sl-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-style: italic;
  font-size: clamp(3.5rem, 9vw, 8rem);
  line-height: 1;
  color: var(--white);
  letter-spacing: -.015em;
}
.sl-meta {
  display: inline-flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: .8rem;
}
.sl-meta-item {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.sl-meta-label {
  font-family: 'DM Sans', sans-serif;
  font-size: .58rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
}
.sl-meta-value {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--white);
}

/* ── Sección genérica del storyline ───────────────────────────────────────── */
.sl-section {
  padding: 8rem 5%;
  background: var(--dark);
  position: relative;
}
.sl-section.alt {
  background: var(--dark2);
}
.sl-section-eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: .65rem;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--mint);
  margin-bottom: 1.4rem;
  text-align: center;
}
.sl-section-title {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(2rem, 4.5vw, 3.6rem);
  line-height: 1.1;
  color: var(--white);
  text-align: center;
  margin-bottom: 2.5rem;
  letter-spacing: -.008em;
}
.sl-section-text {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
  font-family: 'DM Sans', sans-serif;
  font-size: 1.02rem;
  font-weight: 300;
  line-height: 1.85;
  color: rgba(255,255,255,.72);
}
.sl-section-text em {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--salmon);
  font-size: 1.15em;
}

/* ── Antes/Después slider (concepto/realidad) ─────────────────────────────── */
.sl-comparison {
  max-width: 1080px;
  margin: 4rem auto 0;
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  cursor: ew-resize;
  user-select: none;
}
.sl-comparison-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.sl-comparison-before {
  clip-path: inset(0 50% 0 0);
}
.sl-comparison-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--salmon);
  pointer-events: none;
  z-index: 3;
}
.sl-comparison-handle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--salmon);
  box-shadow: 0 4px 18px rgba(0,0,0,.4);
}
.sl-comparison-handle::after {
  content: '⇄';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--dark);
  font-size: 1.2rem;
  font-weight: 700;
  z-index: 4;
  font-family: monospace;
}
.sl-comparison-label {
  position: absolute;
  top: 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: .58rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  padding: .4rem .8rem;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  z-index: 2;
}
.sl-comparison-label.left { left: 1rem; color: var(--mint); }
.sl-comparison-label.right { right: 1rem; color: var(--salmon); }

/* ── Galería editorial ────────────────────────────────────────────────────── */
.sl-gallery {
  max-width: 1320px;
  margin: 4rem auto 0;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}
.sl-gallery-item {
  overflow: hidden;
  position: relative;
}
.sl-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.5s cubic-bezier(.2,.7,.2,1);
}
.sl-gallery-item:hover img {
  transform: scale(1.04);
}
.sl-gallery-item:nth-child(1) { grid-column: span 8; aspect-ratio: 16/10; }
.sl-gallery-item:nth-child(2) { grid-column: span 4; aspect-ratio: 4/5; }
.sl-gallery-item:nth-child(3) { grid-column: span 4; aspect-ratio: 4/5; }
.sl-gallery-item:nth-child(4) { grid-column: span 8; aspect-ratio: 16/10; }
.sl-gallery-item:nth-child(5) { grid-column: span 6; aspect-ratio: 4/3; }
.sl-gallery-item:nth-child(6) { grid-column: span 6; aspect-ratio: 4/3; }
.sl-gallery-item:nth-child(n+7) { grid-column: span 4; aspect-ratio: 4/5; }

/* ── Stats / Resultado ────────────────────────────────────────────────────── */
.sl-stats {
  max-width: 980px;
  margin: 4rem auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  border-top: 1px solid rgba(255,255,255,.12);
  border-bottom: 1px solid rgba(255,255,255,.12);
  padding: 2.5rem 0;
}
.sl-stat {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.sl-stat-num {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 2.4rem;
  color: var(--salmon);
  line-height: 1;
}
.sl-stat-label {
  font-family: 'DM Sans', sans-serif;
  font-size: .58rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
}

/* ── Quote testimonio ─────────────────────────────────────────────────────── */
.sl-quote {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  padding: 2rem 0;
  position: relative;
}
.sl-quote::before {
  content: '\201C';
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 5rem;
  color: var(--salmon);
  opacity: .4;
  line-height: 1;
  margin-bottom: 1rem;
}
.sl-quote-text {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1.5;
  color: var(--white);
  margin-bottom: 1.6rem;
}
.sl-quote-author {
  font-family: 'DM Sans', sans-serif;
  font-size: .68rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: rgba(255,255,255,.7);
}

/* ── CTA siguiente proyecto + WhatsApp ────────────────────────────────────── */
.sl-cta {
  padding: 7rem 5%;
  text-align: center;
  background: var(--dark);
}
.sl-cta-eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: .65rem;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--mint);
  margin-bottom: 1.4rem;
}
.sl-cta-title {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(2.2rem, 5vw, 4rem);
  color: var(--white);
  margin-bottom: 2.5rem;
  line-height: 1.1;
}
.sl-cta-title em {
  color: var(--salmon);
  font-style: italic;
}
.sl-cta-actions {
  display: inline-flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}
.sl-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: 'DM Sans', sans-serif;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .28em;
  text-transform: uppercase;
  padding: 1rem 1.8rem;
  border: 1px solid;
  transition: all .4s;
}
.sl-cta-btn.primary {
  background: var(--salmon);
  color: var(--dark);
  border-color: var(--salmon);
}
.sl-cta-btn.primary:hover { background: var(--rose-deep); border-color: var(--rose-deep); letter-spacing: .34em; }
.sl-cta-btn.ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.28);
}
.sl-cta-btn.ghost:hover { border-color: var(--salmon); color: var(--salmon); }

/* ── Más proyectos ────────────────────────────────────────────────────────── */
.sl-more {
  padding: 5rem 5%;
  background: var(--dark2);
}
.sl-more-grid {
  max-width: 1320px;
  margin: 2.5rem auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
.sl-more-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/5;
}
.sl-more-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.4s cubic-bezier(.2,.7,.2,1);
  filter: brightness(.85);
}
.sl-more-card:hover img { transform: scale(1.05); filter: brightness(1); }
.sl-more-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.85) 100%);
}
.sl-more-info {
  position: absolute;
  left: 1.4rem; right: 1.4rem;
  bottom: 1.4rem;
  z-index: 2;
}
.sl-more-name {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.4rem;
  color: var(--white);
}
.sl-more-meta {
  font-family: 'DM Sans', sans-serif;
  font-size: .58rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: rgba(255,255,255,.6);
  margin-top: .3rem;
}

/* ── Reveal animation simple ──────────────────────────────────────────────── */
.sl-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s cubic-bezier(.2,.7,.2,1), transform 1s cubic-bezier(.2,.7,.2,1);
}
.sl-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .sl-hero { min-height: 540px; }
  .sl-hero-content { bottom: 8vh; left: 1.4rem; right: 1.4rem; gap: 1rem; }
  .sl-title { font-size: clamp(3rem, 14vw, 5rem); }
  .sl-meta { gap: 1.2rem; }
  .sl-section { padding: 5rem 1.4rem; }
  .sl-section-title { font-size: clamp(1.8rem, 7vw, 2.6rem); }
  .sl-section-text { font-size: .94rem; line-height: 1.7; }
  .sl-gallery { grid-template-columns: 1fr; gap: .6rem; margin-top: 2rem; }
  .sl-gallery-item:nth-child(n) { grid-column: span 1; aspect-ratio: 4/3; }
  .sl-stats { grid-template-columns: repeat(2, 1fr); gap: 1.4rem; padding: 1.8rem 0; }
  .sl-stat-num { font-size: 1.8rem; }
  .sl-comparison { aspect-ratio: 4/3; margin-top: 2rem; }
  .sl-more-grid { grid-template-columns: 1fr; }
  .sl-cta { padding: 4.5rem 1.4rem; }
  .sl-cta-actions { flex-direction: column; align-items: center; }
}
