/* DevCentral — layout responsivo (tablet e celular) */

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { -webkit-tap-highlight-color: rgba(251,200,30,.18); overflow-wrap: break-word; }

/* Componentes que só aparecem no celular */
.mobile-bar, .carousel-ui { display: none; }
.menu-toggle .ic-close { display: none; }
.menu-open .menu-toggle .ic-open { display: none; }
.menu-open .menu-toggle .ic-close { display: block; }

/* =========================================================
   Notebook pequeno / tablet: menu vira painel
   ========================================================= */
@media (max-width: 1100px) {
  .menu-toggle { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -8px; }
  .topbar .wrap { height: 64px; }
  /* sem backdrop-filter: ele prenderia o menu fixo dentro da barra */
  .topbar { background: var(--ink); backdrop-filter: none; -webkit-backdrop-filter: none; }
  html { scroll-padding-top: 76px; }
  body.menu-open { overflow: hidden; }

  .nav {
    display: flex; position: fixed; top: 64px; left: 0; right: 0; bottom: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink); padding: 12px 24px 32px; overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
  }
  .menu-open .nav { opacity: 1; visibility: visible; transform: none; transition: opacity .2s ease, transform .2s ease; }
  .nav a {
    font-family: var(--font-head); font-size: 22px; font-weight: 600; color: var(--white);
    padding: 16px 2px; border-bottom: 1px solid rgba(168,147,184,.14);
    display: flex; justify-content: space-between; align-items: center;
  }
  .nav a:not(.btn)::after { content: "→"; color: var(--yellow); font-family: var(--font-mono); font-size: 18px; }
  .nav .btn { margin-top: 24px; justify-content: center; border-bottom: 0; font-size: 17px; padding: 16px 24px; color: var(--ink); }
}

/* =========================================================
   Tablet
   ========================================================= */
@media (max-width: 1020px) {
  .section { padding: 84px 0; }
  .hero { padding: 80px 0 88px; }
  .hero .wrap, .zero, .split { grid-template-columns: 1fr; gap: 40px; }
  .hero-card { max-width: 560px; }
  .g4, .g3 { grid-template-columns: repeat(2, 1fr); }
  .timeline { gap: 14px; }
  .tl { padding: 22px; }
  .tl .when { font-size: 26px; }
  .contacts { grid-template-columns: 1fr; max-width: 520px; margin-left: auto; margin-right: auto; }
  .zero { margin-top: 64px; padding-top: 56px; }
}

@media (max-width: 860px) {
  .dr { grid-template-columns: 1fr; }
  .dr .link { padding: 10px 0; display: flex; align-items: center; justify-content: center; gap: 10px; }
  .dr .link svg { width: 34px; height: 18px; margin: 0; transform: rotate(90deg); }
  .gov { gap: 16px; }
  .gov-card .art { height: 150px; }
  .gov-card .body { padding: 24px; }
  .steps.connected .step::after { display: none; }
}

/* =========================================================
   Celular
   ========================================================= */
