/* Paper Robots: the base for every page. Type, colour, header, footer, links and the
   quiet paper parts the pages share (page heads, the About page, 404). Built on top:
   home.css (the homepage's opening), films.css (the films as tapes and the film pages),
   reading.css (the essay's reading edition and the film notes' prose).
   Local fonts; no framework. Headings are plain: no decorative italics. */
@import url("/fonts/fraunces.css");
@import url("/fonts/dm-sans.css");

:root {
  --paper: #f9f3e7;
  --ink: #1e557b;
  --muted: #475b67;
  --line: #d5cabb;
  --pale: #e8e6dc;
  --accent: #ad3f25;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --gut: clamp(20px, 4vw, 58px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "DM Sans", sans-serif; font-size: 16px; line-height: 1.65; }
button, input, select { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button { border: 1px solid var(--line); background: transparent; border-radius: 0; padding: 9px 16px; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 5px; }
a, button, input, select, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
img { max-width: 100%; display: block; }
figure { margin: 0; }
figcaption { color: var(--muted); font-size: 12px; margin-top: 10px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.08; letter-spacing: -.015em; text-wrap: balance; }
[hidden] { display: none !important; }
.shell { width: min(1200px, calc(100% - 2 * var(--gut))); margin-inline: auto; }
.skip { position: fixed; top: 8px; left: 8px; padding: 12px; z-index: 20; background: var(--paper); transform: translateY(-150%); }
.skip:focus { transform: translateY(0); }

/* ------------------------------------------------------------------- header */
.site-header { min-height: 78px; padding-block: 15px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; border-bottom: 1px solid var(--ink); }
.wordmark { display: flex; align-items: center; gap: 11px; font: 600 21px/1 var(--display); letter-spacing: -.01em; white-space: nowrap; }
.wordmark img { width: 38px; height: 38px; border-radius: 6px; object-fit: contain; mix-blend-mode: multiply; }
.wordmark-dot { color: var(--accent); margin-left: -11px; } /* hugs the word: cancels the wordmark's gap */
.desktop-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; font-size: 15px; }
.desktop-nav a { padding-block: 10px; }
[aria-current="page"] { color: var(--accent); text-decoration: underline; text-underline-offset: 7px; }

/* ------------------------------------------------------------------- footer */
.site-footer { padding-block: 35px; display: grid; grid-template-columns: 1fr auto; gap: 20px; border-top: 1px solid var(--ink); }
.site-footer strong { font-family: "Fraunces", serif; font-size: 29px; font-weight: 500; }
.site-footer p { color: var(--muted); font-size: 13px; margin-top: 10px; }
.site-footer nav { display: flex; align-items: start; gap: 25px; font-size: 13px; }
.site-footer > small { grid-column: 1 / -1; font-size: 10px; color: var(--muted); }

/* ------------------------------------------------------- links and buttons */
.eyebrow { display: block; font: 500 12px/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 500; font-size: 15px; }
.btn:hover { background: #0d304d; text-decoration: none; }
.text-link, .actions a:not(.btn), .text-links a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; margin-top: 6px; font-size: 15px; }
.text-links { display: grid; gap: 8px; justify-items: start; }
.back { font-size: 14px; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; justify-self: start; }

/* --------------------------------------------------------- the top of a page */
.page-head { display: grid; gap: 12px; max-width: 820px; padding-block: clamp(44px, 6vw, 72px) 36px; }
.page-head h1 { font: 600 clamp(40px, 5.2vw, 64px)/1.02 var(--display); letter-spacing: -.025em; }
.page-head .lede { font-size: 19px; color: var(--muted); max-width: 60ch; }
.page-head.lost { padding-bottom: 120px; }

/* -------------------------------------------------------------------- About */
.about-head { max-width: none; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 32px clamp(28px, 6vw, 80px); align-items: center; padding-bottom: 56px; }
.about-head > div { display: grid; gap: 12px; }
.about-robot canvas { display: block; width: 100%; aspect-ratio: 4 / 3; background: var(--pale); box-shadow: 0 1px 0 rgba(30, 40, 60, .08), 0 18px 30px -22px rgba(30, 40, 60, .45); }
.about-robot figcaption { font-size: 13px; }
.about-part { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 14px clamp(28px, 6vw, 80px); padding-block: 44px; border-top: 1px solid var(--line); }
.about-part:last-child { margin-bottom: 40px; }
.about-part h2 { font: 600 clamp(26px, 3vw, 36px)/1.08 var(--display); }
.about-copy { display: grid; gap: 14px; align-content: start; max-width: 62ch; font-size: 18px; color: var(--muted); }
.about-copy p a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.about-copy .text-links { font-size: 16px; color: var(--ink); }
.about-author { grid-template-columns: 96px minmax(0, 1fr); gap: 24px; max-width: none; }
.about-author img { width: 96px; height: auto; aspect-ratio: 2 / 3; object-fit: cover; }
.about-author > div { display: grid; gap: 14px; max-width: 54ch; }
.robot-hands { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 18px; margin-block: 8px; }
.robot-hands a { display: grid; gap: 8px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.robot-hands a:hover { color: var(--ink); }
.robot-hands canvas { display: block; width: 100%; aspect-ratio: 4 / 3; background: var(--pale); }
.robot-hands b { font-weight: 500; color: var(--ink); }
/* without JavaScript there is nothing to draw the robot with */
html:not(.js) :is(.about-robot, .robot-hands) { display: none; }

@media (max-width: 800px) {
  .site-footer nav { flex-wrap: wrap; max-width: 260px; gap: 14px 20px; }
}
@media (max-width: 760px) {
  .about-head, .about-part { grid-template-columns: minmax(0, 1fr); }
  .about-head { padding-bottom: 40px; }
  .about-part { padding-block: 36px; }
  .about-copy { font-size: 17px; }
}
@media (max-width: 600px) {
  .site-header { min-height: 0; }
  .site-footer { grid-template-columns: 1fr; padding-top: 35px; }
  .site-footer nav { max-width: none; gap: 16px 23px; }
  .page-head .lede { font-size: 17px; }
  .page-head.lost { padding-bottom: 72px; }
}
@media (max-width: 420px) {
  .desktop-nav { gap: 18px; font-size: 14px; }
  .about-author { grid-template-columns: 72px minmax(0, 1fr); gap: 16px; }
  .about-author img { width: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
@media print {
  .site-header, .site-footer, .skip { display: none !important; }
}
