/* Sidescreen · Direction B "Developed footage"
   Two colours from the subject: the monitor's matte graphite and its backlight glow.
   Sections flip between them; the halftone recolours itself from --g (ground) / --i (ink). */
@import url(fonts/anybody.css);
@import url(fonts/atkinson-hyperlegible.css);

:root {
  --graphite: #1B1C1E;
  --glow: #D3DED8;
  --g: var(--graphite);
  --i: var(--glow);
  --pad: 16px;
  --wide: 'Anybody', 'Helvetica Neue', Arial, sans-serif;
  --text: 'Atkinson Hyperlegible', 'Helvetica Neue', Arial, sans-serif;
  color-scheme: dark;
}
/* the theme button swaps the two colours everywhere */
:root[data-flip="1"] { --graphite: #D3DED8; --glow: #1B1C1E; color-scheme: light; }
.dk { --g: var(--graphite); --i: var(--glow); }
.lt { --g: var(--glow); --i: var(--graphite); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--graphite); color: var(--glow);
  font: 400 1.0625rem/1.5 var(--text);
  overflow-x: hidden;
  cursor: url(img/cursor.svg) 10 14, auto;
}
@media (hover: none) { body { cursor: auto; } }
a, button, label, summary, input { cursor: pointer; }
input[type="email"] { cursor: text; }
section, header, footer, .dk, .lt { background: var(--g); color: var(--i); }
img, video, canvas { display: block; max-width: 100%; }
figure { margin: 0; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 .9em; }
h1, h2, h3 { font-family: var(--wide); font-stretch: 150%; font-weight: 800; line-height: .92; margin: 0; letter-spacing: -.01em; text-transform: uppercase; }
.sr { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus { outline: none; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; box-shadow: 0 0 0 7px var(--g); }
.skip { position: absolute; left: 8px; top: -60px; z-index: 30; padding: 12px 14px; background: var(--g); color: var(--i); font-weight: 700; }
.skip:focus { top: 8px; }

/* the canvas that develops every plate, drawn over the page but only inside plates */
#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 5; pointer-events: none; }
.plate { position: relative; overflow: hidden; background: var(--g); }
.plate > img, .plate > picture img { width: 100%; height: 100%; object-fit: cover; }
html.gl .plate.gld > img, html.gl .plate.gld > picture { visibility: hidden; }

/* ---------- links and buttons: each one has its own move ---------- */
.ln { position: relative; display: inline-flex; align-items: center; gap: .45em; min-height: 44px; font-weight: 700; }
.ln::after { /* underline built from bars that stand up on hover */
  content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 3px;
  background: repeating-linear-gradient(90deg, currentColor 0 3px, transparent 3px 6px);
  transform-origin: bottom; transition: transform .28s cubic-bezier(.2,.8,.2,1);
}
.ln:hover::after, .ln:focus-visible::after { transform: scaleY(3.2); }
.ln .ar { display: inline-block; transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.ln:hover .ar { transform: translateX(6px); }
.flip { display: inline-grid; overflow: hidden; height: 1.3em; line-height: 1.3em; vertical-align: bottom; }
.flip > span { grid-area: 1/1; transition: transform .35s cubic-bezier(.7,0,.2,1); }
.flip > span + span { transform: translateY(105%); }
button:hover .flip > span:first-child, a:hover .flip > span:first-child, button:focus-visible .flip > span:first-child { transform: translateY(-105%); }
button:hover .flip > span + span, a:hover .flip > span + span, button:focus-visible .flip > span + span { transform: none; }
.btn { font: 800 1rem/1 var(--wide); font-stretch: 125%; text-transform: uppercase; letter-spacing: .02em; color: inherit; background: none; border: 0; padding: 0; min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; gap: .6em; transition: letter-spacing .35s cubic-bezier(.2,.8,.2,1); }
.btn:hover { letter-spacing: .09em; }
.btn .bars { display: inline-flex; gap: 2px; height: 18px; align-items: flex-end; }
.btn .bars i { display: block; width: 3px; background: currentColor; height: 30%; transition: height .3s; }
.btn .bars i:nth-child(2) { height: 60%; } .btn .bars i:nth-child(3) { height: 100%; }
.btn:hover .bars i { height: 100%; }
.btn:hover .bars i:nth-child(3) { height: 30%; }

/* ---------- header + menu ---------- */
.top { position: fixed; z-index: 8; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 4px; padding: 0 var(--pad); background: var(--graphite); color: var(--glow); transition: transform .35s cubic-bezier(.7,0,.2,1); }
.top.hide { transform: translateY(-100%); }
.top:focus-within { transform: none; }
.top a, .top button { color: var(--glow); }
.top .mark { font: 800 1rem/1 var(--wide); font-stretch: 150%; text-transform: uppercase; min-height: 44px; display: inline-flex; align-items: center; margin-right: auto; }
.top .theme, .top .menu-b { font: 700 .95rem/1 var(--text); background: none; border: 0; min-height: 44px; padding: 0 8px; }
.top .menu-b { margin-right: -8px; }
.menu { position: fixed; inset: 0; z-index: 20; display: none; padding: 72px var(--pad) 24px; overflow-y: auto; }
.menu.open { display: grid; align-content: start; gap: 4px; animation: flash .5s steps(1) both; }
@keyframes flash { 0% { background: var(--i); color: var(--g); } 18% { background: var(--g); color: var(--i); } 30% { background: var(--i); color: var(--g); } 42%, 100% { background: var(--g); color: var(--i); } }
.menu .close { position: absolute; top: 6px; right: var(--pad); }
.menu ol { list-style: none; margin: 0; padding: 0; counter-reset: m; }
.menu li a { display: flex; align-items: baseline; gap: .5em; font: 800 clamp(1.6rem, 6.4vw, 4.6rem)/1.02 var(--wide); font-stretch: 150%; text-transform: uppercase; min-height: 44px; padding: 2px 0; transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.menu li a::before { counter-increment: m; content: counter(m, decimal-leading-zero); font: 700 .9rem/1 var(--text); font-stretch: 100%; opacity: .8; min-width: 2.2em; }
.menu li a:hover, .menu li a:focus-visible { transform: translateX(12px); }
.menu .meta { margin-top: 24px; max-width: 60ch; }

/* ---------- torn scanline edge between sections ---------- */
.tear { height: 44px; margin-top: -1px; position: relative; z-index: 1; }
.tear::after { content: ""; position: absolute; inset: 0; background: var(--to); -webkit-mask: url(img/tear.svg) 0 0/100% 100% no-repeat; mask: url(img/tear.svg) 0 0/100% 100% no-repeat; }
.tear.to-lt { --to: var(--glow); background: var(--graphite); }
.tear.to-dk { --to: var(--graphite); background: var(--glow); }
@media (min-width: 1280px) { .tear { height: 64px; } }

/* ---------- preloader (also the 404 scene) ---------- */
.pre { position: fixed; inset: 0; z-index: 25; display: grid; place-items: center; padding: var(--pad); transition: clip-path .7s cubic-bezier(.7,0,.2,1); clip-path: inset(0 0 0 0); }
.pre.gone { clip-path: inset(0 0 100% 0); pointer-events: none; }
.pre .plate { width: min(92vw, 1100px); aspect-ratio: 16/9; }
.pre .count { position: absolute; left: var(--pad); bottom: 12px; font: 800 clamp(3rem, 12vw, 9rem)/1 var(--wide); font-stretch: 150%; font-variant-numeric: tabular-nums; }
.pre .line { position: absolute; right: var(--pad); bottom: 22px; max-width: 26ch; text-align: right; font-weight: 700; }
html.seen .pre, html.rm .pre { display: none; }

/* ---------- footer: a full page like a business card ---------- */
.card { min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; gap: 20px; padding: 72px var(--pad) 24px; }
.card .wm { width: 100%; aspect-ratio: 2400/700; }
@media (max-width: 767px) { .card .wm { aspect-ratio: 1.25; } }
.card dl { margin: 0; display: grid; grid-template-columns: 1fr; gap: 14px 40px; align-content: end; }
.card dt { font-weight: 700; opacity: .82; font-size: .9rem; }
.card dd { margin: 0; font: 800 clamp(1.1rem, 2vw, 2rem)/1.1 var(--wide); font-stretch: 112%; text-transform: uppercase; overflow-wrap: anywhere; }
.card dd.mail { text-transform: none; }
.card dd a { display: inline-block; min-height: 44px; }
.card .base { display: flex; flex-wrap: wrap; gap: 4px 22px; align-items: center; font-size: .95rem; }
.card .base .theme { margin-left: auto; }
@media (min-width: 768px) { .card dl { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1280px) { .card { padding: 80px 40px 28px; } }
@media (min-width: 1700px) and (max-width: 2399px) { .card dl { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 2400px) { .card { grid-template-columns: 1.5fr 1fr; grid-template-rows: 1fr auto; align-items: end; padding: 80px 64px 32px; } .card .wm { grid-row: 1; align-self: center; } .card dl { grid-template-columns: 1fr 1fr; } .card .base { grid-column: 1 / -1; } }

/* ---------- reduced motion: frames stay developed, nothing moves by itself ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
