/* MEI landing prototype — Stage 1
   Palette follows the proposed redesign: navy, blue, warm neutrals.
   No external stylesheets. */

:root {
  --ink: #101b3b;
  --ink-soft: #344054;
  --muted: #475467;
  --blue: #1d4ed8;
  --blue-deep: #1e3a8a;
  --blue-soft: #e8eeff;
  --blue-mist: #dce6ff;
  --navy: #0f1b3d;
  --navy-card: #18284f;
  --navy-icon: #223466;
  --navy-text: #c7d2f0;
  --navy-label: #9db7ff;
  --cream: #fbfaf8;
  --sand: #f4f0e8;
  --line: #ece8df;
  --white: #ffffff;
  --amber-bg: #fef0c7;
  --amber-ink: #93370d;
  --amber-tile: #fdebc8;
  --shadow: 0 2px 4px rgba(16, 27, 59, 0.06), 0 20px 48px rgba(16, 27, 59, 0.12);
  --header-h: 76px;
  --content: 1184px;
  --panel: 1328px;
  --radius: 24px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "Segoe UI Mono", Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--blue);
}

a:hover {
  color: var(--blue-deep);
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: 8px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--white);
  border-radius: 8px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: min(var(--content), calc(100% - 48px));
  margin-inline: auto;
}

.panel {
  width: min(var(--panel), calc(100% - 32px));
  margin-inline: auto;
  border-radius: 32px;
}

.section {
  padding: clamp(56px, 7vw, 96px) 0;
}

.section-follow {
  padding-top: 0;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.hero-copy h1 {
  /* About 15% below the previous clamp(2.35rem, 5vw, 3.85rem).
     Sized from the column so the three lines stay intact. */
  font-size: clamp(2rem, 8.8cqi, 3.27rem);
}

.hero-copy h1 .hero-line {
  display: block;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.75rem, 3.2vw, 2.55rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 700;
}

h3 {
  margin-bottom: 0;
  font-size: 1.2rem;
  line-height: 1.3;
  font-weight: 600;
}

.lede {
  margin-bottom: 0;
  max-width: 40rem;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.muted {
  color: var(--muted);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(var(--content), calc(100% - 32px));
  min-height: var(--header-h);
  margin-inline: auto;
}

.logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}

.logo img {
  display: block;
  width: 132px;
  height: 64px;
  object-fit: contain;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle svg {
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px 22px;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--ink);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--blue-deep);
  color: var(--white);
}

.btn-light {
  background: var(--white);
  color: var(--ink);
}

.btn-light:hover {
  background: var(--blue-soft);
  color: var(--ink);
}

.btn-nav {
  min-height: 44px;
  padding: 0 18px;
  background: var(--blue);
  color: var(--white) !important;
  border-radius: 999px;
}

.btn-nav:hover {
  background: var(--blue-deep);
  color: var(--white) !important;
}

.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 4px;
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.btn-text:hover {
  color: var(--blue-deep);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin-top: 8px;
}

/* Hero */

.hero {
  background: var(--blue-soft);
  padding: clamp(40px, 6vw, 80px) clamp(24px, 5vw, 72px);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px 64px;
  align-items: center;
  width: min(var(--content), 100%);
  margin-inline: auto;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
  container-type: inline-size;
}

.hero-copy .lede {
  color: var(--ink-soft);
}

.illustration {
  position: relative;
}

.blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.blob-a {
  top: -28px;
  right: -20px;
  width: 120px;
  height: 120px;
  background: #cbd9ff;
}

.blob-b {
  bottom: 18px;
  left: -46px;
  width: 72px;
  height: 72px;
  background: #fdebc8;
}

.case-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.case-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 16px;
}

.case-kicker {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
}

.case-title {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--amber-bg);
  color: var(--amber-ink);
  font-size: 0.8rem;
  font-weight: 700;
}

.timeline {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: flex;
  gap: 14px;
}

.rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 28px;
  flex: none;
}

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex: none;
}

.mark-done {
  background: var(--blue);
  color: var(--white);
}

.mark-next {
  background: var(--white);
  border: 2px solid var(--blue);
}

.rail-line {
  width: 2px;
  flex: 1;
  min-height: 16px;
  background: #d0d5dd;
}

.step-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 18px;
}

.timeline li:last-child .step-copy {
  padding-bottom: 0;
}

.step-copy strong {
  font-size: 1rem;
  line-height: 1.35;
}

.step-meta {
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--muted);
}

.evidence {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.evidence span {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-deep);
  font-size: 0.875rem;
  font-weight: 600;
}

.caption {
  position: relative;
  margin: 10px 0 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted);
}

/* Problem */

.card-grid,
.capability-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.problem-card,
.capability {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.problem-card p,
.capability p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
}

.icon-tile svg {
  display: block;
}

