/* ==========================================================================
   Reset & Base Styles — Award-Grade Foundation
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  color: var(--color-text-primary);
  background-color: var(--color-white);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
}

/* ── Custom Selection ──────────────────────────────────────────────────── */
::selection {
  background-color: var(--color-accent);
  color: var(--color-white);
}

::-moz-selection {
  background-color: var(--color-accent);
  color: var(--color-white);
}

/* ── Custom Scrollbar ──────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--color-accent);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent-hover);
}

/* Firefox */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--color-accent) var(--color-secondary);
}

/* ── Focus Visible ─────────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

/* ── Typography Scale ──────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: inherit;
  margin-bottom: 0.5em;
  font-feature-settings: 'kern' 1;
}

h1 {
  font-size: clamp(2.75rem, 5.5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 500;
  line-height: 1.35;
}

p {
  margin-bottom: 1em;
}

p:last-child {
  margin-bottom: 0;
}

.text-body {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.7;
}

.text-small {
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text-secondary);
}

.text-lead {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  line-height: 1.65;
  font-weight: 400;
}

/* ── Base Element Styles ───────────────────────────────────────────────── */
a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

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

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ── Smooth Page Transition ────────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  body {
    animation: pageReveal 0.6s var(--ease-out-expo) forwards;
  }
}

@keyframes pageReveal {
  0% { opacity: 0; }
  100% { opacity: 1; }
}
