/* Кейс 05 — Baby Cute. Монтажная: плёнка, таймкоды, холодный свет, красная точка REC */
:root {
  --bg: #07090b;
  --panel: #0f1418;
  --ice: #9cc7e6;
  --text: #e6eef3;
  --mute: #7f8f9a;
  --rec: #ff3b30;
  --g: clamp(16px, 2.2vw, 32px);
  --display: "Quantum", "Deledda Closed", sans-serif;
  --sans: "Deledda", system-ui, sans-serif;
  --mono: "Feature Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--sans); font-weight: 300; overflow-x: hidden; overflow-x: clip; }
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: auto; }
::selection { background: var(--rec); color: var(--bg); }
body::after { content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .12; mix-blend-mode: screen;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

.mono { font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: .2em; text-transform: uppercase; line-height: 1.7; }
.mono b { font-weight: 700; }
.rec { display: inline-flex; align-items: center; gap: 8px; color: var(--rec); }
.rec::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--rec); box-shadow: 0 0 10px var(--rec); animation: blink 1.2s steps(1) infinite; }
@keyframes blink { 50% { opacity: .15; } }

/* ---------- шапка ---------- */
.bar { position: fixed; inset: 0 0 auto 0; z-index: 50; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px var(--g); mix-blend-mode: difference; color: #fff; }
.bar nav { display: flex; gap: 24px; }
.bar a:hover { text-decoration: line-through; }

/* ---------- обложка: кадр в видоискателе ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; contain: paint; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,9,11,.35) 0%, transparent 30%, transparent 55%, var(--bg) 100%); }
.vf { position: absolute; inset: 70px var(--g) var(--g); z-index: 2; pointer-events: none; }
.vf i { position: absolute; width: 34px; height: 34px; border-color: var(--text); border-style: solid; border-width: 0; }
.vf i:nth-child(1) { left: 0; top: 0; border-left-width: 2px; border-top-width: 2px; }
.vf i:nth-child(2) { right: 0; top: 0; border-right-width: 2px; border-top-width: 2px; }
.vf i:nth-child(3) { left: 0; bottom: 0; border-left-width: 2px; border-bottom-width: 2px; }
.vf i:nth-child(4) { right: 0; bottom: 0; border-right-width: 2px; border-bottom-width: 2px; }
.vf .tl, .vf .tr { position: absolute; top: 14px; }
.vf .tl { left: 48px; } .vf .tr { right: 48px; text-align: right; }
.title { position: absolute; z-index: 3; left: var(--g); right: var(--g); bottom: 14vh; }
.title h1 { font-family: var(--display); font-weight: 400; line-height: .8; letter-spacing: -.01em; }
.title h1 span { display: block; width: max-content; white-space: nowrap; }
.title .sub { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; margin-top: 2vh; font-weight: 600; font-size: clamp(18px, 2.2vw, 36px); line-height: 1; text-transform: uppercase; }
.title .sub span:last-child { color: var(--ice); }

.nums { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 var(--g); border-top: 1px solid var(--mute); position: relative; z-index: 3; }
.nums li { padding: 12px 12px 0 0; }
.nums b { display: block; font-family: var(--sans); font-weight: 900; font-size: clamp(44px, 7vw, 132px); line-height: .9; letter-spacing: -.04em; text-transform: none; color: var(--text); }

/* ---------- бриф ---------- */
.brief { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 6vh var(--g); padding: 14vh var(--g) 8vh; }
.passport { display: grid; gap: 12px; align-content: start; }
.passport p { border-top: 1px solid #1e2830; padding-top: 8px; display: grid; grid-template-columns: 9em minmax(0, 1fr); gap: 12px; }
.passport p span:first-child { color: var(--mute); }
.tsr { display: grid; gap: 5vh; }
.tsr h2 { font-family: var(--mono); font-weight: 700; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--ice); margin-bottom: 10px; }
.tsr p { font-size: clamp(20px, 2.1vw, 34px); line-height: 1.22; max-width: 34ch; }
.tsr b { font-weight: 900; }

/* ---------- заголовки разделов ---------- */
.sec { padding: 16vh var(--g) 5vh; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.sec h2 { font-weight: 900; text-transform: uppercase; line-height: .82; letter-spacing: -.045em; }
.sec h2 i { font-style: normal; color: transparent; -webkit-text-stroke: 2px var(--ice); }
.sec .row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--mute); padding-top: 10px; }
.sec .row .q { font-weight: 300; font-size: clamp(20px, 2.6vw, 42px); line-height: 1.1; max-width: 28ch; }

