/* Moisés Morao — plantilla de caso. Se carga después de site.css y home.css */

.cs { background: #000; color: #fff; }
.cs main { background: #000; }
.cs section { position: relative; }
.cs-pad { padding: clamp(80px, 11vw, 180px) var(--gutter); }
.cs-light { background: #fff; color: #000; }
.cs-kicker { display: block; margin-bottom: clamp(18px, 2vw, 30px); opacity: .6; }
.cs-kicker::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 10px; background: currentColor; }
.cs-h { font-size: clamp(64px, 11vw, 210px); }
.cs-h em, .cs-lead em { font-family: var(--serif); font-style: italic; font-weight: 400; text-transform: none; letter-spacing: -.05em; word-spacing: 0; font-size: .46em; opacity: .62; }
/* Texto descriptivo: el mismo tamaño en toda la web */
.cs-lead { font-weight: 300; font-size: clamp(16px, 1.25vw, 20px); line-height: 1.55; max-width: 34em; }
.cs-lead em { font-size: 1em; }
.cs-text { font-weight: 300; font-size: clamp(16px, 1.25vw, 20px); line-height: 1.55; max-width: 34em; }
.cs-text + .cs-text { margin-top: 1.1em; }
.cs-cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 6vw, 110px); align-items: start; }
.cs-cols--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .cs-cols, .cs-cols--3 { grid-template-columns: 1fr; } }

/* Imágenes: entran con un fundido suave y se pueden ampliar */
.cs-img { position: relative; overflow: hidden; background: #111; }
.cs-img img, .cs-img video { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06); transition: opacity 1s, transform 1.6s var(--ease); }
.cs-img.is-in img, .cs-img.is-in video { opacity: 1; transform: scale(1); }
.cs-light .cs-img { background: #eee; }
[data-zoom] { cursor: zoom-in; }

/* ---------- Hero ---------- */
.cs-hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding: 130px var(--gutter) 34px; overflow: hidden; }
.cs-hero__bg { position: absolute; inset: 0; }
.cs-hero__bg img, .cs-hero__bg video { width: 100%; height: 100%; object-fit: cover; opacity: .55; will-change: transform; }
.cs-hero__bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, #000 4%, rgba(0,0,0,.2) 55%, rgba(0,0,0,.55) 100%); }
.cs-hero__title { position: relative; font-size: clamp(88px, 21vw, 420px); line-height: .88; }
.cs-hero__title .line { display: block; overflow: hidden; padding: .2em 0 .02em; margin-top: -.18em; }
.cs-hero__title .line > span { display: block; transform: translateY(110%); transition: transform 1.3s var(--ease); }
.is-ready .cs-hero__title .line > span { transform: none; }
.cs-hero__title .line:nth-child(2) > span { transition-delay: .12s; }
.cs-meta { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: clamp(24px, 3vw, 44px); padding-top: 20px; }
.cs-meta dt { opacity: .55; margin-bottom: 8px; }
.cs-meta dd { font-size: clamp(14px, 1.1vw, 17px); line-height: 1.4; }
@media (max-width: 760px) { .cs-meta { grid-template-columns: 1fr 1fr; } }

/* ---------- Cifras ---------- */
.cs-stats { display: grid; grid-template-columns: repeat(4, 1fr); }
.cs-light .cs-stats { border-color: var(--line-light); }
.cs-stat { padding: clamp(24px, 3vw, 44px) 0; border-right: 1px solid var(--line-dark); padding-left: clamp(14px, 2vw, 30px); }
.cs-light .cs-stat { border-color: var(--line-light); }
.cs-stat:first-child { padding-left: 0; } .cs-stat:last-child { border-right: 0; }
.cs-stat b { display: block; font-family: var(--display); font-weight: 700; font-size: clamp(70px, 10vw, 180px); line-height: .88; }
.cs-stat span { display: block; margin-top: 12px; opacity: .6; }
@media (max-width: 760px) { .cs-stats { grid-template-columns: 1fr 1fr; } .cs-stat:nth-child(2) { border-right: 0; } .cs-stat:nth-child(n+3) { } .cs-stat:nth-child(3) { padding-left: 0; } }

/* ---------- Muestras de color ---------- */
.cs-swatches { display: flex; min-height: clamp(260px, 44vh, 480px); margin-top: clamp(40px, 6vw, 90px); }
.cs-swatch { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; padding: 22px 22px 18px; min-width: 0; transition: flex .8s var(--ease); cursor: default; overflow: hidden; }
.cs-swatch:hover, .cs-swatch.is-on { flex: 2.4; }
.cs-swatch b { font-family: var(--serif); font-weight: 300; font-size: clamp(15px, 1.3vw, 22px); line-height: 1.1; letter-spacing: -.03em; }
/* El nombre descansa abajo; al tocar el color, el resto de la información se despliega y lo empuja hacia arriba */
.cs-swatch small { max-height: 0; margin-top: 0; opacity: 0; overflow: hidden; transition: max-height .6s var(--ease), margin-top .6s var(--ease), opacity .5s; white-space: nowrap; }
.cs-swatch:hover small, .cs-swatch.is-on small { max-height: 2em; margin-top: 8px; opacity: .85; }
@media (max-width: 760px) { .cs-swatches { flex-direction: column; } .cs-swatch { min-height: 96px; } }

