/* Keep the mobile hero compact while leaving space for its mascot and actions. */
.dp-mobile-hero-lead { display: none; }

@media (max-width: 767px) {
  /* The original mascot and interactions stay intact; only their phone layout changes. */
  #inicio.dp-hero {
    display: block;
    min-height: 0;
    height: auto;
    padding: 0;
  }
  /* Match the mascot video's cyan backdrop so its top edge has no visible band. */
  #inicio.dp-hero,
  #inicio .dp-hero-art,
  #inicio .dp-hero-mascot__viewport { background-color: #00cefe; }
  #inicio.dp-hero::before {
    width: 100%;
    background: linear-gradient(to bottom, transparent 0%, transparent 20%, rgba(3, 12, 14, .83) 39%, #030608 55%);
  }
  #inicio .dp-hero-mascot__viewport video {
    top: 52px;
    right: auto;
    left: 50%;
    width: max(100vw, min(128vw, 620px));
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transform: translateX(-50%) scale(1.001);
    -webkit-mask-image: linear-gradient(#000 0% 82%, transparent 100%);
    mask-image: linear-gradient(#000 0% 82%, transparent 100%);
  }
  #inicio .dp-hero__inner {
    display: block;
    width: min(calc(100% - 48px), 420px);
    max-width: none;
    margin-inline: auto;
    padding: clamp(302px, 83vw, 390px) 0 42px;
  }
  #inicio .dp-hero__copy {
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
    text-align: center;
  }
  #inicio h1 {
    max-width: 100%;
    margin: 0 auto 22px;
    font-size: clamp(28px, 7.5vw, 32px);
    font-weight: 550;
    line-height: 1.15;
    letter-spacing: -.04em;
    white-space: normal;
    text-wrap: balance;
  }
  #inicio .dp-hero__line { overflow: visible; padding: 0; white-space: normal; }
  #inicio .dp-hero__line:not(.dp-hero__line--accent),
  #inicio .dp-hero__line:not(.dp-hero__line--accent) > span { display: inline; white-space: normal; }
  #inicio .dp-hero__line:first-child::after { content: ' '; white-space: pre; }
  #inicio .dp-hero__line--accent,
  #inicio .dp-hero__line--accent > span { display: block; white-space: normal; }
  #inicio .dp-hero__line--accent > span {
    font-size: clamp(19px, 6.5vw, 30px);
    white-space: nowrap;
    text-wrap: nowrap;
  }
  #inicio .dp-hero__lead {
    max-width: min(100%, 350px);
    margin: 0 auto;
    font-size: 15px;
    line-height: 1.55;
    text-align: center;
  }
  #inicio .dp-hero__copy.has-mobile-hero-copy > .dp-hero__lead:not(.dp-mobile-hero-lead) { display: none; }
  #inicio .dp-hero__copy.has-mobile-hero-copy > .dp-mobile-hero-lead { display: block; }
  #inicio .dp-hero__actions {
    display: grid;
    width: 100%;
    gap: 14px;
    margin-top: 28px;
  }
  #inicio .dp-hero__actions .dp-button {
    display: flex;
    width: 100%;
    min-height: 56px;
    align-items: center;
    justify-content: center;
    gap: 12px;
  }
  #inicio .dp-hero__actions .dp-button:not(.dp-button--primary) { border-color: rgba(222, 255, 255, .48); }
  .dp-header__inner { width: calc(100% - 48px); }
  .dp-menu-toggle { display: flex; width: 48px; min-width: 48px; height: 48px; align-items: center; justify-content: center; }

  /* Keep the lead to the left and let the services scroll beside it, just as
     in the desktop sequence. The existing scroll highlight remains intact. */
  #servicos[data-deploy-services-deck="ready"] .dp-services-deck {
    grid-template-columns: minmax(0, 43%) minmax(0, 1fr);
    gap: 3%;
    align-items: start;
  }
  #servicos[data-deploy-services-deck="ready"] .dp-services-deck__intro {
    top: calc(52svh - 14px);
    padding: 0;
    text-align: left;
    background: transparent;
    pointer-events: none;
  }
  #servicos[data-deploy-services-deck="ready"] .dp-services-deck__heading {
    text-align: left;
    font-size: clamp(17px, 5.5vw, 38px);
    text-shadow: 0 2px 20px #071115;
  }
  #servicos[data-deploy-services-deck="ready"] .dp-services-deck__item {
    align-items: flex-start;
    text-align: left;
  }
  #servicos[data-deploy-services-deck="ready"] .dp-services-deck__item h3 {
    width: 100%;
    text-align: left;
    font-size: clamp(19px, 5.8vw, 42px);
  }
  #servicos[data-deploy-services-deck="ready"] .dp-services-deck__item .dp-services-deck__link {
    transform-origin: left center;
  }

  /* Bring the opening line closer to the first timeline entry. */
  .dp-journey__heading { min-height: 50svh; padding-block: 80px 20px; }
  .dp-journey__sequence { margin-top: -37svh; }

  #inicio h1,
  #sobre .dp-manifesto__title,
  .dp-idea-highlight__title,
  .dp-journey__heading h2,
  #faq-title,
  #contact-title { text-align: center; }
}

/* Longer translated first steps need a little more room on narrow phones. */
@media (max-width: 360px) and (min-height: 561px) {
  .dp-journey__sequence { margin-top: -31svh; }
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce),
       (max-width: 767px) and (max-height: 560px) {
  #servicos[data-deploy-services-deck="ready"] .dp-services-deck__intro { position: static; }
  .dp-journey__sequence { margin-top: 0; }
}
