/* =========================================================
   V31 — correções finas após revisão visual
   ========================================================= */

/* 1) CASES: remover faixa clara e bordas da fita */
.projects.cases .case-ribbon-wrap {
  padding-top: 0 !important;
  margin-top: 0 !important;
  background: linear-gradient(90deg, rgba(19,53,77,.98) 0%, rgba(30,76,105,.96) 52%, rgba(19,53,77,.98) 100%) !important;
  border: 0 !important;
  box-shadow: none !important;
}

.projects.cases .case-ribbon {
  min-height: clamp(132px, 12vw, 170px);
  padding-top: clamp(1.15rem, 2vw, 1.55rem) !important;
  padding-bottom: clamp(1.15rem, 2vw, 1.55rem) !important;
  border: 0 !important;
  background: transparent !important;
}

.projects.cases .case-ribbon__hint {
  margin: 0 auto .7rem !important;
  padding-top: .85rem;
}

.projects.cases .case-stage {
  margin-top: 0 !important;
}

@media (max-width: 720px) {
  .projects.cases .case-ribbon-wrap {
    margin-bottom: 0 !important;
  }

  .projects.cases .case-ribbon__hint {
    width: min(calc(100vw - 32px), 1140px) !important;
    margin-bottom: .65rem !important;
    padding-top: .72rem;
  }

  .projects.cases .case-ribbon {
    min-height: 110px;
    padding: .95rem 16px 1rem !important;
  }
}

/* 2) ORIGEM mobile: pergunta centralizada sobre a imagem */
@media (max-width: 720px) {
  .origin-story,
  .origin-story__sticky,
  .origin-story__stage {
    position: relative;
  }

  .origin-story__stage {
    min-height: 100svh;
  }

  .origin-story__image,
  .origin-story__image picture,
  .origin-story__image img {
    height: 100%;
  }

  .origin-story__image img {
    object-position: center center !important;
  }

  .origin-story__question {
    position: absolute !important;
    top: 34% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    width: calc(100vw - 48px) !important;
    max-width: 320px;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .12rem;
    transform: translate(-50%, -50%) !important;
    text-align: center !important;
    z-index: 8 !important;
    pointer-events: none;
  }

  .origin-story__question > span {
    display: block;
    width: 100%;
    white-space: nowrap;
  }

  .origin-story__word {
    top: 63% !important;
    left: 50% !important;
    width: calc(100vw - 26px) !important;
    transform: translate(-50%, -50%) !important;
    text-align: center;
    font-size: clamp(5.3rem, 26vw, 7.5rem) !important;
    line-height: .84 !important;
    z-index: 7 !important;
  }
}

/* 3) METODOLOGIA mobile: círculos mais centrados e texto dentro */
@media (max-width: 720px) {
  .method-cycle__mobile {
    width: min(100%, 326px) !important;
    height: 326px !important;
  }

  .method-mobile-routes {
    inset: 6px !important;
    width: calc(100% - 12px) !important;
    height: calc(100% - 12px) !important;
  }

  .method .method-cycle__mobile .method-mobile-node {
    width: 104px !important;
    height: 104px !important;
    min-width: 104px !important;
    min-height: 104px !important;
    padding: .52rem !important;
    gap: .12rem !important;
  }

  .method .method-cycle__mobile .method-mobile-node strong {
    max-width: 5.4ch !important;
    font-size: .72rem !important;
    line-height: .95 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    hyphens: auto !important;
  }

  .method .method-cycle__mobile .method-mobile-node span {
    margin-bottom: .08rem;
  }

  .method-mobile-node--attraction {
    top: 2px !important;
  }

  .method-mobile-node--confirmation {
    right: 6px !important;
    top: 180px !important;
  }

  .method-mobile-node--permanence {
    left: 6px !important;
    top: 180px !important;
  }

  .method-cycle__mobile-note {
    top: 145px !important;
    width: 120px !important;
  }
}

@media (max-width: 430px) {
  .method-cycle__mobile {
    width: min(100%, 312px) !important;
    height: 312px !important;
  }

  .method .method-cycle__mobile .method-mobile-node {
    width: 100px !important;
    height: 100px !important;
    min-width: 100px !important;
    min-height: 100px !important;
  }

  .method .method-cycle__mobile .method-mobile-node strong {
    max-width: 5.1ch !important;
    font-size: .69rem !important;
  }

  .method-mobile-node--confirmation {
    right: 4px !important;
    top: 174px !important;
  }

  .method-mobile-node--permanence {
    left: 4px !important;
    top: 174px !important;
  }

  .method-cycle__mobile-note {
    top: 139px !important;
    width: 114px !important;
  }
}

/* 4) Serviços/Jornadas mobile: preservar cabeças */
@media (max-width: 720px) {
  .services .service-panel figure,
  .services .service-panel--reverse figure,
  .journey-card figure,
  .journey-card--reverse figure,
  .method .pillar-panel figure {
    aspect-ratio: 16 / 11.6 !important;
  }

  .services .service-panel figure img,
  .services .service-panel--reverse figure img,
  .journey-card figure img,
  .journey-card--reverse figure img,
  .method .pillar-panel figure img {
    object-position: center 4% !important;
  }
}

/* 5) Hero/problema mobile: evitar corte em "evoluiu" */
@media (max-width: 720px) {
  .problem-heading.problem-heading--centered .display-title {
    max-width: 8.9ch !important;
    font-size: clamp(2.02rem, 10vw, 3rem) !important;
    line-height: .93 !important;
  }

  .problem-heading.problem-heading--centered .display-title > span:first-child {
    white-space: nowrap !important;
  }

  .problem-details.problem-details--centered .problem-lead {
    max-width: 18.2em !important;
  }
}
