/* /demo: vertical video page. One dark look, brand teal + mint.
   PC: chapters | video | what is on screen now, over a glow taken from the video.
   Phone: the whole video, chapters as bars on top, the two actions in a bar under it. */
:root {
    color-scheme: dark;
    --t: #17443C;
    --t2: #0A211D;
    --mint: #44D1A6;
    --ink: #FFFFFF;
    --ink-2: rgba(255, 255, 255, .74);
    --ink-3: rgba(255, 255, 255, .5);
    --glass: rgba(255, 255, 255, .12);
    --line: rgba(255, 255, 255, .18);
    --track: rgba(255, 255, 255, .32);
    --shade: rgba(0, 0, 0, .55);
    --sans: 'Sofia Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --cond: 'Sofia Sans Condensed', 'Sofia Sans', system-ui, sans-serif;
    --gutter: clamp(16px, 3.5vw, 56px);
    --vh: 100vh;
    --sh: min(calc(var(--vh) - 56px), 900px);
}
@supports (height: 100dvh) { :root { --vh: 100dvh; } }

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--t2); color: var(--ink); font: 16px/1.45 var(--sans); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }

#amb { position: fixed; inset: -12%; width: 124%; height: 124%; filter: blur(70px) brightness(.5) saturate(1.3); z-index: 0; }

.page {
    position: relative;
    z-index: 1;
    min-height: var(--vh);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.15fr);
    gap: clamp(24px, 3.6vw, 64px);
    align-items: center;
    padding: 28px max(var(--gutter), env(safe-area-inset-right, 0px)) 28px max(var(--gutter), env(safe-area-inset-left, 0px));
}
.side { display: grid; gap: 20px; min-width: 0; align-content: center; }
.back { justify-self: start; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 15px; }
.back:hover { color: var(--ink); }
.logo { display: inline-flex; justify-self: start; }
.logo svg { width: 148px; height: 38px; display: block; }
h1 { font: 700 clamp(34px, 3.7vw, 62px)/1 var(--cond); letter-spacing: -.012em; margin: 0; text-wrap: balance; }
.sub { margin: 0; color: var(--ink-2); font-size: 18px; max-width: 34ch; }

.chl { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.chl button { width: 100%; display: flex; gap: 14px; align-items: baseline; padding: 11px 14px; border: 0; border-radius: 10px; background: none; text-align: left; font-size: 18px; font-weight: 600; }
.chl button:hover { background: var(--glass); }
.chl .tm { font-variant-numeric: tabular-nums; color: var(--ink-3); font-weight: 400; font-size: 15px; min-width: 3ch; }
.chl .on { background: var(--glass); }
.chl .on .tm { color: var(--mint); }

.btns { display: flex; gap: 10px; flex-wrap: wrap; }
.rbtn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 48px; padding: 0 20px; border: 0; border-radius: 10px; background: var(--mint); color: var(--t2); font-weight: 700; font-size: 16px; white-space: nowrap; text-decoration: none; }
.rbtn:hover { filter: brightness(1.08); }
.rbtn.line { background: none; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.rbtn.line:hover { background: var(--glass); filter: none; }
.num { font-variant-numeric: tabular-nums; }
svg.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- the video ---------- */
.stage { position: relative; height: var(--sh); width: calc(var(--sh) * 9 / 16); border-radius: 22px; overflow: hidden; background: #000; box-shadow: 0 30px 80px var(--shade); }
video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.segs { position: absolute; top: 12px; left: 14px; right: 14px; display: flex; gap: 4px; z-index: 3; pointer-events: none; }
.segs i { height: 3px; border-radius: 3px; background: var(--track); overflow: hidden; }
.segs b { display: block; height: 100%; width: 0; background: var(--ink); }
.hud { position: absolute; top: 26px; left: 14px; right: 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; z-index: 3; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud-l { display: inline-flex; gap: 8px; align-items: center; min-width: 0; }
.mback { display: none; width: 38px; height: 38px; flex: none; border-radius: 50%; background: var(--shade); text-decoration: none; place-items: center; }
.chip { padding: 6px 12px; border-radius: 99px; background: var(--shade); font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vol { width: 96px; margin-left: auto; accent-color: var(--mint); }
.snd { display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none; border: 0; border-radius: 50%; background: var(--shade); }
.snd.off .w { display: none; }
.zone { position: absolute; top: 0; bottom: 0; background: none; border: 0; z-index: 2; padding: 0; -webkit-tap-highlight-color: transparent; }
.zone:focus-visible { outline-offset: -4px; }
.prev { left: 0; width: 28%; }
.mid { left: 28%; width: 44%; }
.next { right: 0; width: 28%; }
.hint { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); z-index: 3; pointer-events: none; display: inline-flex; gap: 10px; align-items: center; padding: 14px 22px; border-radius: 99px; background: var(--mint); color: var(--t2); font-weight: 700; font-size: 17px; white-space: nowrap; box-shadow: 0 10px 30px var(--shade); }
.pp { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); z-index: 3; pointer-events: none; width: 76px; height: 76px; border-radius: 50%; background: var(--shade); display: grid; place-items: center; }
.pp svg { width: 30px; height: 30px; fill: var(--ink); margin-left: 5px; }

.end { position: absolute; inset: 0; z-index: 5; background: linear-gradient(170deg, var(--t), var(--t2)); display: grid; align-content: center; gap: 12px; padding: 28px 24px; text-align: center; }
.end .logo { justify-self: center; }
.end h2 { font: 700 clamp(30px, 8vw, 40px)/1.02 var(--cond); margin: 8px 0 0; text-wrap: balance; }
.end p { margin: 0 0 10px; color: var(--ink-2); }
.end-links { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.again { background: none; border: 0; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; padding: 10px; font-size: 16px; }

.mbot { display: none; position: relative; z-index: 1; gap: 10px; padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.mbot .rbtn { flex: 1; }
.sq { display: inline-grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 10px; background: var(--glass); }

/* ---------- what is on screen now ---------- */
.eyeb { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; margin: 0; }
h2.now { font: 700 clamp(26px, 2.6vw, 40px)/1.05 var(--cond); margin: 0; }
.desc { margin: 0; color: var(--ink-2); font-size: 18px; max-width: 46ch; }
.shot { width: 100%; max-height: 42vh; object-fit: cover; object-position: left top; border-radius: 12px; box-shadow: 0 20px 50px var(--shade); display: block; background: #fff; }
.quote { font: 700 clamp(28px, 3vw, 46px)/1.05 var(--cond); margin: 0; color: var(--mint); text-wrap: balance; }
.who { display: flex; gap: 12px; align-items: center; padding-top: 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.who img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: 50% 12%; flex: none; }
.who + .who { border-top: 0; padding-top: 0; margin-top: -8px; }
.who b { display: block; }
.who span { color: var(--ink-2); font-size: 15px; }
.who a { text-decoration: none; }
.who a:hover { text-decoration: underline; }

@media (max-width: 1100px) {
    .page { grid-template-columns: minmax(0, 1fr) auto; }
    .right { display: none; }
}
@media (max-width: 760px) {
    .left, .right { display: none; }
    .page { display: flex; flex-direction: column; gap: 0; padding: 0; height: var(--vh); min-height: 0; }
    .stage { flex: 1; min-height: 0; width: 100%; height: auto; border-radius: 0; box-shadow: none; background: none; }
    video { object-fit: contain; }
    .mback { display: grid; }
    .mbot { display: flex; }
    .ended .mbot { display: none; }
    .segs { top: calc(10px + env(safe-area-inset-top, 0px)); }
    .hud { top: calc(24px + env(safe-area-inset-top, 0px)); }
}
