/* ==========================================================================
   OnTerra Systems — light theme (MapSavvy-style), OnTerra blue + deep green
   One shared file: loaded last on every page, so it overrides each page's
   built-in styles. Change colors here, not in individual pages.
   ========================================================================== */

/* ── 1. Colour tokens ─────────────────────────────────────────────────── */
:root {
  --accent: #3f7a28;             /* deep OnTerra green: 5.2:1 on white (WCAG AA) */
  --accent-hover: #33661f;
  --green: #3f7a28;
  --gold: #3f7a28;
  --gray: #5f6672;               /* 5.2:1 on light-blue sections */
  --brand-green: #88BE5F;        /* original brand green: decorative only */
  --brand-green-on-dark: #a3d27f;/* green text on navy: 4.8:1 */
  --hero-text: #4a5568;
}

/* ── 2. Top bar & footer: navy, matching the navy buttons ─────────────── */
.topbar { background: var(--navy); }
footer { background: var(--navy); }
.footer-bottom { border-top-color: rgba(255,255,255,0.16); }
.footer-col ul a:hover, .footer-contact a:hover { color: var(--brand-green-on-dark); }

/* ── 3. Light hero ────────────────────────────────────────────────────── */
.hero {
  background: #e8f4f8 !important;
  border-bottom: 1px solid var(--border);
}
.hero::before {
  background: radial-gradient(ellipse 60% 80% at 85% 30%, rgba(136,190,95,0.18) 0%, transparent 65%),
              radial-gradient(ellipse 50% 70% at 5% 90%, rgba(36,113,163,0.08) 0%, transparent 60%) !important;
}
.hero h1 { color: var(--navy); }
.hero h1 em { color: var(--accent); }
.hero p { color: var(--hero-text); }
.hero .section-label, .hero .hero-badge { color: var(--accent) !important; }
.hero-badge { background: rgba(63,122,40,0.08); border-color: rgba(63,122,40,0.3); }

