@font-face {
    font-family: 'Schibsted';
    src: url('fonts/schibsted-grotesk-latin-wght-normal.woff2') format('woff2');
    font-weight: 400 900; font-display: swap;
}
@font-face {
    font-family: 'JBM';
    src: url('fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2');
    font-weight: 100 800; font-display: swap;
}

:root {
    --bg: #0b0b0d;
    --bg-2: #121215;
    --surface: #17171b;
    --line: #26262c;
    --line-strong: #3a3a42;
    --text: #ecebe7;
    --muted: #8f8e96;
    --dim: #5d5c64;
    --accent: #ff5277;
    --move: #9fd3ff;
    --ui: #c9c8c2;
    --sans: 'Schibsted', system-ui, sans-serif;
    --mono: 'JBM', ui-monospace, monospace;
    --gutter: clamp(16px, 4vw, 56px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0; background: var(--bg); color: var(--text);
    font-family: var(--sans); font-size: 16px; line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
.mono { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Top bar */
.top {
    display: flex; align-items: center; gap: 28px;
    padding: 16px var(--gutter); border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 20; background: rgba(11, 11, 13, .92);
    backdrop-filter: saturate(1.2) blur(8px);
}
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: -.01em; }
.mark svg { fill: var(--text); }
.mark .dot { fill: var(--accent); }
.mark b { font-weight: 400; color: var(--muted); }
.top-nav { display: flex; gap: 20px; font-size: 14px; }
.top-nav a { color: var(--muted); text-decoration: none; }
.top-nav a:hover { color: var(--text); }
.meta { margin-left: auto; font-size: 12px; color: var(--dim); letter-spacing: .02em; }

/* Wall */
.wall-sec { padding: 34px var(--gutter) 56px; }
.wall-head { display: flex; align-items: end; justify-content: space-between; gap: 40px; max-width: calc(2 * min(62vh, 560px) * 9 / 16 + 30px); margin: 0 auto 26px; }
h1 { font-size: clamp(30px, 3.4vw, 46px); line-height: 1.02; letter-spacing: -.035em; font-weight: 700; margin: 0; max-width: 12ch; }
.lede { color: var(--muted); max-width: 44ch; margin: 0; font-size: 15px; }

.wall {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px;
    max-width: 1240px; margin: 0 auto; list-style: none; padding: 0;
}
.reel { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.frame {
    position: relative; aspect-ratio: 9 / 16; max-height: 62vh; width: 100%;
    margin: 0 auto; border-radius: 18px; overflow: hidden; background: #1e1e2e;
    border: 1px solid var(--line); display: block;
    transition: transform .35s cubic-bezier(.2, .7, .2, 1), border-color .2s;
}
@media (min-width: 761px) {
    .wall { display: flex; justify-content: center; gap: 30px; margin: 0; }
    .wall-head { flex-direction: column; align-items: start; gap: 14px; }
}
@media (min-width: 1081px) {
    .wall-sec { display: grid; grid-template-columns: minmax(0, 340px) auto; justify-content: center; align-items: center; column-gap: 64px; }
    .wall-head { gap: 18px; max-width: none; margin: 0; }
    .wall-head h1 { font-size: clamp(36px, 3.6vw, 52px); }
    .dots { grid-column: 1 / -1; }
    .reel { width: calc(min(68vh, 600px) * 9 / 16); flex: 0 0 auto; }
    .frame { max-height: none; }
}
.hit { position: absolute; inset: 0; z-index: 2; background: none; border: 0; padding: 0; cursor: pointer; border-radius: inherit; }
.hit:focus-visible { outline-offset: -3px; }
.frame:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.frame video, .frame img.poster {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
}
.frame img.poster { transition: opacity .4s; }
.frame.playing img.poster { opacity: 0; }
.frame .scrim {
    position: absolute; inset: auto 0 0 0; height: 34%;
    background: linear-gradient(to top, rgba(0, 0, 0, .55), transparent); pointer-events: none;
}
.frame .play {
    position: absolute; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--mono); font-size: 11.5px; letter-spacing: .03em; color: #fff;
    background: rgba(11, 11, 13, .72); border: 1px solid rgba(255, 255, 255, .14);
    padding: 6px 11px 6px 9px; border-radius: 999px;
}
.frame .play svg { fill: var(--accent); }
.frame .len {
    position: absolute; right: 12px; top: 12px; font-family: var(--mono); font-size: 11px;
    color: #fff; background: rgba(11, 11, 13, .62); padding: 3px 8px; border-radius: 999px;
}
.snd {
    position: absolute; z-index: 3; right: 12px; bottom: 12px; width: 36px; height: 36px; border-radius: 50%;
    display: grid; place-items: center; cursor: pointer;
    background: rgba(11, 11, 13, .72); border: 1px solid rgba(255, 255, 255, .14); color: #fff;
}
.snd[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #0b0b0d; }
.cap { display: flex; flex-direction: column; gap: 4px; padding: 0 2px; }
.cap h3 { margin: 0; font-size: 17px; letter-spacing: -.01em; font-weight: 650; }
.cap p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 4px 0 0; }
.chips li { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; }
.dots { display: none; }

/* How */
.how { border-top: 1px solid var(--line); background: var(--bg-2); padding: 64px var(--gutter) 90px; }
.how-head { max-width: 1240px; margin: 0 auto 40px; }
.label { font-size: 12px; color: var(--accent); letter-spacing: .06em; text-transform: uppercase; }
h2 { font-size: clamp(26px, 2.6vw, 36px); letter-spacing: -.03em; line-height: 1.05; margin: 10px 0 0; font-weight: 700; }
.step {
    display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 48px;
    max-width: 1240px; margin: 0 auto; padding: 34px 0; border-top: 1px solid var(--line);
}
.step-copy h3 { margin: 6px 0 8px; font-size: 20px; letter-spacing: -.015em; }
.step-copy p { margin: 0 0 16px; color: var(--muted); font-size: 14.5px; }
.n { font-size: 12px; color: var(--dim); }

.boards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; }
.boards button {
    display: flex; flex-direction: column; gap: 7px; width: 100%; padding: 0; border: 0;
    background: none; cursor: pointer; text-align: left;
}
.boards img {
    width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 10px;
    border: 1px solid var(--line); display: block; background: #1e1e2e; transition: border-color .2s, transform .25s;
}
.boards button:hover img { border-color: var(--accent); transform: translateY(-2px); }
.boards .bl { font-size: 12.5px; font-weight: 600; }
.boards .bt { font-family: var(--mono); font-size: 10.5px; color: var(--dim); }

.tl-wrap { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; align-items: start; min-width: 0; }
.tl-player { display: flex; flex-direction: column; gap: 10px; }
.tl-player video { width: 100%; aspect-ratio: 9 / 16; border-radius: 12px; border: 1px solid var(--line); background: #1e1e2e; display: block; object-fit: cover; }
.tl-player .btn { justify-content: center; font-size: 13px; padding: 8px 10px; }
.timeline { margin: 0; min-width: 0; }
.tl-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
#tl { display: block; width: 100%; min-width: 760px; height: auto; }
#tl text { font-family: var(--mono); font-size: 10px; fill: var(--dim); }
#tl .lane-l { fill: var(--muted); font-size: 10.5px; }
#tl .act { fill: var(--surface); stroke: var(--line-strong); }
#tl .act-t { fill: var(--text); font-family: var(--sans); font-size: 12px; font-weight: 600; }
#tl .beat { stroke: #1c1c21; }
#tl .bar { stroke: #2b2b32; }
#tl .dive { fill: var(--text); }
#tl .copy { fill: #2c2c34; }
#tl .copy-t { fill: var(--ui); font-size: 9.5px; }
#tl .ev-hit { stroke: var(--accent); }
#tl .ev-move { stroke: var(--move); }
#tl .ev-ui { stroke: var(--ui); opacity: .7; }
#tl .ph { stroke: #fff; stroke-width: 1.5; }
#tl .ph-h { fill: #fff; }
.legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: 11.5px; color: var(--muted); margin-top: 12px; align-items: center; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 7px; vertical-align: -1px; }
.sw-hit { background: var(--accent); }
.sw-move { background: var(--move); }
.sw-ui { background: var(--ui); }
.tc { margin-left: auto; color: var(--text); }

.tools { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.tools li { background: var(--bg); padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.tools b { font-size: 15px; font-weight: 650; }
.tools span { color: var(--muted); font-size: 13.5px; line-height: 1.45; }

.btn {
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
    background: var(--text); color: var(--bg); border: 1px solid var(--text);
    padding: 9px 15px; border-radius: 999px; font-size: 14px; font-weight: 600;
}
.btn svg { fill: currentColor; }
.btn:hover { background: #fff; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line-strong); padding: 9px; }
.btn.ghost:hover { border-color: var(--text); }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: rgba(8, 8, 10, .96); max-width: none; max-height: none; width: 100%; height: 100%; color: var(--text); }
.lightbox::backdrop { background: rgba(5, 5, 7, .9); }
.lb-inner { height: 100%; display: flex; align-items: center; justify-content: center; gap: 40px; padding: 28px; position: relative; }
.lb-inner video { height: min(88vh, 900px); aspect-ratio: 9 / 16; max-width: 100%; border-radius: 16px; background: #1e1e2e; }
.lb-side { width: 300px; display: flex; flex-direction: column; gap: 10px; }
.lb-side h2 { margin: 0; }
.lb-side p { margin: 0; color: var(--muted); font-size: 14.5px; }
.lb-kicker { font-size: 12px; color: var(--accent); }
.lb-nav { display: flex; gap: 8px; margin-top: 10px; }
.lb-close {
    position: absolute; top: 18px; right: 18px; width: 42px; height: 42px; border-radius: 50%;
    display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line-strong); cursor: pointer;
}

.ribbon {
    position: fixed; right: 14px; bottom: 14px; z-index: 40; text-decoration: none;
    font-family: var(--mono); font-size: 11.5px; padding: 4px 10px; border-radius: 999px;
    background: var(--surface); border: 1px solid var(--line-strong); color: var(--muted); opacity: .92;
}
.ribbon:hover { color: var(--text); border-color: var(--accent); }

/* Tablet */
@media (max-width: 1080px) {
    .step { grid-template-columns: 1fr; gap: 20px; }
    .boards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Phone: one film per screen, swipe between them */
@media (max-width: 760px) {
    .top { gap: 14px; padding: 12px 16px; }
    .top-nav, .meta { display: none; }
    .wall-sec { padding: 22px 0 34px; }
    .wall-head { flex-direction: column; align-items: start; gap: 10px; padding: 0 16px; margin-bottom: 18px; }
    .lede { font-size: 14.5px; }
    .wall {
        display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
        padding: 0 16px; scroll-padding: 0 16px; scrollbar-width: none;
    }
    .wall::-webkit-scrollbar { display: none; }
    .reel { flex: 0 0 76%; scroll-snap-align: center; }
    .frame { max-height: none; }
    .dots { display: flex; justify-content: center; gap: 7px; margin-top: 16px; }
    .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); transition: width .25s, background .25s; }
    .dots i.on { width: 18px; border-radius: 3px; background: var(--text); }
    .how { padding: 44px 16px 70px; }
    .boards { display: flex; overflow-x: auto; gap: 8px; margin: 0 -16px; padding: 0 16px 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
    .boards::-webkit-scrollbar { display: none; }
    .boards li { flex: 0 0 96px; scroll-snap-align: start; }
    .boards .bt { display: none; }
    .tools { grid-template-columns: 1fr; }
    .tl-wrap { grid-template-columns: 1fr; }
    .tl-player { flex-direction: row; align-items: center; }
    .tl-player video { width: 96px; }
    .lb-inner { flex-direction: column; gap: 14px; padding: 60px 16px 16px; justify-content: start; }
    .lb-inner video { height: auto; width: 100%; max-height: 66vh; width: auto; }
    .lb-side { width: 100%; }
    .lb-side h2 { font-size: 22px; }
    .lb-side p { font-size: 13.5px; }
    .ribbon { bottom: 10px; right: 10px; font-size: 10.5px; padding: 3px 8px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .frame, .boards img, .frame img.poster, .dots i { transition: none; }
    .frame:hover, .boards button:hover img { transform: none; }
}
