/* ── Reset & Base ──────────────────────────────────────────────────────────── */

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

html {
  font-family: var(--font);
  color: var(--ink);
  background: var(--page-bg);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--transition), color var(--transition);
}

body { line-height: 1.6; min-height: 100vh; }

a { color: var(--green); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--green-mid); }

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

h1, h2, h3, h4 { line-height: 1.2; color: var(--ink); font-weight: 700; }
h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

p { color: var(--ink-mid); }

/* Skip to content */
.skip-link {
  position: absolute;
  left: -999px;
  top: 4px;
  z-index: 1000;
  background: var(--green);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}
.skip-link:focus { left: 8px; }

/* ── Layout ────────────────────────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 12px;
}

.section-title {
  font-size: 1.75rem;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--ink-sub);
  max-width: 600px;
}

.text-center { text-align: center; }
.text-center .section-subtitle { margin: 0 auto; }

/* ── Grid ──────────────────────────────────────────────────────────────────── */

.grid {
  display: grid;
  gap: 24px;
}

.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }

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

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

/* ── Animations ────────────────────────────────────────────────────────────── */

@keyframes up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.fade-up {
  animation: up 0.4s ease both;
}

.fade-up:nth-child(1) { animation-delay: 0s; }
.fade-up:nth-child(2) { animation-delay: 0.06s; }
.fade-up:nth-child(3) { animation-delay: 0.12s; }
.fade-up:nth-child(4) { animation-delay: 0.18s; }
.fade-up:nth-child(5) { animation-delay: 0.24s; }
.fade-up:nth-child(6) { animation-delay: 0.30s; }

/* ── Scroll progress (blog posts) ──────────────────────────────────────────── */

.scroll-progress {
  position: fixed;
  top: 60px;
  left: 0;
  height: 2px;
  background: var(--green);
  z-index: 99;
  transition: width 0.1s linear;
}

/* ── Responsive type ───────────────────────────────────────────────────────── */

@media (min-width: 640px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2rem; }
  .section { padding: 100px 0; }
}

@media (min-width: 1024px) {
  h1 { font-size: 3.5rem; }
  .container { padding: 0 40px; }
}
