/* ==========================================================================
   TEACUP EMPIRE — Base element styling
   ========================================================================== */

html, body {
  /* Guards against transform-induced overflow from off-screen UI (e.g. the
     closed mobile nav's scale(1.02)) without affecting intentional
     horizontal scrollers, which manage their own overflow-x. */
  overflow-x: hidden;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 450;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 560;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--color-text);
}

h1 { font-size: var(--fs-display-xl); }
h2 { font-size: var(--fs-display-md); }
h3 { font-size: var(--fs-heading); }

em, .italic {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
}

p { color: var(--color-text-muted); }

.lede {
  font-size: var(--fs-body-lg);
  line-height: var(--lh-relaxed);
  color: var(--color-text-muted);
}

small { font-size: var(--fs-body-sm); }

a {
  transition: color var(--dur-fast) var(--ease-standard);
}

/* ---- Focus ---- */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ---- Selection targets ---- */
button, a, input, select, textarea, summary {
  min-height: 0;
}

/* ---- Utility: eyebrow micro-label ---- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--color-primary);
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-lime);
  flex-shrink: 0;
}

.eyebrow--muted { color: var(--color-text-faint); }
.eyebrow--muted::before { background: var(--color-text-faint); }

/* ---- Container ---- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.container--narrow {
  max-width: var(--container-narrow);
}

/* ---- Section rhythm ---- */
section {
  position: relative;
}

.section-pad {
  padding-block: var(--space-2xl);
}

.section-pad-sm {
  padding-block: var(--space-xl);
}

/* ---- Visually hidden (a11y) ---- */
.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: fixed;
  top: -100px;
  left: var(--space-md);
  z-index: var(--z-toast);
  background: var(--color-text);
  color: #fff;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  transition: top var(--dur-fast) var(--ease-standard);
}

.skip-link:focus-visible {
  top: var(--space-md);
}

/* ---- Selection helpers ---- */
.text-muted { color: var(--color-text-muted); }
.text-faint { color: var(--color-text-faint); }
.text-lime  { color: var(--color-lime-dark); }
.text-primary { color: var(--color-primary); }

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