/* Roman Lapacz: a centered window floating over the painted sky */

:root {
  --serif: "Fraunces", Georgia, serif;
  --sans: "Geist", system-ui, sans-serif;
  --bg: #0E1015;
  --panel: #14171E;
  --line: rgba(255, 255, 255, .09);
  --text: #F2F4F8;
  --muted: rgba(242, 244, 248, .56);
  --shirt: #73B6F7;
  --radius: 22px;
  --r-tile: 6px;
  --pad: clamp(16px, 2.4vw, 32px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  background: #1F3F6B;
  color: var(--text);
  font-family: var(--sans); font-weight: 300; font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--shirt); color: #050507; }
:focus-visible { outline: 2px solid var(--shirt); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; top: 8px; background: #fff; color: #000; padding: 8px 12px; border-radius: 6px; z-index: 50; }
.skip:focus { left: 8px; }

/* ---------- the painted sky behind everything ---------- */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: #1F3F6B url(sky/sky-day.jpg) center / cover no-repeat; }
.backdrop video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 1.2s var(--ease); }
.backdrop .night { opacity: 0; }
body.is-night .backdrop .night { opacity: 1; }
body.is-night { background: #0B1630; }
.backdrop::after { content: ""; position: absolute; inset: 0; background: rgba(8, 18, 36, .12); }

/* ---------- the window ---------- */
.window {
  position: relative; width: min(1240px, calc(100% - 2 * clamp(10px, 5vw, 72px)));
  margin: clamp(10px, 6vh, 72px) auto;
  background: var(--bg); border-radius: var(--radius); overflow: clip;
  box-shadow: 0 50px 120px rgba(4, 12, 28, .45), 0 0 0 1px rgba(255, 255, 255, .06);
}

/* ---------- header pills ---------- */
.bar { position: relative; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: var(--pad); }
.bar.over { position: absolute; left: 0; right: 0; top: 0; }
.pill {
  display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 16px; border-radius: 999px;
  background: rgba(20, 23, 30, .55); border: 1px solid rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  font-size: 12px; font-weight: 400; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
}
.brand strong { font-weight: 500; letter-spacing: .14em; }
.brand span { color: var(--muted); }
.brand i { width: 1px; height: 14px; background: rgba(255, 255, 255, .2); }
.nav { display: flex; gap: 4px; padding: 0 4px; }
.nav a { padding: 6px 12px; border-radius: 999px; color: var(--muted); transition: color .2s, background .2s; }
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, .08); }
.menu-btn { display: none; width: 40px; height: 40px; padding: 0; justify-content: center; color: var(--text); cursor: pointer; }
.sheet { display: none; }
@media (max-width: 820px) {
  .nav { display: none; }
  .menu-btn { display: inline-flex; }
  .brand span, .brand i { display: none; }
  .sheet {
    display: flex; position: fixed; inset: 0; z-index: 40; flex-direction: column; justify-content: center; gap: 4px;
    padding: 0 28px; background: rgba(11, 13, 18, .96); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    font-family: var(--serif); font-size: 44px; font-weight: 380; font-variation-settings: "opsz" 144; letter-spacing: -.02em;
    opacity: 0; pointer-events: none; transition: opacity .25s var(--ease);
  }
  .sheet.open { opacity: 1; pointer-events: auto; }
  .sheet .close { position: absolute; top: 18px; right: 18px; }
}

