/* ==========================================================================
   Seções portadas da V4 aprovada (jornada, soluções, IA, planos, passos, CTA)
   Mantêm composição e comportamento da V4; ajustes: tokens, tipografia e
   correção do espaçamento negativo excessivo nos títulos.
   ========================================================================== */

/* ---------- Menu mobile ---------- */
.mobile-menu {
  display: none;
}

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--surface-2);
    color: var(--ink);
    cursor: pointer;
  }

  .mobile-menu:not([hidden]) {
    display: grid;
    gap: 2px;
    padding: 8px var(--gutter-r) 16px var(--gutter);
    border-top: 1px solid var(--line);
    background: #fff;
  }

  .mobile-menu a {
    padding: 12px 8px;
    border-radius: 10px;
    font-weight: 600;
    color: var(--ink-2);
  }

  .mobile-menu a:hover {
    background: var(--surface-2);
  }
}

/* ---------- Seções genéricas ---------- */
.section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-block: clamp(56px, 8vw, 96px);
}

.section > p {
  max-width: 40em;
  font-size: 1.0625rem;
}

.band {
  background: linear-gradient(145deg, #f7fbff, #eaf3fb);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.tile {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s, border-color 0.35s;
}

.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(83, 160, 221, 0.09), transparent 65%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.tile:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 45px rgba(35, 91, 139, 0.1);
  border-color: var(--brand-blue);
}

.tile:hover::before {
  opacity: 1;
}

.symbol {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--action-soft);
  color: var(--action);
}

.symbol svg {
  width: 22px;
  height: 22px;
}

/* Cards de soluções (bento): ver css/solutions.css */

/* ---------- Jornada ---------- */
.journey {
  --jp: 0;
  position: relative;
  height: 360vh;
  background: var(--deep-800);
  color: #fff;
}

.journey-stage {
  position: sticky;
  top: var(--navh, var(--header-h));
  height: calc(100svh - var(--navh, var(--header-h)));
  min-height: 490px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: clamp(20px, 4vw, 55px) max(5vw, 24px);
  background: radial-gradient(ellipse at 75% 50%, var(--glow, #28689a), transparent 65%), var(--deep-800);
  transition: background-color 0.5s;
  /* Camada própria: sticky composto, sem descompasso durante a rolagem. */
  will-change: transform;
}

.journey-frame {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.journey-top,
.journey-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  color: #d1e8fa;
}

.journey-layout {
  position: relative;
  flex: 1;
  min-height: 0;
}

.chapter {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: 4vw;
  opacity: 0;
  pointer-events: none;
  transform: translateY(35px) scale(0.98);
  will-change: transform, opacity;
}

.chapter:not([inert]) {
  pointer-events: auto;
}

.chapter-copy h2 {
  margin: 18px 0;
  font-size: clamp(2.4rem, 1rem + 4.6vw, 5.1rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: #fff;
}

.chapter-copy p {
  max-width: 460px;
  font-size: clamp(0.95rem, 0.8rem + 0.6vw, 1.3rem);
  color: #c9e0f2;
}

.chapter-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--brand-orange);
}

.chapter-art {
  position: relative;
  padding: 30px 20px;
  perspective: 1100px;
}

.orbit {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  transform: rotate(-20deg);
  box-shadow: 0 0 0 35px rgba(255, 255, 255, 0.03), 0 0 0 70px rgba(255, 255, 255, 0.025);
}

.product-window {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.45);
  transform: rotateY(-7deg) rotateX(5deg);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 15px;
  background: #f0f6fb;
  font-size: 0.6875rem;
  color: #647b90;
}

.window-bar i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #aac0d2;
}

.window-bar span {
  margin-left: 12px;
}

.window-body {
  display: flex;
  min-height: 240px;
}

.window-body aside {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 16px;
  background: #e9f2fa;
  color: #4389bd;
}

.window-body aside svg {
  width: 18px;
  height: 18px;
}

.window-main {
  flex: 1;
  min-width: 0;
  padding: clamp(16px, 3vw, 36px);
}

.window-main small {
  color: var(--ink-3);
}

.window-main strong {
  display: block;
  margin: 10px 0;
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 0.8rem + 2.2vw, 2.8rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.window-main p {
  font-size: 0.75rem;
  color: #647b90;
}

.demo-graphic {
  display: flex;
  align-items: end;
  gap: 8px;
  height: 82px;
  margin: 16px 0;
}

.demo-graphic i {
  flex: 1;
  height: var(--h);
  border-radius: 6px;
  background: var(--brand-blue);
}

.demo-graphic i:nth-child(3n) { background: var(--brand-orange); }
.g2 i { height: 22%; border-radius: 20px; }
.g3 i { height: 12%; background: #b6d9f4; }

.window-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 12px;
  border-radius: 9px;
  background: #edf5fb;
  font-size: 0.75rem;
}

.chapter-float {
  position: absolute;
  right: 0;
  bottom: 4px;
  padding: 14px 20px;
  border-radius: 15px;
  background: var(--brand-orange);
  color: var(--deep-800);
  font-size: 0.75rem;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

.chapter-float strong {
  display: block;
  margin-top: 5px;
  font-size: 1.125rem;
}

.chapter-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chapter-nav button {
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background: transparent;
  color: #fff;
  font: 600 0.625rem/1 var(--f-body);
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}

.chapter-nav button[aria-current="true"] {
  background: #fff;
  color: var(--deep-800);
}

.journey-track {
  flex: 1;
  max-width: 240px;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
}

.journey-track i {
  display: block;
  height: 100%;
  background: var(--brand-orange);
  transform: scaleX(var(--jp));
  transform-origin: left;
}

@media (max-width: 800px), (prefers-reduced-motion: reduce), (max-height: 620px) {
  .journey {
    height: auto;
  }

  .journey-stage {
    position: relative;
    top: auto;
    height: auto;
    min-height: 0;
  }

  .journey-layout {
    display: grid;
    gap: 36px;
  }

  .chapter {
    position: relative;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 24px 0;
  }

  .chapter-art {
    padding: 10px 8px;
  }

  .chapter-copy h2 {
    font-size: clamp(2.1rem, 1rem + 5vw, 2.8rem);
  }

  .journey-top {
    margin-bottom: 12px;
  }

  .journey-bottom {
    display: none;
  }

  .product-window {
    transform: none;
  }
}

/* IA: css/ai.css · Planos: css/plans.css */

.steps h3 {
  margin-bottom: 8px;
}

/* ---------- CTA final ---------- */
.cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  text-align: center;
  color: #fff;
  background: linear-gradient(120deg, #1a3550, #174d79);
}

.cta::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -380px;
  left: 50%;
  width: 650px;
  height: 650px;
  translate: -50% 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  box-shadow: 0 0 0 45px rgba(255, 255, 255, 0.03), 0 0 0 95px rgba(255, 255, 255, 0.03);
}

.cta-inner {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding-block: clamp(64px, 9vw, 110px);
}

.cta h2 {
  color: #fff;
  max-width: 16em;
}

.cta p {
  color: #dbeaf5;
}

/* ---------- Rodapé ---------- */
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-block: 30px;
}

/* ---------- Responsivo ---------- */
@media (max-width: 800px) {
  .grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tile,
  .chapter-nav button {
    transition: none;
  }
}
