/* Rooney Systems shared world, same as rooneysystems.com (rooney-systems-site/DESIGN.md):
   paper, ink, machine yellow, steel, night; 1-bit OS windows; Schibsted Grotesk, Geist Mono, VT323. */

@font-face { font-family: "Schibsted Grotesk"; src: url("../fonts/schibsted-grotesk-var.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/geist-mono-var.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "VT323"; src: url("../fonts/vt323-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --paper: #FEFEFD;
  --ink: #1E1E1E;
  --ink-soft: #4A4A48;
  --yellow: #F5CD3D;
  --steel: #AEB9C1;
  --night: #1E1E1E;
  --night-line: #3A3A38;
  --night-soft: #B9B9B4;
  --win: #DEDEDE;
  --win-field: #F3F3F1;
  --rule: #CFCFCC;

  --sans: "Schibsted Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --px: "VT323", "Geist Mono", ui-monospace, monospace;

  --gutter: clamp(16px, 3.5vw, 50px);
  --max: 1240px;
  --section: clamp(80px, 10vw, 150px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --z-nav: 20; --z-toast: 40;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 56px; scrollbar-color: var(--ink) var(--paper); scrollbar-width: thin; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.4; -webkit-font-smoothing: antialiased; caret-color: var(--ink); overflow-x: clip; }
::selection { background: var(--yellow); color: var(--ink); }
.field-yellow ::selection { background: var(--ink); color: var(--yellow); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--ink); border: 3px solid var(--paper); }
h1, h2, h3, p, dl, dd { margin: 0; }
h1, h2, h3 { font-weight: 500; letter-spacing: -.045em; line-height: .95; text-wrap: balance; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
button, input, select { font-family: inherit; }
button { cursor: url("/assets/cursor-aubergine-link.svg") 1 1, pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.field-night :focus-visible { outline-color: var(--yellow); }
img, svg, canvas { display: block; max-width: 100%; }

/* ---------- Cursor: a standard arrow is the pointer (fine pointers only) ---------- */
@media (hover: hover) and (pointer: fine) {
  html { cursor: url("/assets/cursor-aubergine.svg") 1 1, auto; }
  a, button, summary, label, select, [role="button"] { cursor: url("/assets/cursor-aubergine-link.svg") 1 1, pointer; }
  input, textarea { cursor: text; }
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Nav chips ---------- */
.nav { position: sticky; top: 0; z-index: var(--z-nav); display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; height: 0; overflow: visible; }
.nav > * { display: flex; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px; background: var(--paper); color: var(--ink); font-size: 19px; letter-spacing: -.02em; text-decoration: none; white-space: nowrap; transition: background-color .2s var(--ease), color .2s var(--ease); }
.chip:hover { background: var(--yellow); }
.chip[aria-current="page"] { background: var(--yellow); }
.chip-ink { background: var(--ink); color: var(--paper); }
.chip-ink:hover { background: var(--yellow); color: var(--ink); }
.nav .chip:focus-visible { outline-offset: -4px; }
.nav .chip-ink:focus-visible { outline-color: var(--yellow); }
.nav-mid { position: absolute; left: 50%; transform: translateX(-50%); }
.mark { height: 21px; width: auto; fill: currentColor; flex: none; }
.chip.brand { flex: none; }
.show-s { display: none; }
@media (max-width: 900px) {
  .hide-s { display: none; }
  .show-s { display: inline; }
  .brand-name { display: none; }
  .nav-mid { position: static; transform: none; }
  .chip { font-size: 17px; height: 34px; padding: 0 7px; }
}
@media (max-width: 360px) {
  .nav > * { gap: 4px; }
  .chip { font-size: 16px; padding: 0 5px; }
}

/* ---------- Windows ---------- */
.win { display: block; position: relative; background: var(--win); border: 1px solid var(--ink); box-shadow: inset 0 0 0 2px var(--win), inset 0 0 0 3px var(--ink); color: var(--ink); text-decoration: none; }
.win-bar { display: flex; justify-content: space-between; gap: 12px; background: var(--ink); color: var(--paper); font-family: var(--px); font-size: 19px; line-height: 1; padding: 4px 7px 3px; white-space: nowrap; overflow: hidden; }
.win-bar > span:last-child:not(:first-child) { opacity: .75; overflow: hidden; text-overflow: ellipsis; }
.win-body { display: block; padding: 14px 13px 13px; }
.win-field { background: var(--paper); margin: 3px; }
.tag-ink { display: inline-block; background: var(--ink); color: var(--paper); font-family: var(--px); font-size: 18px; line-height: 1; padding: 3px 6px 2px; text-decoration: none; }
.tag-yellow { display: inline-block; background: var(--yellow); color: var(--ink); font-family: var(--px); font-size: 19px; line-height: 1; padding: 4px 7px 3px; }
.px { font-family: var(--px); font-size: 21px; line-height: 1.12; }
.mono { font-family: var(--mono); font-size: 12.5px; line-height: 1.35; }

/* ---------- Buttons: ink blocks in pixel type ---------- */
.btn, .ghost { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--px); font-size: 24px; line-height: 1; padding: 9px 16px 7px; border: 1px solid var(--ink); border-radius: 0; text-decoration: none; transition: background-color .15s var(--ease), color .15s var(--ease); }
.btn { background: var(--ink); color: var(--paper); }
.btn:hover { background: var(--yellow); color: var(--ink); }
.ghost { background: var(--paper); color: var(--ink); }
.ghost:hover { background: var(--yellow); }
.mini { font-size: 21px; padding: 6px 12px 5px; }
.btn[disabled], .ghost[disabled] { opacity: .45; pointer-events: none; }
/* a finished action is a success state, not a greyed out button */
.btn.booked[disabled] { opacity: 1; background: var(--yellow); color: var(--ink); }

.text-link { display: inline-block; font-size: 1.15rem; font-weight: 500; letter-spacing: -.02em; text-decoration: underline; text-decoration-thickness: 1.5px; }
.text-link::after { content: ""; display: inline-block; width: .5em; height: .5em; margin-left: .35em; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: translateY(-.1em) rotate(45deg); }
.text-link:hover { background: var(--yellow); }

/* ---------- Fields ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-family: var(--mono); font-size: 12.5px; }
.field input, .field select, .wait input { background: var(--paper); border: 1px solid var(--ink); border-radius: 0; color: var(--ink); font-family: var(--px); font-size: 22px; line-height: 1; padding: 9px 11px 7px; min-width: 0; }
.field input:focus-visible, .wait input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
::placeholder { color: var(--ink-soft); opacity: 1; }

/* ---------- Colour fields ---------- */
.field-yellow { background: var(--yellow); }
.field-steel { background: var(--steel); }
.field-night { background: var(--night); color: var(--paper); }
.dotpanel { position: relative; background-image: radial-gradient(var(--ink) .9px, transparent 1.1px); background-size: 5px 5px; background-color: color-mix(in srgb, var(--yellow) 88%, var(--ink)); }
.crop { position: relative; width: fit-content; max-width: 100%; padding: clamp(18px, 3vw, 36px) clamp(8px, 2vw, 28px); }
.crop::before, .crop::after { content: ""; position: absolute; width: 10px; height: 10px; border: 0 solid currentColor; opacity: .6; }
.crop::before { left: -8px; top: 0; border-left-width: 1px; border-top-width: 1px; }
.crop::after { right: -8px; bottom: 0; border-right-width: 1px; border-bottom-width: 1px; }

/* ---------- Dither steam ---------- */
.steam { position: absolute; left: 0; top: 0; width: 100%; height: 420px; image-rendering: pixelated; pointer-events: none; }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 26px; left: 50%; width: max-content; max-width: calc(100vw - 32px); text-align: center; transform: translate(-50%, 16px); z-index: var(--z-toast); background: var(--yellow); color: var(--ink); border: 1px solid var(--ink); font-family: var(--px); font-size: 21px; line-height: 1.1; padding: 8px 14px 6px; opacity: 0; pointer-events: none; transition: opacity .3s var(--ease), transform .3s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Footer ---------- */
footer { background: var(--night); color: var(--night-soft); margin-top: 0; }
footer .wrap { padding-top: clamp(56px, 8vw, 96px); padding-bottom: 24px; display: grid; gap: 40px; }
.foot-lockup { width: clamp(180px, 22vw, 280px); color: var(--paper); }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px; font-size: 14px; }
.foot-row nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot-row a { color: var(--paper); text-decoration: none; }
.foot-row a:hover { color: var(--yellow); text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .15s !important; }
}