/* ---------- featured film ---------- */
.feature { position: relative; aspect-ratio: 16 / 9; max-height: 82vh; width: 100%; background: var(--poster, #1B2440); overflow: hidden; }
.feature > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(0deg, rgba(5, 7, 12, .7) 0%, rgba(5, 7, 12, 0) 45%), linear-gradient(180deg, rgba(5, 7, 12, .45) 0%, rgba(5, 7, 12, 0) 25%); }
.feature .soon { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .45); }
.feature .title { position: absolute; z-index: 2; left: var(--pad); bottom: calc(var(--pad) + 4px); }
.feature .title a { display: block; font-family: var(--serif); font-weight: 380; font-variation-settings: "opsz" 144; font-size: clamp(32px, 4.4vw, 60px); line-height: 1; letter-spacing: -.02em; }
.feature .title span { display: block; margin-top: 8px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.ticks { position: absolute; z-index: 2; right: var(--pad); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 2px; }
.ticks button { width: 44px; height: 22px; padding: 0; background: none; border: 0; cursor: pointer; display: flex; align-items: center; justify-content: flex-end; }
.ticks button::before { content: ""; width: 16px; height: 1px; background: rgba(255, 255, 255, .45); transition: width .3s var(--ease), background .3s; }
.ticks button[aria-current="true"]::before { width: 30px; background: #fff; }
.round { position: absolute; z-index: 2; bottom: var(--pad); width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; background: rgba(20, 23, 30, .5); border: 1px solid rgba(255, 255, 255, .14); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); cursor: pointer; }
.feature .round { right: var(--pad); }
@media (max-width: 820px) {
  .feature { aspect-ratio: 4 / 5; max-height: none; }
  .ticks { top: auto; bottom: calc(var(--pad) + 60px); }
}

/* ---------- sections ---------- */
.section { padding: 56px var(--pad) 8px; }
.label { display: flex; align-items: baseline; gap: 20px; margin: 0 0 24px; font-family: var(--serif); font-weight: 380; font-variation-settings: "opsz" 144; font-size: clamp(28px, 3vw, 40px); line-height: 1; letter-spacing: -.01em; color: #fff; }
.label::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, .16); align-self: center; }
.label a { order: 2; font-family: var(--sans); font-size: 11px; font-weight: 400; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); transition: color .2s; }
.label a:hover { color: var(--text); }
.page-head { padding: 24px var(--pad) 0; }
.page-head h1 { margin: 0 0 8px; font-family: var(--serif); font-weight: 380; font-variation-settings: "opsz" 144; font-size: clamp(40px, 5vw, 64px); line-height: 1; letter-spacing: -.02em; }
.page-head p { margin: 0; max-width: 52ch; color: var(--muted); }