@media (max-width: 640px) {
  body { font-size: 16px; line-height: 1.55; }
  .wrap { padding: 0 16px; }
  .section { padding: 56px 0; }
  .section-head { margin-bottom: 28px; }
  .section-head h2 { font-size: 27px; line-height: 1.18; }
  .section-head p { font-size: 16px; margin-top: 12px; }
  .tag { font-size: 12.5px; margin-bottom: 12px; }

  /* topo */
  .topbar .wrap { height: 60px; }
  .nav { top: 60px; padding: 8px 16px 32px; }
  .brand img { height: 26px; }
  html { scroll-padding-top: 68px; }

  /* hero */
  .hero { padding: 40px 0 44px; }
  .hero::after { display: none; }
  .hero h1 { font-size: 34px; line-height: 1.1; }
  .hero .lead { font-size: 16.5px; margin-top: 16px; }
  .hero .actions { margin-top: 26px; flex-direction: column; gap: 10px; }
  .hero .actions .btn { justify-content: center; width: 100%; padding: 15px 20px; }
  .hero-card { display: none; }

  /* faixas */
  .promo .wrap { padding-top: 14px; padding-bottom: 14px; font-size: 14.5px; line-height: 1.45; gap: 8px; }
  .promo a { font-size: 15px; padding: 4px 0; }
  .audience .wrap { justify-content: flex-start; gap: 8px; padding-top: 14px; padding-bottom: 14px; font-size: 13.5px; }
  .audience span { background: rgba(254,252,255,.06); border: 1px solid rgba(168,147,184,.18); border-radius: 999px; padding: 6px 12px; gap: 8px; }
  .audience span::before { width: 6px; height: 6px; }

  /* cartões em formato de lista: ícone à esquerda do texto */
  .grid { gap: 12px; }
  .g4, .g3, .g2 { grid-template-columns: 1fr; }
  .card { padding: 18px; border-radius: 12px; }
  .card.has-icon { display: grid; grid-template-columns: 40px 1fr; column-gap: 14px; align-items: start; }
  .card.has-icon > * { grid-column: 2; }
  .card.has-icon > .icon { grid-column: 1; grid-row: 1 / span 4; width: 40px; height: 40px; border-radius: 10px; margin: 0; }
  .card .icon svg { width: 20px; height: 20px; }
  .card h3 { font-size: 17px; margin-bottom: 4px; line-height: 1.25; }
  .card p { font-size: 14.5px; line-height: 1.5; }
  .card .more { display: none; } /* a faixa de tecnologias logo abaixo já lista tudo */

  .stack { margin-top: 32px; padding-top: 24px; }
  .stack .lbl { font-size: 11.5px; margin-bottom: 12px; }
  .chips { gap: 7px; }
  .chip { font-size: 12.5px; padding: 6px 11px; }

  /* como operamos */
  .split { gap: 28px; }
  .split h2 { font-size: 27px !important; }
  .split > div > p { font-size: 16px !important; }
  .checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .checklist li { margin: 0; padding: 12px; font-size: 14px; line-height: 1.3; gap: 10px; align-items: flex-start; }
  .checklist li svg { width: 18px; height: 18px; }
  .sla { margin-top: 18px; font-size: 12px; }

  /* DR */
  .dr { margin-bottom: 14px; }
  .dr .env { padding: 18px; border-radius: 12px; }
  .dr .env h3 { font-size: 19px; margin: 6px 0 4px; }
  .dr .env p { font-size: 14.5px; }
  .dr .env .lbl { font-size: 11.5px; }

  /* cartões pequenos em 2 colunas */
  .zero .grid.g2, #continuidade .grid.g3 { grid-template-columns: 1fr 1fr; gap: 10px; }
  #continuidade .grid.g3 .card:last-child { grid-column: 1 / -1; }
  #continuidade .g3 .card, .zero .g2 .card { padding: 14px; }
  #continuidade .g3 .card h3, .zero .g2 .card h3 { font-size: 15px; }
  #continuidade .g3 .card p, .zero .g2 .card p { font-size: 13.5px; }

  /* segurança */
  .sec-quote { font-size: 23px; }
  .sec-quote + p { font-size: 15.5px; margin-top: 12px; }

  /* VMware */
  .stat-card .big { font-size: 22px; margin-bottom: 2px; }
  .zero { margin-top: 44px; padding-top: 40px; gap: 22px; }
  .zero h3 { font-size: 27px; }
  .zero p.lead { font-size: 16px; margin-top: 12px; }
  .source { font-size: 11.5px; margin-top: 14px; }

  /* passos: linha do tempo vertical */
  .steps.g3 { gap: 0; }
  .step { display: grid; grid-template-columns: 40px 1fr; column-gap: 14px; padding: 0 0 22px; }
  .step > * { grid-column: 2; }
  .step .num { grid-column: 1; grid-row: 1 / span 2; width: 40px; height: 40px; font-size: 13px; margin: 0; position: relative; z-index: 1; }
  .step h3 { font-size: 18px; margin: 8px 0 4px; }
  .step p { font-size: 14.5px; }
  .steps.connected .step:not(:last-child)::after {
    display: block; content: ""; position: absolute; left: 19px; top: 40px; bottom: 0; right: auto; width: 2px; height: auto;
    background: repeating-linear-gradient(180deg, var(--line-2) 0 5px, transparent 5px 10px);
  }
  .note { margin-top: 8px; font-size: 14.5px; }

  /* prazos: linhas compactas */
  .timeline { grid-template-columns: 1fr; gap: 10px; }
  .tl {
    display: grid; grid-template-columns: 104px 1fr; column-gap: 12px; align-items: center;
    padding: 14px 16px; border-top: 1px solid var(--line); border-left: 4px solid var(--yellow);
  }
  .tl.done { border-top-color: var(--line); border-left-color: var(--red); }
  .tl .st { grid-column: 1; grid-row: 1; font-size: 10.5px; }
  .tl .when { grid-column: 1; grid-row: 2; font-size: 20px; margin: 0; white-space: nowrap; }
  .tl h3 { grid-column: 2; grid-row: 1; font-size: 16px; margin: 0; }
  .tl p { grid-column: 2; grid-row: 2; font-size: 13.5px; }

  /* prefeituras: carrossel deslizante */
  .gov {
    display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 -16px; padding: 0 16px 4px; scroll-padding: 0 16px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; overscroll-behavior-x: contain;
  }
  .gov::-webkit-scrollbar { display: none; }
  .gov-card { flex: 0 0 88%; scroll-snap-align: start; border-radius: 14px; }
  .gov-card .art { height: 112px; }
  .gov-card .body { padding: 20px; }
  .gov-card h3 { font-size: 20px; margin-bottom: 8px; }
  .gov-card p { font-size: 14.5px; }
  .gov-card ul { margin-top: 12px; }
  .gov-card li { font-size: 14px; padding: 5px 0; gap: 10px; }
  .carousel-ui { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
  .carousel-ui .hint { font-family: var(--font-mono); font-size: 12px; color: var(--lilac); }
  .dots { display: flex; gap: 2px; margin-right: -8px; }
  .dots button { width: 30px; height: 30px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
  .dots button::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--plum-soft); transition: width .2s ease, background .2s ease; }
  .dots button[aria-current="true"]::before { width: 22px; background: var(--yellow); }

  /* contato */
  .cta h2 { font-size: 28px; }
  .cta p.lead { font-size: 16px; }
  .contacts { margin-top: 28px; gap: 10px; }
  .contact { padding: 16px; gap: 14px; }
  .contact .val { font-size: 15.5px; }
  .contact .icon { width: 40px; height: 40px; }

  /* rodapé (espaço para a barra fixa) */
  .footer { padding: 28px 0 104px; font-size: 13px; }
  .footer .wrap { flex-direction: column; align-items: flex-start; gap: 12px; }

  /* barra fixa de contato */
  .mobile-bar {
    display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(34,14,45,.96); border-top: 1px solid rgba(168,147,184,.18);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    transform: translateY(110%); transition: transform .25s ease;
  }
  .mobile-bar.show { transform: none; }
  .mobile-bar .btn { justify-content: center; padding: 13px 16px; font-size: 15px; }
  .mobile-bar .btn-primary { flex: 1; }
  .mobile-bar .btn svg { width: 18px; height: 18px; }
  body.menu-open .mobile-bar { transform: translateY(110%); }
}

/* Telas bem estreitas (até 370px) */
@media (max-width: 370px) {
  .hero h1 { font-size: 30px; }
  .section-head h2, .zero h3, .split h2 { font-size: 24px !important; }
  .checklist, .zero .grid.g2, #continuidade .grid.g3 { grid-template-columns: 1fr; }
  #continuidade .grid.g3 .card:last-child { grid-column: auto; }
  .tl { grid-template-columns: 92px 1fr; }
  .tl .when { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .nav, .mobile-bar, .dots button::before { transition: none !important; }
}
