/* sma-base.css — Sioma Design System Base
   Palette, typography, custom properties, resets
   Brand: deep forest-green #1A3A2A | field-amber | cream/off-white
   Typography: Sora headings + IBM Plex Sans body + IBM Plex Mono data
*/

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@600;700&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400&display=swap');

/* ── Custom Properties ── */
:root {
  /* Brand palette */
  --sma-green-deep:        #1A3A2A;
  --sma-green-alt:         #243D2A;
  --sma-green-mid:         #2D5A3D;
  --sma-accent-deco:       #7AB648;
  --sma-accent-on-light:   #3D7A1C;
  --sma-accent-on-dark:    #A8D96E;
  --sma-amber:             #C8820A;
  --sma-amber-on-light:    #8A5800;
  --sma-amber-on-dark:     #E8A830;

  /* Foreground tokens — always use context-scoped */
  --sma-fg-light-primary:  #1A2E1A;
  --sma-fg-light-secondary:#4A6040;
  --sma-fg-dark-primary:   #F2F0EB;
  --sma-fg-dark-secondary: #B8C8B0;

  /* Background tokens */
  --sma-bg-dark:           #1A3A2A;
  --sma-bg-dark-alt:       #243D2A;
  --sma-bg-light:          #F5F3EE;
  --sma-bg-light-alt:      #F7F5F0;
  --sma-bg-white:          #FFFFFF;
  --sma-bg-cream:          #EDE9E0;

  /* Typography */
  --sma-font-head:    'Sora', system-ui, sans-serif;
  --sma-font-body:    'IBM Plex Sans', system-ui, sans-serif;
  --sma-font-mono:    'IBM Plex Mono', 'Courier New', monospace;

  /* Sizing */
  --sma-max-w:        1160px;
  --sma-nav-h:        68px;
  --sma-radius-sm:    4px;
  --sma-radius:       8px;
  --sma-radius-lg:    14px;

  /* Spacing */
  --sma-sec-pad-dt:   80px;
  --sma-sec-pad-mb:   48px;
}

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

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

body {
  font-family: var(--sma-font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--sma-fg-light-primary);
  background: var(--sma-bg-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
}

/* ── Typography Scale ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--sma-font-head);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.125rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

strong { font-weight: 600; }

address { font-style: normal; }

/* ── Utility ── */
.sma-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.sma-container {
  max-width: var(--sma-max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Section background variants ── */
.sma-sec--dark {
  background: var(--sma-bg-dark);
}
.sma-sec--dark-alt {
  background: var(--sma-bg-dark-alt);
}
.sma-sec--light {
  background: var(--sma-bg-light);
}
.sma-sec--light-alt {
  background: var(--sma-bg-light-alt);
}
.sma-sec--white {
  background: var(--sma-bg-white);
}
.sma-sec--cream {
  background: var(--sma-bg-cream);
}

/* ── Section padding ── */
.sma-sec {
  padding: var(--sma-sec-pad-dt) 0;
}

/* ── Eyebrow labels ── */
.sma-eyebrow {
  display: inline-block;
  font-family: var(--sma-font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.sma-sec--light .sma-eyebrow,
.sma-sec--light-alt .sma-eyebrow,
.sma-sec--white .sma-eyebrow,
.sma-sec--cream .sma-eyebrow {
  color: var(--sma-amber-on-light);
}
.sma-sec--dark .sma-eyebrow,
.sma-sec--dark-alt .sma-eyebrow {
  color: var(--sma-amber-on-dark);
}

/* ── Dividers ── */
.sma-divider {
  width: 48px;
  height: 3px;
  background: var(--sma-accent-on-light);
  border: none;
  margin: 20px 0;
}
.sma-sec--dark .sma-divider,
.sma-sec--dark-alt .sma-divider {
  background: var(--sma-accent-on-dark);
}

/* ── Text color overrides by context ── */
.sma-sec--light h1, .sma-sec--light h2, .sma-sec--light h3,
.sma-sec--light-alt h1, .sma-sec--light-alt h2, .sma-sec--light-alt h3,
.sma-sec--white h1, .sma-sec--white h2, .sma-sec--white h3,
.sma-sec--cream h1, .sma-sec--cream h2, .sma-sec--cream h3 {
  color: var(--sma-fg-light-primary);
}
.sma-sec--light p, .sma-sec--light li,
.sma-sec--light-alt p, .sma-sec--light-alt li,
.sma-sec--white p, .sma-sec--white li,
.sma-sec--cream p, .sma-sec--cream li {
  color: var(--sma-fg-light-secondary);
}
.sma-sec--dark h1, .sma-sec--dark h2, .sma-sec--dark h3,
.sma-sec--dark-alt h1, .sma-sec--dark-alt h2, .sma-sec--dark-alt h3 {
  color: var(--sma-fg-dark-primary);
}
.sma-sec--dark p, .sma-sec--dark li,
.sma-sec--dark-alt p, .sma-sec--dark-alt li {
  color: var(--sma-fg-dark-secondary);
}

/* ── Fade-in animation ── */
.sma-fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.sma-fade-in.visible {
  opacity: 1;
  transform: none;
}

/* Failsafe: always reveal after 1.2s */
@keyframes sma-reveal {
  to { opacity: 1; transform: none; }
}
.sma-fade-in {
  animation: sma-reveal 0.6s ease 1.2s forwards;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  :root {
    --sma-sec-pad-dt: var(--sma-sec-pad-mb);
  }
  .sma-container {
    padding: 0 16px;
  }
}
