/* ============================================
   BASE STYLES — Reset, Typography, Utilities
   ============================================ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color var(--duration-slow) var(--ease-out),
              color var(--duration-slow) var(--ease-out);
}

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

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

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-primary);
}

h1 {
  font-size: clamp(var(--text-4xl), 6vw, var(--text-7xl));
  font-weight: var(--weight-extrabold);
}

h2 {
  font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
}

h3 {
  font-size: clamp(var(--text-xl), 2.5vw, var(--text-2xl));
}

h4 {
  font-size: var(--text-xl);
}

p {
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

.text-accent-font {
  font-family: var(--font-accent);
}

.text-gradient {
  background: linear-gradient(135deg, var(--color-accent), var(--color-cta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Layout Utilities ── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

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

.section {
  padding: var(--space-5xl) 0;
  position: relative;
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-4xl);
}

.section__label {
  display: inline-block;
  font-family: var(--font-accent);
  font-size: var(--text-xl);
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.section__title {
  margin-bottom: var(--space-md);
}

.section__subtitle {
  max-width: 600px;
  margin: 0 auto;
  font-size: var(--text-lg);
  color: var(--color-text-tertiary);
}

/* ── Flex / Grid Helpers ── */
.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }
.gap-2xl { gap: var(--space-2xl); }

.grid {
  display: grid;
}

/* ── Visibility ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ── Reveal Animation ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--duration-slower) var(--ease-out),
              transform var(--duration-slower) var(--ease-out);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 100ms; }
.reveal-delay-2 { transition-delay: 200ms; }
.reveal-delay-3 { transition-delay: 300ms; }
.reveal-delay-4 { transition-delay: 400ms; }

/* ── Background Decorations ── */
.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

.bg-glow--accent {
  background: var(--color-accent);
}

.bg-glow--cta {
  background: var(--color-cta);
}

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

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--color-text-muted);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-tertiary);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .section {
    padding: var(--space-3xl) 0;
  }
  .section__header {
    margin-bottom: var(--space-2xl);
  }
  .container {
    padding: 0 var(--space-md);
  }
}
