/* rkj dev: the shared foundation for every page.
   One candle lights the whole site. This file holds the light, the type and the chrome (header, footer, buttons, links).
   Page sheets (home.css, blog/blog.css, play/play.css, pages.css) build on it and never redefine its tokens. */

:root {
  --night: #110b14;   /* page ground */
  --dusk: #1a1320;    /* raised surfaces: frames, code, tables, dialogs */
  --wick: #2f2536;    /* rules and borders */
  --ash: #a79daa;     /* muted text */
  --bone: #f2eadf;    /* text */
  --flame: #f4b860;   /* the light: hover, current, focus */
  --core: #fff3d6;    /* flame core, brightest highlight */
  --ember: #c8703f;   /* deep accent for active states */
  --violet: #6e4a9e;  /* cool tint, only far from the light */
  --display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --text: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(20px, 5vw, 56px);
  --page: 1240px;
  --shadow: 14px 28px 56px -28px rgb(0 0 0 / .65);
  --edge: inset 1px 1px 0 rgb(255 243 214 / .07);
  --ease: cubic-bezier(.2, .7, .1, 1);
  /* Where the light is, in viewport units. The home page moves it with the candle; every other page leaves it here. */
  --lx: 10vw;
  --ly: 12vh;
  --li: 1;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; min-height: 100vh;
  background: var(--night); color: var(--bone);
  font: 400 17px/1.6 var(--text);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* The light: a warm fall-off from the candle's side and a cool violet shadow opposite it. Still, on every page but home. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(70vmax 56vmax at var(--lx) var(--ly), rgb(244 184 96 / calc(.14 * var(--li))), rgb(200 112 63 / calc(.05 * var(--li))) 38%, transparent 68%),
    radial-gradient(60vmax 50vmax at 100% 100%, rgb(110 74 158 / .11), transparent 70%);
}
img, svg, video, canvas { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 500; line-height: 1.1; letter-spacing: -.015em; text-wrap: balance; }
p { margin: 0; }
::selection { background: var(--flame); color: var(--night); }
:focus-visible { outline: 2px solid var(--flame); outline-offset: 3px; border-radius: 3px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { position: relative; width: 100%; max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }

/* Skip link */
.skip {
  position: absolute; left: var(--gutter); top: -56px; z-index: 60;
  background: var(--flame); color: var(--night); padding: 10px 14px; border-radius: 4px;
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

/* Header: the same on every page. Frosted, so the light shows through it. */
.site-head {
  position: sticky; top: 0; z-index: 30;
  background: rgb(17 11 20 / .68);
  -webkit-backdrop-filter: blur(14px) saturate(1.15); backdrop-filter: blur(14px) saturate(1.15);
  border-bottom: 1px solid rgb(47 37 54 / .55);
  view-transition-name: site-header;
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 68px; }
.mark {
  font: 500 21px/1 var(--display); letter-spacing: -.02em; color: var(--bone); text-decoration: none;
  transition: color .2s;
}
.mark:hover { color: var(--core); }
.site-head nav { display: flex; gap: clamp(14px, 2.6vw, 30px); }
.site-head nav a {
  color: var(--ash); text-decoration: none; font: 500 15px/1 var(--text);
  padding: 15px 0 13px; border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.site-head nav a:hover { color: var(--bone); }
.site-head nav a[aria-current] { color: var(--bone); border-bottom-color: var(--flame); }
@media (max-width: 560px) { .site-head nav a:nth-child(5) { display: none; } }
@media (max-width: 420px) { .site-head nav a:nth-child(2) { display: none; } .site-head nav { gap: 16px; } }

/* Buttons and text links */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 20px; border: 0; border-radius: 6px; cursor: pointer;
  background: var(--flame); color: var(--night); font: 600 15px/1 var(--text); text-decoration: none;
  transition: background-color .2s, color .2s, transform .2s var(--ease);
}
.btn:hover { background: var(--core); }
.btn:active { background: var(--ember); color: var(--core); transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.quiet { background: transparent; color: var(--bone); box-shadow: inset 0 0 0 1px var(--wick); }
.btn.quiet:hover { box-shadow: inset 0 0 0 1px var(--ash); background: rgb(255 255 255 / .03); }
.textlink {
  color: var(--bone); font-weight: 500; text-decoration: underline;
  text-decoration-color: var(--wick); text-decoration-thickness: 1px; text-underline-offset: 5px;
  transition: color .2s, text-decoration-color .2s;
}
.textlink:hover { color: var(--flame); text-decoration-color: currentColor; }

/* Footer: the business block on every page. Never the postal address or a phone number. */
.site-foot { margin-top: clamp(72px, 10vw, 128px); border-top: 1px solid var(--wick); color: var(--ash); font-size: 14px; line-height: 1.55; }
.site-foot .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; padding-top: 34px; padding-bottom: 52px; }
.site-foot .biz { display: grid; gap: 5px; max-width: 34em; }
.site-foot .biz-name { font: 500 20px/1.2 var(--display); letter-spacing: -.015em; color: var(--bone); margin-bottom: 6px; }
.site-foot .nowrap { white-space: nowrap; }
.site-foot a { color: var(--ash); text-decoration: underline; text-decoration-color: var(--wick); text-underline-offset: 4px; transition: color .2s, text-decoration-color .2s; }
.site-foot a:hover { color: var(--bone); text-decoration-color: currentColor; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 22px; align-content: start; justify-content: end; }
.site-foot nav a { text-decoration: none; padding: 6px 0; }
.site-foot .fine { grid-column: 1 / -1; font-size: 13px; max-width: 64em; color: rgb(167 157 170 / .78); }
@media (max-width: 640px) {
  .site-foot .wrap { grid-template-columns: 1fr; }
  .site-foot nav { justify-content: start; }
}

/* Pages cross-fade under a steady header. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
