/* Mazzy
   Light opening -> the trailer card grows as the trailer plays and the page goes dark -> flat colour sections, each cut over the one before along one diagonal -> red contact and footer.
   Colors and shapes come from the logo: #F5222D on #1D1D1D, flat, straight cuts slightly off square, no rounding or shadows.
   Schibsted Grotesk 900 for headlines, Space Grotesk for everything else. */
:root {
  --light: #fafaf9;
  --bg: #1d1d1d;           /* the logo's charcoal */
  --ink: #f5f5f4;          /* on bg 15.5:1 */
  --muted: #a8a29e;        /* on bg 6.7:1 */
  --dim: #4a4745;          /* unlit words, lines; never final text */
  --raise: #2b2a2a;        /* empty slots on the charcoal */
  --accent: #f5222d;       /* the logo's red: shapes and large type only */
  --accent-dark: #ff4b50;  /* small red text on charcoal, 5.1:1 */
  --accent-text: #c81e1e;  /* small red text on light, 5.5:1 */
  --on-red: #111111;       /* text on red, 4.6:1 */

  --max: 1200px;
  --gutter: 16px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --cut: cubic-bezier(.76, 0, .18, 1);      /* hard in, hard out: for the diagonal cuts */
  --f: "Space Grotesk", system-ui, sans-serif;
  --d: "Schibsted Grotesk", "Arial Black", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--light); color: var(--bg); font: 400 17px/1.55 var(--f); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; }
video, iframe, img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 90; background: var(--bg); color: var(--ink); padding: 10px 14px; }
.skip:focus { top: 12px; }
.blank { color: var(--accent-dark); }

/* ---------- the cut ----------
   One shape, taken from the logo: four straight edges, each a little off square. --c is how far off.
   On hover it is re-cut the other way. It sits on a layer behind the text so focus rings aren't clipped. */
.slot, .open-card, .bar::before, .cut::before {
  clip-path: polygon(0 calc(var(--c) * .8), 100% 0, calc(100% - var(--c) * .6) 100%, calc(var(--c) * .4) calc(100% - var(--c) * .5));
  transition: clip-path .3s var(--ease), background .2s;
}
.cut { --c: 4px; position: relative; isolation: isolate; border: 0; }
.cut::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--fill); }
.cut:active::before { transform: scale(.96); }
.cut:hover::before, .works li.alt .slot, .works li:hover .slot {
  clip-path: polygon(calc(var(--c) * .5) 0, calc(100% - var(--c) * .3) calc(var(--c) * .7), 100% calc(100% - var(--c) * .6), 0 100%);
}
.works li.alt:hover .slot {
  clip-path: polygon(0 calc(var(--c) * .8), 100% 0, calc(100% - var(--c) * .6) 100%, calc(var(--c) * .4) calc(100% - var(--c) * .5));
}

