/* ==========================================================================
   Life HQ — Base / Reset
   ========================================================================== */

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

/* The [hidden] attribute must always win, even over a class that sets
   its own `display` (e.g. .btn, .modal-scrim) — without this, author
   rules of equal specificity beat the UA default and the element stays
   visible despite being marked hidden. */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 8% -10%, rgba(255, 232, 160, 0.35), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(186, 213, 172, 0.25), transparent 55%),
    var(--color-bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink-strong);
  line-height: var(--lh-tight);
  margin: 0;
  font-weight: 600;
}

p { margin: 0; }

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  color: inherit;
  cursor: pointer;
}

input, textarea, select, button {
  font-family: inherit;
  font-size: inherit;
}

textarea { resize: vertical; }

ul, ol { margin: 0; padding: 0; list-style: none; }

img, svg { display: block; max-width: 100%; }

::selection {
  background: var(--periwinkle-200);
  color: var(--ink-strong);
}

/* Custom scrollbar — soft, unobtrusive */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--periwinkle-200) transparent;
}
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--periwinkle-200);
  border-radius: var(--radius-pill);
}
*::-webkit-scrollbar-thumb:hover { background: var(--periwinkle-300); }

/* Focus states — visible, gentle, never a harsh browser blue */
:focus-visible {
  outline: 2px solid var(--periwinkle-500);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

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

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