/* RanioLab: the shell every page shares (menu, footer, type, spacing).
   Each section's stylesheet redefines the tokens below and adds its own world. */
@import url("../fonts/google-fonts.css");
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("../fonts/BarlowCondensed-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("../fonts/BarlowCondensed-Bold.ttf") format("truetype"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 800; font-display: swap; src: url("../fonts/BarlowCondensed-ExtraBold.ttf") format("truetype"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 800; font-style: italic; font-display: swap; src: url("../fonts/BarlowCondensed-ExtraBoldItalic.ttf") format("truetype"); }
@font-face { font-family: "Jersey 10"; font-weight: 400; font-display: swap; src: url("../bitter-roots/fonts/jersey10.woff2") format("woff2"); }
@font-face { font-family: "Tiny5"; font-weight: 400; font-display: swap; src: url("../bitter-roots/fonts/tiny5.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("../fonts/Barlow-Regular.ttf") format("truetype"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url("../fonts/Barlow-Medium.ttf") format("truetype"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("../fonts/Barlow-SemiBold.ttf") format("truetype"); }

:root {
  /* the lab: a Commodore-blue night (overridden per section) */
  --ground: #1d1752;
  --ground-2: #261f68;
  --text: #ded9ff;
  --muted: #a39cdc;
  --accent: #9b90ff;
  --line: rgba(222, 217, 255, 0.16);
  --head-bg: rgba(29, 23, 82, 0.82);
  --head-text: #ded9ff;
  --mono: "VT323", "DejaVu Sans Mono", ui-monospace, monospace;
  --sans: "IBM Plex Sans", "Segoe UI", Roboto, system-ui, sans-serif;
  --display: var(--sans);
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
  --wide: 1180px;
  --step--1: clamp(0.84rem, 0.8rem + 0.15vw, 0.92rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.25rem + 1.1vw, 2.1rem);
  --step-3: clamp(2rem, 1.5rem + 2.4vw, 3.4rem);
  --step-4: clamp(2.6rem, 1.6rem + 4.6vw, 5.6rem);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { line-height: 1.08; text-wrap: balance; margin: 0; font-family: var(--display); }
p { margin: 0; }
p, li { text-wrap: pretty; }
.wrap { width: 100%; max-width: var(--wide); margin-inline: auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--text); color: var(--ground); padding: 8px 14px; font-weight: 600; }
.skip:focus { top: 12px; }

/* The menu: a thin bar that takes each world's colours. */
.site-head {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: calc(10px + env(safe-area-inset-top, 0px)) var(--gutter-r) 10px var(--gutter);
  background: var(--head-bg);
  color: var(--head-text);
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.brand, .foot-brand {
  font-family: "VT323", ui-monospace, monospace; font-size: 1.75rem; line-height: 1; letter-spacing: 0.08em;
  text-decoration: none; display: inline-flex; align-items: center; gap: 4px;
}
.cursor { display: inline-block; width: 0.55em; height: 0.85em; background: currentColor; animation: blink 1.06s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.site-head nav { display: flex; gap: clamp(10px, 2.6vw, 28px); flex-wrap: wrap; }
.site-head nav a {
  text-decoration: none; font-size: var(--step--1); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 6px 0; border-bottom: 2px solid transparent; opacity: 0.82;
}
.site-head nav a:hover, .site-head nav a[aria-current="page"] { opacity: 1; border-bottom-color: currentColor; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); background: var(--ground-2); color: var(--muted); font-size: var(--step--1); }
.foot-inner { max-width: var(--wide); margin-inline: auto; padding: 36px var(--gutter-r) calc(36px + env(safe-area-inset-bottom, 0px)) var(--gutter); display: grid; gap: 6px; }
.foot-brand { color: var(--text); font-size: 1.5rem; margin-bottom: 6px; }
.foot-legal { margin-top: 10px; opacity: 0.85; }

/* Shared bits */
.socials { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.socials-soon { color: var(--muted); }
.made-with { font-size: var(--step--1); color: var(--muted); max-width: 68ch; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .cursor { animation: none; }
}