/* ---------- loading screen ---------- */
.loader { display: none; }
.js .loader {
  position: fixed; inset: 0; z-index: 100; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 34px;
  clip-path: polygon(0 0, 100% 0, 100% 130%, 0 130%); transition: clip-path .7s var(--cut);
  animation: loader-off 0s 20s forwards;      /* safety: never stays up, even if the script breaks */
}
@keyframes loader-off { to { visibility: hidden; } }
.loader svg { display: block; overflow: visible; fill: var(--accent); }
.loader-bar { display: block; width: min(240px, 56vw); height: 8px; background: #3a3838; clip-path: polygon(0 12%, 100% 0, 99% 100%, 1% 88%); }
.loader-bar i { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(var(--lp, 0)); transition: transform .25s linear; }
.js .loader.gone { clip-path: polygon(0 0, 100% 0, 100% -30%, 0 0); }
.loading { overflow: hidden; }

/* ---------- top bar ---------- */
.bar {
  position: fixed; z-index: 60; top: 12px; left: 50%; transform: translateX(-50%);
  width: min(var(--max) - 32px, 100% - 24px); height: 56px; padding: 0 8px 0 18px;
  display: grid; grid-template-columns: 1fr auto; align-items: center;
  color: var(--ink); --c: 4px;
}
.bar::before, .bar::after { content: ""; position: absolute; z-index: -1; inset: 0; background: var(--bg); }
/* past the opening the bar runs edge to edge, so the page doesn't show through above it */
.bar::after { inset: -12px -50vw 0; opacity: 0; transition: opacity .25s; }
.bar.full::after { opacity: 1; }
html { overflow-x: clip; }
.bar-logo { justify-self: start; display: grid; place-items: center; width: 48px; height: 48px; margin-left: -10px; }
.bar-logo svg { display: block; overflow: visible; }
.bar-logo polygon { transform-box: fill-box; transform-origin: center; transition: transform .5s var(--ease); }
.bar-logo:hover polygon { transform: rotate(-6deg); }
.bar-role { display: none; font: 700 13px/1 var(--f); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.bar-menu {
  justify-self: end; display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px;
  background: none; border: 0; cursor: pointer;
  font: 700 13px/1 var(--f); letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.bar-menu:hover { color: var(--ink); }
.burger { display: grid; gap: 4px; width: 18px; }
.burger i { display: block; height: 2px; background: currentColor; transition: transform .3s var(--ease), opacity .2s; }
.bar-menu[aria-expanded="true"] .burger i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.bar-menu[aria-expanded="true"] .burger i:nth-child(2) { opacity: 0; }
.bar-menu[aria-expanded="true"] .burger i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 50; background: var(--bg);
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
  padding: 96px max(var(--gutter), calc((100% - var(--max)) / 2 + 32px));
}
.menu[hidden] { display: none; }
.menu { animation: menu-in .42s var(--cut) both; }
@keyframes menu-in { from { clip-path: polygon(130% 0, 170% 0, 170% 100%, 100% 100%); } to { clip-path: polygon(0 0, 170% 0, 170% 100%, -30% 100%); } }
.menu a { animation: menu-a .5s var(--cut) both; animation-delay: calc(.12s + var(--i, 0) * 60ms); }
@keyframes menu-a { from { clip-path: polygon(0 0, 0 0, -20% 100%, 0 100%); transform: translateX(-40px); } to { clip-path: polygon(0 0, 120% 0, 110% 100%, 0 100%); transform: none; } }
.menu a {
  display: flex; align-items: baseline; gap: 18px; min-height: 44px;
  color: var(--ink); text-decoration: none; text-transform: uppercase;
  font-family: var(--d); font-weight: 900; word-spacing: .08em; letter-spacing: -.03em; line-height: 1.05; font-size: clamp(34px, 8vw, 84px);
  transition: color .2s, transform .3s var(--ease);
}
.menu a[aria-current] { color: var(--accent); }
.menu a:hover { color: var(--accent); transform: translateX(10px); }

/* ---------- opening ---------- */
/* --p goes 0 -> 1 as the trailer plays or as you scroll, whichever is further (set by main.js).
   The section is taller than the screen so the opening stays pinned while you scroll through it. */
.open { position: relative; height: 100vh; height: 100svh; min-height: 340px; background: var(--light); }
.open-pin { position: relative; height: 100%; overflow: hidden; }
/* the light page is cut away by the charcoal along a diagonal, a red edge running ahead */
.open-dark { position: absolute; inset: 0; --e: calc(var(--dk, 0) * 112%); background: linear-gradient(166deg, transparent calc(100% - var(--e)), var(--accent) calc(100% - var(--e)), var(--accent) calc(112% - var(--e)), var(--bg) calc(112% - var(--e))); }
.open-pin { --w0: min(72vw, 66vh); --h0: calc(var(--w0) * 9 / 16); --gap: clamp(14px, 2.6vh, 28px); }
.open-words { margin: 0; font-family: var(--d); font-weight: 900; word-spacing: .08em; }
.ow {
  position: absolute; display: block; text-transform: uppercase; color: var(--accent);
  font-size: min(12.6vw, 21vh); line-height: .76; letter-spacing: -.025em;
}
/* the two words sit right against the card's top and bottom edges */
.ow1 { left: max(var(--gutter), 6vw); bottom: calc(50% + var(--h0) / 2 + var(--gap)); transform: translateX(calc(var(--p, 0) * -105vw)) skewX(calc(var(--p, 0) * -14deg)); }
.ow2 { right: max(var(--gutter), 6vw); top: calc(50% + var(--h0) / 2 + var(--gap)); transform: translateX(calc(var(--p, 0) * 105vw)) skewX(calc(var(--p, 0) * -14deg)); }
.open-card {
  position: absolute; left: 50%; top: 50%; z-index: 2;
  /* grows to the largest 16:9 box that fits the screen; the cut straightens out as it gets there */
  --c: calc(clamp(7px, 1vw, 13px) * (1 - var(--p, 0)));
  width: calc(var(--w0) + (min(100%, 100vh * 16 / 9) - var(--w0)) * var(--p, 0));
  aspect-ratio: 16 / 9;
  transform: translate(-50%, -50%); transition: none;
}
.open-card .slot { height: 100%; aspect-ratio: auto; clip-path: none; }

@media (max-height: 560px) {
  .open-pin { --w0: min(72vw, 54vh); --gap: 10px; }
  .ow { font-size: min(12.6vw, 15vh); }
}

/* trailer controls along the bottom */
.open-controls {
  position: absolute; z-index: 3; left: var(--gutter); right: var(--gutter); bottom: 18px;
  max-width: calc(var(--max) - 32px); margin: 0 auto;
  display: flex; align-items: center; gap: 10px;
}
.oc {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 11px; cursor: pointer;
  background: none; color: var(--ink); --fill: var(--bg);
}
.open.dark-on .oc { --fill: #3a3838; }
.oc svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: butt; stroke-linejoin: miter; }
.oc .i-play { fill: currentColor; }
.oc-play .i-play, .oc-play.paused .i-pause { display: none; }
.oc-play.paused .i-play { display: block; }
.oc-sound .i-on, .oc-sound[aria-pressed="true"] .i-off { display: none; }
.oc-sound[aria-pressed="true"] .i-on { display: block; }
/* a charcoal strip like the top bar, so the controls read on the light page, the red cut and the video alike */
.open-controls { padding: 6px 14px; isolation: isolate; }
.open-controls::before { content: ""; position: absolute; z-index: -1; inset: 0; background: var(--bg); clip-path: polygon(0 4px, 100% 0, calc(100% - 3px) 100%, 2px calc(100% - 2px)); }
.open-controls .oc { --fill: #3a3838; }
.open-controls .oc-rate { color: var(--muted); } .open-controls .oc-rate.fast { color: var(--accent-dark); }

/* sliders: volume and the position in the trailer. --v is how full (0 to 1) */
.oc-range {
  -webkit-appearance: none; appearance: none; flex: none; height: 44px; margin: 0; padding: 0; background: none; cursor: pointer;
  --off: #5c5856; --line: linear-gradient(90deg, var(--accent) calc(var(--v, 0) * 100%), var(--off) 0);
}
.oc-vol { width: 108px; margin: 0 8px 0 2px; }
.oc-seek { flex: 1; min-width: 0; }
.oc-range::-webkit-slider-runnable-track { height: 6px; background: var(--line); transition: height .15s; }
.oc-range::-moz-range-track { height: 6px; background: var(--line); }
.oc-range::-webkit-slider-thumb { -webkit-appearance: none; width: 15px; height: 26px; margin-top: -10px; background: var(--accent); clip-path: polygon(34% 0, 100% 0, 66% 100%, 0 100%); transition: transform .15s; }
.oc-range::-moz-range-thumb { width: 15px; height: 26px; border: 0; border-radius: 0; background: var(--accent); clip-path: polygon(34% 0, 100% 0, 66% 100%, 0 100%); }
.oc-range:hover::-webkit-slider-thumb, .oc-range:focus-visible::-webkit-slider-thumb { transform: scale(1.2); }
.oc-range:focus-visible { outline-offset: -4px; }
.oc-skip {
  flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px 0 20px;
  --fill: var(--accent); color: var(--on-red); text-decoration: none;
  font: 700 14px/1 var(--f); letter-spacing: .04em; text-transform: uppercase;
}
.oc-skip svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: butt; stroke-linejoin: miter; }
.oc-skip svg { transition: transform .25s var(--ease); }
.oc-skip:hover svg { transform: translateY(3px); }

/* "Your sound is off / Enable": two slanted pieces, like the diagonals */
.sound-ask {
  position: absolute; z-index: 4; left: 50%; bottom: 92px; transform: translateX(-50%);
  display: flex; align-items: center; padding: 8px 12px 8px 40px; border: 0; background: none; isolation: isolate; cursor: pointer; white-space: nowrap;
  font: 700 20px/1 var(--f); letter-spacing: -.01em; animation: ask-in .55s var(--cut) .5s both;
}
.sound-ask[hidden] { display: none; }
@keyframes ask-in { from { clip-path: polygon(0 0, 0 0, -12% 100%, -12% 100%); } to { clip-path: polygon(0 0, 115% 0, 105% 100%, -12% 100%); } }
.sound-ask::before { content: ""; position: absolute; z-index: -1; inset: 0; background: var(--bg); clip-path: polygon(24px 0, 100% 0, calc(100% - 24px) 100%, 0 100%); }
.sa-text { padding-right: 26px; color: var(--ink); }
.sa-go { display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 40px 0 36px; background: var(--accent); color: var(--on-red); clip-path: polygon(18px 0, 100% 0, calc(100% - 18px) 100%, 0 100%); transition: background .2s; }
.sound-ask:hover .sa-go { background: var(--light); }
.sound-ask:focus-visible { outline-offset: 6px; }
.sa-go svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linejoin: miter; }
.sa-cone { fill: currentColor; }
.sa-w1, .sa-w2 { animation: ask-wave 1.4s infinite steps(1); }
.sa-w2 { animation-delay: .25s; }
@keyframes ask-wave { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@media (max-width: 559px) {
  .sound-ask { font-size: 17px; bottom: 138px; }
  .sound-ask { padding-left: 32px; }
  .sa-text { padding-right: 16px; } .sa-go { height: 52px; padding: 0 32px 0 28px; gap: 9px; }
  .sa-go svg { width: 25px; height: 25px; }
}
@media (max-height: 560px) { .sound-ask { bottom: 82px; } .sa-go { height: 42px; } }

/* speed readout: "scroll to speed up" before, "2.4×" while scrolling, gone once the trailer is done */
.oc-rate {
  flex: none; min-width: 4.5ch; text-align: right;
  font: 700 13px/1 var(--f); letter-spacing: .02em; color: #57534e; font-variant-numeric: tabular-nums;
  transition: color .3s;
}
.open.dark-on .oc-rate { color: var(--muted); }
.oc-rate.fast { color: var(--accent-text); font-size: 17px; }
.open.dark-on .oc-rate.fast { color: var(--accent-dark); }
.open.done .oc-rate { visibility: hidden; }
@media (max-width: 559px) {
  .oc-rate:not(.fast) { display: none; }
  /* phone: the position bar gets its own row above the buttons */
  .open-controls { flex-wrap: wrap; row-gap: 2px; }
  .oc-seek { order: -1; flex: 1 0 100%; }
  .oc-vol { flex: 1; width: auto; min-width: 40px; }
  .oc-rate.fast { position: absolute; right: 0; bottom: calc(100% + 8px); padding: 8px 12px; background: var(--bg); }
}

/* ---------- video slots ---------- */
.slot {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden; --c: clamp(5px, .7vw, 9px);
  background: var(--raise); display: grid; place-items: center;
}
/* empty: a flat piece of paper with the play shape cut out of it */
.slot:not(.filled)::before {
  content: ""; width: clamp(34px, 13%, 84px); aspect-ratio: 1 / 1.12; background: var(--bg);
  clip-path: polygon(6% 0, 100% 44%, 94% 56%, 0 100%);
}
/* empty trailer: red on charcoal, like the logo */
.open-card .slot:not(.filled) { background: var(--bg); }
.open-card .slot:not(.filled)::before { background: var(--accent); }
.slot.filled { background: #000; }
.slot video, .slot iframe, .slot .yt { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.slot > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slot video { object-fit: cover; }
.slot:not(.slot--trailer) video { object-fit: contain; background: #000; }
.yt { padding: 0; cursor: pointer; background: #000; }
.yt img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 76px; height: 60px; margin: -30px 0 0 -38px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 76 60'%3E%3Cpath d='M0 5 L76 0 L72 60 L3 57 Z' fill='%23f5222d'/%3E%3Cpath d='M29 16 L51 29 L50 32 L28 45 Z' fill='%23111'/%3E%3C/svg%3E") no-repeat center / 100%;
}
.yt:focus-visible { outline-offset: -6px; }

/* ---------- sections: flat colour, hard swaps ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.dark { background: var(--bg); color: var(--ink); }
.light { background: var(--light); color: var(--bg); }
.red { background: var(--accent); color: var(--on-red); }
.sec-wrap { position: relative; padding-bottom: calc(clamp(72px, 9vw, 120px) + var(--h)); }
.sec { position: relative; max-width: var(--max); margin: 0 auto; padding: 72px var(--gutter) 0; }
.sec h2:not(.sr-only) {
  margin: 0 0 40px; text-transform: uppercase;
  font-family: var(--d); font-weight: 900; word-spacing: .08em; letter-spacing: -.025em; line-height: .9;
  font-size: clamp(46px, 11.4vw, 164px);
}

/* ---------- the diagonal ----------
   It is a section's own top edge. The section is pulled up over the one before by --h and cut along one straight line,
   so the colour before shows above the line. --q (0 to 1, set by main.js while scrolling) tilts the line from one side
   to the other. The stripe under it is the same line again, --t thick. */
:root { --h: clamp(48px, 9vw, 150px); --t: clamp(10px, 1.5vw, 24px); }
.cutin {
  position: relative; margin-top: calc(var(--h) * -1); padding-top: calc(var(--h) + var(--t));
  --l: calc(var(--h) * (1 - .92 * var(--q, .4))); --r: calc(var(--h) * (.04 + .88 * var(--q, .4)));
  clip-path: polygon(0 var(--l), 100% var(--r), 100% 100%, 0 100%);
}
.cutin::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: calc(var(--h) + var(--t));
  background: var(--band); clip-path: polygon(0 0, 100% 0, 100% calc(var(--r) + var(--t)), 0 calc(var(--l) + var(--t)));
}
[data-band="red"] { --band: var(--accent); } [data-band="light"] { --band: var(--light); } [data-band="dark"] { --band: var(--bg); }
[id] { scroll-margin-top: calc(60px - var(--h) - var(--t)); }
#top, #main, #about { scroll-margin-top: 0; }

/* about: the words light up as they pass */
#about .sec { padding-top: 130px; padding-bottom: 40px; }
.about-text { margin: 0; max-width: 18ch; font-family: var(--d); font-weight: 900; letter-spacing: -.03em; word-spacing: .06em; line-height: 1.0; font-size: clamp(38px, 8vw, 120px); }
.js .about-text .w { color: #716d6a; transition: color .25s; }
.js .about-text .w.on { color: var(--ink); }

/* what I make: two big links, a red sheet slides in behind on hover */
.make { list-style: none; margin: 0; padding: 0; }
.make-row {
  position: relative; isolation: isolate; display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 16px;
  padding: 26px 16px; margin: 0 -16px; color: var(--bg); text-decoration: none; overflow: hidden;
}
.make li + li { border-top: 4px solid var(--bg); }
.make-row::before { content: ""; position: absolute; inset: 0 -10%; z-index: -1; background: var(--accent); transform: translateX(-125%) skewX(-18deg); transition: transform .4s var(--cut); }
.make-row:hover::before, .make-row:focus-visible::before { transform: skewX(-18deg); }
.make-row:focus-visible { outline-offset: -5px; outline-color: var(--bg); }
.make-t { text-transform: uppercase; font-family: var(--d); font-weight: 900; word-spacing: .08em; letter-spacing: -.025em; line-height: .9; font-size: clamp(28px, 8vw, 108px); }
.make-arrow { width: 40px; height: 40px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: butt; stroke-linejoin: miter; transition: transform .3s var(--ease); }
.make-row:hover .make-arrow { transform: translateY(6px); }

/* ---------- builds: a stack of flat cards, each one slides over the last ---------- */
#builds { padding-bottom: 0; }
#builds .sec { padding-bottom: calc(var(--h) + 24px); }
#builds .sec h2 { margin: 0; }
.stack { list-style: none; margin: 0; padding: 0; }
.build {
  position: sticky; top: 0; min-height: min(100vh, 104vw); min-height: min(100svh, 104vw);
  padding: 88px max(var(--gutter), 4vw) calc(var(--h) + 16px);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  /* a smaller diagonal than the sections, and once the card is stuck its line ends up behind the top bar:
     the cards underneath never show */
  --h: clamp(40px, 5.4vw, 84px);
  --l: calc(var(--h) * (1 - var(--q, 1))); --r: calc(var(--h) * .04 * (1 - var(--q, 1)) + (62px - var(--t)) * var(--q, 1));
  /* the picture is as big as fits between the top bar and the bottom of the screen; never cropped */
  --w: min(100%, 1500px, max(240px, (100svh - 88px - var(--h) - 16px) * 1.903));
}
.build:last-child { --more: calc(clamp(48px, 9vw, 150px) - var(--h)); min-height: calc(min(100svh, 104vw) + var(--more)); padding-bottom: calc(var(--h) + 16px + var(--more)); }
.build::before { height: 100px; height: max(100px, var(--h) + var(--t)); }
.build img { position: relative; display: block; width: var(--w); height: auto; clip-path: polygon(0 1.4%, 100% 0, 99.2% 100%, .5% 99%); }

/* ---------- animations: one large, two beside it ---------- */
.works { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px 24px; }
.works li { position: relative; }
.works .slot { background: #2b2a2a; }

/* ---------- contact ---------- */
.red :focus-visible { outline-color: var(--on-red); }
.cta { display: inline-flex; align-items: center; justify-content: center; min-height: 76px; padding: 0 44px; cursor: pointer; color: var(--ink); font-weight: 700; font-size: clamp(19px, 2.2vw, 28px); letter-spacing: -.01em; background: none; overflow: hidden; }
.cta.cut { --fill: var(--bg); --c: 7px; }
.cta::after { content: ""; position: absolute; z-index: -1; inset: 0; left: -10%; width: 130%; background: var(--light); transform: translateX(-120%) skewX(-18deg); transition: transform .5s var(--cut); }
.cta span { transition: color .2s .12s; }
.cta:hover::after, .cta:focus-visible::after, .cta.copied::after { transform: translateX(0) skewX(-18deg); }
.cta:hover span, .cta:focus-visible span, .cta.copied span { color: var(--bg); }
.cta-note { margin: 20px 0 0; font-size: 17px; font-weight: 500; }

/* ---------- footer ---------- */
#contact { padding-bottom: 0; }
.end { position: relative; max-width: var(--max); margin: clamp(72px, 9vw, 130px) auto 0; padding: 0 var(--gutter) 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font: 700 16px/1.4 var(--f); }
.end-top { display: inline-flex; align-items: center; min-height: 44px; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.end-top:hover { text-decoration-thickness: 4px; }

/* ---------- headlines and video cards: wiped on along a diagonal as they come up the screen ----------
   main.js adds .off before they arrive and takes it away as they do; the wipe then always plays to the end. */
.wipe { display: block; clip-path: polygon(-5% -30%, 140% -30%, 110% 130%, -5% 130%); transition: clip-path .6s var(--cut); }
.wipe.off { clip-path: polygon(-5% -30%, -5% -30%, -35% 130%, -35% 130%); }

/* ---------- larger screens ---------- */
@media (min-width: 640px) {
  .bar { grid-template-columns: 1fr auto 1fr; }
  .bar-role { display: block; }
}
@media (min-width: 768px) {
  :root { --gutter: 32px; }
  .sec { padding: 88px var(--gutter) 0; }
  .sec h2:not(.sr-only) { margin-bottom: 56px; }
  #about .sec { padding-top: 170px; }
  .works { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .works .lead { grid-column: 1 / -1; }
  .make-row { padding: 34px 28px; margin: 0 -28px; }
  .make-arrow { width: 72px; height: 72px; }
}
@media (min-width: 1024px) {
  .works { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 28px; }
  .works .lead { grid-column: span 2; grid-row: span 2; }
  .works .lead .slot { --c: 15px; }
  .works .lead .wipe, .works .lead .slot { width: 100%; height: 100%; aspect-ratio: auto; }
  .works .lead .slot video:not(:fullscreen) { object-fit: cover; }
}
@media (min-width: 1800px) { :root { --max: 1440px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .wipe { clip-path: none; }
  .build { position: relative; }
}
