@import url("components/media.css");
/*
 * Base Styles
 * Reset, body defaults, typography, and shared utilities.
 * These apply globally to all sections.
 */

/* ═══════════════════════════════════════════════════════════════════════════
   RESET
   ═══════════════════════════════════════════════════════════════════════════ */

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

* {
  margin: 0;
}

html, body {
  height: 100%;
}

html {
  /* Deliberate in-page links opt into smooth motion in the navigation module.
     History traversal and direct fragments must remain deterministic. */
  scroll-behavior: auto;
  scrollbar-gutter: stable;
}

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

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BODY DEFAULTS
   ═══════════════════════════════════════════════════════════════════════════ */

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

::selection {
  color: var(--color-bg);
  background: var(--color-accent-2);
}

/* ═══════════════════════════════════════════════════════════════════════════
   TYPOGRAPHY DEFAULTS
   ═══════════════════════════════════════════════════════════════════════════ */

h1, h2, h3, h4, h5, h6 {
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

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

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

/* ═══════════════════════════════════════════════════════════════════════════
   FOCUS STATES
   ═══════════════════════════════════════════════════════════════════════════ */

:focus-visible {
  outline: 3px solid var(--color-focus, var(--color-accent-2));
  outline-offset: 3px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════════════════════════════════ */

/* Screen reader only */
.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;
}

/* Content wrapper */
.wrap {
  width: var(--content-width);
  margin: 0 auto;
}

.wrap-narrow {
  width: var(--content-width-narrow);
  margin: 0 auto;
}

.wrap-wide {
  width: var(--content-width-wide);
  margin: 0 auto;
}

/* Text colors */
.text-muted {
  color: var(--color-text-secondary);
}

.text-accent {
  color: var(--color-accent);
}

/* Gradient text */
.text-gradient {
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SHARED COMPONENTS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Tags */
.tag {
  display: inline-block;
  font-size: var(--text-xs);
  padding: 6px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-text-secondary);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 10px var(--space-4);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.button:hover {
  border-color: var(--color-text-secondary);
  transform: translateY(-1px);
}

/* Status messages */
.status {
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOTION
   ═══════════════════════════════════════════════════════════════════════════ */

/* Section styles load after this file, so important keeps the operating-system
   reduced-motion preference authoritative across every component. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}

/* Keyframes for typing indicators etc */
@keyframes blink {
  0%, 45% { opacity: 1; }
  55%, 100% { opacity: 0; }
}

@keyframes pulse {
  0% { opacity: 0.2; }
  50% { opacity: 1; }
  100% { opacity: 0.2; }
}