/* ---------- composition: 16:9 and 9:16 side by side at equal height ---------- */
.comp { display: flex; flex-direction: column; gap: 28px; }
.row { display: flex; gap: 16px; align-items: flex-start; }
.tile { flex: var(--r) 1 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; cursor: pointer; }
.frame { position: relative; overflow: hidden; border-radius: var(--r-tile); background: var(--poster, #1A1D25); }
.frame.h { aspect-ratio: 16 / 9; }
.frame.v { aspect-ratio: 9 / 16; }
.frame video, .frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.frame .soon { position: absolute; left: 12px; top: 10px; font-size: 11px; letter-spacing: .06em; color: rgba(255, 255, 255, .5); }
.frame > :first-child { transition: transform .7s var(--ease); }
.tile .frame { transition: transform .5s var(--ease); }
.tile:hover .frame { transform: scale(1.012); }
.cap { font-size: 14px; font-weight: 400; display: flex; gap: 8px; flex-wrap: wrap; }
.cap span { color: var(--muted); font-weight: 300; }
@media (max-width: 820px) {
  .row { flex-wrap: wrap; gap: 12px; }
  .tile.h { flex: 1 1 100%; }
  .tile.v { flex: 1 1 calc(50% - 6px); max-width: 64%; margin-inline: auto; }
  .comp { gap: 22px; }
}

/* ---------- project page ---------- */
.project { display: grid; gap: 24px; padding: 0 var(--pad) var(--pad); }
.project.v { grid-template-columns: minmax(0, 380px) minmax(0, 1fr); align-items: start; }
.project.h { grid-template-columns: minmax(0, 1fr); }
.player { position: relative; }
.player .frame { border-radius: 12px; }
.player .round { right: 14px; bottom: 14px; }
.info { display: grid; gap: 28px; padding: 28px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.project.h .info { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.info h1 { margin: 0 0 6px; font-family: var(--serif); font-weight: 380; font-variation-settings: "opsz" 144; font-size: clamp(36px, 4vw, 56px); line-height: 1; letter-spacing: -.02em; }
.info .meta { margin: 0 0 20px; color: var(--muted); font-size: 14px; }
.info .summary { margin: 0; max-width: 58ch; font-size: 17px; }
.credits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; margin: 0; align-content: start; }
.credits dt { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.credits dd { margin: 0; font-size: 13px; font-weight: 400; letter-spacing: .06em; text-transform: uppercase; }
.todo { display: inline-block; margin-top: 16px; font-size: 12px; color: #FFB4B4; border: 1px dashed rgba(255, 180, 180, .5); padding: 3px 8px; border-radius: 6px; }
.next { display: flex; justify-content: space-between; gap: 16px; padding: 18px var(--pad) var(--pad); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.next a:hover { color: var(--text); }
@media (max-width: 820px) {
  .project.v, .project.h .info { grid-template-columns: 1fr; }
  .project.v .player { max-width: 320px; margin: 0 auto; width: 100%; }
}

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; padding: 8px var(--pad) var(--pad); }
.about .lead { margin: 0 0 18px; font-size: clamp(20px, 2vw, 25px); line-height: 1.35; }
.about p { max-width: 58ch; }
.about .col { padding: 28px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.about h2 { margin: 0 0 10px; font-size: 10px; font-weight: 400; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.about ul { margin: 0 0 26px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; }
.about ul:last-child { margin-bottom: 0; }
@media (max-width: 820px) { .about { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.contact { margin-top: 64px; padding: 56px var(--pad) 40px; border-top: 1px solid var(--line); text-align: center; }
.contact h2 { margin: 0 0 14px; font-family: var(--serif); font-weight: 380; font-variation-settings: "opsz" 144; font-size: clamp(30px, 3.6vw, 48px); line-height: 1.05; letter-spacing: -.02em; }
.contact .sub { margin: 0 0 18px; color: var(--muted); font-size: 16px; }
.contact .mail { font-size: clamp(18px, 2vw, 22px); color: var(--shirt); }
.copy { margin-left: 10px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: none; color: var(--muted); font: 400 11px var(--sans); letter-spacing: .14em; text-transform: uppercase; cursor: pointer; vertical-align: middle; }
.copy:hover { color: var(--text); }
.wa-row { margin: 18px 0 0; }
.wa { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); color: var(--text); font-size: 15px; transition: border-color .2s, color .2s; }
.wa[hidden] { display: none; }
.wa:hover { border-color: #25D366; color: #25D366; }
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 20px var(--pad) 24px; border-top: 1px solid var(--line); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.foot a:hover { color: var(--text); }

/* ---------- play cursor ---------- */
.play-cursor {
  position: fixed; left: 0; top: 0; z-index: 30; pointer-events: none;
  width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%;
  background: var(--shirt); color: #fff; text-shadow: 0 1px 6px rgba(11, 22, 48, .35);
  display: flex; align-items: center; justify-content: center;
  font: 500 11px var(--sans); letter-spacing: .14em; text-transform: uppercase;
  transform: translate3d(var(--x, -200px), var(--y, -200px), 0) scale(0);
  transition: transform .35s var(--ease); will-change: transform;
}
.play-cursor.on { transform: translate3d(var(--x), var(--y), 0) scale(1); }
@media (pointer: fine) { .tile { cursor: none; } }
@media (pointer: coarse) { .play-cursor { display: none; } }

/* ---------- transitions ---------- */
@view-transition { navigation: auto; }
::view-transition-group(*) { animation-duration: .55s; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .play-cursor { display: none; }
  .tile { cursor: pointer; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .backdrop video { transition: none; }
}

/* ---------- campaigns with several films ---------- */
.eps { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.ep { position: relative; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel); cursor: pointer; color: var(--text); opacity: .6; transition: opacity .2s, border-color .2s; }
.ep.h { width: 128px; aspect-ratio: 16 / 9; }
.ep.v { width: 72px; aspect-ratio: 9 / 16; }
.ep img { width: 100%; height: 100%; object-fit: cover; }
.ep span { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 5px; font: 400 11px var(--sans); letter-spacing: .04em; background: linear-gradient(0deg, rgba(0,0,0,.75), rgba(0,0,0,0)); text-align: left; }
.ep:hover, .ep[aria-pressed="true"] { opacity: 1; }
.ep[aria-pressed="true"] { border-color: var(--shirt); }

/* ---------- showreel progress ---------- */
.feature .title a, .feature .title span { transition: opacity .25s var(--ease); }
.reel-bar { position: absolute; z-index: 2; left: var(--pad); right: var(--pad); bottom: 14px; height: 1px; background: rgba(255, 255, 255, .2); }
.reel-bar i { display: block; height: 100%; background: var(--shirt); transform-origin: left; transform: scaleX(0); }

/* ---------- AD Life ---------- */
.camps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.camp { display: grid; grid-template-rows: auto 1fr; border-radius: 14px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); }
.camp-img { aspect-ratio: 16 / 9; background: #1A1D25; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.camp-img img { width: 100%; height: 100%; object-fit: cover; }
.camp-img.is-film { aspect-ratio: 16 / 9; background: #000; }
.camp-img video { width: 100%; height: 100%; object-fit: cover; display: block; }
.camp-img.is-pair { gap: 8px; padding: 12px; }
.camp-img.is-pair video { width: auto; height: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 8px; }
/* AD Life covers: the campaign board first, the film on click */
.camp-img.has-cover { position: relative; }
.camp-cover { position: absolute; inset: 0; z-index: 2; padding: 0; border: 0; background: #000; cursor: pointer; display: block; width: 100%; height: 100%; }
.camp-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease), filter .4s; }
.camp-cover.contain { background: #fff; }
.camp-cover.contain img { object-fit: contain; }
.camp-cover:hover img { transform: scale(1.03); filter: brightness(.88); }
.camp-img .camp-play {
  position: absolute; right: 16px; bottom: 16px; width: 64px; height: 64px; margin: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: var(--shirt); color: #fff; padding: 0;
  font: 500 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; text-shadow: 0 1px 6px rgba(11, 22, 48, .35);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35); transition: transform .35s var(--ease);
}
.camp-cover:hover .camp-play, .camp-cover:focus-visible .camp-play { transform: scale(1.1); }
.camp-img.played .camp-cover { display: none; }
@media (prefers-reduced-motion: reduce) { .camp-cover img, .camp-play { transition: none; } }
.camp-img span { font-family: var(--serif); font-size: 28px; color: rgba(255, 255, 255, .28); padding: 0 24px; text-align: center; }
.camp-body { padding: 22px 24px 26px; }
.camp-meta { margin: 0 0 6px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.camp h2 { margin: 0 0 10px; font-family: var(--serif); font-weight: 380; font-variation-settings: "opsz" 144; font-size: 28px; line-height: 1.08; letter-spacing: -.01em; }
.camp p { margin: 0 0 12px; font-size: 15px; }
.camp-award { color: var(--shirt); font-size: 13px !important; letter-spacing: .04em; }
.camp-link { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.camp-link:hover { color: var(--text); }
@media (max-width: 820px) { .camps { grid-template-columns: 1fr; } }

/* external link on a project page, like a series on a brand channel */
.info .ext { display: inline-block; margin: 4px 0 14px; color: var(--shirt); font-size: 15px; text-decoration: none; border-bottom: 1px solid rgba(115, 182, 247, .4); padding-bottom: 2px; }
.info .ext:hover { border-color: var(--shirt); }

/* The challenge: a short note under the description */
.info .challenge { margin: 20px 0 20px; padding-left: 16px; border-left: 2px solid var(--shirt); max-width: 40em; }
.info .challenge span { display: block; margin-bottom: 6px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--shirt); }
.info .challenge p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--text); }

/* Back link: returns to wherever the visitor came from */
.back { display: inline-block; margin: 6px var(--pad) 0; padding: 6px 0; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); text-decoration: none; transition: color .2s; }
.back:hover, .back:focus-visible { color: #fff; }
