/* Palette & type from the reference portfolio: warm paper, ink, burgundy accent; dark theme mirrors it */
:root {
  --paper: #ECECE8; --surface: #F6F6F3; --ink: #141313; --muted: #67655F; --line: #D3D2CC;
  --accent: #7B1C2C; --accent-ink: #F6F6F3; --shade: rgba(20,19,19,.55);
  --f-display: "Oranienbaum", "Didot", "Bodoni 72", "Times New Roman", serif;
  --f-body: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --max: 1320px;
  --ease: cubic-bezier(.2,.7,.2,1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --paper: #0F0E0E; --surface: #181716; --ink: #ECEAE5; --muted: #9C978F; --line: #2B2927;
  --accent: #D0596A; --accent-ink: #0F0E0E; --shade: rgba(0,0,0,.6); color-scheme: dark; } }
:root[data-theme="dark"] {
  --paper: #0F0E0E; --surface: #181716; --ink: #ECEAE5; --muted: #9C978F; --line: #2B2927;
  --accent: #D0596A; --accent-ink: #0F0E0E; --shade: rgba(0,0,0,.6); color-scheme: dark; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--f-body); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; transition: background .4s, color .4s; }
a { color: inherit; }
img, video { max-width: 100%; display: block; }
.wrap { max-width: var(--max); margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.mono { font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.muted { color: var(--muted); }
h1, h2, h3 { font-family: var(--f-display); font-weight: 400; text-wrap: balance; margin: 0; letter-spacing: -.01em; }
h2 { font-size: clamp(40px, 6.4vw, 88px); line-height: .95; }
h3 { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.05; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }

/* scroll progress */
.progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); z-index: 60; }

/* header */
.top { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); transition: transform .4s var(--ease); }
.top.hide { transform: translateY(-100%); }
.top .wrap { display: flex; align-items: center; gap: 24px; padding-block: 14px; }
.brand { font-family: var(--f-display); font-size: 24px; text-decoration: none; white-space: nowrap; }
.brand small { font-family: var(--f-mono); font-size: 10px; letter-spacing: .12em; margin-left: 8px; color: var(--muted); vertical-align: 3px; }
.nav { display: flex; gap: 22px; margin-left: auto; flex-wrap: wrap; }
.nav a { text-decoration: none; font-size: 14px; color: var(--muted); position: relative; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease); }
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.theme { width: 38px; height: 38px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line); font-size: 16px; transition: transform .5s var(--ease); }
.theme:hover { transform: rotate(180deg); }
.btn { display: inline-flex; align-items: center; gap: 10px; background: var(--ink); color: var(--paper); text-decoration: none; padding: 12px 20px; border-radius: 999px; font-size: 14px; font-weight: 500; white-space: nowrap; transition: background .25s, color .25s, transform .25s var(--ease); }
.btn:hover { background: var(--accent); color: var(--accent-ink); transform: translateY(-2px); }
.btn .arr { transition: transform .3s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
@media (max-width: 960px) { .nav { display: none; } .theme { margin-left: auto; } }
@media (max-width: 560px) { .brand small { display: none; } .top .btn { padding: 10px 14px; } .top .btn .long { display: none; } }

/* hero */
.hero .wrap { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(0,1fr); gap: clamp(24px,4vw,64px); padding-block: clamp(40px,7vw,96px) clamp(40px,6vw,80px); align-items: end; }
.hero h1 { font-size: clamp(48px, 6.6vw, 104px); line-height: .9; margin-top: 20px; }
.hero h1 em, .contact h2 em { font-style: normal; color: var(--accent); }
.hero .lead { max-width: 34em; font-size: clamp(17px, 1.4vw, 19px); margin-top: 28px; }
.ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 0 24px; margin-top: 48px; border-top: 1px solid var(--line); }
.facts div { padding-top: 18px; display: grid; grid-template-rows: auto 1fr; gap: 10px; align-content: start; }
.facts b { display: block; font-family: var(--f-display); font-weight: 400; font-size: clamp(22px, 1.9vw, 30px); line-height: 1.05; white-space: nowrap; }
.facts span { font-size: 13px; line-height: 1.5; color: var(--muted); }
/* hero media: big runway frame + two stacked walk videos, all edges aligned */
.hero .wrap { align-items: stretch; }
.hero .wrap > .hero-media { align-self: stretch; }
.hero-media { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; min-height: 560px; }
.hero-media figure { margin: 0; position: relative; overflow: hidden; background: var(--line); min-height: 0; }
.hm-main { background: #0d0d10; animation: heroImg 1.6s var(--ease) .15s both; }
.hm-video { background: #e6dccd; }
.hm-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 30%; transform-origin: 70% 30%; animation: kb 18s ease-out both; }
.hm-video { animation: heroVid 1.1s var(--ease) both; }
.hm-video:nth-of-type(2) { animation-delay: .7s; }
.hm-video:nth-of-type(3) { animation-delay: .9s; }
.hm-video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-media figcaption { position: absolute; left: 10px; top: 10px; z-index: 1; color: #fff; background: rgba(0,0,0,.45); padding: 5px 9px; font-size: 10px; letter-spacing: .1em; }
@keyframes heroImg { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes heroVid { from { opacity: 0; transform: translateY(30px); } }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .facts b { font-size: 26px; }
  .hero-media { min-height: 0; height: 110vw; max-height: 640px; }
  .hero-media figcaption { font-size: 9px; white-space: nowrap; max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } .facts div { grid-template-rows: none; grid-template-columns: 130px 1fr; gap: 12px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); } .facts b { white-space: normal; font-size: 22px; } }

/* marquee */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding-block: 18px; background: var(--surface); }
.mq-track { display: flex; gap: 28px; width: max-content; animation: mq 38s linear infinite; font-family: var(--f-display); font-size: clamp(28px, 3.6vw, 48px); line-height: 1; white-space: nowrap; }
.mq-track i { font-style: normal; color: var(--accent); font-size: .6em; align-self: center; }
.marquee:hover .mq-track { animation-play-state: paused; }
@keyframes mq { to { transform: translateX(-50%); } }

