/* ==========================================================================
   BASE — Reset · Typography · Utilities · Accessibility
   ========================================================================== */

/* ---- Box Model Reset ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ---- HTML / Body ---- */
html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  background: var(--c-bg);
  color: var(--c-text-2);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---- Typography Scale ---- */
h1 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
  color: var(--c-text);
  letter-spacing: -0.02em;
}

h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  line-height: 1.15;
  color: var(--c-text);
}

h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.3;
  color: var(--c-text);
}

h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--c-text);
}

p {
  margin-bottom: var(--sp-4);
}

a {
  color: var(--c-cyan);
  text-decoration: none;
  transition: color var(--duration-fast);
}

a:hover {
  color: var(--c-cyan-hi);
}

strong {
  color: var(--c-text);
  font-weight: 600;
}

/* ---- Selection ---- */
::selection {
  background: rgba(124, 58, 237, 0.3);
  color: var(--c-text);
}

/* ---- Skip-to-content / Screen Reader ---- */
.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;
}

a[href="#main"].sr-only:focus {
  position: fixed;
  top: var(--sp-4);
  left: var(--sp-4);
  width: auto;
  height: auto;
  padding: var(--sp-2) var(--sp-4);
  clip: auto;
  z-index: var(--z-toast);
  background: var(--c-purple);
  color: var(--c-text);
  border-radius: var(--radius-sm);
  font-weight: 600;
}

/* ---- Focus Styles ---- */
:focus-visible {
  outline: 2px solid var(--c-cyan);
  outline-offset: 3px;
  border-radius: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* ---- Container ---- */
.container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--sp-6);
  padding-right: var(--sp-6);
}

@media (min-width: 768px) {
  .container {
    padding-left: var(--sp-8);
    padding-right: var(--sp-8);
  }
}

/* ---- Reduced Motion ---- */
@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;
  }
}

/* ---- Image Defaults ---- */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---- List Reset ---- */
ul, ol {
  list-style: none;
}
