/* ============================================
   EQUESTRIAN HUB — Base Styles
   Reset, Typography, Global Elements
   ============================================ */

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-charcoal);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

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

ul, ol {
  list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-text-navy);
  line-height: 1.2;
  font-weight: 200;
}

h1 {
  font-size: clamp(2.25rem, 5vw, var(--text-4xl));
  letter-spacing: -0.5px;
}

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

h3 {
  font-size: clamp(1.25rem, 3vw, var(--text-xl));
}

h4 {
  font-size: var(--text-lg);
  font-family: var(--font-body);
  font-weight: 600;
}

p {
  margin-bottom: var(--space-md);
  color: var(--color-charcoal);
}

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

strong {
  font-weight: 600;
}

/* --- Dark section text overrides --- */
.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4,
.section--dark h5,
.section--dark h6 {
  color: var(--color-white);
}

.section--dark p,
.section--dark li,
.section--dark span {
  color: rgba(255, 255, 255, 0.85);
}

.section--dark a {
  color: var(--color-white);
}

.section--dark a:hover {
  color: rgba(255, 255, 255, 0.7);
}

/* --- Section Labels --- */
.section-label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
}

.section-label::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
}

.section--dark .section-label {
  color: rgba(255, 255, 255, 0.5);
}

.section--dark .section-label::before {
  background: rgba(255, 255, 255, 0.3);
}

/* --- Divider --- */
.divider {
  width: 48px;
  height: 2px;
  background: var(--color-accent);
  margin: var(--space-lg) 0;
}

.section--dark .divider {
  background: rgba(255, 255, 255, 0.3);
}

/* --- Scroll Reveal Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Staggered children */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.2s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.3s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.4s; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.5s; }

.reveal-stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* --- Selection --- */
::selection {
  background: var(--color-navy);
  color: var(--color-white);
}

/* --- Focus --- */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
