/* =============================================================================
   ZZ DIRIKU™ v3.0 — Base & layout (mobile-first)
   ============================================================================= */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  overflow-wrap: break-word; /* never let long words force horizontal scroll */
}

img, svg, video { display: block; max-width: 100%; height: auto; }
code, kbd, samp, pre { overflow-wrap: anywhere; } /* long tokens (e.g. /api/...) wrap instead of overflowing */
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--teal-600); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: var(--lh-tight); font-weight: 700; color: var(--navy-900); }
h1 { font-size: var(--fs-3xl); letter-spacing: -0.02em; }
h2 { font-size: var(--fs-2xl); letter-spacing: -0.01em; }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }
p { color: var(--text-soft); }

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

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: var(--space-2);
  background: var(--navy-800);
  color: var(--cream-50);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  z-index: 100;
}
.skip-link:focus { left: var(--space-2); }

/* App shell layout */
#app { display: flex; flex-direction: column; min-height: 100dvh; }
.boot { padding: var(--space-8); text-align: center; color: var(--text-muted); }

.app-main { flex: 1 0 auto; width: 100%; }
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-4);
}
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--space-6); }
.stack > * + * { margin-top: var(--space-4); }
.stack-lg > * + * { margin-top: var(--space-6); }

/* Responsive grid helper */
.grid { display: grid; gap: var(--space-4); }
@media (min-width: 560px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 820px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Utilities */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: var(--fs-sm); }
.text-xs { font-size: var(--fs-xs); }
.lead { font-size: var(--fs-lg); color: var(--text-soft); }
.mt-0 { margin-top: 0; }
.hidden { display: none !important; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--teal-600);
}

@media (min-width: 768px) {
  h1 { font-size: var(--fs-4xl); }
  .section { padding-block: var(--space-7); }
  .container { padding-inline: var(--space-5); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
