/* Layout: the whole screen is a pane of glass over a live film. The visitor strikes it; it cracks, the view splits into
   sensor feeds, then the pane shatters to one clear view. Words sit on a single caption plate, like a broadcast lower third.
   System: one typeface plus mono for readouts, fixed type and spacing scales, no gradients, motion on transform and opacity. */
:root{
  color-scheme:dark;
  --bg:#000000;
  --plate:rgba(0,0,0,.62);
  --text:#FFFFFF;
  --muted:#9B9B9B;
  --line:rgba(255,255,255,.28);
  --rec:#FF4D4D;
  --font:"Geist","Manrope",system-ui,-apple-system,"Segoe UI",sans-serif;
  --mono:"Geist Mono",ui-monospace,"SF Mono",Menlo,monospace;
  --ease:cubic-bezier(0.22, 1, 0.36, 1);
  --gutter:24px;
}
@media (min-width:768px){ :root{ --gutter:48px; } }
@media (min-width:1200px){ :root{ --gutter:64px; } }
*,*::before,*::after{ box-sizing:border-box; }
html,body{ height:100%; }
body{ margin:0; overflow:hidden; background:var(--bg); color:var(--text); font-family:var(--font); font-size:16px; line-height:24px; -webkit-font-smoothing:antialiased; }
button{ font:inherit; color:inherit; }
:focus-visible{ outline:2px solid var(--text); outline-offset:4px; }

/* the glass */
.film{ position:fixed; inset:0; background:var(--bg) center / cover no-repeat; }
.film::before{ content:""; position:absolute; inset:0; background:rgba(0,0,0,.3); }
.film canvas{ position:absolute; inset:0; width:100%; height:100%; display:block; opacity:0; transition:opacity 800ms var(--ease); touch-action:manipulation; }
.film.live canvas{ opacity:1; }
.striking .film canvas{ cursor:none; }
.flash{ position:fixed; inset:0; background:#FFFFFF; opacity:0; pointer-events:none; }
.flash.go{ animation:flash 700ms var(--ease); }
@keyframes flash{ 0%{ opacity:0; } 8%{ opacity:.85; } 100%{ opacity:0; } }

/* feed labels, drawn over each pane */
.panes{ position:fixed; inset:0; pointer-events:none; font-family:var(--mono); font-size:12px; line-height:16px; letter-spacing:.04em; text-transform:uppercase; }
.pane{ position:absolute; opacity:0; transition:opacity 300ms var(--ease); }
.pane.on{ opacity:1; }
.pane span{ position:absolute; top:16px; display:flex; align-items:center; gap:8px; }
.pane .pl{ left:16px; } .pane .tc{ right:16px; opacity:.6; font-variant-numeric:tabular-nums; }
.pane.top span{ top:80px; }
.pane .pl i{ width:8px; height:8px; border-radius:9999px; background:var(--rec); animation:rec 1000ms steps(1) infinite; }
.pane.dead{ color:var(--muted); } .pane.dead .pl i{ background:var(--muted); animation:none; }
@keyframes rec{ 50%{ opacity:.2; } }

/* the hammer that replaces the pointer */
.hammer{ position:fixed; left:0; top:0; width:48px; height:48px; pointer-events:none; opacity:0; transition:opacity 200ms var(--ease); }
.striking .hammer.on{ opacity:1; }
.hammer svg{ width:100%; height:100%; transform-origin:80% 80%; transform:rotate(16deg); }
.hammer.swing svg{ animation:swing 300ms var(--ease); }
@keyframes swing{ 0%{ transform:rotate(30deg); } 40%{ transform:rotate(-18deg); } 100%{ transform:rotate(16deg); } }

/* the frame's content */
.frame{
  position:relative; height:100%; display:flex; flex-direction:column; justify-content:space-between;
  padding-block:24px 32px;
  padding-left:max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right:max(var(--gutter), env(safe-area-inset-right, 0px));
  pointer-events:none;
}
.frame a, .frame button{ pointer-events:auto; }
.top{ display:flex; justify-content:space-between; align-items:center; gap:16px; }
.mark{ display:inline-flex; align-items:center; gap:8px; font-size:20px; line-height:28px; font-weight:600; letter-spacing:-0.01em; }
.mark svg{ width:28px; height:28px; }
.readout{ display:flex; gap:24px; margin:0; font-family:var(--mono); font-size:12px; line-height:16px; letter-spacing:.04em; text-transform:uppercase; font-variant-numeric:tabular-nums; }
.readout div{ display:flex; gap:8px; }
.readout dt{ color:var(--muted); } .readout dd{ margin:0; }

.bottom{ display:flex; flex-direction:column; align-items:flex-start; gap:16px; }
.plate{ max-width:680px; padding:24px; border-radius:16px; background:var(--plate); -webkit-backdrop-filter:blur(16px); backdrop-filter:blur(16px); }
.swap{ transition:opacity 300ms var(--ease); }
.swap.out{ opacity:0; }
h1{ margin:0 0 8px; font-size:30px; line-height:36px; font-weight:500; letter-spacing:-0.02em; text-wrap:balance; }
.sub{ margin:0; color:var(--muted); text-wrap:pretty; }
.acts{ display:flex; flex-wrap:wrap; gap:12px; padding-top:16px; }
.act{
  display:inline-flex; align-items:center; gap:8px; min-height:48px; padding:12px 16px; border-radius:9999px; cursor:pointer;
  background:transparent; border:1px solid var(--line); font-size:14px; line-height:20px; font-weight:600;
  transition:transform 300ms var(--ease), opacity 300ms var(--ease);
}
.act svg{ width:16px; height:16px; }
.btn{
  display:inline-flex; align-items:center; gap:8px; min-height:48px; padding:12px 24px; border-radius:9999px;
  background:var(--text); color:var(--bg); text-decoration:none; font-size:16px; line-height:24px; font-weight:600;
  transition:transform 300ms var(--ease), opacity 300ms var(--ease);
}
.btn svg{ width:16px; height:16px; transition:transform 300ms var(--ease); }
@media (hover:hover){
  .act:hover, .btn:hover{ opacity:.8; }
  .btn:hover svg{ transform:translateX(4px); }
}
.act:active, .btn:active{ transform:scale(0.98); }
.act:disabled{ opacity:.4; cursor:default; }

@media (min-width:768px){
  .frame{ padding-block:32px 48px; }
  .bottom{ flex-direction:row; align-items:flex-end; justify-content:space-between; gap:24px; }
  h1{ font-size:36px; line-height:40px; }
  .sub{ font-size:18px; line-height:28px; }
}
@media (min-width:1200px){ h1{ font-size:48px; line-height:48px; } }
@media (max-width:767px){ .readout{ gap:16px; } .pane .tc{ display:none; } }
@media (prefers-reduced-motion: reduce){
  .pane .pl i{ animation:none; }
  .flash.go{ animation:none; }
}
#film{background-image:url('m/frame.jpg')}
