/* I402 — base reset + typography */

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--surface-0);
  color: var(--color-whiteout);
  font-family: var(--font-circular);
  font-size: var(--text-body);
  line-height: var(--lh-body);
  letter-spacing: var(--tracking-default);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Page grain — adds tactile depth without being noisy */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.04;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/></svg>");
}

h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: var(--weight-medium); letter-spacing: var(--tracking-tight); }
p { margin: 0; }
a { color: var(--color-supabase-green); text-decoration: none; transition: color 120ms ease; }
a:hover { color: var(--color-glow-green); }

button { font-family: inherit; cursor: pointer; }
input, button { outline: none; }

::selection { background: rgba(0, 197, 115, 0.35); color: var(--color-whiteout); }

/* Make HTML's `hidden` attribute win over our explicit display rules.
   Without this, .void-overlay { display:flex } overrides [hidden]. */
[hidden] { display: none !important; }

/* Utility */
.mono { font-family: var(--font-mono); }
.muted { color: var(--color-mid-gray-text); }
.dim { color: var(--color-iron-outline); }
.uppercase-wide { text-transform: uppercase; letter-spacing: var(--tracking-wide); font-size: var(--text-caption); }
.hidden { display: none !important; }

/* App layout */
#app { position: relative; z-index: 2; min-height: 100vh; display: flex; flex-direction: column; }

main.screen-stack {
  flex: 1;
  position: relative;
  width: 100%;
}

section.screen {
  position: absolute;
  inset: 0;
  display: none;
  opacity: 0;
  transition: opacity 320ms ease;
}
section.screen.active {
  display: flex;
  opacity: 1;
}
