/**
 * Fortal V4.1 — Premium layer (toggle de rollback)
 * ------------------------------------------------
 * Carregado DEPOIS de assets/css/v3.css em todas as páginas.
 *
 * ROLLBACK INSTANTÂNEO:
 *   Remover das 5 páginas HTML a linha:
 *   <link rel="stylesheet" href="assets/css/v4.1-premium.css">
 *
 * STATUS ONDAS:
 *   Onda 0 — PREPARADA (este arquivo criado + links HTML)
 *   Onda 1 — FEITA (ritmo + tipografia)
 *   Onda 2 — FEITA (ícones SVG)
 *   Onda 3 — FEITA (motion.js)
 *   Onda 4 — FEITA (densidade editorial)
 *   Onda 5 — FEITA (QA + capturas + docs)
 *
 * V4.1 COMPLETA — rollback: remover link deste CSS e script motion.js
 * Docs: v1/docs/V4.1-CHANGELOG.md · V4.1-QA.md
 * Plano completo: memoria/HANDOFF.md e v1/docs/V4.1-PREMIUM-PLAN.md
 * Snapshot baseline: memoria/snapshots/pre-v41-baseline/
 */

/* =========================================================
   WAVE-0 · scaffold only — sem regras visuais
   ========================================================= */

/* =========================================================
   WAVE-1 · ritmo + tipografia
   Hero home (.hero__content h1 / --display) → NÃO ALTERAR
   ========================================================= */

.section { padding: clamp(72px, 8vw, 120px) 0; }
.capabilities { padding: clamp(80px, 8vw, 130px) 0; }
.section-head { margin-bottom: clamp(32px, 5vw, 64px); }

:root {
  --h2: clamp(2.1rem, 3.2vw, 3.75rem);
  --h1: clamp(2.4rem, 4.2vw, 4.5rem);
}

.capabilities__statement h2 {
  font-size: clamp(2.6rem, 4vw, 4.25rem);
}

/* =========================================================
   CTA final · faixa densa com presença (sem contact-strip)
   ========================================================= */

.cta-final {
  padding: clamp(56px, 6vw, 80px) 0;
  isolation: isolate;
  background: var(--orange-500);
}

.cta-final__photo {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
}

.cta-final__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

/* Editor visual ACF: HTML dentro de .lead / .hero__lead / .form-note */
.lead > p:first-child,
.hero__lead > p:first-child,
.form-note > p:first-child { margin-top: 0; }
.lead > p:last-child,
.hero__lead > p:last-child,
.form-note > p:last-child { margin-bottom: 0; }
.lead > p,
.hero__lead > p,
.form-note > p { margin: 0 0 .65em; }

.cta-final::before {
  z-index: 1;
  background:
    linear-gradient(105deg,
      rgba(245, 130, 32, .94) 0%,
      rgba(245, 130, 32, .9) 38%,
      rgba(245, 130, 32, .62) 58%,
      rgba(7, 18, 28, .58) 78%,
      rgba(7, 18, 28, .5) 100%);
}

.cta-final::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .08), transparent 42%),
    repeating-linear-gradient(90deg, transparent 0 79px, rgba(255, 255, 255, .05) 80px);
  mask-image: linear-gradient(90deg, #000 0 48%, transparent 82%);
}

.cta-final__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, .72fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  max-width: none;
}

.cta-final__copy {
  min-width: 0;
}

.cta-final__brand {
  margin: 0 0 10px;
  color: var(--navy-950);
  font-size: .92rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1.2;
}

.cta-final h2 {
  max-width: 16ch;
  margin: 0 0 12px;
  font-size: clamp(1.85rem, 3.1vw, 2.85rem);
  line-height: 1.05;
  letter-spacing: -.045em;
}

.cta-final__lead {
  max-width: 36ch;
  margin: 0;
  color: rgba(7, 18, 28, .78);
  font-size: .98rem;
  font-weight: 500;
  line-height: 1.5;
}

.cta-final__actions {
  display: grid;
  gap: 10px;
  justify-self: stretch;
}

.cta-final__actions .btn {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  box-shadow: none;
}

.cta-final .btn--dark {
  box-shadow: 0 12px 28px rgba(7, 18, 28, .2);
}

.cta-final .btn--outline {
  border-color: rgba(255, 255, 255, .55);
  color: #fff;
  background: rgba(7, 18, 28, .28);
}

.cta-final .btn--outline:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, .16);
  color: #fff;
}

