/* How Tech Works: the site is a page of the same notebook the films are drawn in.
   Dot-grid paper, a black fineliner, grey marker for shadows, one yellow marker for the thing that matters. */
@font-face { font-family: Kalam; font-weight: 700; font-display: swap; src: url(/fonts/Kalam-Bold.woff2) format('woff2'); }
@font-face { font-family: 'Patrick Hand'; font-weight: 400; font-display: swap; src: url(/fonts/PatrickHand-Regular.woff2) format('woff2'); }

:root {
  --paper: #fbfaf6; --ink: #1e1e22; --note: #5b5852; --dot: rgba(150, 144, 132, .5);
  --yel: #ffcd28; --yel-d: #f5aa00; --grey: rgba(80, 80, 92, .28); --grey-l: rgba(100, 100, 110, .16);
  --bold: Kalam, 'Comic Sans MS', 'Segoe Print', cursive; --hand: 'Patrick Hand', 'Comic Sans MS', 'Segoe Print', cursive;
  --gut: clamp(16px, 4vw, 40px); --line: 2.5px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  color: var(--ink); background-color: var(--paper);
  background-image: radial-gradient(var(--dot) 1.3px, transparent 1.6px); background-size: 26px 26px; background-position: 13px 13px;
  font: 400 20px/1.4 var(--hand); letter-spacing: .01em;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
}
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
img, video { display: block; max-width: 100%; }
mark { color: inherit; background: linear-gradient(transparent 12%, var(--yel) 12% 88%, transparent 88%); padding: 0 .12em; margin: 0 -.06em; border-radius: .2em .5em .25em .45em; }
:focus-visible { outline: 3px solid var(--yel-d); outline-offset: 3px; border-radius: 6px; }

/* ---------- header: the banner the films open on ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px 28px; flex-wrap: wrap;
  width: 100%; max-width: 1180px; margin: 0 auto; padding: clamp(18px, 4vw, 34px) var(--gut) 8px; }
.brand { text-decoration: none; display: inline-block; padding: 0 30px 10px; }
.ribbon { position: relative; display: inline-block; }
.ribbon::before, .ribbon::after { content: ''; position: absolute; top: 34%; height: 100%; width: 44px; background: #b9b9bf; border: var(--line) solid var(--ink); z-index: 0; }
.ribbon::before { left: -30px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 34% 50%); border-right: 0; }
.ribbon::after { right: -30px; clip-path: polygon(0 0, 100% 0, 66% 50%, 100% 100%, 0 100%); border-left: 0; }
.ribbon-in { position: relative; z-index: 1; display: block; background: var(--paper); border: var(--line) solid var(--ink);
  border-radius: 3px 6px 4px 7px; padding: .22em .7em .08em; font: 700 clamp(26px, 6.2vw, 44px)/1.15 var(--bold); letter-spacing: .03em; white-space: nowrap;
  transform: rotate(-.8deg); }
.tagline { color: var(--note); font-size: clamp(18px, 2.6vw, 22px); line-height: 1.25; text-align: right; margin-left: auto; }

main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: clamp(14px, 3vw, 28px) var(--gut) 40px; }
.loading, .empty { color: var(--note); text-align: center; padding: 12vh 0; font-size: 24px; }
.foot { color: var(--note); text-align: center; font-size: 17px; padding: 14px var(--gut) calc(22px + env(safe-area-inset-bottom));
  border-top: 2px dashed var(--grey); max-width: 1180px; width: calc(100% - 2 * var(--gut)); margin: 0 auto; }

/* ---------- a card: a rounded box in fineliner with a grey-marker shadow, down and to the right ---------- */
.card { position: relative; display: block; text-decoration: none; background: var(--paper); border: var(--line) solid var(--ink);
  border-radius: 20px 26px 18px 28px / 26px 18px 28px 20px; box-shadow: 8px 9px 0 var(--grey); transition: transform .16s ease, box-shadow .16s ease; }
a.card:hover, a.card:focus-visible { transform: translate(-2px, -3px) rotate(-.25deg); box-shadow: 11px 13px 0 var(--grey); }
a.card:active { transform: translate(3px, 4px); box-shadow: 4px 4px 0 var(--grey); }
.thumb { position: relative; margin: 10px 10px 0; border: 2px solid var(--ink); border-radius: 12px 16px 11px 17px / 16px 11px 17px 12px; overflow: hidden;
  aspect-ratio: 16 / 9; background: #f1efe8; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.play { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%;
  background: var(--yel); border: var(--line) solid var(--ink); box-shadow: 4px 5px 0 var(--grey); transition: transform .16s ease; }