/* ---------- плёнка: последовательность кадров ---------- */
.film { margin: 0 var(--g); background: #000; padding: 26px 0; position: relative;
  --hole: repeating-linear-gradient(90deg, transparent 0 10px, #d9e2e8 10px 22px, transparent 22px 34px); }
.film::before, .film::after { content: ""; position: absolute; left: 0; right: 0; height: 10px; background: var(--hole); opacity: .85; border-radius: 2px; }
.film::before { top: 8px; } .film::after { bottom: 8px; }
.film ol { list-style: none; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; padding: 0 6px; scroll-snap-type: x mandatory; }
.film li { flex: 0 0 clamp(170px, 17vw, 260px); scroll-snap-align: start; position: relative; }
.film li img { aspect-ratio: 4 / 3; object-fit: cover; background: var(--panel); }
.film li span { position: absolute; left: 6px; top: 6px; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; background: rgba(0, 0, 0, .65); padding: 2px 5px; }
.film-cap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; margin: 14px var(--g) 0; color: var(--mute); }

/* ---------- пайплайн ---------- */
.pipe { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin: 0 var(--g); counter-reset: s; }
.pipe li { position: relative; padding: 18px 18px 22px 0; border-top: 2px solid var(--ice); display: grid; gap: 10px; align-content: start; }
.pipe li::after { content: "→"; position: absolute; right: 8px; top: 14px; font-family: var(--mono); color: var(--ice); }
.pipe li:last-child::after { content: none; }
.pipe b { font-family: var(--mono); font-weight: 700; font-size: 12px; letter-spacing: .2em; color: var(--rec); }
.pipe h3 { font-weight: 900; font-size: clamp(18px, 1.7vw, 28px); line-height: 1; text-transform: uppercase; }
.pipe p { font-size: clamp(15px, 1.1vw, 18px); line-height: 1.4; color: #b9c6ce; }
.note { margin: 5vh var(--g) 0; max-width: 60ch; font-size: clamp(18px, 1.7vw, 28px); line-height: 1.3; }
.note b { font-weight: 900; }

/* ---------- клипы ---------- */
.clip-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px var(--g); align-items: end; margin: 0 var(--g); border-top: 1px solid var(--mute); padding-top: 12px; }
.clip-head h3 { font-family: var(--display); font-weight: 400; font-size: clamp(48px, 8vw, 150px); line-height: .82; }
.clip-head p { font-size: clamp(16px, 1.3vw, 21px); line-height: 1.35; max-width: 44ch; color: #b9c6ce; grid-column: 1; }
.watch { grid-column: 2; grid-row: 1 / span 2; align-self: end; display: inline-flex; align-items: center; gap: 12px; padding: 14px 20px; border: 1.5px solid var(--text); font-family: var(--mono); font-weight: 700; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.watch::before { content: ""; width: 0; height: 0; border-left: 12px solid var(--rec); border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.watch:hover { background: var(--text); color: var(--bg); }

.grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 4vh var(--g) 0; }
.grid figure { position: relative; cursor: zoom-in; overflow: hidden; background: var(--panel); }
.grid figure img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.grid figure:hover img { transform: scale(1.04); }
.grid figure figcaption { position: absolute; left: 8px; bottom: 6px; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; color: rgba(230, 238, 243, .85); text-shadow: 0 1px 2px #000; }
.w2 { grid-column: span 2; } .w3 { grid-column: span 3; } .w4 { grid-column: span 4; } .w6 { grid-column: span 6; }
.r2 { grid-row: span 2; }
.k43 img { aspect-ratio: 4 / 3; } .k169 img { aspect-ratio: 16 / 9; }

/* ---------- цифры ---------- */
.scale { padding: 18vh var(--g) 6vh; display: grid; gap: 6vh; }
.scale h2 { font-family: var(--mono); font-weight: 700; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--ice); }
.scale ul { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--mute); }
.scale li { padding: 14px 14px 0 0; display: grid; gap: 8px; align-content: start; }
.scale li b { font-weight: 900; font-size: clamp(48px, 7.4vw, 140px); line-height: .85; letter-spacing: -.05em; }
.scale li > span { font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--mute); }
.scale .date { color: var(--mute); margin-top: -3vh; }

.self { padding: 10vh var(--g) 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--g); }
.self p:last-child { font-size: clamp(22px, 2.6vw, 44px); line-height: 1.15; }