html.motion-ready .cta-final__inner[data-reveal] {
  opacity: 1;
  transform: none;
}

html.motion-ready .cta-final__copy,
html.motion-ready .cta-final__actions {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity .55s cubic-bezier(0.22, 1, 0.36, 1),
    transform .55s cubic-bezier(0.22, 1, 0.36, 1);
}

html.motion-ready .cta-final__inner.is-visible .cta-final__copy,
html.motion-ready .cta-final__inner.is-visible .cta-final__actions {
  opacity: 1;
  transform: none;
}

html.motion-ready .cta-final__inner.is-visible .cta-final__actions {
  transition-delay: .1s;
}

@media (prefers-reduced-motion: reduce) {
  html.motion-ready .cta-final__copy,
  html.motion-ready .cta-final__actions {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 820px) {
  .cta-final__inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .cta-final h2 {
    max-width: none;
  }

  .cta-final__actions {
    width: 100%;
  }
}

/* =========================================================
   Máquinas feature · faixa densa (Home)
   ========================================================= */

.machines-feature {
  min-height: 0;
}

.machines-feature::after {
  background: linear-gradient(
    100deg,
    rgba(4, 11, 17, .08) 0%,
    rgba(4, 11, 17, .22) 36%,
    rgba(4, 11, 17, .72) 62%,
    rgba(4, 11, 17, .88) 100%
  );
}

.machines-feature__grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  min-height: clamp(520px, 58vw, 620px);
  align-items: center;
}

.machines-feature__content {
  max-width: 34rem;
  padding: clamp(48px, 6vw, 72px) 0 clamp(48px, 6vw, 72px) clamp(20px, 3vw, 48px);
}

.machines-feature__content .eyebrow {
  margin-bottom: 14px;
}

.machines-feature__content h2 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 3.4vw, 3.15rem);
  line-height: 1.08;
  letter-spacing: -.04em;
}

.machines-feature__content .lead {
  max-width: 36ch;
  margin: 0 0 28px;
  color: #c5d0d9;
  font-size: 1.02rem;
  line-height: 1.55;
}

.machines-feature__photo img {
  object-position: 28% center;
}

@media (max-width: 820px) {
  .machines-feature::after {
    background: linear-gradient(
      180deg,
      rgba(4, 11, 17, .55) 0%,
      rgba(4, 11, 17, .28) 42%,
      rgba(4, 11, 17, .92) 100%
    );
  }

  .machines-feature__grid {
    min-height: clamp(520px, 88vw, 640px);
    align-items: end;
  }

  .machines-feature__content {
    grid-column: 1;
    max-width: none;
    padding: 0 0 52px;
  }

  .machines-feature__photo img {
    object-position: 35% center;
  }
}

.page-intro {
  padding: 56px 0 24px;
}

.product-hero__stage {
  margin-top: clamp(36px, 4vw, 52px);
}

.category-block {
  padding: clamp(64px, 7vw, 88px) 0;
}

/* =========================================================
   Footer premium · ícones elegantes + marca refinada
   ========================================================= */

.site-footer {
  position: relative;
  padding: clamp(64px, 7vw, 96px) 0 28px;
  color: #9eafbc;
  background:
    linear-gradient(180deg, #061018 0%, var(--navy-1000) 28%);
  border-top: 1px solid rgba(255, 255, 255, .06);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--orange-500), rgba(245, 130, 32, .15) 42%, transparent 78%);
}

.footer-grid {
  grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(0, .7fr)) minmax(0, 1.05fr);
  gap: clamp(32px, 4vw, 56px);
  padding-bottom: 48px;
}

.footer-brand img {
  width: 176px;
  height: auto;
  margin-bottom: 20px;
  padding: 10px 14px 8px;
  object-fit: contain;
  background: #fff;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
}

.footer-brand p {
  max-width: 34ch;
  margin: 0;
  color: #8fa0ae;
  font-size: .92rem;
  line-height: 1.65;
}

.site-footer h2 {
  margin-bottom: 18px;
  color: #fff;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links li {
  margin: 0;
}

.footer-links a {
  color: #b7c5d0;
  font-size: .92rem;
  font-weight: 500;
  transition: color .2s, transform .2s;
}

.footer-links a:hover {
  color: #fff;
}

.footer-contact {
  list-style: none;
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
}

