/* ============================================================
 * Base — reset + typography + container
 * ============================================================ */

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

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

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main { flex: 1; }

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--duration-fast, 150ms) var(--ease, ease);
}
a:hover { color: var(--color-primary-light, #5A8F3D); }

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-tight);
  color: var(--color-text);
}

ul, ol { list-style: none; }

p { line-height: var(--lh-relaxed); }

code, pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: var(--container-lg, 1024px);
  margin: 0 auto;
  padding: 0 var(--space-4, 16px);
}

.main {
  padding: var(--space-7, 48px) var(--space-4, 16px);
  max-width: var(--container-xl, 1200px);
  margin: 0 auto;
  width: 100%;
}

/* ---------- Fade-in animation ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity var(--duration-slow, 400ms) var(--ease, ease),
    transform var(--duration-slow, 400ms) var(--ease, ease);
  will-change: opacity, transform;
}
.fade-in--visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html { scroll-behavior: auto; }
}

/* ---------- Selection ---------- */
::selection {
  background: var(--color-primary-light, #5A8F3D);
  color: #fff;
}