/* KAYZE Studio — page Marques (marques.html).
   Same world as the site: black, Poppins, white, Instrument Serif italic for the accents (font-face in kayze.css),
   the sand gold only as a detail. Everything is visible by default; motion only adds to it.
   --p (0 -> 1) comes from js/kayze-marques.js: how far a block has come up the screen. Without JS it stays 1. */

.kzm { --kzm-gold: #e9c49a; --kzm-line: #ffffff1f; --kzm-mute: #a9a9a9; --kzm-text: #cfcfcf; --kzm-ease: cubic-bezier(.16, 1, .3, 1);
  background: #000; color: #fff; overflow-x: clip; }
.kzm ::selection { background: var(--kzm-gold); color: #000; }
.kzm-wrap { max-width: 1240px; margin: 0 auto; padding-inline: max(24px, 4vw); } /* same column as the menu and the footer (.kz3-wrap) */
.kzm em, .kzm-serif { font-family: "Instrument Serif", "Times New Roman", serif; font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.kzm-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.kzm .kz-btn svg { width: 15px; height: 15px; flex: none; }

/* ---------- Hero: title, then the showreel in a cinema letterbox ---------- */
.kzm-hero { padding-top: clamp(140px, 17vw, 230px); }
.kzm-hero-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); align-items: end; gap: clamp(28px, 4vw, 64px); }
.kzm-hero h1 { margin: 0; font-size: clamp(44px, 8vw, 128px); font-weight: 500; line-height: .98; letter-spacing: -.045em; }
.kzm-hero h1 em { font-size: 1.08em; letter-spacing: -.02em; }
.kzm-line { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.kzm-line > span { display: block; }
.kzm-lead { margin: 0 0 28px; color: var(--kzm-text); font-size: clamp(17px, 1.45vw, 20px); line-height: 1.55; max-width: 34ch; }

/* The screen: a thin 2.39:1 band with rounded corners that opens to the full width as it comes up. */
.kzm-screen { --p: 1; --kzm-v: 17%; --kzm-h: calc(max(0px, (100% - 1240px) / 2) + max(24px, 4vw)); /* closed: edges on the text column */
  position: relative; margin-top: clamp(48px, 7vw, 104px); width: 100%; aspect-ratio: 16 / 9; max-height: 100svh; overflow: hidden; background: #0b0b0b;
  clip-path: inset(calc((1 - var(--p)) * var(--kzm-v)) calc((1 - var(--p)) * var(--kzm-h)) round calc((1 - var(--p)) * 28px)); }
.kzm-screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; scale: calc(1.14 - var(--p) * .14); }
.kzm-screen-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding: clamp(18px, 3vw, 44px) clamp(16px, 4vw, 48px); background: linear-gradient(#0000, #000b);
  opacity: clamp(0, (var(--p) - .7) * 3.4, 1); transition: opacity .3s; }
.kzm-screen-bar:focus-within { opacity: 1; }
.kzm-screen-title { font-size: clamp(22px, 2.6vw, 40px); font-weight: 500; letter-spacing: -.03em; line-height: 1; }

/* ---------- Selected projects ---------- */
.kzm-work { padding-top: clamp(96px, 12vw, 180px); }
.kzm-head { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: end; gap: 18px clamp(28px, 4vw, 64px); }
.kzm-head h2, .kzm-offer h2 { margin: 0; font-size: clamp(38px, 5.6vw, 88px); font-weight: 500; line-height: 1; letter-spacing: -.04em; text-wrap: balance; }
.kzm-head p { margin: 0; color: var(--kzm-text); font-size: clamp(16px, 1.35vw, 19px); line-height: 1.55; max-width: 38ch; }

.kzm-case { --p: 1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px); align-items: center;
  padding-block: clamp(56px, 8vw, 128px); }
.kzm-case + .kzm-case { border-top: 1px solid var(--kzm-line); }
.kzm-still { grid-column: 1 / span 7; grid-row: 1; position: relative; aspect-ratio: 5 / 6; max-height: calc(100svh - 150px); width: 100%; border-radius: 22px; overflow: hidden; background: #111; isolation: isolate; }
.kzm-still picture { display: block; height: 100%; transition: scale 1.6s var(--kzm-ease); }
/* The still "develops": it settles from a slight zoom and its shade lifts as it comes up the screen. */
.kzm-still img { display: block; width: 100%; height: 100%; object-fit: cover; scale: calc(1.15 - var(--p) * .15); }
.kzm-still::after { content: ""; position: absolute; inset: 0; background: #000; opacity: calc((1 - var(--p)) * .6); pointer-events: none; }
.kzm-copy { grid-column: 9 / span 4; grid-row: 1; }
.kzm-case:nth-child(even) .kzm-still { grid-column: 6 / span 7; }
.kzm-case:nth-child(even) .kzm-copy { grid-column: 1 / span 4; }
.kzm-brand { margin: 0; font-size: clamp(40px, 5vw, 80px); font-weight: 500; line-height: .95; letter-spacing: -.045em; text-wrap: balance; }
.kzm-tag { margin: 14px 0 0; font-size: clamp(24px, 2.2vw, 34px); line-height: 1.1; color: #e2e2e2; }
.kzm-desc { margin: 22px 0 0; color: var(--kzm-text); font-size: 16px; line-height: 1.6; max-width: 38ch; }
.kzm-meta { margin: 28px 0 0; }
.kzm-meta div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--kzm-line); font-size: 14.5px; line-height: 1.4; }
.kzm-meta dt { color: var(--kzm-mute); font-weight: 400; }
.kzm-meta dd { margin: 0; text-align: right; }
.kzm-frames { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 32px; align-items: start; }
.kzm-frames picture { display: block; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; background: #111;
  translate: 0 calc((1 - var(--p)) * 48px * var(--k, 1)); }
.kzm-frames picture + picture { --k: 2.2; margin-top: 36px; }
.kzm-frames img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (hover: hover) {
  .kzm-case:hover .kzm-still picture { scale: 1.04; }
}

/* ---------- What we do for brands ---------- */
.kzm-offer { padding-block: clamp(80px, 10vw, 160px); }
.kzm-list { list-style: none; margin: clamp(40px, 5vw, 72px) 0 0; padding: 0; border-bottom: 1px solid var(--kzm-line); }
.kzm-list li { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 24px; align-items: baseline;
  padding: clamp(24px, 3vw, 40px) 0; border-top: 1px solid var(--kzm-line); }
.kzm-list li::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--kzm-gold);
  scale: 0 1; transform-origin: 0 50%; transition: scale .9s var(--kzm-ease); }