/* ---------- подвал ---------- */
footer { padding: 22vh var(--g) var(--g); display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.next { display: grid; gap: 8px; border-top: 1px solid var(--mute); padding-top: 10px; }
.next .big { font-weight: 900; font-size: clamp(56px, 13vw, 260px); line-height: .82; letter-spacing: -.05em; text-transform: uppercase; transition: color .3s; }
.next:hover .big { color: var(--ice); }
footer .links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; border-top: 1px solid var(--mute); padding-top: 10px; }
footer .links a { font-weight: 900; font-size: clamp(20px, 3vw, 48px); line-height: 1; text-transform: uppercase; letter-spacing: -.02em; }
footer .links a:hover { color: var(--ice); }

/* ---------- лайтбокс ---------- */
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(7, 9, 11, .97); display: none; place-items: center; padding: 48px var(--g); cursor: zoom-out; }
.lb.on { display: grid; }
.lb img { max-width: 100%; max-height: calc(100svh - 96px); width: auto; object-fit: contain; }
.lb .mono { position: absolute; top: 14px; left: var(--g); right: var(--g); display: flex; justify-content: space-between; gap: 16px; }
.lb button { position: absolute; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--text); font: 900 40px var(--sans); padding: 16px; cursor: pointer; }
.lb button:hover { color: var(--rec); }
.lb [data-step="-1"] { left: 0; } .lb [data-step="1"] { right: 0; }

@media (max-width: 1000px) { .pipe { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pipe li:nth-child(2n)::after { content: none; } }
@media (max-width: 760px) {
  .bar nav, .bar > span { display: none; }
  .hero { height: 82svh; min-height: 480px; }
  .vf .tr { display: none; }
  .title { bottom: 8vh; }
  .nums, .scale ul { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); row-gap: 24px; }
  .brief, .self { grid-template-columns: minmax(0, 1fr); }
  .passport p { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .pipe { grid-template-columns: minmax(0, 1fr); }
  .pipe li::after { content: none; }
  .clip-head { grid-template-columns: minmax(0, 1fr); }
  .watch { grid-column: 1; grid-row: auto; justify-self: start; }
  .grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .grid .w2, .grid .w3 { grid-column: span 1; }
  .grid .w4, .grid .w6 { grid-column: span 2; }
  .grid .r2 { grid-row: auto; }
  .lb button { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .rec::before { animation: none; } }

/* без киношных декораций: ни REC, ни видоискателя, ни перфорации */
.vf, .rec::before { display: none !important; }
.film { background: transparent; padding: 0; }
.film::before, .film::after { content: none; }
.film ol { padding: 0; }

/* Quantum рисует латинскую B как «Б» — заголовки на Deledda Black */
.title h1 { font-family: var(--sans); font-weight: 900; letter-spacing: -.04em; }
.clip-head h3 { font-family: var(--sans); font-weight: 900; letter-spacing: -.04em; }
