
/* ==========================================================================
   MDC v3.0 — Deployment Readability & Visual Consistency
   Unifies internal pages with the homepage visual language.
   ========================================================================== */

:root {
  --deploy-bg: #f7faf8;
  --deploy-surface: #ffffff;
  --deploy-surface-soft: #f2f7f4;
  --deploy-blue: #07345a;
  --deploy-blue-deep: #041f35;
  --deploy-green: #2f7f36;
  --deploy-text: #2f4552;
  --deploy-text-muted: #5e707a;
  --deploy-border: rgba(6,47,83,.10);
  --deploy-shadow: 0 14px 34px rgba(6,47,83,.09);
}

/* Global readable background and text */
html,
body {
  background: var(--deploy-bg) !important;
  color: var(--deploy-text) !important;
}

main {
  background: transparent !important;
}

main > section:not(.section-dark):not(.page-hero):not(.about-hero):not(.project-hero):not(.research-hero):not(.research-thought-hero):not(.experts-hero):not(.footprint-hero):not(.academy-hero):not(.executive-home-hero-ai) {
  background: var(--deploy-bg) !important;
}

main > section:nth-of-type(even):not(.section-dark):not(.page-hero):not(.about-hero):not(.project-hero):not(.research-hero):not(.research-thought-hero):not(.experts-hero):not(.footprint-hero):not(.academy-hero):not(.executive-home-hero-ai) {
  background: var(--deploy-surface-soft) !important;
}

/* Readable light surfaces */
.section,
.section-muted,
.content-section,
.resource-strip,
.research-lab,
.footprint-shell,
.map-panel,
.location-detail-panel,
.location-grid,
.expert-section,
.expertise-glance {
  color: var(--deploy-text) !important;
}

.section-muted {
  background: var(--deploy-surface-soft) !important;
}

/* Headings */
main h1,
main h2,
main h3,
main h4,
main h5,
main h6 {
  color: var(--deploy-blue) !important;
}

main p,
main li,
main dd,
main dt,
main label,
main small {
  color: var(--deploy-text) !important;
}

main .muted,
main .text-muted,
main .meta,
main .publication-meta,
main .course-meta,
main .project-meta,
main .caption {
  color: var(--deploy-text-muted) !important;
}

/* Dark hero sections remain dark, with high-contrast text */
.section-dark,
.page-hero.section-dark,
.about-hero.section-dark,
.project-hero.section-dark,
.contact-hero-sprint.section-dark,
.academy-hero.section-dark {
  background:
    radial-gradient(circle at 85% 15%, rgba(47,127,54,.18), transparent 25%),
    linear-gradient(135deg, var(--deploy-blue-deep), var(--deploy-blue)) !important;
  color: #fff !important;
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4,
.section-dark p,
.section-dark li,
.section-dark small,
.section-dark .eyebrow,
.page-hero h1,
.page-hero p,
.about-hero h1,
.about-hero p,
.project-hero h1,
.project-hero p,
.contact-hero-sprint h1,
.contact-hero-sprint p,
.academy-hero h1,
.academy-hero p {
  color: #fff !important;
}

.section-dark .hero-title-line:last-child,
.page-hero .hero-title-line:last-child,
.about-hero .hero-title-line:last-child,
.project-hero .hero-title-line:last-child,
.contact-hero-sprint .hero-title-line:last-child,
.academy-hero .hero-title-line:last-child {
  color: #8ccf43 !important;
}

/* Cards, panels, forms and tables */
.card,
[class*="-card"],
.panel,
[class*="-panel"],
form,
.form-card,
table,
details {
  background: var(--deploy-surface) !important;
  color: var(--deploy-text) !important;
  border-color: var(--deploy-border) !important;
}

.card h2,
.card h3,
.card h4,
[class*="-card"] h2,
[class*="-card"] h3,
[class*="-card"] h4,
.panel h2,
.panel h3,
.panel h4,
[class*="-panel"] h2,
[class*="-panel"] h3,
[class*="-panel"] h4 {
  color: var(--deploy-blue) !important;
}

.card p,
.card li,
[class*="-card"] p,
[class*="-card"] li,
.panel p,
.panel li,
[class*="-panel"] p,
[class*="-panel"] li {
  color: var(--deploy-text) !important;
}

input,
select,
textarea {
  background: #fff !important;
  color: var(--deploy-text) !important;
  border-color: rgba(6,47,83,.16) !important;
}

input::placeholder,
textarea::placeholder {
  color: #7a8a93 !important;
  opacity: 1;
}

th {
  background: #edf4ef !important;
  color: var(--deploy-blue) !important;
}

td {
  background: #fff !important;
  color: var(--deploy-text) !important;
}

/* Links */
main a:not(.btn) {
  color: var(--deploy-green);
}

main a:not(.btn):hover {
  color: #17643f;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--deploy-green), #17643f) !important;
  color: #fff !important;
  border-color: transparent !important;
}

.btn-secondary,
.btn-outline,
.btn-outline-primary {
  background: #fff !important;
  color: var(--deploy-blue) !important;
  border-color: rgba(6,47,83,.18) !important;
}

/* Footer remains dark and readable */
footer,
.site-footer {
  background:
    radial-gradient(circle at 85% 15%, rgba(47,127,54,.18), transparent 25%),
    linear-gradient(135deg, var(--deploy-blue-deep), var(--deploy-blue)) !important;
  color: rgba(255,255,255,.84) !important;
}

footer h2,
footer h3,
footer h4,
footer p,
footer li,
footer small,
footer a,
.site-footer h2,
.site-footer h3,
.site-footer h4,
.site-footer p,
.site-footer li,
.site-footer small,
.site-footer a {
  color: rgba(255,255,255,.84) !important;
}

footer strong,
.site-footer strong {
  color: #fff !important;
}

/* FAQ */
details summary {
  color: var(--deploy-blue) !important;
}

details[open] {
  background: #fff !important;
}

/* Mobile */
@media (max-width: 720px) {
  body {
    background: var(--deploy-bg) !important;
  }

  main > section {
    background: var(--deploy-bg) !important;
  }

  main > section:nth-of-type(even) {
    background: var(--deploy-surface-soft) !important;
  }

  .section-dark,
  .page-hero.section-dark,
  .about-hero.section-dark,
  .project-hero.section-dark,
  .contact-hero-sprint.section-dark,
  .academy-hero.section-dark {
    background:
      linear-gradient(135deg, var(--deploy-blue-deep), var(--deploy-blue)) !important;
  }
}
