/* =================================================================
   Simplified Base Styles (no Tailwind bundle) — v1.0
   - Lightweight reset
   - Color & typography variables
   - Light/Dark themes
   - Minimal utilities
   - Common components (container, buttons, cards)
   - Helpful animations (fade-in-up, spin, shimmer)
   ================================================================= */

/* -----------------------------
   1) Reset & base
--------------------------------*/
*,
*::before,
*::after {
  box-sizing: border-box;
}

html:focus-within {
  scroll-behavior: smooth;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell,
               Noto Sans, "Helvetica Neue", Arial, "Apple Color Emoji",
               "Segoe UI Emoji";
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg);
  color: var(--text);
}

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

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

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

:root {
  /* Colors (light) — adjust to your brand */
  --primary: #2e7d32;       /* moss green */
  --primary-600: #1b5e20;
  --bg: #ffffff;
  --surface: #f7f7f8;       /* soft grey */
  --card: #ffffff;
  --text: #111418;
  --muted: #667085;
  --border: #e6e8eb;

  /* Typography scale */
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.25rem;
  --fs-2xl: 1.5rem;
  --fs-3xl: 1.875rem;
  --fs-4xl: 2.25rem;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(16,24,40,.06);
  --shadow-md: 0 8px 24px rgba(15,23,42,.12);
}

.dark {
  /* Colors (dark) */
  --primary: #7ddc8a;
  --primary-600: #45b45a;
  --bg: #0b0d10;
  --surface: #121417;
  --card: #0f1216;
  --text: #e8eaed;
  --muted: #9aa4b2;
  --border: #1e2227;
  color-scheme: dark;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* -----------------------------
   2) Layout helpers
--------------------------------*/
.container {
  width: 100%;
  margin-inline: auto;
  padding-inline: 1rem;
  max-width: 1200px;
}

.section {
  padding-block: clamp(2rem, 4vw, 5rem);
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

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

/* -----------------------------
   3) Utilities (small set)
--------------------------------*/
.hidden { display: none !important; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.center { display: grid; place-items: center; }

.gap-2 { gap: .5rem; }
.gap-3 { gap: .75rem; }
.gap-4 { gap: 1rem; }

.p-3 { padding: .75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }

.py-8 { padding-block: 2rem; }
.my-8 { margin-block: 2rem; }

.rounded { border-radius: var(--radius); }
.rounded-sm { border-radius: calc(var(--radius) - 6px); }
.rounded-lg { border-radius: calc(var(--radius) + 6px); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }

.text-center { text-align: center; }
.text-muted { color: var(--muted); }

.border { border: 1px solid var(--border); }
.surface { background: var(--surface); }
.card-surface { background: var(--card); }

.w-full { width: 100%; }
.max-w-sm { max-width: 380px; }
.max-w-md { max-width: 640px; }
.max-w-lg { max-width: 880px; }

/* Aspect helpers */
.ar-16x9 { aspect-ratio: 16/9; }
.ar-1x1 { aspect-ratio: 1/1; }

/* Visually hidden (accessibility) */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* -----------------------------
   4) Typography helpers
--------------------------------*/
.h1, h1 { font-size: clamp(2rem, 4vw, var(--fs-4xl)); letter-spacing: -0.02em; margin: 0 0 .5em; }
.h2, h2 { font-size: clamp(1.5rem, 3vw, var(--fs-3xl)); letter-spacing: -0.01em; margin: 0 0 .6em; }
.h3, h3 { font-size: clamp(1.25rem, 2.5vw, var(--fs-2xl)); margin: 0 0 .7em; }
.lead { font-size: var(--fs-lg); color: var(--muted); }

/* -----------------------------
   5) Components
--------------------------------*/
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .6rem 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  letter-spacing: .01em;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease;
  box-shadow: 0 2px 10px rgba(46, 125, 50, .2);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary-600);
  box-shadow: none;
}
.btn.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1rem;
}
.card.headered > .card__header {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: .75rem; margin-bottom: .75rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}

/* Navbar (simple) */
.navbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in oklab, var(--bg), black 4%);
  backdrop-filter: saturate(120%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.navbar .nav {
  display: flex; align-items: center; gap: 1rem;
  padding: .75rem 1rem; margin: 0 auto; max-width: 1200px;
}
.navbar .brand { font-weight: 800; letter-spacing: -0.02em; font-size: 1.1rem; color: var(--text); }
.navbar a { color: var(--text); opacity: .9; }
.navbar a:hover { opacity: 1; }

/* -----------------------------
   6) Animations
--------------------------------*/
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up { animation: fadeInUp .5s ease-out both; }

@keyframes spin { to { transform: rotate(1turn); } }
.animate-spin { animation: spin 1s linear infinite; }

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  --skel: linear-gradient(90deg,
            color-mix(in srgb, var(--surface), white 2%) 25%,
            color-mix(in srgb, var(--surface), white 7%) 37%,
            color-mix(in srgb, var(--surface), white 2%) 63%);
  background-image: var(--skel);
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
  border-radius: var(--radius);
}

/* -----------------------------
   7) Forms (minimal)
--------------------------------*/
.input, input[type="text"], input[type="email"], input[type="password"], textarea, select {
  width: 100%;
  padding: .65rem .8rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.input:focus, input:focus, textarea:focus, select:focus {
  border-color: color-mix(in srgb, var(--primary), white 25%);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary), transparent 80%);
}

/* Help text + field states */
.form-help { color: var(--muted); font-size: var(--fs-sm); margin-top: .4rem; }
.is-error { border-color: #ef4444 !important; }
.is-success { border-color: #22c55e !important; }

/* -----------------------------
   8) Footer (simple)
--------------------------------*/
.footer {
  padding-block: 2rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: var(--fs-sm);
}

/* End — keep this file lean and extend locally as needed */
