:root {
  --bg: #f3f2ef; --fg: #111; --dim: #8a8884; --line: #d9d6d1; --tile: #e6e4e0; --tile2: #dcd9d4;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit;
         background: none; border: 0; padding: 0; cursor: pointer; }
.dim { color: var(--dim); }

/* top */
header.top { position: sticky; top: 0; z-index: 5; background: var(--bg);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: max(22px, env(safe-area-inset-top)) 16px 22px; }
header.top .mid { text-align: center; }
header.top .right { text-align: right; }
@media (max-width: 699px) {
  header.top { grid-template-columns: 1fr 1fr; row-gap: 18px; }
  header.top .mid { grid-column: 1 / -1; grid-row: 1; }
}
.tabs { display: flex; gap: 22px; }
.tabs button { color: var(--dim); }
.tabs button[aria-pressed="true"] { color: var(--fg); }

main { max-width: 1240px; margin: 0 auto; padding: 24px 16px 96px; }

/* films grid */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 56px 16px; }
@media (min-width: 700px)  { .grid { grid-template-columns: repeat(3, 1fr); gap: 72px 32px; } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(4, 1fr); gap: 88px 48px; } }
.item { display: block; width: 100%; text-align: center; }
.frame { position: relative; aspect-ratio: 9 / 16; overflow: hidden; background: var(--tile); }
.frame video, .frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.frame.ph { background: linear-gradient(160deg, var(--tile), var(--tile2)); }
.code { display: block; margin-top: 14px; }
.item.live .frame { transition: transform .5s cubic-bezier(.2,.7,.2,1); }
@media (hover: hover) { .item.live:hover .frame { transform: scale(1.02); } }
.item.ph { cursor: default; }
.item.ph .code { color: var(--dim); }

/* brands list */
.brands { max-width: 760px; margin: 0 auto; }
.brand { display: grid; grid-template-columns: 52px 1fr; column-gap: 12px; padding: 22px 0; border-top: 1px solid var(--line); }
.brand .row { grid-column: 2; }
.brand:last-child { border-bottom: 1px solid var(--line); }
.brand .name { font-size: 11px; }
.brand .row { margin-top: 8px; line-height: 1.7; }
.brand .result { color: var(--fg); }
@media (min-width: 700px) {
  .brand { grid-template-columns: 80px 1.1fr 1fr 1.4fr; align-items: baseline; column-gap: 16px; }
  .brand .row { margin-top: 0; grid-column: auto; }
}

/* footer */
footer.bottom { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 28px;
  padding: 0 16px max(32px, env(safe-area-inset-bottom)); color: var(--dim); }
footer.bottom a:hover { color: var(--fg); }
.views { width: 100%; text-align: center; color: var(--fg); margin-bottom: 18px; font-variant-numeric: tabular-nums; }

.btn { display: inline-block; padding: 14px 22px; background: var(--fg); color: var(--bg); }
.btn:hover { opacity: .85; }

/* full-screen viewer */
#view { position: fixed; inset: 0; z-index: 10; background: #000; color: #f2efe9;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .35s; }
#view.open { opacity: 1; pointer-events: auto; }
#view video { height: 100%; max-width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: #000; }
@media (max-aspect-ratio: 9/16) { #view video { width: 100%; height: auto; } }
.vbar { position: fixed; left: 16px; right: 16px; display: flex; justify-content: space-between; gap: 16px; z-index: 11; }
.vtop { top: max(20px, env(safe-area-inset-top)); }
.vbot { bottom: max(24px, env(safe-area-inset-bottom)); color: rgba(242,239,233,.65); }
.vbot button:hover, .vtop button:hover { color: #fff; }
#vinfo { position: fixed; left: 16px; right: 16px; bottom: calc(max(24px, env(safe-area-inset-bottom)) + 30px);
  z-index: 11; text-align: center; color: #f2efe9; line-height: 1.8;
  opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s; }
#view.info #vinfo { opacity: 1; transform: none; }