.tile-amber {
  background: var(--amber-tile);
  color: #92400e;
}

.tile-blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.tile-sand {
  background: var(--sand);
  color: var(--ink);
}

.tile-navy {
  background: #e7eef8;
  color: var(--blue-deep);
}

.section-intro {
  max-width: 46rem;
}

.section-intro h2 + p {
  margin-top: 16px;
}

/* How */

.how {
  background: var(--navy);
  padding: clamp(40px, 6vw, 80px) clamp(24px, 5vw, 72px);
}

.how-inner {
  width: min(var(--content), 100%);
  margin-inline: auto;
}

.how .eyebrow {
  color: var(--navy-label);
}

.how h2,
.how .flow {
  color: var(--white);
}

.flow {
  margin: 10px 0 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.how .lede {
  margin-top: 12px;
  color: var(--navy-text);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 40px;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  background: var(--navy-card);
  border-radius: var(--radius);
}

.step-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.step-num {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--navy-label);
}

.step h3 {
  color: var(--white);
}

.step p {
  margin-bottom: 0;
  color: var(--navy-text);
  line-height: 1.6;
}

.tile-navy-soft {
  background: var(--navy-icon);
  color: var(--navy-label);
}

/* Capabilities */

.capability ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.capability li {
  position: relative;
  padding-left: 18px;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.5;
}

.capability li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
}

.audit-note {
  margin: 22px 0 0;
  padding: 18px 22px;
  background: var(--sand);
  border-left: 4px solid var(--blue);
  border-radius: 18px;
}

.audit-note h3 {
  margin-bottom: 6px;
  font-size: 1.05rem;
  line-height: 1.35;
}

.audit-note p {
  margin: 0;
  max-width: 62rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* Alongside */

.alongside-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 40px 64px;
  align-items: center;
}

.alongside-grid .lede + p {
  margin-top: 16px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.role-grid {
  display: grid;
  gap: 16px;
}

.role {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px 26px;
  border-radius: var(--radius);
  background: var(--sand);
}

.role span {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.role strong {
  font-size: 1.15rem;
  line-height: 1.4;
  font-weight: 600;
}

.role-mei {
  background: var(--blue);
}

.role-mei span,
.role-mei strong {
  color: var(--white);
}

.role-mei span {
  color: var(--blue-mist);
}

/* Resources */

.resource-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.resource {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 88px;
  padding: 16px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--ink);
  text-decoration: none;
}

.resource:hover {
  border-color: #b8b09c;
  color: var(--ink);
}

.resource-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue);
}

.resource-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.resource-text strong {
  font-size: 1rem;
}

.resource-text span {
  font-size: 0.85rem;
  color: var(--muted);
}

.resource-arrow {
  flex: none;
  color: var(--blue);
}

/* Final CTA */

.final-cta {
  position: relative;
  overflow: hidden;
  background: var(--blue);
  padding: clamp(40px, 6vw, 80px) clamp(24px, 5vw, 72px);
}

.final-cta .blob-cta {
  right: -80px;
  bottom: -120px;
  width: 340px;
  height: 340px;
  background: rgba(255, 255, 255, 0.1);
}

.final-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  width: min(var(--content), 100%);
  margin-inline: auto;
}

.final-cta h2 {
  max-width: 18em;
  color: var(--white);
}

.final-cta p {
  max-width: 38rem;
  margin-bottom: 0;
  font-size: 1.125rem;
  line-height: 1.6;
  color: #e0e9ff;
}

/* Footer */

.site-footer {
  padding: 28px 0 36px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 32px;
}

.footer-note,
.copyright {
  margin: 0;
  max-width: 36rem;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

.copyright {
  margin-top: 6px;
}

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

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--ink);
}

[id] {
  scroll-margin-top: calc(var(--header-h) + 12px);
}

/* Mobile navigation */

@media (max-width: 959px) {
  .js .nav-toggle {
    display: inline-flex;
  }

  .js .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 16px 16px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 32px rgba(16, 27, 59, 0.08);
  }

  .js .site-nav.is-open {
    display: flex;
  }

  .site-nav a,
  .btn-nav {
    justify-content: flex-start;
  }

  .btn-nav {
    margin-top: 8px;
  }

  .hero-grid,
  .alongside-grid,
  .card-grid,
  .capability-grid {
    grid-template-columns: 1fr;
  }

  .steps,
  .resource-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .wrap {
    width: min(var(--content), calc(100% - 32px));
  }

  .card-grid,
  .capability-grid,
  .steps,
  .resource-grid {
    grid-template-columns: 1fr;
  }

  .header-inner {
    width: min(var(--content), calc(100% - 20px));
  }

  .case-card {
    padding: 22px;
  }

  .step-meta,
  .footer-note {
    font-size: 0.875rem;
  }

  .step-copy strong {
    font-size: 1.0625rem;
    line-height: 1.4;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
