/* =========================================================
   Meralli LLC — base.css
   Design tokens, reset, typography, utilities
   ========================================================= */

/* ---------- 1. Design tokens ---------- */
:root {
  /* Brand palette */
  --green-950: #071A14;
  --green-900: #0E2E24;
  --green-800: #123A2C;
  --green-700: #1A5240;
  --green-600: #226A53;
  --green-100: #DCEAE3;

  --lime-500: #84CC16;
  --lime-400: #A3E635;
  --lime-300: #BEF264;
  --lime-100: #ECFCCB;

  --ink: #14201B;
  --ink-soft: #3D4F47;
  --muted: #5F7269;
  --muted-2: #8A9A92;

  --light: #F4F7F5;
  --light-2: #EAF0EC;
  --white: #FFFFFF;

  --danger: #C0392B;
  --success: #1E7A44;

  /* Surfaces & borders */
  --surface: var(--white);
  --border: rgba(14, 46, 36, 0.10);
  --border-strong: rgba(14, 46, 36, 0.18);
  --border-dark: rgba(255, 255, 255, 0.12);

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(7, 26, 20, 0.06);
  --shadow-sm: 0 2px 8px rgba(7, 26, 20, 0.06);
  --shadow-md: 0 10px 30px rgba(7, 26, 20, 0.08);
  --shadow-lg: 0 24px 60px rgba(7, 26, 20, 0.14);
  --shadow-lime: 0 12px 28px rgba(132, 204, 22, 0.28);

  /* Radii */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-pill: 999px;

  /* Layout */
  --container: 1200px;
  --container-narrow: 820px;
  --gutter: 24px;
  --header-h: 76px;
  --topbar-h: 40px;

  /* Typography */
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head: "Sora", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 160ms;
  --t: 260ms;
  --t-slow: 520ms;
}

/* ---------- 2. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

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

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em;
  font-family: var(--font-head);
  color: var(--green-900);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.15rem, 1.35rem + 3.4vw, 4rem); }
h2 { font-size: clamp(1.75rem, 1.15rem + 2.4vw, 2.85rem); }
h3 { font-size: clamp(1.2rem, 1.05rem + 0.7vw, 1.5rem); }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--green-700);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}
a:hover { color: var(--green-600); }

ul, ol { margin: 0 0 1.1em; padding-left: 1.25em; }
li { margin-bottom: 0.4em; }

strong, b { font-weight: 650; color: var(--green-900); }

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

table { border-collapse: collapse; width: 100%; }

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

address { font-style: normal; }

::selection {
  background: var(--lime-300);
  color: var(--green-950);
}

:focus-visible {
  outline: 3px solid var(--lime-500);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- 3. Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow { max-width: var(--container-narrow); }

.section {
  position: relative;
  padding-block: clamp(64px, 7vw, 112px);
}

.section--tight { padding-block: clamp(48px, 5vw, 76px); }

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

.section--dark {
  background: var(--green-900);
  color: rgba(255, 255, 255, 0.78);
}
.section--dark h2,
.section--dark h3 { color: var(--white); }

/* ---------- 4. Section headings ---------- */
.section-head {
  max-width: 720px;
  margin-bottom: clamp(36px, 4vw, 60px);
}
.section-head--center {
  margin-inline: auto;
  text-align: center;
}
.section-head h2 { margin-bottom: 0.45em; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px 14px 6px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  background: var(--white);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--green-700);
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime-500);
  box-shadow: 0 0 0 4px rgba(132, 204, 22, 0.22);
}
.section--dark .eyebrow,
.eyebrow--onDark {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-dark);
  color: var(--lime-300);
}

.lead {
  font-size: clamp(1.02rem, 0.97rem + 0.28vw, 1.18rem);
  line-height: 1.7;
  color: var(--muted);
}
.section--dark .lead { color: rgba(255, 255, 255, 0.72); }

/* ---------- 5. Utilities ---------- */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0 !important; }
.mt-lg { margin-top: 40px; }
.no-wrap { white-space: nowrap; }
.accent { color: var(--lime-500); }
.section--dark .accent { color: var(--lime-400); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 999;
  padding: 12px 20px;
  background: var(--lime-400);
  color: var(--green-950);
  font-weight: 650;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  transition: top var(--t) var(--ease);
}
.skip-link:focus { top: 0; }

/* Decorative dotted backdrop */
.dot-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(14, 46, 36, 0.09) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 72%);
  mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 72%);
  pointer-events: none;
}
.dot-grid--dark {
  background-image: radial-gradient(rgba(163, 230, 53, 0.16) 1px, transparent 1px);
}

/* ---------- 6. Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
