:root {
  color-scheme: dark;
  --ink: #f5f8ff;
  --muted: #aebbd0;
  --navy-950: #030b19;
  --navy-900: #07162e;
  --navy-800: #0b2348;
  --surface: rgba(10, 30, 61, 0.78);
  --surface-strong: #0d2850;
  --blue: #39adff;
  --blue-bright: #80d1ff;
  --gold: #ffc453;
  --border: rgba(128, 209, 255, 0.2);
  --border-strong: rgba(128, 209, 255, 0.43);
  --shadow: 0 28px 80px rgba(0, 7, 20, 0.45);
  --radius: 24px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  background:
    radial-gradient(circle at 82% 0%, rgba(31, 115, 231, 0.2), transparent 30rem),
    radial-gradient(circle at 5% 42%, rgba(57, 173, 255, 0.09), transparent 28rem),
    linear-gradient(145deg, var(--navy-950), #061329 55%, #081a35);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: 0.28;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(77, 156, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 156, 255, 0.08) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}

a { color: inherit; }

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 99;
  padding: 10px 14px;
  border-radius: 10px;
  color: #061329;
  background: var(--gold);
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.site-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(4, 15, 33, 0.78);
  box-shadow: 0 12px 38px rgba(0, 5, 18, 0.32);
  backdrop-filter: blur(16px);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  white-space: nowrap;
}

.wordmark strong,
.wordmark small { display: block; }
.wordmark strong { font-size: 1.02rem; letter-spacing: 0.01em; }
.wordmark small { color: var(--muted); font-size: 0.68rem; }

.brand-mark {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 31px;
}

.brand-mark i {
  display: block;
  width: 9px;
  height: 9px;
  border: 3px solid var(--blue);
  border-radius: 50%;
  box-shadow: 12px 0 0 -3px var(--blue);
}

.brand-mark i:nth-child(2) { border-color: var(--gold); transform: translateY(7px); }
.brand-mark i:nth-child(3) { transform: translateY(-2px); }
.brand-mark i:nth-child(4) { transform: translateY(5px); }

nav { display: flex; flex-wrap: wrap; gap: 6px; }
nav a {
  padding: 8px 11px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 680;
  text-decoration: none;
}
nav a:hover,
nav a:focus-visible,
nav a[aria-current="page"] { color: var(--ink); background: rgba(57, 173, 255, 0.12); }

main { margin-top: 18px; }

.hero,
.section,
.page-hero,
.content-panel {
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  min-height: 520px;
  overflow: hidden;
  border-radius: var(--radius);
}

.hero-copy {
  align-self: center;
  padding: clamp(34px, 6vw, 72px);
}

.hero-art {
  min-height: 390px;
  border-left: 1px solid var(--border);
  background:
    linear-gradient(90deg, var(--navy-900), transparent 35%),
    linear-gradient(0deg, rgba(3, 11, 25, 0.15), transparent),
    url("assets/mjd-solutions-hero.png") center right / cover no-repeat;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue-bright);
  font-size: 0.74rem;
  font-weight: 820;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1, h2, h3 { line-height: 1.12; text-wrap: balance; }
h1 { margin: 0; font-size: clamp(2.5rem, 6vw, 4.8rem); letter-spacing: -0.055em; }
h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 3rem); letter-spacing: -0.035em; }
h3 { margin: 0; font-size: 1.18rem; }
p, li { max-width: 72ch; }
.lede { color: #d6e0ef; font-size: clamp(1.02rem, 2vw, 1.22rem); }
.muted, .meta { color: var(--muted); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 17px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  color: var(--ink);
  font-weight: 760;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}
.button:hover { transform: translateY(-2px); border-color: var(--blue); background: rgba(57, 173, 255, 0.08); }
.button.primary { border-color: var(--blue); color: #03101f; background: linear-gradient(135deg, var(--blue-bright), var(--blue)); }

.section {
  margin-top: 18px;
  padding: clamp(30px, 5vw, 58px);
  border-radius: var(--radius);
}

.intro-grid,
.story { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(28px, 6vw, 72px); }

.metric-panel { display: grid; gap: 10px; }
.metric-panel div {
  display: grid;
  grid-template-columns: minmax(110px, 0.65fr) 1.35fr;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(5, 20, 43, 0.6);
}
.metric-panel strong { color: var(--gold); font-size: 1.05rem; }
.metric-panel span { color: var(--muted); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 26px;
}
.resource-card {
  display: flex;
  flex-direction: column;
  min-height: 265px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(16, 49, 94, 0.72), rgba(5, 20, 43, 0.82));
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease;
}
.resource-card:hover { transform: translateY(-4px); border-color: var(--blue); }
.resource-card p { color: var(--muted); font-size: 0.92rem; }
.card-icon { margin-bottom: auto; color: var(--gold); font-size: 0.72rem; font-weight: 850; letter-spacing: 0.13em; }
.text-link { margin-top: auto; color: var(--blue-bright); font-size: 0.9rem; font-weight: 760; }

.story { background: linear-gradient(135deg, rgba(12, 42, 81, 0.94), rgba(5, 18, 40, 0.94)); }
.story-copy p:first-child { margin-top: 0; font-weight: 650; }
.notice {
  padding: 15px 18px;
  border-left: 3px solid var(--gold);
  color: var(--muted);
  background: rgba(255, 196, 83, 0.06);
}

.page-hero {
  padding: clamp(34px, 6vw, 68px);
  border-radius: var(--radius) var(--radius) 0 0;
  background:
    linear-gradient(100deg, rgba(7, 22, 46, 0.95), rgba(10, 41, 82, 0.72)),
    url("assets/mjd-solutions-hero.png") center / cover;
}
.page-hero h1 { max-width: 840px; font-size: clamp(2.3rem, 5vw, 4.2rem); }
.page-hero .lede { max-width: 760px; }
.facts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.facts div { min-width: 170px; padding: 12px 15px; border: 1px solid var(--border); border-radius: 11px; background: rgba(3, 13, 30, 0.62); }
.facts dt { color: var(--muted); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.facts dd { margin: 3px 0 0; font-weight: 720; }

.content-panel {
  padding: clamp(28px, 5vw, 58px);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
}
.content-section { padding: 0 0 28px; margin: 0 0 28px; border-bottom: 1px solid var(--border); }
.content-section:last-child { padding-bottom: 0; margin-bottom: 0; border-bottom: 0; }
.content-section h2 { font-size: clamp(1.45rem, 3vw, 2.1rem); }
.content-section h3 { margin-top: 24px; }
.content-section a { color: var(--blue-bright); text-underline-offset: 0.2em; }
.summary-grid, .video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 22px; }
.summary-grid article, .video-card { padding: 20px; border: 1px solid var(--border); border-radius: 15px; background: rgba(5, 20, 43, 0.62); }
.summary-grid p, .video-card p { color: var(--muted); }
.video-grid { grid-template-columns: repeat(2, 1fr); }
video { display: block; width: min(100%, 360px); max-height: 680px; margin: 18px auto 0; border: 1px solid var(--border); border-radius: 14px; background: #000; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 5px 8px;
  color: var(--muted);
  font-size: 0.82rem;
}
footer strong, footer span { display: block; }
footer strong { color: var(--ink); }
footer p { margin: 0; text-align: right; }

@media (max-width: 900px) {
  .site-header { align-items: flex-start; flex-direction: column; }
  .hero { grid-template-columns: 1fr; }
  .hero-art { min-height: 260px; border-top: 1px solid var(--border); border-left: 0; }
  .intro-grid, .story { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .site-shell { width: min(100% - 20px, 1180px); padding-top: 10px; }
  .site-header { padding: 14px; border-radius: 14px; }
  nav { gap: 3px; }
  nav a { padding: 7px 8px; font-size: 0.78rem; }
  .hero, .section, .page-hero, .content-panel { border-radius: 18px; }
  .page-hero { border-radius: 18px 18px 0 0; }
  .content-panel { border-radius: 0 0 18px 18px; }
  .hero-copy { padding: 30px 24px; }
  .card-grid, .summary-grid, .video-grid { grid-template-columns: 1fr; }
  .resource-card { min-height: 225px; }
  .metric-panel div { grid-template-columns: 1fr; gap: 3px; }
  footer { flex-direction: column; }
  footer p { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
