/* Friendly public-site refresh.
   Loaded last so the homepage and shared public surfaces stay calm, readable,
   and responsive without changing the underlying commerce application. */

:root {
  --mc-friendly-green: #237a4b;
  --mc-friendly-green-strong: #185f39;
  --mc-friendly-green-soft: #eef8f1;
  --mc-friendly-green-border: #cfe8d8;
  --mc-friendly-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 18px 52px rgba(15, 23, 42, .07);
  --mc-friendly-shadow-hover: 0 3px 10px rgba(15, 23, 42, .06), 0 24px 64px rgba(15, 23, 42, .09);
}

/* Keep the public site bright and remove decorative overlays that can read as empty black panels. */
.mc-dev-hero {
  position: relative;
  overflow: clip !important;
  background:
    radial-gradient(circle at 82% 18%, rgba(35, 122, 75, .07), transparent 31%),
    linear-gradient(180deg, #fff 0%, color-mix(in oklab, var(--surface-2) 32%, white) 100%);
}
.mc-dev-hero::before,
.mc-dev-hero::after,
.mc-dev-hero-grid::before,
.mc-dev-hero-grid::after {
  content: none !important;
  display: none !important;
}

.mc-dev-hero-grid {
  grid-template-columns: minmax(0, .92fr) minmax(520px, 1.08fr) !important;
  gap: clamp(48px, 6vw, 84px) !important;
  align-items: center;
}
.mc-dev-hero-copy { max-width: 640px !important; }
.mc-dev-hero-copy h1 {
  max-width: 640px !important;
  font-size: clamp(44px, 4.3vw, 62px) !important;
  line-height: 1.01 !important;
  letter-spacing: -.052em !important;
  text-wrap: balance;
}
.mc-dev-hero-copy > p {
  max-width: 615px !important;
  color: color-mix(in oklab, var(--muted) 92%, var(--foreground));
  font-size: clamp(16px, 1.3vw, 18px) !important;
  line-height: 1.65 !important;
}
.mc-dev-hero .mc-hero-actions { gap: 10px; }
.mc-dev-hero-meta { max-width: 620px; }
.mc-dev-hero-meta span {
  background: rgba(255,255,255,.78) !important;
  border-color: color-mix(in oklab, var(--border) 88%, transparent) !important;
  color: color-mix(in oklab, var(--muted) 88%, var(--foreground)) !important;
  font-family: inherit !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 1px rgba(15, 23, 42, .025);
}
.mc-dev-hero-meta i {
  background: var(--mc-friendly-green) !important;
  box-shadow: 0 0 0 3px rgba(35, 122, 75, .10) !important;
}

/* Friendly product preview instead of a large dark code terminal. */
.mc-commerce-preview {
  width: 100%;
  max-width: 700px;
  justify-self: end;
  overflow: hidden;
  border: 1px solid color-mix(in oklab, var(--border-strong) 68%, var(--border));
  border-radius: 22px;
  background: rgba(255,255,255,.96);
  box-shadow: var(--mc-friendly-shadow);
}
.mc-commerce-preview-head {
  min-height: 76px;
  padding: 17px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fff, color-mix(in oklab, var(--surface-2) 45%, white));
}
.mc-commerce-preview-head > div { min-width: 0; }
.mc-commerce-preview-head small,
.mc-commerce-preview-head strong { display: block; }
.mc-commerce-preview-head small {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .02em;
}
.mc-commerce-preview-head strong {
  font-size: 15px;
  letter-spacing: -.015em;
}
.mc-commerce-live {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid var(--mc-friendly-green-border);
  border-radius: 999px;
  background: var(--mc-friendly-green-soft);
  color: var(--mc-friendly-green-strong);
  font-size: 11px;
  font-weight: 700;
}
.mc-commerce-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mc-friendly-green);
  box-shadow: 0 0 0 3px rgba(35, 122, 75, .10);
}
.mc-commerce-preview-main {
  padding: 20px;
  display: grid;
  gap: 14px;
  background: color-mix(in oklab, var(--surface-2) 36%, white);
}
.mc-commerce-order-card,
.mc-commerce-event-list {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
}
.mc-commerce-order-card { padding: 18px; }
.mc-commerce-order-top {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}
.mc-commerce-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--foreground);
}
.mc-commerce-icon.is-success {
  background: var(--mc-friendly-green-soft);
  color: var(--mc-friendly-green-strong);
}
.mc-commerce-order-top small {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 650;
}
.mc-commerce-order-top h3 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -.025em;
}
.mc-commerce-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--mc-friendly-green-soft);
  color: var(--mc-friendly-green-strong);
  font-size: 10.5px;
  font-weight: 720;
}
.mc-commerce-order-meta {
  margin-top: 17px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in oklab, var(--surface-2) 45%, white);
}
.mc-commerce-order-meta > div {
  min-width: 0;
  padding: 12px 13px;
  border-right: 1px solid var(--border);
}
.mc-commerce-order-meta > div:last-child { border-right: 0; }
.mc-commerce-order-meta span,
.mc-commerce-order-meta strong { display: block; min-width: 0; }
.mc-commerce-order-meta span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9.5px;
}
.mc-commerce-order-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
  font-weight: 680;
}
.mc-commerce-event-list { overflow: hidden; }
.mc-commerce-event {
  min-height: 64px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 20px;
  gap: 11px;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.mc-commerce-event:last-child { border-bottom: 0; }
.mc-commerce-event > span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--foreground);
}
.mc-commerce-event > span svg { width: 16px; height: 16px; }
.mc-commerce-event strong,
.mc-commerce-event small { display: block; }
.mc-commerce-event strong {
  font-size: 12.5px;
  letter-spacing: -.01em;
}
.mc-commerce-event small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.35;
}
.mc-commerce-event > svg { color: var(--mc-friendly-green); }
.mc-commerce-preview-foot {
  min-height: 58px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  border-top: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  font-size: 11px;
}
.mc-commerce-preview-foot strong { color: var(--foreground); font-weight: 700; }
.mc-commerce-preview-foot svg { color: color-mix(in oklab, var(--muted) 70%, transparent); }

