/* Agência Firefly — identidade roxo & dourado */
:root {
  --purple-deep: #1a0a2e;
  --purple-mid: #2d1b4e;
  --purple-bright: #7c3aed;
  --purple-glow: rgba(124, 58, 237, 0.45);
  --gold: #d4af37;
  --gold-light: #f4e4a6;
  --gold-muted: #a67c00;
  --ink: #f4f0ff;
  --ink-soft: rgba(244, 240, 255, 0.72);
  --surface: rgba(45, 27, 78, 0.55);
  --border: rgba(212, 175, 55, 0.22);
  --radius: 1rem;
  --radius-lg: 1.5rem;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 4.25rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink-soft);
  background: var(--purple-deep);
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(124, 58, 237, 0.35), transparent),
    radial-gradient(ellipse 60% 50% at 100% 50%, rgba(212, 175, 55, 0.08), transparent),
    linear-gradient(180deg, var(--purple-mid) 0%, var(--purple-deep) 45%, #0f0618 100%);
  overflow-x: hidden;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  z-index: 9998;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  animation: float-glow 18s var(--ease-out-expo) infinite alternate;
}

.glow--1 {
  width: min(50vw, 420px);
  height: min(50vw, 420px);
  top: -10%;
  right: -10%;
  background: var(--purple-glow);
}

.glow--2 {
  width: min(40vw, 320px);
  height: min(40vw, 320px);
  bottom: 20%;
  left: -5%;
  background: rgba(212, 175, 55, 0.15);
  animation-delay: -6s;
}

@keyframes float-glow {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(-30px, 40px) scale(1.08);
  }
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 10000;
  padding: 0.75rem 1rem;
  background: var(--gold);
  color: var(--purple-deep);
  font-weight: 600;
  border-radius: 0.5rem;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 500;
}

.header__bar {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(26, 10, 46, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: transform 0.5s var(--ease-out-expo), opacity 0.5s ease;
}

.header__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 max(1.5rem, env(safe-area-inset-right)) 0 max(1.5rem, env(safe-area-inset-left));
  padding-top: env(safe-area-inset-top);
  width: 100%;
  min-height: calc(var(--header-h) + env(safe-area-inset-top));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

body.menu-open {
  overflow: hidden;
  touch-action: none;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.25rem;
}

.logo__mark--butterfly {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  filter: drop-shadow(0 0 8px rgba(230, 193, 92, 0.4));
}

.butterfly {
  display: block;
}

.butterfly--header {
  width: 36px;
  height: 36px;
}

.butterfly--footer {
  width: 32px;
  height: 32px;
}

/* Borboleta: flutuação + bater de asas (eixo do corpo) */
.butterfly__float {
  transform-origin: 50px 50px;
  animation: butterfly-bob 3.4s ease-in-out infinite;
}

.butterfly__float--hero {
  animation-duration: 4s;
}

.butterfly__side--left {
  transform-origin: 50px 50px;
  animation: butterfly-flap-left 2.2s ease-in-out infinite;
}

.butterfly__side--right {
  transform-origin: 50px 50px;
  animation: butterfly-flap-right 2.2s ease-in-out infinite;
}

.butterfly__side--hero {
  animation-duration: 2.45s;
}

@keyframes butterfly-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

@keyframes butterfly-flap-left {
  0%,
  100% {
    transform: rotate(16deg);
  }
  50% {
    transform: rotate(-14deg);
  }
}

@keyframes butterfly-flap-right {
  0%,
  100% {
    transform: rotate(-16deg);
  }
  50% {
    transform: rotate(14deg);
  }
}

.logo__text {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.nav {
  display: none;
  align-items: center;
  gap: 2rem;
}

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.25s ease;
}

.nav a:hover {
  color: var(--gold-light);
}

.nav__cta {
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(124, 58, 237, 0.2));
  color: var(--ink) !important;
}

.nav__cta:hover {
  border-color: var(--gold);
  box-shadow: 0 0 24px rgba(212, 175, 55, 0.2);
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 22px;
  background: var(--gold);
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out-expo), opacity 0.3s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Menu mobile: overlay em tela cheia (fora do header — sem corte por height/transform no sticky) */
.nav-mobile {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-height: 100dvh;
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(12, 6, 24, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: auto;
}

.nav-mobile[hidden] {
  display: none !important;
}

.nav-mobile__backdrop {
  flex: 1 1 auto;
  min-height: 2rem;
  cursor: pointer;
}

.nav-mobile__panel {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: calc(var(--header-h) + env(safe-area-inset-top) + 0.75rem) max(1.5rem, env(safe-area-inset-right)) 1.25rem max(1.5rem, env(safe-area-inset-left));
  background: linear-gradient(180deg, rgba(26, 10, 46, 0.98) 0%, rgba(20, 10, 38, 0.96) 100%);
  border-bottom: 1px solid rgba(212, 175, 55, 0.22);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.nav-mobile__panel a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.15rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(212, 175, 55, 0.12);
  transition: color 0.2s ease, padding-left 0.25s var(--ease-out-expo);
}

.nav-mobile__panel a:hover,
.nav-mobile__panel a:focus-visible {
  color: var(--gold-light);
  padding-left: 0.35rem;
}

.nav-mobile__cta {
  margin-top: 0.5rem;
  padding: 0.95rem 1.25rem !important;
  border-radius: 999px;
  border: 1px solid var(--border) !important;
  text-align: center;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.18), rgba(124, 58, 237, 0.22));
}