.footer-contact a,
.footer-address {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  align-items: start;
  color: #b7c5d0;
  font-size: .92rem;
  font-weight: 500;
  line-height: 1.45;
  transition: color .2s;
}

.footer-contact a:hover {
  color: #fff;
}

.footer-contact .ops-icon,
.footer-address .ops-icon {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: var(--orange-500);
}

.footer-address {
  margin: 14px 0 0;
}

.footer-address p {
  margin: 0;
  color: inherit;
  line-height: 1.7;
}

.footer-place .footer-contact {
  margin-bottom: 0;
}

.footer-place .footer-contact + .footer-address {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  color: #7f909d;
  font-size: .72rem;
  letter-spacing: .04em;
}

.footer-bottom span:last-child {
  color: #a8b7c3;
  font-weight: 600;
}

/* =========================================================
   WhatsApp float · redondo + pulso
   ========================================================= */

.whatsapp-float {
  position: fixed;
  z-index: 90;
  right: 22px;
  bottom: 22px;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  min-height: 58px;
  padding: 0;
  color: #fff;
  background: #18ba64;
  border-radius: 50%;
  box-shadow: 0 12px 28px rgba(13, 80, 45, .32);
  transition: transform .2s, box-shadow .2s;
}

.whatsapp-float span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.whatsapp-float svg {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.whatsapp-float::before,
.whatsapp-float::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #18ba64;
  z-index: 0;
  animation: wa-pulse 2.2s ease-out infinite;
  pointer-events: none;
}

.whatsapp-float::after {
  animation-delay: 1.1s;
}

.whatsapp-float:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 16px 34px rgba(13, 80, 45, .4);
}

@keyframes wa-pulse {
  0% {
    transform: scale(1);
    opacity: .55;
  }
  100% {
    transform: scale(1.85);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .whatsapp-float::before,
  .whatsapp-float::after {
    animation: none;
    opacity: 0;
  }
}

@media (max-width: 640px) {
  .whatsapp-float {
    right: 14px;
    bottom: 14px;
    width: 54px;
    height: 54px;
    min-height: 54px;
  }
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr;
  }

  .footer-grid > :last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-brand,
  .footer-grid > :last-child {
    grid-column: auto;
  }

  .footer-bottom {
    display: grid;
    gap: 8px;
  }
}

.ops-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.ops-icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--orange-500);
}

.ops-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.capability__tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.process-step .ops-icon {
  display: flex;
  margin-bottom: 14px;
}

.process--light .ops-icon,
.process .ops-icon {
  color: var(--orange-500);
}

.safety-flow b {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.signal-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 4px;
  align-items: start;
}

.signal-item .ops-icon {
  grid-row: 1 / span 2;
  margin-top: 2px;
}

.signal-item b,
.signal-item span {
  grid-column: 2;
}

.proof-band .ops-icon {
  display: flex;
  margin-bottom: 12px;
}

