/* Monnai prototype — base styles (reset, type, layout primitives, accessibility) */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--c-ground);
  color: var(--c-ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

h1, h2, h3, h4 { margin: 0; font-weight: var(--fw-bold); line-height: var(--lh-heading); letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); letter-spacing: -0.025em; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); letter-spacing: 0; }
p { margin: 0; text-wrap: pretty; }
p + p { margin-top: var(--s-4); }
ul, ol { margin: 0; padding: 0; }
code, kbd, samp, .mono { font-family: var(--font-mono); font-size: var(--fs-mono); }

a { color: var(--c-accent); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--c-accent-ink); text-decoration-thickness: 2px; }

/* Focus: always visible on every interactive element */
:focus { outline: none; }
:focus-visible {
  outline: var(--stroke-focus) solid var(--c-accent);
  outline-offset: 3px;
  border-radius: var(--r-1);
}

/* Layout primitives */
.container { width: 100%; max-width: calc(var(--w-page) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.container--wide { max-width: calc(var(--w-wide) + 2 * var(--gutter)); }
.measure { max-width: var(--w-read); }
.section { padding-block: var(--section-y); }
.section--panel { background: var(--c-panel); }
.section--tight { padding-block: var(--s-8); }

.lead { font-size: var(--fs-lead); line-height: 1.5; color: var(--c-ink-2); }
.small { font-size: var(--fs-small); }
.muted { color: var(--c-muted); }

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

.skip-link {
  position: absolute; left: var(--s-4); top: -100px; z-index: calc(var(--z-menu) + 10);
  background: var(--c-ink); color: var(--c-ground); padding: var(--s-3) var(--s-4);
  border-radius: var(--r-2); text-decoration: none;
}
.skip-link:focus { top: var(--s-4); color: var(--c-ground); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
