/*
  global.css — Reset, base typography, utility classes
  Import order: tokens.css → global.css → components.css
*/

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-secondary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p { margin-bottom: var(--space-md); }
p:last-child { margin-bottom: 0; }

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: color-mix(in srgb, var(--color-primary), black 20%); }

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

ul, ol { list-style: none; }

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

/* ── Layout utilities ── */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

.section {
  padding-block: var(--section-padding-y);
}

.section--dark {
  background-color: var(--color-accent);
  color: var(--color-secondary);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--color-secondary);
}

.section--light {
  background-color: var(--color-subfooter-bg);
}

.section--primary {
  background-color: var(--color-primary);
  color: var(--color-secondary);
}

/* ── Decorative heading (Phlox p-tag style hero heading) ── */
.heading-decorative {
  font-family: var(--font-heading);
  font-size: var(--text-hero);
  font-weight: var(--weight-bold);
  line-height: 1;
  color: var(--color-primary);
  letter-spacing: -0.02em;
  display: block;
  margin-bottom: var(--space-lg);
}

/* ── Text utilities ── */
.text-center { text-align: center; }
.text-muted   { color: var(--color-muted); }
.text-primary { color: var(--color-primary); }
.text-white   { color: var(--color-secondary); }

/* ── Flex / Grid helpers ── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

/* ── Scroll-triggered fade-in animation ── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Skip link for accessibility ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--color-primary);
  color: white;
  padding: var(--space-sm) var(--space-md);
  z-index: 9999;
  transition: top var(--transition-fast);
}
.skip-link:focus { top: 0; }

/* ── Placeholder badge ── */
.placeholder-badge {
  display: inline-block;
  background: #ffe0e0;
  border: 1px solid #ffaaaa;
  color: #cc0000;
  font-size: 0.75rem;
  font-family: monospace;
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: 6px;
}

/* ── Section divider ── */
.divider {
  border: none;
  border-top: var(--border-std);
  margin-block: var(--space-xl);
}

/* ── Responsive breakpoints ── */
/* mobile-first:   < 640px  */
/* sm:    ≥ 640px  */
/* md:    ≥ 768px  */
/* lg:    ≥ 1024px */
/* xl:    ≥ 1280px */
