/* ---- the fonts, self-hosted (Latin subsets, woff2): Creato Display 400 and 500, Space Mono 400. font-display: swap, so text never waits;
   the two first-paint faces are preloaded from each page's head. Without these every visitor saw the fallback sans. ---- */
@font-face { font-family: 'Creato Display'; font-style: normal; font-weight: 400; font-display: swap; src: url(assets/fonts/creato-display-400.woff2) format('woff2'); }
@font-face { font-family: 'Creato Display'; font-style: normal; font-weight: 500; font-display: swap; src: url(assets/fonts/creato-display-500.woff2) format('woff2'); }
@font-face { font-family: 'Space Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(assets/fonts/space-mono-400.woff2) format('woff2'); }

/* ============================================================
   THE VISITOR  /  SYSTEM  v0.2  (Nov 2026)

   Tokens, type, space, margins, buttons, section header, card.
   The future top of styles.css. Nothing in here is page-specific.
   If a value isn't a token, it doesn't exist.

   v0.2: no serif. One grotesk (Switzer) for everything you read,
   one pixel monospace (Departure Mono) for everything you scan:
   labels, numbers, coordinates, meta. White and grey text. One
   signal orange, reserved for the dither and for the moment you
   touch something. One shape: the cut corner.
   ============================================================ */

:root {
  /* ---- colour (9) ---- */
  --bg: #050505;
  --panel: #0e0e0e;
  --text: #ffffff;
  --text-2: #cfcfcf;                        /* body */
  --text-3: #7c7c7c;                        /* muted, labels, emphasis phrases; 4.6:1 on the panel, so small labels pass contrast */
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.22);
  --accent: #ff4f00;                        /* signal orange: the dither, and hover. Nothing else. */
  --accent-ink: #000000;

  /* ---- type ---- */
  --font-sans: 'Creato Display', ui-sans-serif, system-ui, sans-serif;   /* Owen's pick, 5 Nov. Regular only in headlines. Free; self-host. */
  --font-mono: 'Space Mono', ui-monospace, monospace;

  /* small register (Owen, 5 Nov, after pacer-intelligence.com: "I like how it's small").
     The hero headline tops out at 40px; the dither carries the screen. */
  --t-display: clamp(1.75rem, 2.4vw, 2.5rem);    /* 28 to 40 */
  --t-h1:      clamp(1.625rem, 2.2vw, 2.25rem);  /* 26 to 36 */
  --t-h2:      clamp(1.5rem, 2vw, 2rem);         /* 24 to 32 */
  --t-h3:      clamp(1.0625rem, 1.2vw, 1.25rem); /* 17 to 20 */
  --t-lead:    clamp(1rem, 1.1vw, 1.0625rem);    /* 16 to 17 */
  --t-body:    0.9375rem;                        /* 15 */
  --t-small:   0.8125rem;                        /* 13 */
  --t-label:   0.75rem;                          /* 12 */

  --lh-display: 1.05;
  --lh-h1: 1.1;
  --lh-h2: 1.15;
  --lh-h3: 1.3;
  --lh-lead: 1.45;
  --lh-body: 1.55;

  --ls-display: -0.03em;
  --ls-h1: -0.025em;
  --ls-h2: -0.02em;
  --ls-h3: -0.01em;
  --ls-label: 0.04em;

  --measure: 62ch;

  /* ---- space: 4px base ---- */
  --s-1: 0.25rem;  --s-2: 0.5rem;  --s-3: 0.75rem; --s-4: 1rem;
  --s-5: 1.5rem;   --s-6: 2rem;    --s-7: 3rem;    --s-8: 4rem;
  --s-9:  clamp(4rem, 7vw, 6rem);
  --s-10: clamp(5rem, 10vw, 8rem);

  /* ---- margins + grid ---- */
  --margin: clamp(1.25rem, 3.2vw, 3rem);
  --container: 1440px;
  --col-gap: clamp(1rem, 1.6vw, 1.5rem);
  --section-y: var(--s-10);

  /* ---- shape + motion ---- */
  --cut: 10px;                                   /* the cut corner, top right, everywhere */
  --ease-out:  cubic-bezier(0.165, 0.84, 0.44, 1);
  --ease-osmo: cubic-bezier(0.625, 0.05, 0, 1);
  --dur-fast: 0.2s;
  --dur: 0.45s;

  /* ---- dither tiles: 4x4 Bayer at three densities ---- */
  --d25-accent: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' shape-rendering='crispEdges'%3E%3Cpath fill='%23ff4f00' d='M0 0h1v1H0zM2 0h1v1H2zM0 2h1v1H0zM2 2h1v1H2z'/%3E%3C/svg%3E");
  --d50-accent: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' shape-rendering='crispEdges'%3E%3Cpath fill='%23ff4f00' d='M0 0h1v1H0zM2 0h1v1H2zM0 2h1v1H0zM2 2h1v1H2zM1 1h1v1H1zM3 3h1v1H3zM3 1h1v1H3zM1 3h1v1H1z'/%3E%3C/svg%3E");
  --d75-accent: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' shape-rendering='crispEdges'%3E%3Cpath fill='%23ff4f00' d='M0 0h1v1H0zM2 0h1v1H2zM0 2h1v1H0zM2 2h1v1H2zM1 1h1v1H1zM3 3h1v1H3zM3 1h1v1H3zM1 3h1v1H1zM1 0h1v1H1zM3 2h1v1H3zM3 0h1v1H3zM1 2h1v1H1z'/%3E%3C/svg%3E");
  --d25-white:  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' shape-rendering='crispEdges'%3E%3Cpath fill='%23ffffff' d='M0 0h1v1H0zM2 0h1v1H2zM0 2h1v1H0zM2 2h1v1H2z'/%3E%3C/svg%3E");
  --d50-white:  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' shape-rendering='crispEdges'%3E%3Cpath fill='%23ffffff' d='M0 0h1v1H0zM2 0h1v1H2zM0 2h1v1H0zM2 2h1v1H2zM1 1h1v1H1zM3 3h1v1H3zM3 1h1v1H3zM1 3h1v1H1z'/%3E%3C/svg%3E");
  --d75-white:  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' shape-rendering='crispEdges'%3E%3Cpath fill='%23ffffff' d='M0 0h1v1H0zM2 0h1v1H2zM0 2h1v1H0zM2 2h1v1H2zM1 1h1v1H1zM3 3h1v1H3zM3 1h1v1H3zM1 3h1v1H1zM1 0h1v1H1zM3 2h1v1H3zM3 0h1v1H3zM1 2h1v1H1z'/%3E%3C/svg%3E");
}