.nav-mobile__cta:hover,
.nav-mobile__cta:focus-visible {
  border-color: var(--gold) !important;
  padding-left: 1.25rem !important;
}

@media (min-width: 768px) {
  .nav {
    display: flex;
  }
  .nav-toggle {
    display: none;
  }
  .nav-mobile {
    display: none !important;
  }

  body.menu-open {
    overflow: unset;
    touch-action: unset;
  }
}

/* Layout */
main {
  position: relative;
  z-index: 1;
}

section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem;
}

.gold {
  color: var(--gold);
  text-shadow: 0 0 40px rgba(212, 175, 55, 0.25);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.25rem;
}

.eyebrow--center {
  justify-content: center;
}

.eyebrow__line {
  width: 2rem;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  border-radius: 2px;
}

.eyebrow--center .eyebrow__line {
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* Hero */
.hero {
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.hero__grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding-top: 1rem;
  }
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3.35rem);
  font-weight: 700;
  line-height: 1.12;
  color: var(--ink);
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
}

.hero__title em {
  font-style: italic;
  color: var(--gold-light);
  background: linear-gradient(120deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lead {
  margin: 0 0 1.75rem;
  max-width: 36ch;
  font-size: 1.1rem;
}

.hero__lead strong {
  color: var(--ink);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.35s var(--ease-out-expo), box-shadow 0.35s ease, border-color 0.25s ease, background 0.25s ease;
}

.btn--primary {
  background: linear-gradient(135deg, var(--gold) 0%, #c9a227 50%, var(--gold-light) 100%);
  background-size: 200% 200%;
  animation: shimmer 6s ease infinite;
  color: var(--purple-deep);
  box-shadow: 0 8px 32px rgba(212, 175, 55, 0.35);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(212, 175, 55, 0.45);
}

.btn--ghost {
  border-color: var(--border);
  color: var(--ink);
  background: rgba(124, 58, 237, 0.08);
}

.btn--ghost:hover {
  border-color: var(--purple-bright);
  background: rgba(124, 58, 237, 0.18);
}

.btn--large {
  padding: 1rem 1.75rem;
  font-size: 1rem;
}

@keyframes shimmer {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.hero__stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.hero__stats li {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.stat__num,
.stat__label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--gold);
}

/* Orbital visual */
.hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 280px;
}

.orbital {
  position: relative;
  width: min(100%, 340px);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orbital__ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--border);
}

.orbital__ring--slow {
  inset: 8%;
  animation: spin 28s linear infinite;
  border-color: rgba(212, 175, 55, 0.25);
}

.orbital__ring--mid {
  inset: 18%;
  animation: spin-reverse 20s linear infinite;
  border-style: dashed;
  border-color: rgba(124, 58, 237, 0.4);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes spin-reverse {
  to {
    transform: rotate(-360deg);
  }
}

.orbital__core {
  width: 38%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(145deg, #4b2082, var(--purple-mid), var(--purple-bright));
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 60px var(--purple-glow),
    inset 0 0 30px rgba(0, 0, 0, 0.35);
  animation: breathe 5s ease-in-out infinite;
}

.orbital__butterfly {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72%;
  height: 72%;
  perspective: 120px;
}

.butterfly--hero {
  width: 100%;
  height: auto;
  max-width: 118px;
  aspect-ratio: 1;
  filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.35));
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.04);
  }
}

.orbital__dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 16px var(--gold);
}

.orbital__dot--a {
  top: 12%;
  left: 50%;
  animation: orbit-a 12s linear infinite;
  transform-origin: 0 140px;
}

.orbital__dot--b {
  bottom: 18%;
  right: 14%;
  animation: orbit-b 15s linear infinite;
}

.orbital__dot--c {
  top: 40%;
  left: 6%;
  width: 6px;
  height: 6px;
  background: var(--purple-bright);
  box-shadow: 0 0 12px var(--purple-bright);
  animation: twinkle 2.5s ease-in-out infinite;
}

@keyframes orbit-a {
  from {
    transform: translateX(-50%) rotate(0deg) translateY(-140px) rotate(0deg);
  }
  to {
    transform: translateX(-50%) rotate(360deg) translateY(-140px) rotate(-360deg);
  }
}

