/*
Theme Name: Leila Cherifi Portfolio
Author: Leila Cherifi Caballé
Description: Portfolio minimalista: reel a sangre, cuadrícula de proyectos (vídeo y foto) con ficha en ventana completa y About en ventana. Igual que el diseño de vista previa.
Version: 3.4
Text Domain: lc
*/

@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@300;400;500;600&display=swap');

* { box-sizing: border-box; }
html, body { margin: 0; background: #fff; color: #111; -webkit-font-smoothing: antialiased; }
html { scroll-behavior: smooth; }
body { font-family: 'Barlow', sans-serif; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; min-height: 100vh; display: flex; flex-direction: column; }
a { color: #111; text-decoration: none; }
a:hover { color: #cf4a30; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
[hidden] { display: none !important; }
.muted { color: #8a857e; }
.wrap { padding-left: clamp(16px, 2.4vw, 32px); padding-right: clamp(16px, 2.4vw, 32px); }
.logo { font-size: 13px; font-weight: 600; letter-spacing: 0; }
.cols4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 16px; align-items: baseline; }
main { flex: 1; }
.page-pad { padding-top: 110px; }

/* Cabecera fija, legible sobre vídeo y sobre blanco */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 20; padding-top: 16px; padding-bottom: 16px; color: #fff; mix-blend-mode: difference; }
.site-header a { color: #fff; }
.site-header > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-header .dim { opacity: .6; }
.header-end { display: flex; justify-content: space-between; gap: 12px; }
.header-end .menu { display: flex; gap: 14px; }
.admin-bar .site-header { top: 32px; }

/* Pie */
.site-footer { border-top: 1px solid #e6e6e6; padding-top: 16px; padding-bottom: 16px; margin-top: auto; }

/* Reel a sangre */
.reel { position: relative; width: 100%; height: 100vh; min-height: 480px; background: #111; overflow: hidden; }
.reel video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel iframe { position: absolute; top: 50%; left: 50%; width: max(100vw, 177.78vh); height: max(100vh, 56.25vw); transform: translate(-50%, -50%); border: 0; pointer-events: none; }
.reel-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #6a6a6a; }
.reel .scroll { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; color: #fff; mix-blend-mode: difference; }

/* Cuadrícula de proyectos */
#work { scroll-margin-top: 0; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(40px, 7vh, 96px) 16px; align-items: start; padding-top: clamp(72px, 10vh, 120px); padding-bottom: clamp(64px, 10vh, 120px); }
.card { display: block; cursor: pointer; will-change: transform; }
.card .media .card-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; opacity: 0; transition: opacity .45s ease; z-index: 2; pointer-events: none; }
.card .media iframe.card-preview { top: 50%; left: 50%; inset: auto; width: max(100%, 177.78cqh); height: max(100%, 56.25cqw); transform: translate(-50%, -50%); }
.card .media { container-type: size; }
.card .media .card-preview.on { opacity: 1; }
.card .media-inner { position: absolute; inset: 0; }
@media (hover: hover) { .grid .card, .grid .card * { cursor: none; } }
.lc-cursor { position: fixed; left: 0; top: 0; z-index: 30; width: 64px; height: 64px; margin: -32px 0 0 -32px; color: #fff; mix-blend-mode: difference; pointer-events: none; transform: scale(.4); opacity: 0; transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .3s; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.lc-cursor.on { transform: scale(1); opacity: 1; }
.lc-cursor i { position: absolute; width: 12px; height: 12px; border: 0 solid #fff; }
.lc-cursor .tl { top: 0; left: 0; border-top-width: 1.5px; border-left-width: 1.5px; }
.lc-cursor .tr { top: 0; right: 0; border-top-width: 1.5px; border-right-width: 1.5px; }
.lc-cursor .bl { bottom: 0; left: 0; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.lc-cursor .br { bottom: 0; right: 0; border-bottom-width: 1.5px; border-right-width: 1.5px; }
.lc-cursor b { position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; background: #fff; border-radius: 50%; }
.lc-cursor .lbl { position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); white-space: nowrap; display: flex; gap: 8px; }
.lc-cursor .cl { opacity: .6; }
.card .media { position: relative; width: 100%; background: #f2f2f2; overflow: hidden; }
.card .media-inner img, .card .media-inner video, .card .media img, .card .media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .3s; }
.card:hover .media img, .card:hover .media video { opacity: .9; }
.card .cap { display: flex; justify-content: space-between; gap: 12px; margin-top: 9px; }
.card .cap > span:first-child { flex: 1; min-width: 0; }
.card .cap > span:last-child { flex: none; }
.card:hover .cap, .card:hover .cap .muted { color: #cf4a30; }
.admin-hint { text-align: center; padding-bottom: 64px; }
.admin-hint a { color: #cf4a30; }

.l0 { grid-column: 1 / span 7; } .l0 .media { aspect-ratio: 3/2; }
.l1 { grid-column: 9 / span 4; } .l1 .media { aspect-ratio: 4/5; }
.l2 { grid-column: 3 / span 4; } .l2 .media { aspect-ratio: 4/5; }
.l3 { grid-column: 8 / span 5; } .l3 .media { aspect-ratio: 3/2; }
.l4 { grid-column: 1 / span 12; } .l4 .media { aspect-ratio: 21/9; }
.l5 { grid-column: 1 / span 5; } .l5 .media { aspect-ratio: 4/5; }
.l6 { grid-column: 7 / span 6; } .l6 .media { aspect-ratio: 3/2; }
.l7 { grid-column: 2 / span 6; } .l7 .media { aspect-ratio: 3/2; }
.l8 { grid-column: 9 / span 3; } .l8 .media { aspect-ratio: 4/5; }
.l9 { grid-column: 4 / span 6; } .l9 .media { aspect-ratio: 16/9; }

/* Ventanas a pantalla completa (proyecto y About) */
.overlay { position: fixed; inset: 0; z-index: 50; background: #fff; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.admin-bar .overlay { top: 32px; }
.ov-bar { position: sticky; top: 0; z-index: 2; background: #fff; padding-top: 16px; padding-bottom: 16px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: baseline; }
.ov-bar-2 { display: flex; justify-content: space-between; }
.ov-close { justify-self: end; color: #111; }
.ov-close:hover { color: #cf4a30; }
.standalone .ov-bar { margin-top: 0; }
.standalone { position: relative; z-index: 30; background: #fff; }

/* Ficha de proyecto */
.pj { padding-top: clamp(40px, 7vh, 88px); padding-bottom: 32px; }
.pj-title { margin: 0; text-align: center; font-size: clamp(34px, 6vw, 88px); font-weight: 500; line-height: 1; letter-spacing: -.03em; }
.pj-title .light { font-weight: 300; }
.pj-hero { margin: clamp(36px, 6vh, 72px) auto 0; position: relative; width: 100%; max-width: 1200px; aspect-ratio: 16/9; background: #f2f2f2; overflow: hidden; }
.pj-hero iframe, .pj-hero video, .pj-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.pj-hero video { object-fit: contain; background: #000; }
.pj-credits { margin: 40px auto 0; max-width: 1200px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 16px; }
.pj-credits p { margin: 0; }
.pj-credits .muted { margin-bottom: 6px; }
.pj-desc { grid-column: 1 / -1; margin-top: 16px; max-width: 620px; font-size: 15px; font-weight: 400; line-height: 1.6; letter-spacing: 0; text-transform: none; color: #33302c; }
.pj-desc p { margin: 0 0 1em; }
.pj-gallery { margin: 48px auto 0; max-width: 1200px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.pj-gallery figure { margin: 0; position: relative; aspect-ratio: 4/5; background: #f2f2f2; overflow: hidden; }
.pj-gallery img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pj-pager { margin: 56px auto 0; max-width: 1200px; padding-top: 16px; border-top: 1px solid #e6e6e6; display: flex; justify-content: space-between; }
.pj-pager a, .pj-pager button { color: #111; }
.pj-pager a:hover, .pj-pager button:hover { color: #cf4a30; }

/* About */
.about { padding-top: clamp(48px, 10vh, 120px); padding-bottom: clamp(48px, 10vh, 120px); gap: 24px 16px; }
.about .body { grid-column: 2 / span 3; max-width: 860px; }
.about .body > p:first-child, .about .body .lead { margin: 0; font-size: clamp(20px, 2.4vw, 32px); font-weight: 400; line-height: 1.2; letter-spacing: -.02em; text-transform: none; }
.about .body p { margin: 22px 0 0; max-width: 560px; font-size: 14px; font-weight: 400; line-height: 1.6; letter-spacing: 0; text-transform: none; color: #4a4540; }
.about .body > p:first-child { max-width: none; color: #111; }
.about .body h4 { margin: 40px 0 10px; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #8a857e; }
.about .body h4 + p, .about .body .caps { margin: 0; max-width: none; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; line-height: 1.7; color: #111; }
.about .body a { color: #111; }

@media (max-width: 782px) { .admin-bar .site-header, .admin-bar .overlay { top: 46px; } }
@media (max-width: 720px) {
  .grid > .card { grid-column: 1 / -1; }
  .cols4, .ov-bar { grid-template-columns: 1fr 1fr; }
  .pj-credits { grid-template-columns: 1fr 1fr; }
  .about .body { grid-column: 1 / -1; }
}
