@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/assets/fonts/atkinson-latin-ext.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/assets/fonts/atkinson-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #1b1b1b;
  --ink-2: #3f3f3f;
  --muted: #5c5c5c;
  --rule: #d4d4d4;
  --soft: #f3f3f1;
  --pen: #1f3a93;
  --pen-dark: #13245e;
  --marker: #ffe45c;
  --focus: #ffdd33;
  --sans: "Atkinson Hyperlegible Next", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --measure: 36rem;
  /* Fluid sizing from small phones to desktop; rem limits preserve text zoom. */
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2rem);
  --section-space: clamp(2rem, 1.25rem + 3.75vw, 3.5rem);
  --layout-gap: clamp(1rem, 0.5rem + 2.5vw, 2rem);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1.0625rem, 1rem + 0.3125vw, 1.1875rem);
  line-height: 1.55;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* The rule above would otherwise override the browser's own [hidden] { display: none }. */
[hidden] {
  display: none !important;
}

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

/* Links and focus */

a {
  color: var(--pen);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--pen-dark);
  text-decoration-thickness: 3px;
}

a:focus-visible {
  outline: 3px solid transparent;
  color: #000;
  background: var(--focus);
  box-shadow: 0 -2px var(--focus), 0 4px #000;
  text-decoration: none;
}

summary:focus-visible {
  outline: 3px solid var(--focus);
  box-shadow: inset 0 0 0 2px #000;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -10rem;
  padding: 0.5rem 0.75rem;
  z-index: 10;
}

.skip:focus {
  top: 0.5rem;
}

/* Cappuccino în 360° (src/cappuccino-360.njk): all screen, no header, no footer, no text. */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.page-360 {
  overflow: hidden;
  overscroll-behavior: none;
  background: #060709;
  color-scheme: dark;
}

.particles {
  background: #07080a;
}

.stage {
  position: relative;
  height: 100vh;
  height: 100dvh;
  min-height: 20rem;
  overflow: hidden;
  background: radial-gradient(120% 90% at 50% 42%, #1d2129 0%, #0d0f13 55%, #060709 100%);
  color: #e8e4dc;
}

.stage canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  outline: none;
}

.stage canvas:focus-visible {
  box-shadow: inset 0 0 0 3px var(--focus);
}

/* While he loads: one speck of light breathing in the middle, where the galaxy he gathers from
   then opens up. */
.stage-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  transition: opacity 0.6s, visibility 0.6s;
  pointer-events: none;
}

.stage-loading::before {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #efe2cc;
  box-shadow: 0 0 14px 3px rgb(239 226 204 / 0.3);
  content: "";
  animation: stage-breathe 1.8s ease-in-out infinite;
}

@keyframes stage-breathe {
  0%,
  100% {
    transform: scale(0.55);
    opacity: 0.35;
  }

  50% {
    transform: scale(1);
    opacity: 0.95;
  }
}

.stage.is-ready .stage-loading,
.stage.is-fallback .stage-loading {
  opacity: 0;
  visibility: hidden;
}

/* A row of round buttons at the bottom, showing once he has gathered: what he turns into, then,
   past a thin line, the sound. */
.stage-controls {
  position: absolute;
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  left: 50%;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  transform: translateX(-50%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.2s ease 5.5s, visibility 0s linear 5.5s;
}

@media (min-width: 40rem) {
  .stage-controls {
    bottom: 1.75rem;
  }
}

.stage.is-ready .stage-controls {
  opacity: 1;
  visibility: visible;
}

.stage-controls[hidden],
.stage-fx[hidden],
.stage-sep[hidden],
.stage-sound[hidden],
.stage.is-fallback .stage-controls {
  display: none;
}

.stage-fx {
  display: flex;
  gap: 0.625rem;
}

.stage-sep {
  width: 1px;
  height: 1.5rem;
  margin-inline: 0.125rem;
  background: rgb(255 255 255 / 0.12);
}

.stage-controls button {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 50%;
  background: rgb(255 255 255 / 0.03);
  color: #aaa397;
  font: inherit;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s, opacity 0.3s;
}

.stage-controls svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stage-fx svg.fill,
.stage-fx .dot {
  fill: currentColor;
  stroke: none;
}

.stage-fx .dim {
  opacity: 0.55;
}

.stage-controls button:hover {
  border-color: rgb(255 255 255 / 0.28);
  background: rgb(255 255 255 / 0.07);
  color: #f4efe6;
}

.stage-controls button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  color: #f4efe6;
}

/* While one plays, it glows; the others wait their turn. */
.stage-fx.is-busy button {
  opacity: 0.4;
  cursor: default;
}

.stage-fx.is-busy button.is-playing {
  border-color: rgb(241 217 181 / 0.45);
  background: rgb(241 217 181 / 0.08);
  color: #f1d9b5;
  opacity: 1;
}

/* The sound: a speaker with its waves while it is on, crossed out while it is off. */
.stage-sound .off,
.stage-sound[aria-pressed="false"] .on {
  display: none;
}

.stage-sound[aria-pressed="false"] .off {
  display: inline;
}

.stage-sound[aria-pressed="false"] {
  color: #77726a;
}

/* Its name, above it, while the mouse is on it or it has the focus. */
.stage-controls button::after {
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 50%;
  padding: 0.2rem 0.5rem;
  border: 1px solid rgb(255 255 255 / 0.08);
  border-radius: 0.375rem;
  background: #15181e;
  color: #ddd7cc;
  font-size: 0.75rem;
  line-height: 1.3;
  white-space: nowrap;
  content: attr(data-tip);
  opacity: 0;
  transform: translate(-50%, 0.25rem);
  transition: opacity 0.15s, transform 0.15s;
  pointer-events: none;
}

.stage-controls button:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (hover: hover) {
  .stage-controls button:hover::after {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.stage-fallback {
  position: absolute;
  inset: 2rem 0;
  width: auto;
  max-width: 90%;
  height: calc(100% - 4rem);
  margin: 0 auto;
  object-fit: contain;
}

/* The 360° canvas is opaque, so it stays invisible until it has something to show. */
.stage-360 canvas {
  opacity: 0;
  transition: opacity 0.8s;
}

.stage-360.is-ready canvas {
  opacity: 1;
}

.stage-360.is-fallback canvas {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .stage-loading::before {
    animation: none;
    opacity: 0.7;
  }
}