/* ---------- base ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { background: var(--bg); overflow-x: clip; scrollbar-width: thin; scrollbar-color: #222 var(--bg); }
body {
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: var(--t-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, canvas, video { display: block; max-width: 100%; }
ul, ol { list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

/* ---------- layout ---------- */
.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--margin); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--col-gap); }
.section { padding-block: var(--section-y); }
.hairline { border-top: 1px solid var(--line); }

/* ---------- type ---------- */
.t-display, .t-h1, .t-h2 { font-weight: 400; text-wrap: balance; }   /* never bold: Owen finds bold headlines tacky */
.t-display { font-size: var(--t-display); line-height: var(--lh-display); letter-spacing: var(--ls-display); }
.t-h1      { font-size: var(--t-h1);      line-height: var(--lh-h1);      letter-spacing: var(--ls-h1); }
.t-h2      { font-size: var(--t-h2);      line-height: var(--lh-h2);      letter-spacing: var(--ls-h2); }
.t-h3      { font-size: var(--t-h3);      line-height: var(--lh-h3);      letter-spacing: var(--ls-h3); font-weight: 500; }
.t-lead    { font-size: var(--t-lead);    line-height: var(--lh-lead);    font-weight: 400; color: var(--text-2); max-width: var(--measure); }
.t-body    { font-size: var(--t-body);    line-height: var(--lh-body);    color: var(--text-2); max-width: var(--measure); }
.t-small   { font-size: var(--t-small);   line-height: 1.5;               color: var(--text-3); }