/* sections */
section { scroll-margin-top: 72px; }
.sec { padding-block: clamp(56px, 8vw, 112px); border-top: 1px solid var(--line); }
#before-after.sec { border-top: 0; }
.sec-head { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,26em); gap: 24px 48px; align-items: start; margin-bottom: clamp(28px, 4vw, 48px); }
.sec-head p { color: var(--muted); padding-top: .55em; }
@media (max-width: 860px) { .sec-head p { padding-top: 0; } }
@media (max-width: 860px) { .sec-head { grid-template-columns: 1fr; } }

/* before/after */
.ba { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: clamp(24px,4vw,56px); align-items: center; }
.ba-stage { position: relative; aspect-ratio: 2/3; max-height: 82vh; width: 100%; max-width: 640px; justify-self: center; overflow: hidden; background: var(--line); user-select: none; touch-action: pan-y; }
.ba-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .35s; }
.ba-stage .after { clip-path: inset(0 0 0 var(--pos, 50%)); }
.ba-stage.anim .after { transition: clip-path .9s var(--ease), opacity .35s; }
.ba-stage.anim .ba-line, .ba-stage.anim .ba-knob { transition: left .9s var(--ease); }
.ba-line { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 2px; background: var(--surface); transform: translateX(-1px); pointer-events: none; }
.ba-knob { position: absolute; top: 50%; left: var(--pos, 50%); width: 52px; height: 52px; border-radius: 50%; background: var(--surface); color: var(--ink); transform: translate(-50%,-50%); display: grid; place-items: center; font-family: var(--f-mono); font-size: 14px; box-shadow: 0 4px 20px rgba(0,0,0,.25); pointer-events: none; }
.ba-knob::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid var(--surface); animation: pulse 2.2s ease-out infinite; }
@keyframes pulse { from { transform: scale(.9); opacity: .9; } to { transform: scale(1.5); opacity: 0; } }
.ba-tag { position: absolute; top: 14px; padding: 6px 10px; background: var(--shade); color: #fff; font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.ba-tag.l { left: 14px; } .ba-tag.r { right: 14px; }
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.ba-copy h2 { margin-bottom: 24px; }
.ba-copy ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.ba-copy li { display: grid; grid-template-columns: 28px 1fr; gap: 8px; align-items: baseline; }
.ba-copy li .mono { color: var(--accent); }
.ba-thumbs { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 8px; margin-top: 32px; }
.ba-thumbs button { aspect-ratio: 2/3; overflow: hidden; opacity: .55; transition: opacity .25s, transform .25s var(--ease); }
.ba-thumbs button:hover { opacity: .85; transform: translateY(-3px); }
.ba-thumbs button[aria-pressed="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--accent); }
.ba-thumbs img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
@media (max-width: 860px) { .ba { grid-template-columns: 1fr; } .ba-stage { max-height: none; } }

/* films */
.films { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); gap: 12px; grid-auto-flow: row dense; }
.film { position: relative; margin: 0; background: var(--line); overflow: hidden; }
.film video { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.film:hover video { transform: scale(1.03); }
.film.on video { transform: none; }
.film .play { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 16px; color: #fff; background: linear-gradient(to top, rgba(0,0,0,.62), rgba(0,0,0,0) 55%); text-align: left; transition: opacity .3s; }
.film .play .t { font-family: var(--f-display); font-size: clamp(20px, 2vw, 26px); line-height: 1.1; }
.film .play .mono { opacity: .85; margin-top: 6px; font-size: 11px; }
.film .play i { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.7); display: grid; place-items: center; font-style: normal; font-size: 14px; transition: background .25s, color .25s, transform .3s var(--ease); }
.film:hover .play i { background: #fff; color: #000; transform: scale(1.1); }
.film.on .play { opacity: 0; pointer-events: none; }
.f-a, .f-b { grid-column: span 8; aspect-ratio: 16/9; }
.f-tall { grid-column: span 4; grid-row: span 2; }
.f-h { grid-column: span 12; aspect-ratio: 21/9; }
.f-s { grid-column: span 3; aspect-ratio: 3/4; }
.f-s .play .t { font-size: 20px; }
@media (max-width: 860px) { .f-a, .f-b { grid-column: span 12; } .f-h { grid-column: span 12; aspect-ratio: 16/9; } .f-tall { grid-column: span 6; grid-row: auto; aspect-ratio: 9/16; } .f-s { grid-column: span 6; } }
.walks-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: 56px; flex-wrap: wrap; }
.walks { display: flex; gap: 10px; overflow-x: auto; margin-top: 24px; padding: 0 max(16px, calc((100vw - var(--max)) / 2 + 16px)) 10px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.walks figure { margin: 0; flex: 0 0 clamp(150px, 16vw, 220px); scroll-snap-align: start; position: relative; overflow: hidden; }
.walks video { width: 100%; aspect-ratio: 9/16; object-fit: cover; background: var(--line); transition: transform .8s var(--ease); }
.walks figure:hover video { transform: scale(1.04); }
.walks figcaption { position: absolute; left: 8px; bottom: 8px; color: #fff; background: var(--shade); padding: 3px 7px; font-family: var(--f-mono); font-size: 10px; letter-spacing: .08em; }

/* cases */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.chip { padding: 9px 16px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; color: var(--muted); transition: background .25s, color .25s; }
.chip:hover { color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); box-shadow: none; }
.cases { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: clamp(16px,2vw,28px) clamp(12px,1.6vw,24px); }
.case { display: flex; flex-direction: column; gap: 12px; text-decoration: none; }
.case .cv { position: relative; aspect-ratio: 4/5; overflow: hidden; background: var(--line); }
.case .cv img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; transition: transform .8s var(--ease); }
.case .cv::after { content: "Открыть кейс →"; position: absolute; inset: auto 12px 12px auto; background: var(--accent); color: var(--accent-ink); padding: 6px 10px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; transform: translateY(12px); opacity: 0; transition: opacity .3s, transform .4s var(--ease); }
.case:hover .cv img { transform: scale(1.05); }
.case:hover .cv::after { opacity: 1; transform: none; }
.case .cv .n { position: absolute; left: 12px; bottom: 12px; background: var(--surface); color: var(--ink); padding: 5px 9px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; }
.case .cv .kind { position: absolute; right: 12px; top: 12px; background: var(--shade); color: #fff; padding: 5px 9px; font-family: var(--f-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.case h3 { font-size: clamp(22px, 2vw, 28px); transition: color .25s; }
.case:hover h3 { color: var(--accent); }
.case p { font-size: 14px; color: var(--muted); }
.case.feat { grid-column: span 2; }
.case.feat .cv { aspect-ratio: 16/10; }
@media (max-width: 1000px) { .cases { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 560px) { .cases { grid-template-columns: 1fr; } .case.feat { grid-column: auto; } .case.feat .cv { aspect-ratio: 4/5; } }

/* services */
.svc { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); border-top: 1px solid var(--ink); }
/* each card spans 4 shared rows (label, title, list, footer) so rows line up across columns */
.svc { grid-template-rows: repeat(4, auto); }
.svc article { grid-row: span 4; display: grid; grid-template-rows: subgrid; row-gap: 12px; padding: 24px 24px 28px; border-right: 1px solid var(--line); transition: background .3s; }
.svc article:hover { background: var(--surface); }
.svc article:first-child { padding-left: 0; }
.svc article:last-child { border-right: 0; padding-right: 0; }
.svc article > * { margin: 0; }
.svc h3 { align-self: start; }
.svc .use { margin-top: 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--accent); }
.terms-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 0 32px; margin-top: clamp(40px, 5vw, 64px); }
.terms-grid div { border-top: 1px solid var(--line); padding: 18px 0 22px; display: grid; gap: 8px; align-content: start; }
.terms-grid .mono { color: var(--accent); }
.terms-grid p { color: var(--muted); font-size: 15px; }
@media (max-width: 860px) { .terms-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .terms-grid { grid-template-columns: 1fr; } }
.hero-tags { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hero-tags li { padding: 6px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; color: var(--ink); transition: background .25s, color .25s; }
.hero-tags li:hover { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.svc ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14px; display: grid; gap: 4px; }
.terms { display: flex; gap: 12px 32px; flex-wrap: wrap; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; }
.terms b { font-weight: 600; }
@media (max-width: 1000px) { .svc { grid-template-columns: repeat(2, minmax(0,1fr)); } .svc article:nth-child(odd) { padding-left: 0; } .svc article:nth-child(2) { border-right: 0; } .svc article:nth-child(even) { padding-right: 0; } .svc article:nth-child(n+3) { border-top: 1px solid var(--line); } }
@media (max-width: 560px) { .svc { grid-template-columns: 1fr; } .svc article { padding-left: 0 !important; padding-right: 0; border-right: 0; } .svc article + article { border-top: 1px solid var(--line); } }

/* process */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 20px; counter-reset: s; }
.steps li { counter-increment: s; display: grid; gap: 10px; align-content: start; padding-top: 16px; border-top: 1px solid var(--line); position: relative; }
.steps li::after { content: ""; position: absolute; top: -1px; left: 0; height: 1px; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 1s var(--ease) var(--sd, 0s); }
.steps.in li::after { transform: scaleX(1); }
.steps li::before { content: counter(s, decimal-leading-zero); font-family: var(--f-mono); font-size: 12px; color: var(--accent); }
.steps b { font-weight: 600; }
.steps p { font-size: 14px; color: var(--muted); }
@media (max-width: 1000px) { .steps { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* faq */
.faq { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 48px; }
.faq details { border-top: 1px solid var(--line); padding-block: 18px; }
.faq summary { cursor: pointer; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--f-mono); color: var(--accent); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details[open] p { animation: drop .4s var(--ease); }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }
.faq p { margin-top: 10px; color: var(--muted); font-size: 15px; max-width: 38em; }
@media (max-width: 860px) { .faq { grid-template-columns: 1fr; } }

/* contacts */
.contact { background: var(--ink); color: var(--paper); --line: color-mix(in srgb, var(--paper) 22%, transparent); }
:root:not([data-theme="dark"]) .contact h2 em { color: #D0596A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .contact h2 em { color: var(--accent); } }
.contact .sec { border-top: 0; }
.contact h2 { font-size: clamp(48px, 8vw, 120px); }
.clist { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); margin-top: 48px; border-top: 1px solid var(--line); }
.clist div { padding: 20px 20px 0 0; display: grid; gap: 6px; min-width: 0; }
.clist .val { font-family: var(--f-display); font-size: clamp(24px, 2.6vw, 34px); user-select: all; word-break: break-word; }
.clist .acts { display: flex; gap: 14px; font-size: 14px; }
.clist .acts a, .clist .acts button { color: var(--paper); opacity: .75; text-decoration: underline; text-underline-offset: 3px; }
.clist .acts a:hover, .clist .acts button:hover { opacity: 1; }
.contact .mono { opacity: .65; }
.clist .val { font-size: clamp(22px, 2.2vw, 30px); }
@media (max-width: 1100px) { .clist { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .clist { grid-template-columns: 1fr; } }
footer { background: var(--ink); color: var(--paper); }
footer .meta-note { flex-basis: 100%; font-size: 12px; opacity: .8; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 24px; border-top: 1px solid color-mix(in srgb, var(--paper) 18%, transparent); font-size: 13px; opacity: .75; }

/* case page */
.case-page { animation: pageIn .6s var(--ease); }
@keyframes pageIn { from { opacity: 0; transform: translateY(16px); } }
.case-head { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 24px 56px; padding-block: clamp(32px,5vw,64px); align-items: start; }
.case-head h1 { font-size: clamp(44px, 6vw, 92px); line-height: .92; }
.back { display: inline-flex; gap: 8px; color: var(--muted); text-decoration: none; margin-bottom: 28px; transition: color .2s, gap .3s var(--ease); }
.back:hover { color: var(--ink); gap: 12px; }
.case-cover { overflow: hidden; aspect-ratio: 3/4; max-height: calc(100vh - 120px); position: sticky; top: 84px; background: var(--line); }
.case-cover img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; animation: kb 14s ease-out both; }
@keyframes kb { from { transform: scale(1.12); } to { transform: scale(1); } }
.brief { display: grid; gap: 18px; margin: 32px 0 0; }
.brief dt { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.brief dd { margin: 4px 0 0; }
.brief ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.note { font-size: 13px; color: var(--muted); border-left: 2px solid var(--accent); padding-left: 12px; }
.gal-sec { padding-top: 40px; }
.gal-sec h2 { font-size: clamp(32px, 4vw, 54px); margin-bottom: 24px; }
.gal { columns: 3 260px; column-gap: 12px; }
.gal.small { columns: 6 120px; column-gap: 8px; }
.gal button { display: block; width: 100%; margin: 0 0 12px; break-inside: avoid; background: var(--line); overflow: hidden; position: relative; }
.gal.small button { margin-bottom: 8px; }
.gal img, .gal video { width: 100%; height: auto; transition: transform .8s var(--ease); }
.gal button:hover img, .gal button:hover video { transform: scale(1.03); }
.gal .vid span { position: absolute; left: 10px; top: 10px; background: var(--shade); color: #fff; padding: 4px 8px; font-family: var(--f-mono); font-size: 10px; letter-spacing: .08em; }
.next-case { margin: 72px 0 80px; border-top: 1px solid var(--line); padding-top: 32px; display: flex; justify-content: space-between; align-items: baseline; gap: 20px; flex-wrap: wrap; }
.next-case a { font-family: var(--f-display); font-size: clamp(32px, 4.4vw, 60px); text-decoration: none; transition: color .25s; }
.next-case a:hover { color: var(--accent); }
@media (max-width: 860px) { .case-head { grid-template-columns: 1fr; } .case-cover { position: static; max-height: 70vh; } .gal.small { columns: 3; } }

/* lightbox */
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(8,8,8,.94); display: grid; grid-template-columns: auto 1fr auto; align-items: center; padding: 56px 8px 40px; animation: fade .25s; }
@keyframes fade { from { opacity: 0; } }
.lb img, .lb video { max-height: calc(100vh - 120px); max-width: 100%; margin: auto; object-fit: contain; animation: zoomIn .35s var(--ease); }
@keyframes zoomIn { from { opacity: 0; transform: scale(.97); } }
.lb .stage { min-width: 0; height: 100%; display: grid; place-items: center; }
.lb button { color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 22px; }
.lb button:hover { background: rgba(255,255,255,.12); }
.lb .close { position: absolute; top: 8px; right: 12px; }
.lb .count { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; color: #bbb; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 999px; font-size: 14px; z-index: 200; animation: drop .3s var(--ease); }

/* ---------- motion ---------- */
.js .rv { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease) var(--d, 0s), transform .9s var(--ease) var(--d, 0s); }
.js .rv.in { opacity: 1; transform: none; }
.js .split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.js .split .w > span { display: inline-block; transform: translateY(105%); transition: transform 1s var(--ease); transition-delay: calc(var(--i) * 60ms); }
.js .split.in .w > span { transform: none; }
.js .stagger > * { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.js .stagger.in > * { opacity: 1; transform: none; }
.js .reveal-img { clip-path: inset(100% 0 0 0); transition: clip-path 1.3s var(--ease) var(--d, .1s); }
.js .reveal-img.in { clip-path: inset(0 0 0 0); }
.js .case.rv .cv { clip-path: inset(8% 8% 8% 8%); transition: clip-path 1.1s var(--ease) var(--d, 0s); }
.js .case.rv.in .cv { clip-path: inset(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .rv, .js .stagger > *, .js .split .w > span { opacity: 1 !important; transform: none !important; }
  .js .reveal-img, .js .case.rv .cv { clip-path: none !important; }
}
