/* Mission Digital Labs page content styles.

   Header, footer, typography and the colour system come from the site's own
   Astra stylesheets. This file styles only the content sections.

   Palette note: the site's painted palette is #3a3a3a ink, black, white and
   #1f7ee3 blue as the single accent. Astra also defines --ast-global-color-0
   (#57aa6e green) but nothing on the site applies it, so it is deliberately
   NOT used here. CurbApprove's #15803d green appears only inside its own
   product mark, which must keep its brand colour. */

.md-labs .site-main { padding: 0; }

.md-wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ============================ hero ============================ */

.md-hero {
  position: relative;
  padding: 92px 0 72px;
  background:
    radial-gradient(900px 520px at 78% 12%, rgba(31,126,227,.10), transparent 62%),
    linear-gradient(180deg, #f7f9fc 0%, #ffffff 72%);
  overflow: hidden;
}

/* Faint dot grid for texture. Kept very low contrast so it reads as paper,
   not as a pattern competing with the copy. */
.md-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(15,30,50,.055) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
          mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
  pointer-events: none;
}

.md-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  gap: 56px;
  align-items: center;
}

/* min-width:0 stops long words from forcing the grid column wider than its track */
.md-hero-copy { min-width: 0; }

/* Colour is #14559b rather than the #1f7ee3 accent: on the tinted pill the
   lighter blue measured 3.58:1, below the WCAG AA 4.5:1 minimum. */
.md-eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .13em;
  font-size: .76rem;
  font-weight: 700;
  color: #14559b;
  background: rgba(31,126,227,.09);
  border: 1px solid rgba(31,126,227,.20);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 20px;
}

.md-labs h1.md-h1 {
  font-size: clamp(2.5rem, 4.6vw, 3.9rem);
  line-height: 1.06;
  letter-spacing: -.025em;
  margin: 0 0 .45em;
}
.md-h1-accent { color: #1f7ee3; }

.md-lede {
  font-size: 1.1rem;
  line-height: 1.66;
  max-width: 54ch;
  margin-bottom: 2rem;
}

/* #6b7681 rather than a lighter grey: the previous #8a949c measured 3.09:1
   against white, below the WCAG AA 4.5:1 minimum for text this size. */
.md-hero-meta {
  margin: 1.5rem 0 0;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #6b7681;
}

/* ---------- hero visual: stylised app window ----------
   Built in CSS rather than shipped as an image so it stays crisp at any
   density and costs no extra request. Decorative only, aria-hidden in markup. */

.md-hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.md-window {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow:
    0 1px 2px rgba(15,30,50,.04),
    0 12px 28px rgba(15,30,50,.09),
    0 34px 60px rgba(15,30,50,.10);
  overflow: hidden;
  transform: perspective(1400px) rotateY(-7deg) rotateX(2deg);
}

.md-window-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 14px;
  background: #f7f9fc;
  border-bottom: 1px solid #eef2f7;
}
.md-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #d8e0ea;
  flex: 0 0 9px;
}
.md-window-url {
  margin-left: 10px;
  height: 9px;
  flex: 1;
  max-width: 190px;
  border-radius: 999px;
  background: #e8eef5;
}

.md-window-body { display: flex; min-height: 268px; }

