/* Public-site readability pass.
   Loaded after the existing public styles so the product stays visually consistent
   while using a calmer, easier-to-scan type scale on every screen size. */

/* Shared public typography */
.mc-dev-hero-copy h1,
.v2-hero h1,
.devhub-hero h1,
.sec-hero h1 {
  font-size: clamp(40px, 4.15vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.048em;
  text-wrap: balance;
}

.mc-section-heading {
  max-width: 760px;
}

.mc-section-heading h2 {
  margin-top: 14px;
  font-size: clamp(30px, 3.15vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.042em;
  text-wrap: balance;
}

.mc-section-heading > p {
  max-width: 700px;
  font-size: 15.5px;
  line-height: 1.65;
}

.v2-hero > .mc-shell,
.devhub-hero > .mc-shell,
.sec-hero > .mc-shell {
  min-width: 0;
}

.v2-hero p,
.devhub-hero p,
.sec-hero p {
  font-size: 16px;
  line-height: 1.65;
}

/* Homepage hero */
.mc-dev-hero {
  padding: clamp(64px, 6vw, 78px) 0 28px;
}

.mc-dev-hero-grid {
  grid-template-columns: minmax(0, 0.94fr) minmax(460px, 1.06fr);
  gap: clamp(42px, 5.5vw, 72px);
}

.mc-dev-hero-copy {
  min-width: 0;
  max-width: 620px;
}

.mc-dev-hero-copy h1 {
  max-width: 620px;
  margin: 16px 0 18px;
}

.mc-dev-hero-copy > p {
  max-width: 600px;
  font-size: clamp(16px, 1.25vw, 17px);
  line-height: 1.62;
  letter-spacing: -0.008em;
}

.mc-dev-hero .mc-hero-actions {
  margin-top: 26px;
}

.mc-dev-hero .mc-button {
  min-height: 44px;
}

.mc-dev-hero .mc-tertiary {
  margin-top: 17px;
}

.mc-dev-hero-meta {
  margin-top: 18px;
}

.mc-dev-hero-meta span {
  padding: 6px 9px;
  font-size: 11px;
}

.mc-terminal {
  width: 100%;
  max-width: 660px;
  justify-self: end;
  border-radius: 14px;
}

.mc-terminal-top {
  min-height: 48px;
}

.mc-terminal-code {
  min-height: 282px;
  padding: 22px 22px 20px;
  font-size: 12px;
  line-height: 1.72;
}

.mc-terminal-status {
  min-height: 50px;
}

/* Keep homepage sections substantial without letting headings dominate the viewport. */
.mc-dev-primitives,
.mc-infrastructure,
.mc-dev-quickstart,
.mc-connected,
.mc-reliability,
.mc-home-resources {
  padding-top: clamp(64px, 6.5vw, 88px);
  padding-bottom: clamp(64px, 6.5vw, 88px);
}

.mc-dev-primitives-grid {
  margin-top: 36px;
}

.mc-dev-primitive {
  min-height: 218px;
  padding: 22px 20px;
}

.mc-dev-primitive code {
  margin-top: 24px;
}

.mc-dev-primitive h3 {
  font-size: 16px;
}

.mc-dev-primitive p {
  font-size: 13px;
  line-height: 1.6;
}

.mc-infrastructure .mc-two-col {
  grid-template-columns: minmax(0, 0.92fr) minmax(460px, 1.08fr);
  gap: clamp(44px, 6vw, 78px);
  align-items: center;
}

.mc-infrastructure .mc-section-heading {
  max-width: 650px;
}

.mc-concepts {
  margin-top: 30px;
}

.mc-concept h3 {
  font-size: 16px;
}

.mc-concept p {
  font-size: 13.5px;
  line-height: 1.58;
}

.mc-architecture {
  width: 100%;
  max-width: 680px;
  justify-self: end;
}

.mc-dev-quickstart-grid {
  gap: clamp(44px, 6vw, 78px);
}

.mc-dev-quickstart h2 {
  max-width: 520px;
  font-size: clamp(30px, 3.15vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.042em;
  text-wrap: balance;
}

.mc-dev-quickstart p {
  font-size: 15px;
  line-height: 1.65;
}

.mc-dev-quickstart-steps article {
  padding: 17px 18px;
}

.mc-home-resource-grid,
.mc-feature-grid {
  margin-top: 36px;
}

.mc-cta-inner h2 {
  font-size: clamp(30px, 3.15vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.042em;
  text-wrap: balance;
}

/* Other public landing heroes should use the same calmer scale. */
.devhub-hero,
.sec-hero {
  padding-top: clamp(64px, 6vw, 78px);
  padding-bottom: clamp(58px, 5.5vw, 72px);
}

@media (max-width: 1180px) {
  .mc-dev-hero-grid {
    grid-template-columns: minmax(0, 0.92fr) minmax(430px, 1.08fr);
    gap: 42px;
  }

  .mc-terminal {
    max-width: 620px;
  }

  .mc-infrastructure .mc-two-col {
    grid-template-columns: minmax(0, 1fr) minmax(430px, 1fr);
    gap: 42px;
  }
}

@media (max-width: 1040px) {
  .mc-dev-hero {
    padding-top: 58px;
  }

  .mc-dev-hero-grid,
  .mc-infrastructure .mc-two-col {
    grid-template-columns: 1fr;
  }

  .mc-dev-hero-copy {
    max-width: 720px;
  }

  .mc-dev-hero-copy h1 {
    max-width: 700px;
  }

  .mc-terminal,
  .mc-architecture {
    max-width: 760px;
    justify-self: start;
  }

  .mc-infrastructure .mc-section-heading {
    max-width: 720px;
  }

  .mc-dev-quickstart-grid {
    gap: 38px;
  }
}

@media (max-width: 760px) {
  .mc-dev-hero {
    padding: 46px 0 20px;
  }

  .mc-dev-hero-copy h1,
  .v2-hero h1,
  .devhub-hero h1,
  .sec-hero h1 {
    font-size: clamp(34px, 9.5vw, 42px);
    line-height: 1.04;
    letter-spacing: -0.045em;
  }

  .mc-dev-hero-copy > p,
  .v2-hero p,
  .devhub-hero p,
  .sec-hero p {
    font-size: 16px;
    line-height: 1.58;
  }

  .mc-section-heading h2,
  .mc-dev-quickstart h2,
  .mc-cta-inner h2 {
    font-size: clamp(28px, 7.8vw, 36px);
    line-height: 1.1;
    letter-spacing: -0.04em;
  }

  .mc-section-heading > p,
  .mc-dev-quickstart p {
    font-size: 15px;
    line-height: 1.62;
  }

  .mc-dev-hero .mc-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
    width: 100%;
    max-width: 420px;
  }

  .mc-dev-hero .mc-button {
    width: 100%;
    justify-content: center;
  }

  .mc-terminal {
    border-radius: 12px;
  }

  .mc-terminal-code {
    padding: 18px 16px;
    font-size: 11px;
    line-height: 1.65;
  }

  .mc-terminal-status {
    padding: 0 14px;
    font-size: 10px;
  }

  .mc-dev-primitives,
  .mc-infrastructure,
  .mc-dev-quickstart,
  .mc-connected,
  .mc-reliability,
  .mc-home-resources {
    padding-top: 58px;
    padding-bottom: 58px;
  }

  .mc-dev-primitives-grid,
  .mc-home-resource-grid,
  .mc-feature-grid {
    margin-top: 28px;
  }

  .mc-dev-quickstart-steps article {
    padding: 16px;
  }

  .mc-architecture {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .mc-dev-primitives-grid {
    grid-template-columns: 1fr;
  }

  .mc-dev-primitive,
  .mc-dev-primitive:nth-child(2n) {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .mc-dev-primitive:last-child {
    border-bottom: 0;
  }

  .mc-arch-split {
    grid-template-columns: 1fr;
  }

  .mc-arch-branches {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mc-arch-branches span:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .mc-dev-hero {
    padding-top: 40px;
  }

  .mc-dev-hero-copy h1,
  .v2-hero h1,
  .devhub-hero h1,
  .sec-hero h1 {
    font-size: clamp(32px, 9vw, 38px);
  }

  .mc-dev-hero-meta {
    gap: 6px;
  }

  .mc-dev-hero-meta span {
    font-size: 10.5px;
  }

  .mc-terminal-top {
    min-height: 44px;
    padding-inline: 14px;
  }

  .mc-terminal-tabs span:last-child,
  .mc-terminal-status > span {
    display: none;
  }

  .mc-terminal-code {
    font-size: 10.5px;
  }

  .mc-arch-node {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .mc-arch-node span {
    text-align: left;
  }
}

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