.kzm-list h3 { margin: 0; font-size: clamp(28px, 3.5vw, 56px); font-weight: 500; line-height: 1.02; letter-spacing: -.035em; transition: translate .7s var(--kzm-ease); }
.kzm-list p { margin: 0; color: var(--kzm-text); font-size: clamp(15px, 1.25vw, 18px); line-height: 1.55; max-width: 40ch; }
@media (hover: hover) {
  .kzm-list li:hover::before { scale: 1 1; }
  .kzm-list li:hover h3 { translate: 12px 0; }
}

/* ---------- Closing call ---------- */
.kzm-cta { padding-block: clamp(96px, 12vw, 180px); border-top: 1px solid var(--kzm-line); text-align: center; }
.kzm-cta h2 { margin: 0 auto; max-width: 13ch; font-size: clamp(42px, 7vw, 112px); font-weight: 500; line-height: .98; letter-spacing: -.045em; text-wrap: balance; }
.kzm-cta p { margin: 24px auto 0; max-width: 40ch; color: var(--kzm-text); font-size: clamp(16px, 1.35vw, 19px); line-height: 1.55; }
.kzm-cta .kzm-actions { justify-content: center; margin-top: 36px; }

/* ---------- Smaller screens ---------- */
@media (max-width: 991px) {
  .kzm-hero-grid, .kzm-head { grid-template-columns: minmax(0, 1fr); }
  .kzm-case, .kzm-case:nth-child(even) { grid-template-columns: minmax(0, 1fr); }
  .kzm-case .kzm-still, .kzm-case:nth-child(even) .kzm-still { grid-column: 1; aspect-ratio: 3 / 2; }
  .kzm-case .kzm-copy, .kzm-case:nth-child(even) .kzm-copy { grid-column: 1; grid-row: 2; margin-top: 32px;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 32px; align-items: start; }
  .kzm-copy > :not(.kzm-frames) { grid-column: 1; }
  .kzm-copy .kzm-frames { grid-column: 2; grid-row: 1 / span 5; margin-top: 0; }
}
@media (max-width: 767px) {
  .kzm-screen { --kzm-v: 24%; aspect-ratio: 4 / 5; }
  .kzm-case .kzm-still, .kzm-case:nth-child(even) .kzm-still { aspect-ratio: 4 / 5; border-radius: 18px; }
  .kzm-case .kzm-copy, .kzm-case:nth-child(even) .kzm-copy { display: block; margin-top: 28px; }
  .kzm-copy .kzm-frames { margin-top: 28px; }
  .kzm-list li { grid-template-columns: minmax(0, 1fr); }
  .kzm-screen-bar .kz-btn { padding-inline: 18px; }
}

/* ---------- Entrance of the title (after the shutter) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .kzm-line > span { animation: kzm-rise 1.3s var(--kzm-ease) both; animation-delay: calc(.3s + var(--i, 0) * .12s); }
  .kzm-hero h1 em { display: inline-block; animation: kzm-focus 1.8s .6s var(--kzm-ease) both; }
  .kzm-hero-side { animation: kzm-fade 1.1s .8s var(--kzm-ease) both; }
  @keyframes kzm-rise { from { translate: 0 105%; } }
  @keyframes kzm-focus { from { opacity: 0; filter: blur(12px); letter-spacing: .14em; } }
  @keyframes kzm-fade { from { opacity: 0; translate: 0 24px; } }
}
.kzm .kz-reel-close svg { display: block; margin: auto; }

/* Delivered formats: vertical, square, landscape */
.kzm-formats { padding-block: clamp(56px, 7vw, 100px); }
.kzm-fmts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 32px); align-items: end; margin: 34px 0 0; padding: 0; list-style: none; }
.kzm-fmts li { display: grid; gap: 6px; }
.kzm-fmt-img { display: block; overflow: hidden; border-radius: 14px; background: #111; }
.kzm-fmt-img picture, .kzm-fmt-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.kzm-fmts b { margin-top: 10px; color: #e9c49a; font-size: 13px; font-weight: 600; letter-spacing: .2em; }
.kzm-fmts h3 { margin: 0; font-size: 20px; font-weight: 500; }
.kzm-fmts p { margin: 0; color: #bdbdbd; font-size: 15px; }
@media (max-width: 767px) { .kzm-fmts { grid-template-columns: minmax(0, 1fr); } .kzm-fmts li:first-child .kzm-fmt-img { max-width: 260px; } }
