/* DAAT — polish mobile / tablet (carregado depois do CSS inline) */

@media (max-width: 900px) {
  :root {
    --maxw: calc(100% - 2.5rem);
    --page-gutter: 1.25rem;
  }

  html {
    font-size: 15px;
    overflow-x: clip;
  }

  body {
    overflow-x: clip;
    box-shadow: none;
  }

  .container {
    width: var(--maxw);
  }

  /* —— Nav: bandeiras alinhadas e com mesma altura do menu —— */
  .nav-outer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
    padding-bottom: 10px;
  }

  .nav-lang-bar {
    position: static;
    height: 44px;
    flex-shrink: 0;
    align-items: center;
    gap: 8px;
  }

  .nav-lang-btn {
    width: 44px;
    height: 44px;
    padding: 6px;
    border-radius: 12px;
    box-sizing: border-box;
  }

  .nav-lang-flag {
    width: 28px;
    height: auto;
  }

  .nav-wrap {
    align-items: center;
    margin-left: auto;
  }

  .nav-burger {
    width: 44px;
    height: 44px;
  }

  .section-head {
    max-width: none;
    margin-bottom: 1.75rem;
  }

  .section-head h2,
  .section-head h2 strong,
  .scroll-title-container h3,
  .scroll-title-container h3 strong,
  #servicos .section-head .serv-lead-line,
  .feature-title,
  .phase6-title,
  .contato-glass-title,
  .planos-glass-inner .section-head h2 {
    white-space: normal !important;
  }

  .section-head h2,
  .scroll-title-container h3 {
    font-size: clamp(1.45rem, 5.6vw, 1.9rem);
    line-height: 1.15;
  }

  #servicos .section-head .serv-lead-line {
    display: inline;
  }

  .section-head p,
  .contato-glass-lead {
    max-width: none;
    font-size: 0.98rem;
    line-height: 1.45;
  }

  .services,
  .audience,
  .planos-grid {
    grid-template-columns: 1fr !important;
    gap: 0.9rem;
  }

  .card {
    border-radius: 1.35rem;
    padding: 1.2rem 1.25rem;
  }

  .servicos-linhas-grid {
    gap: 0.55rem;
  }

  .servicos-linha-link {
    font-size: 0.82rem;
    height: 2.45rem;
    padding: 0 0.95rem;
  }

  .planos-glass-shell,
  .contato-glass-shell {
    width: calc(100% - 1.5rem);
    border-radius: 1.35rem;
  }

  .planos-glass-inner,
  .contato-glass-content {
    padding: 1.35rem 1.15rem 1.2rem;
  }

  .contato-glass-title {
    font-size: clamp(1.2rem, 5.2vw, 1.65rem);
  }

  .form-grid {
    grid-template-columns: 1fr !important;
  }

  .notice,
  .footer-subtext {
    white-space: normal !important;
    max-width: none;
  }

  .footer-top {
    flex-direction: column;
    gap: 2rem;
  }

  .footer-left {
    width: 100% !important;
    min-width: 0 !important;
  }

  .footer-right {
    flex-wrap: wrap;
    gap: 1.5rem 2rem;
    padding-right: 0;
  }

  .footer-input-group {
    max-width: none;
    width: 100%;
  }

  /* Canais digitais — sem vazio enorme no mobile */
  .clients-container {
    margin-bottom: 7rem !important;
    overflow-x: clip;
  }

  .marquee-container {
    overflow: hidden;
    width: 100%;
  }

  /*
    Mobile/tablet: Vamos conversar no fluxo DEPOIS de Investimento
    (não sobe como overlay fixo antes dos planos).
  */
  .home-end-flow .glass-container,
  .glass-container {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    transform: none !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-top: none !important;
    z-index: 5 !important;
    pointer-events: auto !important;
    margin-top: 12vh;
    padding: 0 0 2.5rem;
  }

  .glass-gradient-wrapper {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    width: calc(100% - 1.5rem) !important;
    min-height: 0 !important;
    max-height: none !important;
    height: auto !important;
    margin: 0 auto;
    border-radius: 1.35rem !important;
  }

  .glass-gradient-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .gradient-content {
    position: relative !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 1.25rem 1.1rem 1.1rem !important;
    gap: 1rem !important;
  }

  .glass-container .form-grid input,
  .glass-container .form-grid select,
  .glass-container .form-grid textarea {
    font-size: 16px !important;
    min-height: 2.85rem;
  }

  .glass-container .form-grid textarea {
    min-height: 5.5rem;
  }

  .phase6-title {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    padding-left: 1.15rem !important;
    padding-right: 1.15rem !important;
  }
}

