/* Ritmo, navegação e refinamentos posteriores à primeira revisão visual. */
main {
  display: flex;
  flex-direction: column;
}

.hero { order: 1; }
.intro { order: 2; }
.services { order: 3; }
.process { order: 4; }
.about { order: 5; }
.contact { order: 6; }

main > section[id] {
  scroll-margin-top: 86px;
}

.intro {
  padding-top: 120px;
  padding-bottom: 85px;
}

.portfolio {
  padding-top: 115px;
  padding-bottom: 115px;
}

.services {
  padding-top: 40px;
  padding-bottom: 115px;
}

.hero-photo {
  background:
    radial-gradient(circle at 78% 35%, rgba(84, 238, 34, .12), transparent 26%),
    linear-gradient(125deg, #070a09 0%, #101713 62%, #080b0a 100%);
  transform: none;
}

.hero-shade {
  background: linear-gradient(90deg, rgba(4, 6, 5, .55), rgba(4, 6, 5, .05));
}

.about {
  display: block;
  min-height: auto;
}

.about-copy {
  width: min(var(--max), calc(100% - 56px));
  max-width: none;
  margin: 0 auto;
  padding: 120px 0;
}

.about-copy h2,
.about-copy > p:not(.eyebrow) {
  max-width: 820px;
}

.about-facts {
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.contact {
  background: linear-gradient(135deg, #070a09 0%, #101713 100%);
}

.contact::after {
  background: radial-gradient(circle at 80% 50%, rgba(84, 238, 34, .08), transparent 28%);
}

.service-featured {
  padding-top: 70px;
  padding-bottom: 70px;
}

.process {
  padding-top: 120px;
  padding-bottom: 120px;
}

.topbar nav a {
  position: relative;
}

.topbar nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -9px;
  height: 1px;
  background: var(--green);
  transition: right .25s ease;
}

.topbar nav a:hover::after,
.topbar nav a.active::after {
  right: 0;
}

.topbar nav a.active {
  color: #fff;
}

.will-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2,.75,.25,1);
}

.will-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.project:active,
.button:active {
  transform: scale(.985);
}

.whatsapp-float {
  position: fixed;
  z-index: 25;
  right: 22px;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  pointer-events: none;
}

.whatsapp-teaser {
  position: relative;
  width: 286px;
  padding: 18px 18px 16px;
  color: #fff;
  background: rgba(9, 14, 11, .96);
  border: 1px solid rgba(84, 238, 34, .28);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
  backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(.98);
  transform-origin: right bottom;
  transition: opacity .3s ease, transform .3s ease, visibility .3s;
  pointer-events: none;
}

.whatsapp-float.is-visible .whatsapp-teaser { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
.whatsapp-teaser::after { content: ""; position: absolute; right: 26px; bottom: -6px; width: 10px; height: 10px; background: #0a0f0c; border-right: 1px solid rgba(84, 238, 34, .28); border-bottom: 1px solid rgba(84, 238, 34, .28); transform: rotate(45deg); }
.whatsapp-teaser strong,
.whatsapp-teaser span { display: block; }
.whatsapp-teaser strong { padding-right: 20px; font-size: .98rem; }
.whatsapp-teaser span { margin-top: 5px; color: rgba(255, 255, 255, .68); font-size: .84rem; }
.whatsapp-teaser > a { display: inline-flex; align-items: center; gap: 9px; margin-top: 14px; color: var(--green); font-size: .78rem; font-weight: 800; }
.whatsapp-teaser-close { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; padding: 0; border: 0; color: rgba(255,255,255,.6); background: transparent; cursor: pointer; font-size: 1.2rem; line-height: 1; }
.whatsapp-teaser-close:hover { color: #fff; }

.floating-whatsapp {
  position: static;
  width: 72px;
  height: 72px;
  padding: 0;
  overflow: visible;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 12px 30px rgba(39, 255, 0, .2);
  transition: transform .25s ease, filter .25s ease;
  pointer-events: auto;
}

.has-cookie-banner .whatsapp-float { bottom: 116px; }

.floating-whatsapp img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .32));
}

.floating-whatsapp:hover {
  transform: translateY(-4px) scale(1.05);
  filter: saturate(1.08);
}

.cookie-banner {
  position: fixed;
  z-index: 60;
  left: 24px;
  right: 24px;
  bottom: 24px;
  max-width: 820px;
  margin: 0 auto;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 28px;
  color: #fff;
  background: rgba(8, 12, 10, .97);
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .35);
}

.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0; color: rgba(255, 255, 255, .78); font-size: .82rem; line-height: 1.45; }
.cookie-actions { display: flex; gap: 9px; }
.cookie-actions button { min-height: 44px; padding: 0 18px; border: 1px solid rgba(255, 255, 255, .24); color: #fff; background: transparent; cursor: pointer; font-weight: 700; }
.cookie-actions .cookie-accept { border-color: var(--green); color: #081007; background: var(--green); }

@media (max-width: 900px) {
  main > section[id] { scroll-margin-top: 70px; }

  .hero {
    min-height: 720px;
  }

  .hero-content {
    padding-top: 145px;
    padding-bottom: 175px;
  }

  .hero-copy {
    max-width: 32rem;
    line-height: 1.55;
    margin-top: 25px;
    margin-bottom: 25px;
  }

  .hero-proof span:nth-child(3) {
    display: none;
  }

  .intro,
  .process {
    padding-top: 80px;
    padding-bottom: 80px;
  }

  .portfolio {
    padding-top: 85px;
    padding-bottom: 85px;
  }

  .services {
    padding-top: 20px;
    padding-bottom: 80px;
  }

  .service-featured {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .about-copy,
  .contact {
    padding-top: 80px;
    padding-bottom: 80px;
  }

  .about-copy {
    width: calc(100% - 40px);
  }

  .about-facts {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 560px) {
  .cookie-banner {
    left: 12px;
    right: 12px;
    bottom: 12px;
    padding: 18px;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .cookie-actions button { flex: 1; }

  .floating-whatsapp {
    width: 64px;
    height: 64px;
  }

  .whatsapp-float { right: 14px; bottom: 14px; }
  .has-cookie-banner .whatsapp-float { bottom: 208px; }
  .whatsapp-teaser { width: min(286px, calc(100vw - 28px)); }

  .hero h1 {
    font-size: clamp(2.9rem, 12.4vw, 3.65rem);
  }

  .hero-proof span {
    padding: 10px 0;
  }

  .project-grid {
    grid-auto-rows: 230px;
  }

  .section-heading {
    margin-bottom: 45px;
  }

  .technical-card {
    height: 230px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .will-reveal {
    opacity: 1;
    transform: none;
  }
}