/* ---------- Galería horizontal fija ---------- */
.cs-rail { height: 520vh; }
.cs-rail__pin { position: sticky; top: 0; height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.cs-rail__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding: 0 var(--gutter); margin-bottom: clamp(10px, 1.4vw, 20px); }
.cs-rail__head .cs-h { font-size: clamp(44px, 5.4vw, 100px); }
.cs-rail__count { font-family: var(--display); font-weight: 700; font-size: clamp(34px, 3.6vw, 64px); line-height: .88; white-space: nowrap; }
.cs-rail__count i { font-style: normal; opacity: .35; }
.cs-rail__track { display: flex; gap: clamp(16px, 2vw, 32px); padding: 0 var(--gutter); will-change: transform; }
.cs-card { flex: 0 0 auto; width: clamp(260px, 30vw, 500px); }
.cs-card__img { height: min(62svh, 40vw * 4 / 3); aspect-ratio: 3 / 4; overflow: hidden; background: #111; }
.cs-card { width: auto; }
.cs-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease), filter .6s; filter: saturate(.9); }
.cs-card:hover .cs-card__img img { transform: scale(1.05); filter: none; }
.cs-card__n { display: block; margin: 10px 0 4px; opacity: .6; }
.cs-card h3 { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: clamp(30px, 2.8vw, 48px); line-height: .88; letter-spacing: .02em; }
.cs-card p { margin-top: 4px; font-weight: 300; font-size: 14px; line-height: 1.3; opacity: .8; max-width: 26ch; }
.cs-rail__bar { margin: clamp(18px, 2.4vw, 34px) var(--gutter) 0; height: 2px; background: rgba(255,255,255,.18); }
.cs-rail__bar i { display: block; height: 100%; background: #fff; transform: scaleX(0); transform-origin: left; }
@media (max-width: 760px) { .cs-rail { height: 620vh; } .cs-card { width: 62vw; } }

/* ---------- Cita ---------- */
.cs-quote { padding: clamp(110px, 16vw, 260px) var(--gutter); }
.cs-quote p { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.05em; line-height: 1.02; font-size: clamp(36px, 7vw, 132px); max-width: 13em; }
.cs-quote--r p { margin-left: auto; text-align: right; }
.cs-quote cite { display: block; margin-top: 28px; font-style: normal; opacity: .6; }
.cs-quote--r cite { text-align: right; }

/* ---------- Rejilla de piezas ---------- */
.cs-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(12px, 1.6vw, 26px); }
.cs-grid > * { grid-column: span 4; }
.cs-grid .w6 { grid-column: span 6; } .cs-grid .w8 { grid-column: span 8; } .cs-grid .w12 { grid-column: 1 / -1; } .cs-grid .w3 { grid-column: span 3; }
.cs-grid .tall { grid-row: span 2; }
@media (max-width: 760px) { .cs-grid > *, .cs-grid .w6, .cs-grid .w8, .cs-grid .w3 { grid-column: 1 / -1; } .cs-grid .tall { grid-row: auto; } }
.cs-par { will-change: transform; }

/* ---------- Texto fijo junto a imagen ---------- */
.cs-stick { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 6vw, 110px); }
.cs-stick__fix { position: sticky; top: 16vh; align-self: start; }
@media (max-width: 860px) { .cs-stick { grid-template-columns: 1fr; } .cs-stick__fix { position: static; } }

/* ---------- Tipografía de marca (se respeta la del proyecto) ---------- */
.cs-type { display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 5vw, 90px); align-items: end; padding: clamp(28px, 4vw, 60px) 0; }
.cs-type__aa { font-size: clamp(120px, 20vw, 360px); line-height: .8; }
.cs-type__set { font-size: clamp(16px, 2vw, 34px); line-height: 1.25; word-break: break-all; }
.cs-type__w { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 18px; font-size: clamp(15px, 1.3vw, 20px); }
@media (max-width: 760px) { .cs-type { grid-template-columns: 1fr; } }

/* ---------- Cierre ---------- */
.cs-end { text-align: center; padding: clamp(110px, 15vw, 240px) var(--gutter); }
.cs-end .cs-h { margin-bottom: clamp(26px, 3vw, 46px); }
.cs-marquee { padding: clamp(18px, 2vw, 30px) 0; }
.cs-marquee .marquee__track > span { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: clamp(40px, 6vw, 110px); line-height: .88; padding: .2em .3em .04em; letter-spacing: .02em; }
.cs-marquee .marquee__track > span:nth-child(even) { color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .7); }

@media (prefers-reduced-motion: reduce) {
  .cs-img img, .cs-img video { opacity: 1; transform: none; }
  .cs-hero__title .line > span { transform: none; }
}

/* ---------- Visor de fotos ---------- */
.cs-lb { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: rgba(0, 0, 0, .78); -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); opacity: 0; pointer-events: none; transition: opacity .4s; }
.cs-lb.is-open { opacity: 1; pointer-events: auto; }
.cs-lb img { max-width: min(92vw, 1500px); max-height: 88svh; object-fit: contain; box-shadow: 0 40px 120px rgba(0, 0, 0, .7); transform: scale(.96); transition: transform .5s var(--ease); }
.cs-lb.is-open img { transform: none; }
.cs-lb button { position: absolute; display: grid; place-items: center; width: 56px; height: 56px; border: 1px solid rgba(255, 255, 255, .5); border-radius: 50%; color: #fff; font-size: 20px; background: rgba(0, 0, 0, .35); transition: background .3s, border-color .3s; }
.cs-lb button:hover { background: var(--accent); border-color: var(--accent); }
.cs-lb__x { top: 22px; right: var(--gutter); }
.cs-lb__prev { left: var(--gutter); top: 50%; margin-top: -28px; }
.cs-lb__next { right: var(--gutter); top: 50%; margin-top: -28px; }
.cs-lb__n { position: absolute; left: 0; right: 0; bottom: 20px; text-align: center; color: #fff; opacity: .7; }
@media (max-width: 760px) { .cs-lb button { width: 46px; height: 46px; } .cs-lb__prev, .cs-lb__next { top: auto; bottom: 14px; margin: 0; } .cs-lb__n { bottom: 30px; } }
