/* Fonts: self-hosted, open-licensed (SIL OFL 1.1, licences in fonts/). Brygada 1918 Bold stands in for NYT Cheltenham Bold (display),
   Figtree Bold for Galaxie Polaris Bold (body, small text), Handjet Bold is the pixel face of The Build button. */
@font-face { font-family: "Brygada 1918"; font-weight: 700; src: url("../fonts/brygada-1918-latin-700-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Figtree"; font-weight: 700; src: url("../fonts/figtree-latin-700-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Handjet"; font-weight: 700; src: url("../fonts/handjet-latin-700-normal.woff2") format("woff2"); font-display: swap; }

/* palette: Tan is the field, Persian Blue is headers, buttons and text, Red is the footer. White is used only on the game button ("The Build"). */
:root {
  --paper: #eadfc3;
  /* the field: sun-warmed sand. Deeper clay at the top (no text there), a soft light pool behind the tin, and paler sand along the bottom so the red credit keeps 4.5:1 */
  --field: radial-gradient(ellipse 62% 52% at 50% 40%, rgba(248, 241, 224, .7), rgba(248, 241, 224, 0) 72%),
           linear-gradient(180deg, #dfcca7 0%, #e5d6b6 38%, #eadfc3 70%, #eee4cb 100%); --persian_blue: #0c2c91; --red: #b42f10;
  --build-white: #ffffff; --build-navy: #000019;
  --display: "Brygada 1918", Georgia, serif;
  --body: "Figtree", "Helvetica Neue", Arial, sans-serif;
  --track-display: .02em; --track-label: .08em;           /* caps tracking: Brygada headings / Figtree labels */
  --btn-h: 54px; --btn-radius: 12px;                         /* every menu button shares one size and corner */
  --focus-ring: 3px solid var(--persian_blue);               /* keyboard focus on everything interactive */
  --fade: 1.4s ease;                                          /* the links and footer arriving together */
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--paper); overflow: hidden; overscroll-behavior: none; touch-action: manipulation; -webkit-font-smoothing: antialiased; }   /* pinch-zoom stays available */
body { background: var(--field) var(--paper); }
::selection { background: var(--persian_blue); color: var(--paper); }
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* invisible hit/focus targets that follow the tin and its fish (positioned from JS) */
.peel, .contact {
  position: fixed; left: 0; top: 0; z-index: 5; margin: 0; padding: 0; border: 0; background: none;
  pointer-events: none; color: transparent; font-size: 0;
}
.peel { border-radius: 48px; }
.contact { border-radius: 999px; }
.is-open .contact { pointer-events: auto; cursor: pointer; }
.hot { cursor: pointer; }
.peel:focus-visible, .contact:focus-visible { outline: var(--focus-ring); outline-offset: 8px; }

/* work links: sections with a button under each */
.work { position: fixed; left: 50%; bottom: calc(max(12px, env(safe-area-inset-bottom)) + 40px); z-index: 6; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 24px); display: flex; flex-wrap: wrap; justify-content: center; gap: 64px 56px; --w: min(220px, calc((100vw - 80px) / 2)); }
.work { opacity: 0; visibility: hidden; }
.work.show { opacity: 1; visibility: visible; transition: opacity var(--fade); }
.no-gl .work { opacity: 1; visibility: visible; }
.about { opacity: 0; }
.about.show { opacity: 1; transition: opacity var(--fade); }
.no-gl .about { opacity: 1; }
/* phones only: one column, one section above the next (tablets and larger keep the row) */
@media (max-width: 500px) {
  .work { flex-direction: column; flex-wrap: nowrap; align-items: center; gap: 40px; --w: min(260px, calc(100vw - 56px)); }
  .work { --btn-h: 48px; }
}
.work section { width: var(--w); text-align: center; }
.work h2 { margin: 0 0 12px; color: var(--persian_blue); font: 700 25px/1 var(--display); text-transform: uppercase; letter-spacing: var(--track-display); }
.soon, .build, .view { display: flex; align-items: center; justify-content: center; width: 100%; height: var(--btn-h); margin: 0; padding: 0 2px; border-radius: var(--btn-radius); white-space: nowrap; text-decoration: none; }
.soon { border: 2px dashed var(--persian_blue); background: none; color: var(--persian_blue); font: 700 12px/1 var(--body); letter-spacing: var(--track-label); text-transform: uppercase; cursor: default; }
.build { --bg: var(--build-navy); --fg: var(--build-white); border: 0; color: var(--fg); font: 700 26px/1 "Handjet", var(--body); letter-spacing: .06em; text-transform: uppercase;
  background: linear-gradient(var(--fg), var(--fg)) 6% 22% / 2px 2px no-repeat, linear-gradient(var(--fg), var(--fg)) 13% 70% / 2px 2px no-repeat, linear-gradient(var(--fg), var(--fg)) 21% 40% / 3px 3px no-repeat, linear-gradient(var(--fg), var(--fg)) 30% 12% / 2px 2px no-repeat, linear-gradient(var(--fg), var(--fg)) 36% 84% / 2px 2px no-repeat, linear-gradient(var(--fg), var(--fg)) 47% 9% / 3px 3px no-repeat, linear-gradient(var(--fg), var(--fg)) 55% 88% / 2px 2px no-repeat, linear-gradient(var(--fg), var(--fg)) 64% 10% / 2px 2px no-repeat, linear-gradient(var(--fg), var(--fg)) 72% 80% / 3px 3px no-repeat, linear-gradient(var(--fg), var(--fg)) 79% 24% / 2px 2px no-repeat, linear-gradient(var(--fg), var(--fg)) 86% 62% / 2px 2px no-repeat, linear-gradient(var(--fg), var(--fg)) 93% 34% / 3px 3px no-repeat, linear-gradient(var(--fg), var(--fg)) 91% 86% / 2px 2px no-repeat, linear-gradient(var(--fg), var(--fg)) 17% 90% / 2px 2px no-repeat, linear-gradient(var(--fg), var(--fg)) 4% 52% / 2px 2px no-repeat, linear-gradient(var(--fg), var(--fg)) 96% 12% / 2px 2px no-repeat, linear-gradient(var(--fg), var(--fg)) 82% 48% / 2px 2px no-repeat, linear-gradient(var(--fg), var(--fg)) 26% 66% / 2px 2px no-repeat, var(--bg); }   /* floating pixels, kept clear of the lettering */
@media (hover: hover) { .build:hover { --bg: var(--build-white); --fg: var(--build-navy); } }   /* touch screens: no hover state left stuck after a tap */
.build:active { transform: translateY(1px); }
.build:focus-visible { outline: var(--focus-ring); outline-offset: 3px; }
/* a live section: solid Persian Blue, the outline of "Coming soon" filled in */
.view { border: 2px solid var(--persian_blue); background: var(--persian_blue); color: var(--paper); font: 700 12px/1 var(--body); letter-spacing: var(--track-label); text-transform: uppercase; }
@media (hover: hover) { .view:hover { background: none; color: var(--persian_blue); } }
.view:active { transform: translateY(1px); }
.view:focus-visible { outline: var(--focus-ring); outline-offset: 3px; }

.about { position: fixed; left: 0; right: 0; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 4; padding: 0 16px; text-align: center; pointer-events: none; color: var(--red); font: 700 10.5px/1.4 var(--body); letter-spacing: var(--track-label); text-transform: uppercase; }

/* the circle cursor (added by JS for mouse and trackpad only; the stock cursor stays on touch and if JS is off) */
.has-cursor, .has-cursor * { cursor: none !important; }
.cursor { position: fixed; left: 0; top: 0; z-index: 10; width: 0; height: 0; pointer-events: none; opacity: 0; transition: opacity .2s; will-change: transform; }   /* a point at the pointer: the ring centres on it, the hand's fingertip sits on it */
.cursor.on { opacity: 1; }
.cursor svg { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; fill: #fff; stroke: #fff; stroke-width: 1.2; stroke-linejoin: round; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .3)); }   /* one white shape: the disc, the hand, and every shape between; the faint shadow only lifts it off the tan */

/* no WebGL / no JS: just the button */
.no-gl .peel, .no-gl #gl { display: none; }
.no-gl .contact, .ns a {
  position: fixed; left: 50%; top: 50%; width: auto; height: auto; transform: translate(-50%, -50%); pointer-events: auto;
  padding: 14px 34px 10px; border-radius: 6px; background: var(--persian_blue); color: var(--paper); font: 700 36px/1 var(--display); text-transform: uppercase; letter-spacing: var(--track-display);
  text-decoration: none; white-space: nowrap; box-shadow: 0 0 0 4px var(--paper), 0 0 0 7px var(--persian_blue);
}
.ns { position: fixed; inset: 0; margin: 0; display: grid; place-content: center; gap: 22px; text-align: center; color: var(--persian_blue); font: 700 14px/1.5 var(--body); letter-spacing: var(--track-label); text-transform: uppercase; }
.ns a { position: static; transform: none; }
@media (max-width: 500px) { .no-gl .contact, .ns a { padding: 12px 22px 8px; font-size: 26px; } .ns { padding: 0 16px; } }   /* phones: the fallback button fits a 320px screen */
