/* =====================================================
   APPALACHIAN CLEAN ENERGY — BASE STYLES
   Reset, global typography, layout primitives
   ===================================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  font-optical-sizing: auto;
}

body {
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.45;
  letter-spacing: -0.022em;
  color: var(--label-primary);
  background: var(--bg-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
}

/* ── Layout primitives ──────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(var(--sp-5), 5vw, var(--sp-12));
}

.container--narrow {
  max-width: 760px;
}

.container--wide {
  max-width: 1400px;
}

/* ── Section base ───────────────────────────────────── */
.section {
  padding-block: clamp(var(--sp-16), 10vw, var(--sp-32));
  position: relative;
}

.section--alt {
  background: var(--bg-secondary);
}

.section-eyebrow {
  font-family: var(--font-text);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-3);
}

.section-headline {
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 4vw + 0.5rem, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--label-primary);
  margin-bottom: var(--sp-5);
}

.section-body {
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--label-secondary);
  max-width: 60ch;
}

.section-header {
  margin-bottom: clamp(var(--sp-10), 5vw, var(--sp-16));
}

.section-header--center {
  text-align: center;
}

.section-header--center .section-body {
  margin-inline: auto;
}

/* ── Grid helpers ───────────────────────────────────── */
.grid-auto {
  display: grid;
  gap: var(--sp-6);
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
}

.grid-2 {
  display: grid;
  gap: var(--sp-6);
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  display: grid;
  gap: var(--sp-6);
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ── 0.5px separator ────────────────────────────────── */
.divider {
  height: 0.5px;
  background: var(--separator);
  border: none;
}

/* ── Skip-to-content ────────────────────────────────── */
.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: var(--sp-4);
  z-index: 9999;
  padding: var(--sp-2) var(--sp-4);
  background: var(--accent);
  color: white;
  border-radius: var(--r-md);
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform var(--t-2) var(--ease-out);
}

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

/* ── Focus ring ─────────────────────────────────────── */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* ── Touch targets ──────────────────────────────────── */
@media (pointer: coarse) {
  button, a, [role="button"] {
    min-height: 44px;
    min-width: 44px;
    -webkit-tap-highlight-color: transparent;
  }
}

/* ── Scrollbar ──────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--fill-primary);
  border-radius: var(--r-pill);
}
::-webkit-scrollbar-thumb:hover { background: var(--fill-secondary); }

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