/* ============================================================
   BASE / RESET — Happy Technologies
   Light global defaults so specimen cards and primitives render
   with brand typography out of the box. Consumers get sensible
   element styling without a CSS framework.
   ============================================================ */

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--text-strong);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  color: var(--text-heading);
  letter-spacing: var(--tracking-tighter);
  line-height: var(--leading-snug);
}

h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }

p {
  margin: 0;
  color: var(--text-body);
  line-height: var(--leading-relaxed);
}

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-text-hover);
}

img {
  max-width: 100%;
  height: auto;
}

small {
  font-size: var(--text-xs);
}

code, kbd, samp {
  font-family: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
}

/* Eyebrow / section label — used across site + slides */
.ht-eyebrow {
  display: inline-block;
  background: var(--accent-bg);
  color: var(--accent-text);
  text-transform: uppercase;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-widest);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-sm);
}

/* ---- Accessibility: visible focus, skip link, screen-reader-only ---- */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--accent);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 2000;
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius-sm) 0;
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
}
.skip-link:focus {
  left: 0;
}

.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;
}

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