/* Sleep Studio — reset + base */

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

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

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--void);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* faint fixed vignette + grain: a lamp-lit room, not a void. Two warm
   radial pools (top glow near the hero, a deeper pool at the footer)
   plus a whisper of noise so flat dark fields don't look like a solid
   fill — the texture of a real, occupied space. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-base);
  background:
    radial-gradient(90% 60% at 18% -8%, oklch(0.32 0.05 58 / 0.16), transparent 62%),
    radial-gradient(120% 90% at 82% 0%, oklch(0.26 0.03 258 / 0.4), transparent 60%),
    radial-gradient(140% 100% at 50% 112%, oklch(0.08 0.016 264 / 0.9), transparent 55%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-base);
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

a { color: inherit; }

code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--surface-raised);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 0.1em 0.4em;
}

button, input, select, textarea { font: inherit; color: inherit; }

button { background: none; border: none; padding: 0; cursor: pointer; }

ul, ol { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4, p { margin: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p { text-wrap: pretty; max-width: 65ch; }

::selection { background: var(--ember-dim); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
  border-radius: 4px;
}

/* scrollbars stay in the studio's own material, not the OS default chrome */
* { scrollbar-color: var(--hairline-strong) transparent; scrollbar-width: thin; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--hairline-strong); border-radius: var(--radius-pill); border: 2px solid var(--void); }
*::-webkit-scrollbar-track { background: transparent; }

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