.contact-methods > li > span {
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-methods .ops-icon {
  color: var(--orange-500);
}

.solution-item > .ops-icon,
.solution-item--wide > div > .ops-icon,
.solution-item--lead > .ops-icon {
  display: flex;
  margin: 0 0 14px;
}

.solution-item__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.solution-item__head .ops-icon {
  margin-top: 3px;
}

.solution-item__head h3 {
  margin: 0;
}

.solution-rail .solution-item__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.solution-item--wide .ops-icon,
.solution-item--lead .ops-icon {
  color: var(--orange-500);
}

.metric-list .ops-icon {
  display: flex;
  margin-bottom: 10px;
}

/* =========================================================
   WAVE-3 · motion hooks (classes .is-active / path draw)
   Inerte sem motion.js; pulse só com html.motion-ready
   ========================================================= */

.hero-product[data-reveal],
.product-hero__stage[data-reveal] {
  transition-duration: .55s;
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-product.is-entered,
.product-hero__stage.is-entered {
  /* hook for future refinement; reveal already handled by main.js */
}

.story-step.is-active span {
  color: #fff;
  background: var(--orange-500);
  border-color: var(--orange-500);
  transform: scale(1.04);
}

.process-step.is-active::before {
  box-shadow: 0 0 0 8px rgba(245, 130, 32, .2);
}

.process-step.is-active > .ops-icon {
  transform: translateY(-2px);
}

.process-step > .ops-icon {
  transition: transform .3s ease;
}

.safety-flow {
  position: relative;
  padding-left: 14px;
}

.safety-flow::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 0;
  width: 2px;
  background: linear-gradient(var(--orange-500), rgba(245, 130, 32, .2));
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.safety-flow.is-active::before,
html.motion-reduce .safety-flow::before {
  transform: scaleY(1);
}

html.motion-ready .safety-flow li {
  transition: opacity .35s ease, transform .35s ease;
}

html.motion-ready .safety-flow:not(.is-active) li {
  opacity: .55;
}

html.motion-ready .safety-flow li.is-active {
  opacity: 1;
  transform: none;
}

html.motion-ready .product-canvas .callout {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .45s ease, transform .45s cubic-bezier(0.22, 1, 0.36, 1);
}

html.motion-ready .product-canvas.is-visible .callout--one {
  opacity: 1;
  transform: none;
  transition-delay: .12s;
}

html.motion-ready .product-canvas.is-visible .callout--two {
  opacity: 1;
  transform: none;
  transition-delay: .26s;
}

.intent-nav a.is-current {
  color: var(--orange-600);
  box-shadow: inset 0 -2px 0 var(--orange-500);
}

html.motion-ready .status-pill::before,
html.motion-ready .hero__proof i {
  animation: fortal-live-pulse 2.4s ease-in-out infinite;
}

html.motion-ready .app-orbit::after {
  animation: fortal-orbit-pulse 2.4s ease-in-out infinite;
}

@keyframes fortal-live-pulse {
  0%, 100% { box-shadow: 0 0 0 5px rgba(32, 200, 120, .12); }
  50% { box-shadow: 0 0 0 10px rgba(32, 200, 120, .05); }
}

@keyframes fortal-orbit-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 130, 32, .4); }
  50% { box-shadow: 0 0 0 12px rgba(245, 130, 32, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .safety-flow::before,
  html.motion-ready .product-canvas .callout,
  .process-step > .ops-icon {
    transition: none !important;
  }

  html.motion-ready .safety-flow:not(.is-active) li,
  html.motion-ready .product-canvas .callout {
    opacity: 1;
    transform: none;
  }
}

/* =========================================================
   WAVE-4 · densidade editorial
   ========================================================= */

.page-intro--rich {
  border-bottom: 1px solid var(--border);
}

.page-intro--rich .page-intro__main {
  display: grid;
  gap: 22px;
}

.page-intro__index {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 0;
  padding: 14px 0 0;
  list-style: none;
  border-top: 1px solid var(--border);
}

.page-intro__index a,
.page-intro__index span {
  color: var(--navy-800);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.page-intro__index a:hover,
.page-intro__index a:focus-visible {
  color: var(--orange-600);
}

.process-step__signal {
  margin: 16px 0 0;
  color: var(--orange-500);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.process--light .process-step__signal {
  color: var(--orange-600);
}

.product-hero {
  position: relative;
  overflow: hidden;
}

.product-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .35;
  background-image:
    linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(100deg, #000 18%, transparent 70%);
  pointer-events: none;
}

.product-hero > .container {
  position: relative;
}

.product-hero__copy--dense {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 28px 48px;
  align-items: end;
  max-width: none;
}

.product-hero__copy--dense .breadcrumb,
.product-hero__copy--dense .eyebrow,
.product-hero__copy--dense h1 {
  grid-column: 1 / -1;
}

.product-hero__copy--dense .lead {
  max-width: 54ch;
  margin: 0;
}

.product-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-self: end;
}

.product-hero__meta span {
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, .18);
  color: #d4dee6;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.solution-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 18px;
  color: var(--navy-800);
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.solution-item__meta span {
  position: relative;
}

.solution-item__meta span + span::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -9px;
  width: 3px;
  height: 3px;
  background: var(--orange-500);
  border-radius: 50%;
}

.solution-item--wide .solution-item__meta,
.solution-item--lead .solution-item__meta {
  color: #d4dee6;
}

.solution-rail .solution-item__meta {
  grid-column: 2 / -1;
  margin-top: 10px;
}

@media (max-width: 1024px) {
  .product-hero__copy--dense {
    grid-template-columns: 1fr;
  }

  .product-hero__meta {
    justify-content: flex-start;
  }
}

@media (max-width: 820px) {
  .solution-rail .solution-item__meta {
    grid-column: 2;
  }
}

/* Hero H1: exatamente 3 linhas (Sua frota. / Sob controle. / Em tempo real.) */
.hero__content h1 .hero-line {
  display: block;
  white-space: nowrap;
}