@keyframes orbit-b {
  0%,
  100% {
    transform: translate(0, 0);
    opacity: 1;
  }
  50% {
    transform: translate(-20px, -30px);
    opacity: 0.7;
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.4;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.3);
  }
}

/* Story */
.story {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(124, 58, 237, 0.06), transparent);
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  max-width: 22ch;
}

.section-head--center {
  text-align: center;
}

.section-head--center h2 {
  max-width: none;
}

.section-head__sub {
  margin: 0;
  max-width: 60ch;
  font-size: 1.05rem;
}

.section-head--center .section-head__sub {
  margin-left: auto;
  margin-right: auto;
}

.timeline {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .timeline {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

.timeline__item {
  position: relative;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.45s var(--ease-out-expo), border-color 0.3s ease, box-shadow 0.3s ease;
}

.timeline__item:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.45);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.timeline__step {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--purple-bright);
  margin-bottom: 0.75rem;
}

.timeline__item h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  color: var(--ink);
}

.timeline__item p {
  margin: 0;
  font-size: 0.95rem;
}

/* Services — hierarquia: 4 pilares em grade 2×2, hub “Marketing de ponta” em destaque full-width */
.services__grid {
  display: grid;
  gap: 1rem;
  margin-top: 2.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .services__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.15rem;
  }
}

@media (min-width: 1024px) {
  .services__grid {
    gap: 1.25rem 1.35rem;
  }
}

.card--service {
  padding: 1.5rem 1.35rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(155deg, rgba(45, 27, 78, 0.85), rgba(26, 10, 46, 0.6));
  border: 1px solid var(--border);
  transition: transform 0.5s var(--ease-out-expo), border-color 0.35s ease, box-shadow 0.35s ease;
  will-change: transform;
}

.card--service:hover {
  border-color: rgba(124, 58, 237, 0.5);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.card--wide {
  grid-column: 1 / -1;
}

@media (min-width: 640px) {
  .card--wide {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0 1.35rem;
    align-items: start;
    padding: 1.65rem 1.5rem;
    border-color: rgba(212, 175, 55, 0.38);
    background: linear-gradient(
      155deg,
      rgba(75, 32, 130, 0.35),
      rgba(45, 27, 78, 0.88),
      rgba(26, 10, 46, 0.75)
    );
    box-shadow: inset 0 1px 0 rgba(255, 215, 0, 0.12);
  }

  .card--wide .card__icon {
    grid-row: span 2;
    font-size: 1.85rem;
    margin-bottom: 0;
    align-self: center;
  }

  .card--wide h3 {
    font-size: 1.35rem;
  }
}

.card__icon {
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 0.75rem;
  line-height: 1;
}

.card--service h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  color: var(--ink);
}

.card--service p {
  margin: 0;
  font-size: 0.98rem;
}

/* CTA band */
.cta-band {
  max-width: none;
  margin: 0;
  padding: 4rem 1.5rem;
  background: linear-gradient(90deg, rgba(124, 58, 237, 0.2), rgba(212, 175, 55, 0.12), rgba(124, 58, 237, 0.2));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.cta-band__inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.cta-band__inner h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: var(--ink);
  margin: 0 0 0.75rem;
}

.cta-band__inner p {
  margin: 0 0 1.5rem;
  color: var(--ink-soft);
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  padding: 3rem 1.5rem 2rem;
  border-top: 1px solid var(--border);
}

.footer__inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
}

.footer__brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0.5rem;
}

.footer__brand .logo__mark--butterfly {
  line-height: 0;
}

.footer__brand .logo__text {
  line-height: 1;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  font-size: 1.2rem;
}

.footer__tagline {
  flex-basis: 100%;
  margin: 0.75rem 0 0;
  max-width: 28ch;
  font-size: 0.95rem;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.footer__links a {
  color: var(--gold-light);
  text-decoration: none;
  font-weight: 600;
}

.footer__links a:hover {
  text-decoration: underline;
}

.footer__legal {
  max-width: 1120px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: rgba(244, 240, 255, 0.45);
  text-align: center;
}

/* FAB WhatsApp */
.fab-wa {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(145deg, #25d366, #128c7e);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 40px rgba(37, 211, 102, 0.45);
  transition: transform 0.35s var(--ease-out-expo), box-shadow 0.35s ease;
}

.fab-wa:hover {
  transform: scale(1.08);
  box-shadow: 0 14px 48px rgba(37, 211, 102, 0.55);
}

/* Reveal animation */
[data-reveal] {
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity 0.8s var(--ease-out-expo),
    transform 0.8s var(--ease-out-expo);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal-delay="1"] {
  transition-delay: 0.08s;
}

[data-reveal-delay="2"] {
  transition-delay: 0.16s;
}
