/* ==========================================================================
   URSY.FM — BASE
   Resets, type scale, focus rings, scrollbars, accessibility utilities.
   ========================================================================== */

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

html, body { margin: 0; }

/* clip, not hidden: overflow-x:hidden silently kills position:sticky */
@supports (overflow-x: clip) {
  html, body { overflow-x: clip; }
}

body {
  min-height: 100svh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--neon); text-decoration: underline; text-underline-offset: 3px; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
  touch-action: manipulation;
}
button[disabled] { cursor: not-allowed; opacity: .55; }

input, select, textarea { font-family: inherit; font-size: inherit; }
input[type='range'] { accent-color: var(--neon); }

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

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.026em; line-height: 1.14; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }

/* Focus is never removed. */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 2px;
  border-radius: var(--radius-s);
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: var(--line2);
  border-radius: 10px;
  border: 3.5px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }

::selection { background: var(--neon-soft); }

/* ---- type scale ---- */
.u-h1 { font-size: clamp(3rem, 6.5vw, 6rem); line-height: 1.02; letter-spacing: -.037em; }
.u-h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); letter-spacing: -.028em; }
.u-h3 { font-size: 1.25rem; }
.u-lead { font-size: 15px; line-height: 1.65; color: var(--ink2); max-width: 68ch; }
.u-lead--wide { max-width: 70ch; }
.u-mono { font-family: var(--font-mono); font-weight: 500; }
.u-eyebrow { font-size: 9px; letter-spacing: .22em; color: var(--ink3); text-transform: uppercase; }
.u-accent { color: var(--neon); }
.u-prose { max-width: 70ch; }
.u-prose > * + * { margin-top: 1em; }

/* ---- module tints ---- */
.u-tint-stations { color: var(--m-stations); }
.u-tint-planner { color: var(--m-planner); }
.u-tint-sleep { color: var(--m-sleep); }
.u-tint-library { color: var(--m-library); }
.u-tint-atlas { color: var(--m-atlas); }
.u-tint-pods { color: var(--m-pods); }

.u-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: currentColor; }
.u-dot--accent { color: var(--neon); }

/* ---- utilities ---- */
.u-sr {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.u-skip {
  position: fixed;
  z-index: 100;
  inset-inline-start: 16px;
  inset-block-start: 12px;
  padding: 11px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  font-weight: 600;
  transform: translateY(-96px);
  transition: transform .16s ease;
}
.u-skip:focus { transform: translateY(0); text-decoration: none; }

.u-wrap { max-width: 1180px; margin-inline: auto; padding-inline: clamp(18px, 4vw, 44px); }
.u-foot__gap { flex: 1; min-width: 8px; }
.u-icon { flex: none; }

/* Theme-conditional icon halves. */
[data-ursy-theme='dark'] .u-onLight,
[data-ursy-theme='light'] .u-onDark { display: none; }

/* Playback-conditional icon halves, toggled by player.js. */
.u-onPaused { display: none; }
[data-ursy-playing='false'] .u-onPaused { display: block; }
[data-ursy-playing='false'] .u-onPlaying { display: none; }

/* ---- motion ---- */
@keyframes u-rise { from { opacity: 0; transform: translate3d(0, 14px, 0); } to { opacity: 1; transform: none; } }
.u-anim-rise { animation: u-rise .5s ease both; }

/* Law: everything stops. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

@media (prefers-contrast: more) {
  :root { --line: rgba(255, 255, 255, .3); --line2: rgba(255, 255, 255, .5); }
  [data-ursy-theme='light'] { --line: rgba(18, 20, 24, .3); --line2: rgba(18, 20, 24, .55); }
}

@media (forced-colors: active) {
  .u-aurora { display: none; }
  .u-card, .u-btn, .u-pill { border: 1px solid CanvasText; }
}
