/* ==========================================================================
   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); }
/* footer text: white and medium weight for readability (Courtney, Oct 2026) */
footer, .footer-brand p, .footer-contact, .footer-contact a, .footer-col ul a, .footer-bottom { color: #ffffff; font-weight: 500; }
/* top bar: phone and email bold */
.topbar-contact a { font-weight: 700; }

/* ── 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; }

/* ── Readability ── */
/* links inside running text are underlined so they don't rely on colour alone (WCAG 1.4.1);
   links styled as buttons (classed, or with inline padding) are left alone */
main p a:not([class]):not([style*="padding"]),
section p a:not([class]):not([style*="padding"]),
section li a:not([class]):not([style*="padding"]),
article p a:not([class]):not([style*="padding"]) {
  text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px;
}
/* small labels: at least 12px */
.hero-card-label, .product-badge, .rt-state, .alert-tag, .press-tag,
.mcp-page .rs-say-label, .mcp-page .eyebrow, .mcp-page .hero-eyebrow, .mcp-page .rs-callout-tag,
.mcp-page .rs-toc-label, .mcp-page .rs-group-label { font-size: 12px; }
[style*="font-size:0.72rem"] { font-size: 12px !important; }   /* About timeline years, "Recommended" badge */
/* keep long paragraphs to a comfortable reading width */
.mcp-page .rs-fieldnote { max-width: 80ch; }

/* ── 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 {
  /* MCP pages specified Montserrat/Open Sans, which the site never loaded, so browsers
     substituted their own fonts (often a very wide black face on Windows). Use the site fonts. */
  --font-head: 'Inter', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --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; font-weight: 800; }
.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; }
}

/* ── Retirement countdown band (homepage, UWP page) ─────────────────── */
.ot-countdown { background: linear-gradient(135deg, #1a5276 0%, #2471a3 60%, #1e4d8c 100%); color: #fff; padding: 34px 24px; }
.ot-cd-wrap { max-width: 1100px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px 36px; }
.ot-cd-text { flex: 1 1 320px; }
.ot-cd-eyebrow { font-family: var(--font-head); font-weight: 800; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #fcd34d; margin-bottom: 8px; }
.ot-cd-title { font-family: var(--font-head); font-weight: 700; font-size: 1.5rem; line-height: 1.25; margin: 0 0 6px; color: #fff; }
.ot-cd-sub { margin: 0; color: #e8f4f8; font-size: 0.97rem; line-height: 1.6; }
.ot-cd-sub strong { color: #fff; }
.ot-cd-units { display: flex; gap: 10px; }
.ot-cd-unit { min-width: 84px; padding: 12px 8px 10px; border-radius: 12px; background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.22); text-align: center; }
.ot-cd-unit b { display: block; font-family: var(--font-head); font-weight: 800; font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; color: #fff; }
.ot-cd-unit span { display: block; margin-top: 6px; font-family: var(--font-head); font-weight: 600; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #c8e6b0; }
.ot-cd-cta { display: inline-block; margin-top: 14px; padding: 11px 20px; border-radius: 8px; background: #fff; color: #33661f !important; font-family: var(--font-head); font-weight: 700; font-size: 15px; text-decoration: none !important; }
.ot-cd-cta:hover { background: #eef6e9; }
.ot-countdown.is-past .ot-cd-units { display: none; }
@media (max-width: 640px) {
  .ot-countdown { padding: 26px 16px; }
  .ot-cd-units { width: 100%; justify-content: space-between; gap: 6px; }
  .ot-cd-unit { min-width: 0; flex: 1; padding: 10px 4px 8px; }
  .ot-cd-unit b { font-size: 26px; }
  .ot-cd-unit span { font-size: 11px; }
}

/* ── Press release body: paragraph spacing and indented lists ── */
.pr-body > p, .pr-body > ul, .pr-body > ol { margin: 0 0 16px; }
.pr-body > ul, .pr-body > ol { padding-left: 24px; }
.pr-body > ul li, .pr-body > ol li { margin-bottom: 8px; }

/* homepage service cards are links */
a.ci-item { display: block; color: inherit; text-decoration: none; transition: background .2s, transform .2s; }
a.ci-item:hover { transform: translateY(-2px); }
a.ci-item:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
