/* Shared design system and site chrome.
   Page-specific layout stays in each HTML file. Nav and footer markup is
   injected from worker/index.js so those copies cannot drift. */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('archivo-latin-var.woff2') format('woff2');
}

:root {
  --forest: #2D5016;
  --forest-mid: #3D6B20;
  --forest-light: #EBF2E3;
  --forest-border: #C5DCA8;
  --text: #1A1A1A;
  --muted: #555;
  --white: #FFFFFF;
  --accent: #A8D878;
}

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

body {
  font-family: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}

/* Focus ring: forest on light surfaces (9.3:1 on white), accent on dark (5.6:1
   on forest). Selectors for classes a given page lacks are simply inert. */
:focus-visible {
  outline: 3px solid var(--forest);
  outline-offset: 2px;
  border-radius: 2px;
}
nav :focus-visible,
.hero :focus-visible,
.cta-section :focus-visible,
.math-section :focus-visible,
.diff-section :focus-visible,
footer :focus-visible {
  outline-color: var(--accent);
}

nav {
  background: var(--forest);
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo img {
  height: 36px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
}

.nav-links a:hover { color: var(--white); }

.nav-cta {
  background: var(--white);
  color: var(--forest) !important;
  padding: 8px 18px;
  border-radius: 6px;
  font-weight: 600 !important;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
  /* 44px minimum touch target */
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  z-index: 200;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.25s;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

section { padding: 56px 40px; }

.section-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.hero-cta:hover { background: #BFE898; }

.breadcrumb {
  font-size: 13px;
  color: rgba(255,255,255,0.72);
  margin-bottom: 20px;
}

.breadcrumb a {
  color: rgba(255,255,255,0.72);
  text-decoration: none;
}

.breadcrumb a:hover { color: var(--white); }

.product-badge {
  display: inline-block;
  background: rgba(168,216,120,0.16);
  color: #C6E6A7;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 20px;
  border: 1px solid rgba(168,216,120,0.4);
}

.feature-card {
  background: var(--white);
  border: 1.5px solid var(--forest-border);
  border-radius: 10px;
  padding: 24px;
}

.feature-icon {
  width: 40px;
  height: 40px;
  background: var(--forest-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.feature-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--forest);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.cta-section h2 {
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.cta-section p {
  font-size: 17px;
  color: rgba(255,255,255,0.7);
  max-width: 500px;
  margin: 0 auto 36px;
}

.cta-btn {
  display: inline-block;
  background: var(--accent);
  color: var(--forest);
  font-weight: 700;
  font-size: 15px;
  padding: 14px 32px;
  border-radius: 8px;
  text-decoration: none;
}

.cta-btn:hover { background: #BFE898; }

.contact-fallback {
  max-width: 540px;
  margin: 28px auto 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
}

.contact-fallback a {
  color: var(--forest);
  font-weight: 600;
}

footer {
  background: #1A2E0A;
  color: rgba(255,255,255,0.5);
  padding: 32px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  flex-wrap: wrap;
  gap: 12px;
}

footer a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
}

footer a:hover { color: var(--white); }

.footer-brand {
  font-weight: 700;
  color: rgba(255,255,255,0.8);
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  nav { padding: 0 20px; }
  .hamburger { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--forest);
    flex-direction: column;
    gap: 0;
    padding: 8px 0 16px;
    z-index: 100;
    border-top: 1px solid rgba(255,255,255,0.1);
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 12px 24px; font-size: 15px; }
  .nav-cta { margin: 8px 24px 0; border-radius: 6px; text-align: center; }
  section { padding: 44px 24px; }
  footer { padding: 24px; flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}