/* no emphasis inside headlines for now: one weight, one colour. em is plain. */
.t-display em, .t-h1 em, .t-h2 em { font-style: normal; font-weight: inherit; color: inherit; }

/* the scan voice: pixel mono for labels, meta, numbers, coordinates */
.t-label, .t-mono {
  font-family: var(--font-mono);
  font-size: var(--t-label);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--text-3);
  -webkit-font-smoothing: none;         /* keep the pixels crisp */
  -moz-osx-font-smoothing: unset;
}
.t-label b, .t-mono b { font-weight: 400; color: var(--text); }
.t-mono { text-transform: none; }

/* ---------- the cut corner ---------- */
.cut { clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); }

/* ---------- buttons ---------- */
.btn {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  --cut: 8px;                                    /* buttons sit in the small register: 40px tall, 14px label */
  gap: var(--s-3);
  height: 40px;
  padding: 0 var(--s-4);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
}
.btn > * { position: relative; z-index: 2; }
.btn__label { display: inline-block; }
.btn__arrow { width: 12px; height: 12px; flex: none; transition: transform 0.25s steps(3, end); }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* primary: orange at rest. On hover white wipes across from the left behind a coarse
   dithered edge (3px dots, 12px pitch); the solid follows 70ms behind. Label stays black.
   Owen's pick, 5 Nov: coarse wipe, then flipped to orange-to-white. */
.btn--primary { background-color: var(--accent); color: var(--accent-ink); }
.btn--primary::before, .btn--primary::after {
  content: '';
  position: absolute; inset: 0; z-index: 1;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.42s var(--ease-osmo);
  pointer-events: none;
}
.btn--primary::before { background-image: var(--d50-white); background-size: 12px 12px; }
.btn--primary::after  { background-color: var(--text); transition-delay: 70ms; }
.btn--primary:hover::before, .btn--primary:hover::after { clip-path: inset(0 0 0 0); }

/* secondary: the primary's negative. Same block and cut, filled panel grey with a hairline edge.
   Lifts a shade on hover. No dots. Owen's pick, 5 Nov. */
