/* macroe/styles/base.css — reset, typography scale, paper grain, focus, reveal cascade */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(231, 223, 208, 0.025) 1px, transparent 1px);
  background-size: 24px 24px;
  z-index: 0;
}
html[data-theme="day"] body::before,
html[data-theme="print"] body::before {
  background-image: radial-gradient(rgba(31, 27, 21, 0.04) 1px, transparent 1px);
}

.app-header, .app-main, .masthead, .app-footer, #view { position: relative; z-index: 1; }

/* Type scale */
.t-display-xl  { font: 300 72px/0.96 var(--font-display); letter-spacing: -0.5px; }
.t-display-l   { font: 300 48px/1.0  var(--font-display); letter-spacing: -0.4px; }
.t-display-m   { font: 400 italic 28px/1.1 var(--font-display); }
.t-display-s   { font: 400 20px/1.2  var(--font-display); }
.t-body-l      { font: 400 18px/1.6  var(--font-body); }
.t-body-m      { font: 400 15px/1.55 var(--font-body); }
.t-body-s      { font: 400 13px/1.5  var(--font-body); }
.t-dek         { font: 300 italic 18px/1.4 var(--font-body); color: var(--fg-muted); }
.t-mono-num    { font: 500 24px/1 var(--font-mono); letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.t-mono-nav    { font: 400 12px/1 var(--font-mono); text-transform: uppercase; letter-spacing: 1.5px; }
.t-mono-label  { font: 400 10px/1 var(--font-mono); text-transform: uppercase; letter-spacing: 2px; color: var(--fg-muted); }
.t-mono-meta   { font: 400 11px/1.2 var(--font-mono); letter-spacing: 0.5px; color: var(--fg-muted); }

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

h1, h2, h3, h4 { margin: 0; color: var(--fg); font-weight: 400; }

p { margin: 0 0 var(--step-16); }

:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

.reveal { opacity: 0; transform: translateY(8px); animation: reveal 500ms cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.reveal-1 { animation-delay: 80ms; }
.reveal-2 { animation-delay: 160ms; }
.reveal-3 { animation-delay: 240ms; }
.reveal-4 { animation-delay: 320ms; }
@keyframes reveal {
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-1, .reveal-2, .reveal-3, .reveal-4 {
    animation: none; opacity: 1; transform: none;
  }
}
