/* ============================================================
   GheReCess -- base.css
   Reset, type system, and the core design tokens.
   ============================================================ */

:root {
  /* Type scale */
  --font-display: "Fraunces", serif;
  --font-body: "Manrope", system-ui, sans-serif;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.25rem;
  --text-xl: 1.75rem;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;

  --shadow-soft: 0 8px 24px rgba(20, 16, 28, 0.18);
  --shadow-card: 0 2px 10px rgba(20, 16, 28, 0.12);

  --transition-fast: 140ms ease;
  --transition-med: 220ms ease;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-md);
  background: var(--bg-deep);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition-med), color var(--transition-med);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0;
}

p {
  margin: 0;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
}

input, select, textarea {
  font-family: var(--font-body);
  font-size: var(--text-md);
}

a {
  color: inherit;
}

.hidden {
  display: none !important;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* Visible keyboard focus, kept everywhere */
:focus-visible {
  outline: 2px solid var(--accent-500);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* Ambient grain overlay -- the one atmospheric signature of the
   "Lo-Fi Study Space" look. Kept extremely subtle and non-interactive. */
.grain-defs {
  position: absolute;
  width: 0;
  height: 0;
}

.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  filter: url(#grain);
  mix-blend-mode: overlay;
  opacity: 0.5;
}