.btn--secondary { background-color: var(--line-2); color: var(--text); transition: background-color var(--dur-fast) var(--ease-out); }
.btn--secondary::before {
  content: '';
  position: absolute; inset: 1px; z-index: 0;
  background-color: var(--panel);
  clip-path: polygon(0 0, calc(100% - var(--cut) - 0.1px) 0, 100% calc(var(--cut) + 0.1px), 100% 100%, 0 100%);
  transition: background-color var(--dur-fast) var(--ease-out);
}
.btn--secondary:hover { background-color: rgba(255, 255, 255, 0.4); }
.btn--secondary:hover::before { background-color: #1a1a1a; }

.btn--sm { height: 34px; padding: 0 var(--s-3); font-size: 0.8125rem; --cut: 7px; }
.btn--lg { height: 48px; padding: 0 var(--s-5); font-size: 0.9375rem; --cut: 10px; }

/* text link: label in the text face, pixel arrow. On hover the underline draws in from the
   left and the arrow steps right. Owen's pick ("A, Draw"), 5 Nov. */
.link {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  font-size: 0.9375rem;
  color: var(--text);
  text-decoration: none;
}
.link__label {
  padding-bottom: 3px;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size var(--dur) var(--ease-osmo);
}
.link:hover .link__label { background-size: 100% 1px; }
.link .btn__arrow { width: 13px; height: 13px; }
.link:hover .btn__arrow { transform: translateX(4px); }
.link--muted { color: var(--text-3); transition: color var(--dur-fast); }
.link--muted:hover { color: var(--text); }

/* ---------- section header ---------- */
.section-head { display: grid; gap: var(--s-5); margin-bottom: var(--s-8); }
.section-head .t-h2 { max-width: 16ch; }
.section-head__note { color: var(--text-3); font-size: var(--t-body); line-height: 1.5; max-width: 34ch; }
.section-head--split { grid-template-columns: 1fr auto; align-items: end; column-gap: var(--s-8); }
.section-head--split .t-label { grid-column: 1 / -1; }
.section-head--split .section-head__note { text-align: right; }
@media (max-width: 767px) {
  .section-head--split { grid-template-columns: 1fr; }
  .section-head--split .section-head__note { text-align: left; }
}

/* ---------- card ---------- */
.card {
  --cut: 40px;                                   /* the button's corner, scaled to the card */
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: subgrid;                   /* in a card row, every card shares the object row and the body row, so titles align */
  grid-row: span 2;
  background-color: var(--line);                 /* this is the border */
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
  text-decoration: none;
  transition: background-color var(--dur) var(--ease-out);
}
.card::before {                                  /* the panel, inset 1px: the border shows on the cut too */
  content: '';
  position: absolute; inset: 1px; z-index: 0;
  background-color: var(--panel);
  /* the diagonal band is 1.5px perpendicular, not 1px: a 1px line on a 45 degree edge is
     spread over two pixel rows by anti-aliasing and disappears at hairline alpha */
  clip-path: polygon(0 0, calc(100% - var(--cut) - 0.1px) 0, 100% calc(var(--cut) + 0.1px), 100% 100%, 0 100%);
}
.card:hover { background-color: var(--line-2); }
.card > * { position: relative; z-index: 1; }
.card__index { position: absolute; top: var(--s-5); left: var(--s-5); z-index: 2; }
.card__object {
  position: relative; min-height: 0; margin: 1px 1px 0; aspect-ratio: 1.3;
  /* the object sits above the stroke layer, so it must wear the same inner shape or it paints over the diagonal */
  clip-path: polygon(0 0, calc(100% - var(--cut) - 0.1px) 0, 100% calc(var(--cut) + 0.1px), 100% 100%, 0 100%);
}
.card__object canvas { width: 100%; height: 100%; image-rendering: pixelated; }
.card__body { display: grid; gap: var(--s-2); padding: var(--s-5); border-top: 1px solid var(--line); }
.card__body .t-small { max-width: 32ch; font-size: var(--t-body); line-height: 1.5; }   /* the description reads at body size, not the 13px small (Owen) */
@media (max-width: 767px) { .card__body .t-small { font-size: 1rem; max-width: none; } }   /* a phone: a full 16px, the width of the card */
.card .btn__arrow { position: absolute; top: calc(var(--s-5) + var(--cut) / 2); right: var(--s-5); z-index: 2; color: var(--text-3); opacity: 0; transition: opacity var(--dur-fast), transform 0.25s steps(3, end), color var(--dur-fast); }
.card:hover .btn__arrow { opacity: 1; color: var(--text); transform: translateX(4px); }

/* ---------- motion safety ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; transition-delay: 0ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- the phone menu: a burger at the right of the nav that turns into a cross, and a full-screen panel built by nav.js: the page dissolves
   into it through the site's dither, the links are a ruled list, a dithered globe turns in the bottom-right corner as an accent. The panel sits UNDER the
   page grain (z-index 80, the grain is 90) so it wears the same surface as the rest of the site; the nav rides over it (85), so the wordmark holds and
   the cross closes. (Owen's pick, 7 Nov 2026.) ---------- */
.nav__menu { display: none; position: relative; width: 44px; height: 44px; margin-right: -12px; color: var(--text); }   /* a 44px target; the bars end flush with the page margin */
@media (max-width: 767px) { .nav__menu { display: block; } }
.nav__menu i { position: absolute; left: 12px; width: 20px; height: 2px; background: currentColor; transition: transform 0.45s var(--ease-osmo), background-color 0.3s; }
.nav__menu i:first-child { top: 17px; }
.nav__menu i:last-child { top: 25px; }   /* two bars with 6px of air between: the two-line mark */
html.menu-open .nav__menu i:first-child { transform: translateY(4px) rotate(45deg); }
html.menu-open .nav__menu i:last-child { transform: translateY(-4px) rotate(-45deg); }
html.menu-open .nav { z-index: 85; }
html.menu-open { overflow: hidden; }
.menu { position: fixed; inset: 0; z-index: 80; visibility: hidden; }
html.menu-open .menu, .menu.is-closing { visibility: visible; }
.menu__bg, .menu__object { position: absolute; display: block; image-rendering: pixelated; pointer-events: none; }
.menu__bg { inset: 0; width: 100%; height: 100%; }
.menu__stack { position: absolute; left: var(--margin); right: var(--margin); top: calc(72px + var(--s-7)); display: grid; gap: var(--s-6); justify-items: stretch; }
.menu__cta { justify-self: start; }
/* the list is a list: ruled rows, each rule drawing in left to right as the words rise, the pixel arrow at the right (orange on the page you are on) */
.menu__links { display: grid; gap: 0; }
.menu__links a { position: relative; display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); padding: var(--s-4) 0; border-top: 1px solid transparent; color: var(--text); text-decoration: none; font-family: var(--font-sans); font-weight: 400; font-size: clamp(2.125rem, 9.6vw, 3rem); line-height: 1.05; letter-spacing: -0.03em; opacity: 0; transform: translateY(14px); transition: opacity 0.45s ease, transform 0.7s var(--ease-out), color var(--dur-fast); }
.menu__links a::before, .menu__links a:last-child::after { content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--line-2); transform: scaleX(0); transform-origin: left; transition: transform 0.7s var(--ease-osmo); }
.menu__links a:last-child::after { top: auto; bottom: -1px; }
html.menu-open .menu__links a::before { transform: scaleX(1); transition-delay: calc(var(--i, 0) * 70ms + 160ms); }
html.menu-open .menu__links a:last-child::after { transform: scaleX(1); transition-delay: calc(var(--i, 0) * 70ms + 260ms); }
.menu__links a[aria-current] { color: var(--accent); }
.menu__links a .btn__arrow { display: block; flex: none; width: 14px; height: 14px; color: var(--text-3); align-self: center; }
.menu__links a[aria-current] .btn__arrow { color: var(--accent); }
html.menu-open .menu__links a { opacity: 1; transform: none; transition-delay: calc(var(--i, 0) * 70ms + 220ms); }
.menu__cta { opacity: 0; transform: translateY(16px); transition: opacity 0.45s ease, transform 0.6s var(--ease-out); }
html.menu-open .menu__cta { opacity: 1; transform: none; transition-delay: 480ms; }
.menu__foot { position: absolute; left: var(--margin); right: var(--margin); bottom: var(--s-6); display: flex; gap: var(--s-6); font-family: var(--font-mono); font-size: var(--t-label); text-transform: uppercase; letter-spacing: var(--ls-label); opacity: 0; transition: opacity 0.5s ease; }
html.menu-open .menu__foot { opacity: 1; transition-delay: 520ms; }
.menu__foot a { color: var(--text-3); text-decoration: none; transition: color var(--dur-fast); }
.menu__foot a:hover { color: var(--text); }
/* the globe as an accent: big, pushed into the bottom-right corner so the screen clips it on the right and along the bottom, turning (Owen) */
.menu__object { right: -22vw; bottom: -14vw; width: min(90vw, 60vh); height: min(90vw, 60vh); opacity: 0; transition: opacity 0.8s ease; }
html.menu-open .menu__object { opacity: 1; transition-delay: 320ms; }
@media (prefers-reduced-motion: reduce) { .menu, .menu__links a, .menu__cta, .menu__foot, .menu__object, .nav__menu i, .menu__links a::before, .menu__links a:last-child::after { transition: none; } .menu__links a, .menu__cta, .menu__foot, .menu__object { opacity: 1; transform: none; } .menu__links a::before, .menu__links a:last-child::after { transform: none; } .menu { visibility: hidden; } html.menu-open .menu { visibility: visible; } }

/* phones and any touch screen: the text link's underline is on by default, since nothing hovers to draw it in (Owen) */
@media (hover: none), (max-width: 767px) { .link__label { background-size: 100% 1px; } }
/* under 480px the wordmark, MENU and the button do not fit on one line: the button lives in the menu panel, MENU takes the right edge */
@media (max-width: 479px) { .nav__links > .btn { display: none; } }
