/**
 * Origin X Digital (OXD) - Base Styles & Reset
 * Reset, typography rendering, accessibility utilities, and core container rules
 */

/* ==========================================================================
   1. Modern Reset
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  line-height: var(--leading-normal);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: auto; /* Handled by Lenis for smooth momentum */
  background-color: var(--oxd-abyss);
  color: var(--oxd-cream);
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  background-color: var(--oxd-abyss);
  color: var(--oxd-cream);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ==========================================================================
   2. Typography Foundations
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--leading-tight);
  color: var(--oxd-cream);
}

h1 {
  font-size: var(--text-display);
  letter-spacing: var(--tracking-tighter);
}

h2 {
  font-size: var(--text-h1);
  letter-spacing: var(--tracking-tight);
}

h3 {
  font-size: var(--text-h3);
  letter-spacing: var(--tracking-tight);
}

p {
  color: var(--oxd-muted);
  font-size: var(--text-body);
  line-height: var(--leading-normal);
}

p.lead {
  font-size: var(--text-lead);
  color: var(--oxd-cream);
  line-height: var(--leading-snug);
}

em {
  font-style: italic;
  color: var(--oxd-gold);
}

strong {
  font-weight: 600;
  color: var(--oxd-cream);
}

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

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

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

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* ==========================================================================
   3. Accessible Focus States & Utilities
   ========================================================================== */
:focus-visible {
  outline: 2px solid var(--oxd-gold);
  outline-offset: 4px;
}

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

.skip-link {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 1000;
  padding: 12px 20px;
  background: var(--oxd-gold);
  color: var(--oxd-abyss);
  font-weight: 600;
  font-size: var(--text-small);
  border-radius: var(--radius-xs);
  transform: translateY(-150%);
  transition: transform var(--transition-fast);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ==========================================================================
   4. Layout Containers & Section Rhythms
   ========================================================================== */
.shell {
  width: var(--shell);
  max-width: var(--shell-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.section-spacing {
  padding-top: var(--space-4xl);
  padding-bottom: var(--space-4xl);
}

@media (max-width: 768px) {
  .section-spacing {
    padding-top: var(--space-3xl);
    padding-bottom: var(--space-3xl);
  }
}