.md-window-side {
  width: 76px;
  flex: 0 0 76px;
  padding: 18px 12px;
  background: #fbfcfe;
  border-right: 1px solid #eef2f7;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.md-side-item {
  height: 8px;
  border-radius: 999px;
  background: #e8eef5;
}
.md-side-item.md-side-active { background: #1f7ee3; opacity: .85; }

.md-window-main {
  flex: 1;
  padding: 20px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.md-row { display: flex; align-items: center; gap: 12px; }
.md-row-bar {
  height: 9px;
  border-radius: 999px;
  background: #e8eef5;
}
.md-w-45 { width: 45%; }
.md-w-55 { width: 55%; }
.md-w-60 { width: 60%; }
.md-w-70 { width: 70%; }
.md-w-80 { width: 80%; }

.md-pill {
  margin-left: auto;
  width: 42px;
  height: 15px;
  border-radius: 999px;
  background: #eef2f7;
  flex: 0 0 42px;
}
.md-pill-ok   { background: rgba(31,126,227,.20); }
.md-pill-wait { background: rgba(31,126,227,.09); }

/* ============================ buttons ============================ */

.md-actions { display: flex; gap: 13px; flex-wrap: wrap; }
.md-actions-center { justify-content: center; }

.md-labs a.md-btn {
  display: inline-block;
  background: #1f7ee3;
  color: #fff;
  padding: 15px 30px;
  border-radius: 6px;
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(31,126,227,.24);
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.md-labs a.md-btn:hover {
  background: #1668bd;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(31,126,227,.30);
}

.md-labs a.md-btn-ghost {
  background: transparent;
  color: #3a3a3a;
  border: 2px solid #d7dee4;
  box-shadow: none;
}
.md-labs a.md-btn-ghost:hover {
  background: #fff;
  color: #1f7ee3;
  border-color: #1f7ee3;
  box-shadow: 0 6px 16px rgba(15,30,50,.07);
}

.md-labs a.md-btn-light { background: #fff; color: #1f7ee3; box-shadow: none; }
.md-labs a.md-btn-light:hover { background: #eaf2fc; color: #1668bd; }

.md-labs a.md-btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.45);
  box-shadow: none;
}
.md-labs a.md-btn-outline:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ============================ sections ============================ */

.md-section { padding: 84px 0; }
.md-section-alt {
  background: #f4f7fa;
  border-top: 1px solid #e8eef5;
  border-bottom: 1px solid #e8eef5;
}

.md-labs h2.md-h2 {
  font-size: clamp(1.85rem, 3.2vw, 2.45rem);
  letter-spacing: -.015em;
  margin: 0 0 .3em;
}
.md-labs h2.md-brands-title { margin-bottom: 1.7rem; }

/* ---------- capability cards ---------- */

.md-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }

.md-card {
  position: relative;
  background: #fff;
  border: 1px solid #e6ecf2;
  border-radius: 14px;
  padding: 30px 28px 32px;
  overflow: hidden;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
/* Accent rule that fills in on hover, the page's one repeated motif. */
.md-card::after {
  content: "";
  position: absolute;
  left: 0; top: 0;
  height: 3px;
  width: 0;
  background: #1f7ee3;
  transition: width .28s ease;
}
.md-card:hover {
  border-color: #cfe0f6;
  box-shadow: 0 10px 30px rgba(15,30,50,.08);
  transform: translateY(-3px);
}
.md-card:hover::after { width: 100%; }

.md-ico {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: rgba(31,126,227,.10);
  color: #1f7ee3;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.md-ico svg { width: 24px; height: 24px; }

.md-labs .md-card h2 { font-size: 1.16rem; margin: 0 0 .45em; letter-spacing: -.005em; }
.md-card p { margin: 0; font-size: .98rem; line-height: 1.62; }

/* ---------- featured project ----------
   A single project in a multi-column grid reads as unfinished, so the one
   project is presented as a full-width feature instead. */

.md-labs a.md-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: stretch;
  background: #fff;
  border: 1px solid #e2eaf2;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.md-labs a.md-feature:hover {
  border-color: #cfe0f6;
  box-shadow: 0 14px 38px rgba(15,30,50,.10);
  transform: translateY(-3px);
  text-decoration: none;
}

.md-feature-body { padding: 38px 40px 36px; }

.md-brand-logo { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 16px; }

.md-brand-mark {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 8px;
  color: #fff;
  flex: 0 0 36px;
}
.md-brand-mark svg { width: 22px; height: 22px; }
/* per-brand colours */
.md-brand-mark-curbapprove { background: #15803d; }

.md-brand-name {
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -.015em;
  color: #0f172a;
}
.md-brand-name-accent { color: #15803d; }

.md-feature-desc {
  margin: 0 0 18px;
  font-size: 1rem;
  line-height: 1.62;
  max-width: 46ch;
  /* explicit: the card is an <a>, so body copy would otherwise inherit the
     theme's link colour and render blue */
  color: #3a3a3a;
}

.md-feature-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
  padding: 0;
}
.md-feature-tags li {
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #5b6873;
  background: #f2f6fa;
  border: 1px solid #e4ecf4;
  border-radius: 999px;
  padding: 6px 12px;
}

.md-brand-link {
  display: inline-block;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #1f7ee3;
}

/* Art panel carries CurbApprove's own brand colour, since it represents that
   product rather than Mission Digital chrome. */
.md-feature-art {
  position: relative;
  min-height: 210px;
  background:
    radial-gradient(420px 260px at 72% 30%, rgba(255,255,255,.16), transparent 68%),
    linear-gradient(135deg, #15803d 0%, #14532d 100%);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.md-feature-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.15) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: .5;
}
.md-feature-mark {
  position: relative;
  color: rgba(255,255,255,.94);
}
.md-feature-mark svg { width: 132px; height: 132px; }

/* ============================ cta ============================ */

.md-cta {
  position: relative;
  padding: 88px 0;
  background:
    radial-gradient(700px 380px at 50% -10%, rgba(31,126,227,.30), transparent 68%),
    linear-gradient(180deg, #10202e 0%, #0b1620 100%);
  text-align: center;
  overflow: hidden;
}
.md-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
}
.md-cta .md-wrap { position: relative; }
.md-labs .md-cta h2 {
  color: #fff;
  font-size: clamp(1.8rem, 3.2vw, 2.45rem);
  letter-spacing: -.015em;
  margin: 0 0 .45em;
}
.md-cta p {
  color: rgba(255,255,255,.78);
  max-width: 54ch;
  margin: 0 auto 2rem;
  line-height: 1.62;
}

/* ============================ responsive ============================ */

@media (max-width: 1024px) {
  .md-hero-grid { gap: 40px; }
  .md-window { max-width: 420px; }
  .md-labs a.md-feature { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
}

@media (max-width: 921px) {
  .md-hero { padding: 64px 0 56px; }
  .md-hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .md-hero-visual { order: 2; }
  .md-window { transform: none; max-width: 460px; }
  .md-grid-3 { grid-template-columns: 1fr; gap: 20px; }
  .md-section { padding: 60px 0; }
  .md-labs a.md-feature { grid-template-columns: 1fr; }
  /* Content first on narrow screens: a full-width block of brand colour above
     the copy dominated the section and pushed the project name below the fold. */
  .md-feature-art { min-height: 150px; }
  .md-feature-mark svg { width: 86px; height: 86px; }
  .md-wrap { padding: 0 32px; }
}

@media (max-width: 544px) {
  .md-wrap { padding: 0 24px; }
  .md-hero { padding: 48px 0 44px; }
  .md-section { padding: 48px 0; }
  .md-cta { padding: 60px 0; }
  /* Equal-width stacked buttons: auto-width buttons produced two different
     widths, which read as an alignment bug rather than a deliberate hierarchy. */
  .md-actions { flex-direction: column; align-items: stretch; }
  .md-labs a.md-btn { width: 100%; padding: 14px 20px; text-align: center; }
  .md-feature-body { padding: 28px 26px 30px; }
  .md-window-side { width: 60px; flex: 0 0 60px; padding: 14px 10px; }
  .md-window-main { padding: 16px; gap: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .md-labs a.md-btn,
  .md-card,
  .md-labs a.md-feature { transition: none; }
  .md-labs a.md-btn:hover,
  .md-card:hover,
  .md-labs a.md-feature:hover { transform: none; }
  .md-card::after { transition: none; }
}