/* Give the homepage cards more shape and rhythm. */
.mc-dev-primitives-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 14px !important;
  overflow: visible !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.mc-dev-primitive {
  grid-column: span 2;
  min-width: 0;
  min-height: 238px !important;
  padding: 24px !important;
  border: 1px solid var(--border) !important;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03), 0 12px 30px rgba(15, 23, 42, .035);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.mc-dev-primitive:nth-child(4),
.mc-dev-primitive:nth-child(5) { grid-column: span 3; }
.mc-dev-primitive:hover {
  transform: translateY(-2px);
  border-color: color-mix(in oklab, var(--border-strong) 78%, var(--border)) !important;
  box-shadow: var(--mc-friendly-shadow-hover);
}
.mc-dev-primitive > span {
  border-radius: 11px !important;
  background: color-mix(in oklab, var(--mc-friendly-green-soft) 70%, white) !important;
  color: var(--mc-friendly-green-strong);
}
.mc-dev-primitive code {
  color: color-mix(in oklab, var(--muted) 82%, var(--foreground)) !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.mc-dev-primitive h3 { font-size: 18px !important; }
.mc-dev-primitive p { font-size: 14px !important; line-height: 1.62 !important; }

/* Architecture stays technical but not severe. */
.mc-architecture {
  border-radius: 20px !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03), 0 18px 48px rgba(15, 23, 42, .05);
}
.mc-arch-node.dark {
  background: var(--mc-friendly-green-soft) !important;
  color: #173824 !important;
  border-color: var(--mc-friendly-green-border) !important;
  box-shadow: none !important;
}
.mc-arch-node.dark span { color: #5d7466 !important; }
.mc-arch-label { color: color-mix(in oklab, var(--muted) 88%, var(--foreground)); }

/* Make the integration section feel like an inviting setup guide instead of a dark terminal wall. */
.mc-dev-quickstart {
  background: linear-gradient(180deg, #f4f8f5, #edf5ef) !important;
  color: var(--foreground) !important;
  border-top: 1px solid var(--mc-friendly-green-border);
  border-bottom: 1px solid var(--mc-friendly-green-border);
}
.mc-dev-quickstart .mc-eyebrow { color: var(--muted) !important; }
.mc-dev-quickstart .mc-text-link { color: var(--foreground) !important; }
.mc-dev-quickstart p { color: var(--muted) !important; }
.mc-dev-quickstart-steps {
  gap: 10px !important;
  overflow: visible !important;
  border: 0 !important;
  background: transparent !important;
}
.mc-dev-quickstart-steps article {
  border: 1px solid rgba(35, 122, 75, .14);
  border-radius: 14px;
  background: rgba(255,255,255,.9) !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .025);
}
.mc-dev-quickstart-steps article > span { color: var(--muted) !important; }
.mc-dev-quickstart-steps h3 { color: var(--foreground) !important; }
.mc-dev-quickstart-steps p { color: var(--muted) !important; }
.mc-dev-quickstart-steps code {
  padding: 7px 9px;
  border: 1px solid var(--mc-friendly-green-border);
  border-radius: 8px;
  background: var(--mc-friendly-green-soft);
  color: var(--mc-friendly-green-strong) !important;
  white-space: nowrap;
}

/* Feature grids should read as individual product cards on every device. */
.mc-feature-grid {
  gap: 14px !important;
  overflow: visible !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.mc-feature-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.mc-feature-grid.five { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
.mc-feature-grid.five .mc-feature { grid-column: span 2; }
.mc-feature-grid.five .mc-feature:nth-child(4),
.mc-feature-grid.five .mc-feature:nth-child(5) { grid-column: span 3; }
.mc-feature {
  min-width: 0;
  min-height: 230px !important;
  padding: 26px !important;
  border: 1px solid var(--border) !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03), 0 12px 30px rgba(15, 23, 42, .035);
}
.mc-feature-icon {
  border-radius: 11px !important;
  background: color-mix(in oklab, var(--mc-friendly-green-soft) 68%, white) !important;
  color: var(--mc-friendly-green-strong);
}
.mc-feature h3 { font-size: 18px !important; }
.mc-feature p { font-size: 14px !important; line-height: 1.62 !important; }

.mc-home-resource-grid > a {
  border-radius: 18px !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03), 0 16px 40px rgba(15, 23, 42, .045) !important;
}
.mc-home-resource-grid > a > div {
  border-radius: 12px !important;
  background: color-mix(in oklab, var(--mc-friendly-green-soft) 66%, white) !important;
  color: var(--mc-friendly-green-strong);
}
.mc-home-resource-grid > a:hover { box-shadow: var(--mc-friendly-shadow-hover) !important; }

.mc-cta {
  background: linear-gradient(180deg, #fff, color-mix(in oklab, var(--surface-2) 44%, white));
}

/* Slightly tighter desktop navigation now that Product is visible. */
.mc-desktop-nav { gap: clamp(18px, 1.8vw, 26px) !important; }
.mc-desktop-nav a { white-space: nowrap; }

@media (max-width: 1160px) {
  .mc-dev-hero-grid {
    grid-template-columns: minmax(0, .9fr) minmax(460px, 1.1fr) !important;
    gap: 42px !important;
  }
  .mc-commerce-preview { max-width: 640px; }
}

@media (max-width: 1020px) {
  .mc-dev-hero-grid,
  .mc-infrastructure .mc-two-col,
  .mc-dev-quickstart-grid {
    grid-template-columns: 1fr !important;
  }
  .mc-dev-hero-copy { max-width: 740px !important; }
  .mc-dev-hero-copy h1 { max-width: 700px !important; }
  .mc-commerce-preview,
  .mc-architecture { max-width: 760px; justify-self: start; }
  .mc-dev-primitives-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .mc-dev-primitive,
  .mc-dev-primitive:nth-child(4),
  .mc-dev-primitive:nth-child(5) { grid-column: auto; }
  .mc-dev-primitive:last-child { grid-column: 1 / -1; }
  .mc-feature-grid.five { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .mc-feature-grid.five .mc-feature,
  .mc-feature-grid.five .mc-feature:nth-child(4),
  .mc-feature-grid.five .mc-feature:nth-child(5) { grid-column: auto; }
  .mc-feature-grid.five .mc-feature:last-child { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .mc-dev-hero { padding-top: 42px !important; }
  .mc-dev-hero-copy h1 {
    font-size: clamp(36px, 10.5vw, 48px) !important;
    line-height: 1.02 !important;
  }
  .mc-dev-hero-copy > p { font-size: 16px !important; line-height: 1.6 !important; }
  .mc-commerce-preview { border-radius: 18px; }
  .mc-commerce-preview-head { min-height: 68px; padding: 14px 15px; }
  .mc-commerce-preview-main { padding: 14px; }
  .mc-commerce-order-card { padding: 15px; }
  .mc-commerce-order-meta { grid-template-columns: 1fr; }
  .mc-commerce-order-meta > div { border-right: 0; border-bottom: 1px solid var(--border); }
  .mc-commerce-order-meta > div:last-child { border-bottom: 0; }
  .mc-commerce-order-meta strong { white-space: normal; }
  .mc-commerce-preview-foot { justify-content: flex-start; padding-inline: 15px; }
  .mc-dev-primitives-grid,
  .mc-feature-grid.three,
  .mc-feature-grid.five,
  .mc-home-resource-grid { grid-template-columns: 1fr !important; }
  .mc-dev-primitive,
  .mc-dev-primitive:last-child,
  .mc-feature-grid.five .mc-feature,
  .mc-feature-grid.five .mc-feature:last-child { grid-column: auto !important; }
  .mc-dev-primitive,
  .mc-feature { min-height: 0 !important; }
  .mc-dev-quickstart-steps article {
    grid-template-columns: 34px minmax(0, 1fr) !important;
    gap: 12px !important;
  }
  .mc-dev-quickstart-steps code {
    grid-column: 2;
    justify-self: start;
    max-width: 100%;
    overflow-x: auto;
  }
  .mc-home-resource-grid > a { min-height: 0 !important; }
}

@media (max-width: 520px) {
  .mc-commerce-preview-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .mc-commerce-order-top {
    grid-template-columns: 40px minmax(0, 1fr);
  }
  .mc-commerce-badge {
    grid-column: 2;
    justify-self: start;
  }
  .mc-commerce-event {
    grid-template-columns: 34px minmax(0, 1fr) 18px;
    padding: 11px 12px;
  }
  .mc-commerce-preview-foot svg { display: none; }
  .mc-commerce-preview-foot {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3px;
  }
  .mc-dev-quickstart-steps article { padding: 14px !important; }
  .mc-dev-quickstart-steps code { font-size: 10px !important; }
}

@media (max-width: 380px) {
  .mc-dev-hero-copy h1 { font-size: 34px !important; }
  .mc-commerce-preview-main { padding: 10px; }
  .mc-commerce-order-card { padding: 13px; }
  .mc-commerce-event { grid-template-columns: 32px minmax(0, 1fr); }
  .mc-commerce-event > svg { display: none; }
  .mc-commerce-event > span { width: 32px; height: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .mc-dev-primitive,
  .mc-feature,
  .mc-home-resource-grid > a { transition: none !important; }
}