.play::after { content: ''; position: absolute; left: 53%; top: 50%; transform: translate(-50%, -50%); border-style: solid; border-width: 15px 0 15px 25px; border-color: transparent transparent transparent var(--ink); }
a.card:hover .play { transform: scale(1.08) rotate(-3deg); }
.len { position: absolute; right: 8px; bottom: 8px; background: var(--paper); border: 2px solid var(--ink); border-radius: 8px 10px 7px 11px; padding: 0 8px; font-size: 17px; line-height: 1.35; }
.tag { position: absolute; left: -12px; top: -14px; z-index: 2; background: var(--yel); border: var(--line) solid var(--ink); border-radius: 4px 7px 5px 8px;
  padding: .1em .6em 0; font: 700 19px/1.4 var(--bold); letter-spacing: .04em; transform: rotate(-4deg); box-shadow: 3px 4px 0 var(--grey); white-space: nowrap; }
.meta { padding: 12px 16px 14px; }
.meta h3, .meta h2 { font: 700 25px/1.18 var(--bold); letter-spacing: .01em; text-wrap: balance; }
.idea { color: var(--note); margin-top: 4px; font-size: 19px; line-height: 1.3; text-wrap: pretty; }
.when { color: var(--note); font-size: 17px; margin-top: 8px; }

/* ---------- home: the newest film large, then every episode ---------- */
.latest { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: center; margin-top: 14px; }
.latest .thumb { margin: 12px; }
.latest .meta { padding: 18px 26px 22px 12px; }
.latest .meta h2 { font-size: clamp(28px, 3.6vw, 42px); }
.latest .idea { font-size: clamp(20px, 2vw, 24px); margin-top: 10px; }
.watch { display: inline-block; margin-top: 18px; padding: .18em .9em .02em; background: var(--yel); border: var(--line) solid var(--ink); border-radius: 12px 16px 11px 17px / 16px 11px 17px 12px;
  font: 700 21px/1.5 var(--bold); letter-spacing: .03em; box-shadow: 4px 5px 0 var(--grey); }
.section { display: flex; align-items: baseline; gap: 14px; margin: clamp(36px, 6vw, 56px) 0 26px; }
.section h2 { font: 700 30px/1.1 var(--bold); letter-spacing: .03em; }
.section h2::after { content: ''; display: block; height: 5px; margin-top: 2px; border-radius: 4px; background: var(--ink); transform: rotate(-.6deg); width: 104%; }
.section span { color: var(--note); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 34px 30px; }

/* ---------- one episode ---------- */
.back { display: inline-block; text-decoration: none; color: var(--note); font-size: 21px; margin: 4px 0 18px; padding: 2px 4px; }
.back:hover { color: var(--ink); }
.stage { padding: 12px; }
.stage video { width: 100%; aspect-ratio: 16 / 9; background: #f1efe8; border: 2px solid var(--ink); border-radius: 12px 16px 11px 17px / 16px 11px 17px 12px; }
.about { margin: 34px 4px 0; max-width: 820px; }
.about h1 { font: 700 clamp(30px, 5.2vw, 48px)/1.12 var(--bold); letter-spacing: .01em; text-wrap: balance; }
.about .idea { font-size: clamp(21px, 2.4vw, 26px); margin-top: 12px; color: var(--ink); }
.about .when { font-size: 19px; margin-top: 14px; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 10px; margin-top: 22px; }
.share-t { font: 700 21px/1 var(--bold); letter-spacing: .05em; margin-right: 4px; padding-top: .2em; }
.sh { display: inline-block; text-decoration: none; background: var(--paper); border: 2px solid var(--ink); border-radius: 10px 13px 9px 14px / 13px 9px 14px 10px;
  padding: .12em .8em .04em; font: 400 19px/1.5 var(--hand); color: var(--ink); cursor: pointer; box-shadow: 3px 4px 0 var(--grey); transition: transform .12s ease, box-shadow .12s ease; }
.sh:hover, .sh:focus-visible { background: var(--yel); transform: translate(-1px, -2px); box-shadow: 4px 6px 0 var(--grey); }
.sh:active { transform: translate(2px, 3px); box-shadow: 1px 1px 0 var(--grey); }
.sh-native { background: var(--yel); font: 700 19px/1.5 var(--bold); letter-spacing: .03em; }
.sh[hidden] { display: none; }
.more { margin-top: clamp(40px, 7vw, 64px); }

@media (max-width: 760px) {
  body { font-size: 19px; }
  .top { justify-content: center; }
  .tagline { text-align: center; margin: 0 auto; }
  .tagline br { display: none; }
  .latest { grid-template-columns: 1fr; }
  .latest .thumb { margin: 10px 10px 0; }
  .latest .meta { padding: 14px 16px 18px; }
  .tag { left: -8px; }
  .play { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
  .stage { padding: 8px; margin: 0 -4px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
