/* Deploy — deliberate touch states, with native scrolling kept intact. */
@media (max-width: 767px) {
  html.dp-mobile-experience { -webkit-tap-highlight-color: transparent; }
  html.dp-mobile-experience a,
  html.dp-mobile-experience button { touch-action: manipulation; }

  .dp-mobile-case-guide {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto 44px;
    align-items: center;
    min-height: 58px;
    margin: 0 0 14px;
    overflow: hidden;
    border: 1px solid rgba(135, 240, 240, .24);
    border-radius: 14px;
    background: linear-gradient(115deg, rgba(7, 23, 27, .96), rgba(8, 38, 42, .84));
    box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
  }
  .dp-mobile-case-guide__button {
    width: 44px;
    min-width: 44px;
    min-height: 56px;
    padding: 0;
    border: 0;
    border-inline-end: 1px solid rgba(135, 240, 240, .16);
    background: transparent;
    color: #dfffff;
    font-size: 18px;
    line-height: 1;
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
  }
  .dp-mobile-case-guide__button:last-child { border-inline: 1px solid rgba(135, 240, 240, .16) 0; }
  .dp-mobile-case-guide__button:not(:disabled):active { background: var(--dp-cyan, #00ffff); color: #061014; transform: scale(.94); }
  .dp-mobile-case-guide__button:disabled { opacity: .26; }
  .dp-mobile-case-guide__status { min-width: 0; padding: 8px 12px; }
  .dp-mobile-case-guide__status span,
  .dp-mobile-case-guide__count { display: block; color: rgba(227, 255, 255, .64); font-family: var(--font-mono, ui-monospace, monospace); font-size: 8px; font-weight: 700; letter-spacing: .13em; line-height: 1.2; }
  .dp-mobile-case-guide__status strong { display: block; overflow: hidden; margin-top: 3px; color: #f5ffff; font-family: var(--font-display, Inter, sans-serif); font-size: 13px; font-weight: 600; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
  .dp-mobile-case-guide__count { padding: 0 10px 0 0; white-space: nowrap; }
  .dp-mobile-case-guide__count b { color: var(--dp-cyan, #00ffff); font-size: 11px; }
  .dp-mobile-case-guide__count i { padding-inline: 2px; color: rgba(227, 255, 255, .34); font-style: normal; }

  .dp-projects--stacked .dp-project-card {
    border-color: rgba(156, 236, 236, .22);
    box-shadow: 0 15px 38px rgba(0, 0, 0, .3);
    transition: border-color .35s ease, box-shadow .35s ease;
  }
  .dp-projects--stacked .dp-project-card::after {
    position: absolute;
    z-index: 3;
    top: 0;
    right: 12%;
    left: 12%;
    height: 2px;
    background: var(--dp-cyan, #00ffff);
    box-shadow: 0 0 16px rgba(0, 255, 255, .7);
    content: "";
    opacity: 0;
    transform: scaleX(.3);
    transform-origin: center;
    transition: opacity .35s ease, transform .45s cubic-bezier(.16, 1, .3, 1);
  }
  .dp-projects--stacked .dp-project-card .dp-project-card__media img {
    transform: scale(1.005);
    filter: saturate(.78) contrast(.96);
    transition: transform .7s cubic-bezier(.16, 1, .3, 1), filter .5s ease;
  }
  .dp-projects--stacked .dp-project-card.is-current {
    border-color: rgba(0, 255, 255, .7);
    box-shadow: 0 20px 52px rgba(0, 0, 0, .36), 0 0 0 1px rgba(0, 255, 255, .08);
  }
  .dp-projects--stacked .dp-project-card.is-current::after { opacity: 1; transform: scaleX(1); }
  .dp-projects--stacked .dp-project-card.is-current .dp-project-card__media img { transform: scale(1.035); filter: saturate(1.04) contrast(1.02); }
  .dp-projects--stacked .dp-project-card.is-touching .dp-project-card__media img { transform: scale(1.015); }
  .dp-projects--stacked .dp-projects__progress { display: flex; justify-content: center; gap: 8px; margin-top: 3px; padding: 5px 0 0; }
  .dp-projects--stacked .dp-projects__progress span { width: 22px; border-radius: 999px; }

  #servicos .dp-service-row {
    position: relative;
    overflow: hidden;
    touch-action: manipulation;
    transition: background-color .22s ease, padding-inline .22s ease;
  }
  #servicos .dp-service-row::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--dp-cyan, #00ffff);
    content: "";
    opacity: 0;
    transform: scaleY(.25);
    transform-origin: center;
    transition: opacity .22s ease, transform .28s cubic-bezier(.16, 1, .3, 1);
  }
  #servicos .dp-service-row:is(:active, .is-touching) { padding-inline: 5px 0; background: rgba(0, 143, 148, .055); }
  #servicos .dp-service-row:is(:active, .is-touching)::before { opacity: 1; transform: scaleY(1); }
  #servicos .dp-service-row:is(:active, .is-touching) h3 { color: #008c91; }
  #servicos .dp-service-row h3 { transition: color .2s ease; }

  .dp-projects--stacked .dp-projects__cta-button:active { transform: translateY(1px) scale(.98); background: #f4ffff; }
  #contato a:active, #contato button:active { transform: scale(.985); }
}

/* On phones with enough vertical room, preserve the desktop scroll-led stack. */
@media (max-width: 767px) and (min-height: 561px) {
  .dp-projects--stacked.is-mobile-stack .dp-projects__frame { height: 420vh; height: 420svh; }
  .dp-projects--stacked.is-mobile-stack .dp-mobile-case-guide {
    position: sticky;
    top: 78px;
    z-index: 20;
  }
  .dp-projects--stacked.is-mobile-stack .dp-projects__stage {
    display: block;
    position: sticky;
    top: 150px;
    height: min(calc(100vh - 170px), calc(125vw - 60px));
    height: min(calc(100svh - 170px), calc(125vw - 60px));
    min-height: 0;
    overflow: hidden;
    perspective: 1200px;
  }
  .dp-projects--stacked.is-mobile-stack .dp-projects__stack { position: absolute; inset: 0; display: block; }
  .dp-projects--stacked.is-mobile-stack .dp-project-card { position: absolute; inset: 0; min-height: 0; aspect-ratio: auto; }
  .dp-projects--stacked.is-mobile-stack .dp-project-card:nth-child(1) { z-index: 1; }
  .dp-projects--stacked.is-mobile-stack .dp-project-card:nth-child(2) { z-index: 2; }
  .dp-projects--stacked.is-mobile-stack .dp-project-card:nth-child(3) { z-index: 3; }
  .dp-projects--stacked.is-mobile-stack .dp-project-card:nth-child(4) { z-index: 4; }
  .dp-projects--stacked.is-mobile-stack .dp-project-card:nth-child(5) { z-index: 5; }
}

@media (prefers-reduced-motion: reduce) {
  .dp-mobile-case-guide *,
  .dp-projects--stacked .dp-project-card,
  .dp-projects--stacked .dp-project-card *,
  #servicos .dp-service-row,
  #servicos .dp-service-row * { transition-duration: .01ms !important; }
}