/* pages whose hero text is coloured inline (style="color:white" etc.) */
.hero h1[style], .hero h2[style], .hero h1 [style], .hero strong[style] { color: var(--navy) !important; }
.hero h1 span[style] { color: #2c5f80 !important; }
.hero p[style], .hero li[style], .hero span.rt-updated, .hero .rt-updated { color: var(--hero-text) !important; }
.hero [style*="color:#88BE5F"], .hero [style*="color: #88BE5F"] { color: var(--accent) !important; }

/* orange "retiring" badges in heroes: #ffa500 on the light hero was 1.6:1 */
.hero [style*="color:#ffa500"] { color: #9a3412 !important; background: #fff1e0 !important; border-color: #f5b971 !important; }

/* hero cards & stats (homepage, product pages) */
.hero-card { background: rgba(255,255,255,0.78); border: 1px solid var(--border); box-shadow: 0 4px 16px rgba(26,82,118,0.08); backdrop-filter: none; }
.hero-card-label, .hero-card-link { color: var(--accent); }
.hero-card-link:hover { color: var(--accent-hover); }
.hero-card-title { color: var(--navy); }
.hero-card-desc { color: var(--gray); }
.hero-stat { background: rgba(255,255,255,0.72); border: 1px solid var(--border); }
.hero-stat-num { color: var(--accent); }
.hero-stat-label { color: var(--gray); }

/* hero buttons: all filled green */
.hero .btn-white { background: var(--accent) !important; color: #fff !important; border: 2px solid var(--accent) !important; }
.hero .btn-white:hover { background: var(--accent-hover) !important; border-color: var(--accent-hover) !important; }
.hero .btn-outline { color: var(--navy) !important; border-color: var(--navy) !important; }

/* ── 4. Body sections ─────────────────────────────────────────────────── */
.why-bg { background: #ffffff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.why-bg .section-label { color: var(--accent); }
.why-bg .section-title { color: var(--navy); }
.why-bg .section-subtitle { color: var(--gray); }
.why-card { background: #f5fafc; border: 1px solid var(--border); box-shadow: 0 4px 16px rgba(26,82,118,0.06); }
.product-badge, .alert-tag { color: var(--accent-hover); }
.consulting-image-label { color: var(--brand-green-on-dark); }
.cta-strip p { color: #ffffff; }
/* inline light-green text used for links/labels on white sections */
section [style*="color:#88BE5F"]:not([style*="background"]) { color: var(--accent) !important; }
/* …but keep the lighter tints on dark bands */
section[style*="linear-gradient"] [style*="color:#88BE5F"], section[style*="var(--navy)"] [style*="color:#88BE5F"],
section[style*="#1e3a5f"] [style*="color:#88BE5F"] { color: #b4dc95 !important; }

/* light-green text inside dark navy boxes keeps a light tint (contact, press, MapSavvy pricing) */
section [style*="background:var(--navy)"] [style*="color:#88BE5F"],
section [style*="background:var(--navy)"] [style*="color:var(--green)"],
section [style*="background: var(--navy)"] [style*="color:#88BE5F"] { color: #b4dc95 !important; }
/* green-tinted badges in heroes (press release dates) */
.hero [style*="color:#88BE5F"][style*="background"] { color: var(--accent-hover) !important; }
/* call-to-action strips: full-white supporting text */
.cta-strip p, .cta-strip p[style] { color: #ffffff !important; }
/* homepage consulting card */
.consulting-image-label { color: #c8e6b0; }
.ci-item-sub { color: #ffffff; }
/* orange timeline dates (Bing discontinuation strategies): white on #e67e22 was 2.85:1 */
[style*="background:#e67e22"] { background: #c2410c !important; }
/* red timeline dates: white on #e74c3c was 3.8:1 */
[style*="background:#e74c3c"] { background: #c0392b !important; }
/* muted address text in navy contact boxes (press page) */
[style*="color:#8fa8c8"] { color: #c0d5e5 !important; }
/* footer social icons */
.social-link { color: #dbe7f0; }

/* ── 5. Navigation ────────────────────────────────────────────────────── */
/* mobile menu group labels ("Products", "Maps Licensing") were navy on navy */
.mobile-nav-links > li.mobile-nav-group, .mobile-nav-links > li:not(:has(a)) {
  color: var(--brand-green-on-dark); font-family: var(--font-head); font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; padding: 20px 8px 6px;
}
.mobile-menu { z-index: 10000; }
.hamburger { min-width: 44px; min-height: 44px; padding: 10px; }

/* ── 6. MCP product pages (scoped design system) ──────────────────────── */
.mcp-page {
  --green: #3f7a28;
  --green-dk: #33661f;
  --green-lt: #eef6e9;
}
.mcp-page .hero { background: #e8f4f8 !important; border-bottom: 1px solid var(--border); }
.mcp-page .hero::before { background-image: radial-gradient(ellipse 60% 80% at 85% 30%, rgba(136,190,95,0.18) 0%, transparent 65%) !important; background-size: auto !important; }
.mcp-page .hero h1 { color: #1a5276; }
.mcp-page .hero h1 em { color: #3f7a28; }
.mcp-page .hero-sub { color: #4a5568; }
.mcp-page .hero-eyebrow { background: rgba(63,122,40,0.08); border-color: rgba(63,122,40,0.3); color: #33661f; }
.mcp-page .hero .btn-hero { background: #fff; color: #33661f; border: 2px solid #3f7a28; }
.mcp-page .hero .btn-hero-solid { background: #3f7a28; color: #fff; border-color: #3f7a28; }
.mcp-page .hero .btn-hero-solid:hover { background: #33661f; border-color: #33661f; color: #fff; }
.mcp-page .hero-meta-item, .mcp-page .hero-meta-item a { color: #5f6672; }
.mcp-page .hero .hero-card { background: rgba(255,255,255,0.8); border: 1px solid var(--border); }
.mcp-page .cta-band { background: linear-gradient(135deg, #1a5276 0%, #2471a3 60%, #1e4d8c 100%); }
.mcp-page .cta-band p { color: #ffffff; }
.mcp-page .cta-band .btn-hero-solid { background: #fff; color: #33661f; border-color: #fff; }

.mcp-page .hero .hero-card-title { color: #1a5276; }
.mcp-page .hero .hero-card-desc { color: #5f6672; }
.mcp-page .hero .hero-card-eyebrow { color: #33661f; }
.mcp-page .hero .hero-card-link { color: #3f7a28; }
.mcp-page .stat-label { color: rgba(255,255,255,0.9); }
.mcp-page .stat-num { color: #b4dc95; }

/* ── 7. Phones ────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero-ctas { flex-direction: column; gap: 10px; max-width: none; }
  .hero-ctas .btn-white { width: 100%; text-align: center; padding: 13px 20px; margin: 0; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 32px; }
  .hero-stat { padding: 14px 6px; }
  .hero-stat-num { font-size: 1.5rem; }
  .hero-stat-label { font-size: 0.7rem; line-height: 1.35; }
  section[style*="#fef3c7"] { padding-left: 16px !important; padding-right: 16px !important; }
  .migration-cta-box .btn-primary, .migration-cta-box .btn-outline { display: block; width: 100%; text-align: center; margin: 0 0 10px 0 !important; }
  .why-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .why-card { padding: 20px 12px; }
  .why-num { font-size: 1.8rem; }
  .why-card h3 { font-size: 0.88rem; }
  .why-card p { font-size: 0.78rem; }
  .testimonials-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; margin: 0 -20px; padding: 4px 20px 16px; scrollbar-width: thin; }
  .testimonial-card { flex: 0 0 85%; scroll-snap-align: center; padding: 26px 22px; }
  .product-link { padding: 10px 0; }
  .topbar a { display: inline-block; padding: 5px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  body .ada-toggle { width: 46px; height: 46px; right: 12px; bottom: 12px; }
  body .ada-toggle svg { width: 24px; height: 24px; }
}