@media (max-width: 700px) {
  :root {
    --maxw: calc(100% - 2rem);
    --page-gutter: 1rem;
  }

  html {
    font-size: 16px;
  }

  body {
    box-shadow: none;
  }

  section {
    padding: 3.25rem 0;
  }

  body.subpage main.subpage-main {
    padding-top: 4.75rem;
  }

  /* Hero — sobe um pouco e respira nas laterais */
  .hero-copy {
    top: 48% !important;
    left: 1rem !important;
    right: 1rem !important;
    max-width: none !important;
    width: auto !important;
  }

  .hero-brand-mark-wrap {
    max-width: min(100%, 16.5rem);
    margin-bottom: 0.35rem;
  }

  .hero-brand-mark {
    width: 100%;
    height: auto;
  }

  /* Hero tipografia — proporção próxima da web, adaptada ao mobile */
  #animated-hero-title {
    font-size: clamp(2.55rem, 12vw, 3.25rem) !important;
    white-space: normal !important;
    line-height: 1.02 !important;
    letter-spacing: -0.025em;
  }

  .hero-title-lead {
    white-space: normal !important;
    display: block;
    margin-bottom: 0.12rem;
    /* Na web é ~0.42em do h1 (~2.3rem em desktop); no mobile sobe para ler forte */
    font-size: clamp(1.35rem, 6.2vw, 1.75rem) !important;
    font-weight: 200 !important;
    line-height: 1.08 !important;
    letter-spacing: -0.02em;
  }

  .hero-slide {
    font-size: clamp(1.85rem, 9.2vw, 2.65rem) !important;
    max-width: 100% !important;
    height: 1.35em !important;
    line-height: 1.35 !important;
  }

  .hero-slide-word {
    white-space: nowrap;
  }

  .hero-under-title {
    gap: 0.95rem;
    margin-top: 0.55rem;
    max-width: 100%;
    width: 100%;
    align-items: stretch;
  }

  .hero-under-title .lead {
    white-space: normal !important;
    font-size: 1rem !important;
    line-height: 1.45 !important;
    max-width: 34ch;
  }

  .hero-under-title .hero-actions {
    width: 100%;
    display: flex;
  }

  .hero-under-title .hi-btn,
  .services-wa-cta .hi-btn {
    width: 100%;
    max-width: 100%;
    justify-content: center;
    text-align: center;
    font-size: 0.88rem !important;
    padding: 1rem 1.15rem !important;
    letter-spacing: 0.05em;
    align-self: stretch;
    box-sizing: border-box;
  }

  /* Clientes / marquee */
  .clients-container {
    margin-bottom: 5.5rem !important;
  }

  .clients-subtitle {
    padding-left: 1rem !important;
    font-size: 0.8rem !important;
    letter-spacing: 0.04em;
  }

  .clients-container > .clients-line {
    margin-left: 1rem !important;
    margin-right: 1rem !important;
    margin-bottom: 1.5rem !important;
  }

  .marquee-logo {
    height: 2.2rem !important;
  }

  .marquee-content {
    gap: 2.25rem !important;
    padding-right: 2.25rem !important;
  }

  /* Scroll title + diffs */
  .scroll-title-container {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .scroll-title-container h3 {
    max-width: 100%;
  }

  .diff-dock-list {
    max-width: none !important;
    width: 100%;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-top: 1.35rem;
  }

  .diff-dock {
    font-size: 1rem !important;
    line-height: 1.4;
    margin-bottom: 0.65rem;
  }

  /* Frases / palavras Clarix — Planejamento / Conteúdo / Resultados */
  .flying-word {
    font-size: clamp(2.5rem, 13vw, 3.85rem) !important;
    max-width: calc(100vw - 1.5rem);
    text-align: center;
  }

  .feature-title {
    font-size: clamp(1.2rem, 5.4vw, 1.55rem) !important;
    white-space: normal !important;
    max-width: calc(100% - 1.5rem) !important;
    width: auto !important;
    line-height: 1.25 !important;
    overflow-wrap: normal;
    word-break: keep-all;
    hyphens: none;
  }

  .phase5-title-left {
    top: 66% !important;
    left: 50% !important;
    transform: translate(-50%, 0) !important;
    text-align: center !important;
    max-width: calc(100% - 1.5rem) !important;
  }

  .phase5-title-left .phase5-em {
    white-space: nowrap;
  }

  .phase6-title {
    font-size: clamp(1.35rem, 7vw, 2rem) !important;
    white-space: normal !important;
    padding: 0 1.15rem !important;
    box-sizing: border-box;
    line-height: 1.15 !important;
  }

  /* Cards de serviço / planos */
  .plano-card {
    padding: 1.35rem 1.2rem 1.25rem;
  }

  .plano-card--featured {
    transform: none;
  }

  .plano-popular {
    font-size: 0.7rem;
  }

  .plano-price {
    font-size: clamp(1.6rem, 8vw, 2.1rem);
  }

  .plano-features {
    margin-bottom: 1.1rem;
  }

  .services-wa-cta {
    margin-top: 1.25rem;
    padding: 0 0.25rem;
  }

  /*
    Em mobile os blocos finais cobriam a logo DAAT (z-index 5 > canvas 3).
    Ficam atrás do canvas até o JS liberar após a fase da logo.
  */
  .home-end-flow {
    z-index: 2;
    transition: opacity 0.35s ease;
  }
  .home-end-flow.is-logo-clear {
    z-index: 5;
  }

  #servicos {
    padding-top: 2rem !important;
  }

  #para-quem {
    margin-top: 8vh;
    padding-top: 1.5rem;
  }

  .home-end-flow #planos {
    margin-top: 8vh;
    padding-top: 2rem;
  }

  .home-end-flow .glass-container,
  .glass-container {
    margin-top: 8vh;
    padding: 0 0 2rem;
  }

  .gradient-content {
    padding: 1.35rem 1.15rem 1.2rem !important;
  }

  .contato-glass-head {
    gap: 0.55rem;
  }

  .contato-glass-badge {
    font-size: 0.72rem;
    letter-spacing: 0.06em;
  }

  .contato-glass-lead {
    font-size: 0.95rem !important;
  }

  #contato.contato-glass-section {
    padding: 2rem 0 3rem;
  }

  .contato-glass-shell .form-grid .btn-main,
  .glass-container .form-grid .btn-main {
    width: 100%;
    justify-content: center;
    text-align: center;
    min-height: 3rem;
    font-size: 0.92rem;
  }

  /* Footer */
  .glass-footer {
    padding: 1.35rem 1.15rem;
    border-radius: 1.35rem;
  }

  footer.site-footer {
    padding: 1.25rem 0.85rem calc(2rem + env(safe-area-inset-bottom, 0px));
  }

  .footer-col {
    min-width: 6.5rem;
  }

  .footer-heading {
    font-size: 1.05rem;
  }

  .footer-tagline {
    max-width: none;
    font-size: 0.92rem;
  }

  .footer-input-group {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    width: 100%;
  }

  .footer-input {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 16px !important;
  }

  .footer-submit {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .footer-subtext {
    font-size: 0.78rem;
    line-height: 1.4;
  }

  /* Float WhatsApp */
  .whatsapp-float-wrap {
    right: max(0.75rem, env(safe-area-inset-right, 0px)) !important;
    bottom: max(0.75rem, env(safe-area-inset-bottom, 0px)) !important;
  }

  .whatsapp-bubble {
    display: none;
  }

  .whatsapp-float {
    width: 52px;
    height: 52px;
  }
}

@media (max-width: 420px) {
  :root {
    --maxw: calc(100% - 1.5rem);
  }

  .section-head h2,
  .scroll-title-container h3 {
    font-size: clamp(1.3rem, 6.8vw, 1.65rem);
  }

  .servicos-linha-link {
    font-size: 0.78rem;
    height: 2.3rem;
    padding: 0 0.8rem;
  }

  .hero-copy {
    top: 46% !important;
    left: 0.85rem !important;
    right: 0.85rem !important;
  }

  .hero-brand-mark-wrap {
    max-width: min(100%, 14.5rem);
  }

  .hero-under-title .hi-btn {
    font-size: 0.84rem !important;
    padding: 0.95rem 0.9rem !important;
    letter-spacing: 0.03em;
  }

  .hero-under-title .lead {
    font-size: 0.95rem !important;
  }

  .nav-lang-btn {
    width: 42px;
    height: 42px;
  }

  .nav-burger {
    width: 42px;
    height: 42px;
  }

  .nav-lang-bar {
    height: 42px;
  }

  .footer-input-group {
    flex-direction: column;
    align-items: stretch;
  }

  .footer-submit {
    width: 100%;
    justify-content: center;
  }
}
