:root {
  --blue-950: #11145d;
  --blue-900: #191b75;
  --blue-800: #25258c;
  --orange: #f5a623;
  --orange-strong: #ffb52b;
  --ink: #111827;
  --muted: #687083;
  --line: rgba(255,255,255,.14);
  --bg: #f4f6fb;
  --card: #ffffff;
  --radius: 24px;
  --shadow: 0 24px 70px rgba(17, 20, 93, .18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.topbar {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1120px, calc(100% - 28px));
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  background: rgba(17, 20, 93, .88);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 40px rgba(5, 7, 55, .24);
  transition: transform .35s ease, background .35s ease, box-shadow .35s ease, padding .35s ease;
  will-change: transform;
}
.topbar.scrolled {
  padding: 8px 10px;
  background: rgba(17, 20, 93, .94);
  box-shadow: 0 16px 36px rgba(5, 7, 55, .30);
}
.topbar.faded {
  opacity: .18;
  transform: translateX(-50%) translateY(-18px) scale(.985);
  background: rgba(17, 20, 93, .58);
  box-shadow: 0 10px 24px rgba(5, 7, 55, .12);
}
.topbar.faded:hover,
.topbar.faded:focus-within {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
  background: rgba(17, 20, 93, .94);
  box-shadow: 0 16px 36px rgba(5, 7, 55, .30);
}
.brand { display: flex; align-items: center; }
.brand img {
  height: 52px;
  width: 142px;
  object-fit: cover;
  border-radius: 999px;
}
.topbar nav { display: flex; gap: 8px; align-items: center; }
.topbar nav a {
  color: rgba(255,255,255,.88);
  font-size: .94rem;
  font-weight: 700;
  padding: 10px 13px;
  border-radius: 999px;
  transition: .2s ease;
}
.topbar nav a:hover { background: rgba(255,255,255,.1); color: white; }
.menu-btn {
  display: none;
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  background: var(--orange);
  color: var(--blue-950);
  font-weight: 900;
  cursor: pointer;
}

.section { width: min(1120px, calc(100% - 28px)); margin: 0 auto; padding: 88px 0; }
.hero {
  width: 100%;
  min-height: 760px;
  padding: 150px max(24px, calc((100% - 1120px) / 2)) 94px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  gap: 48px;
  align-items: center;
  background:
    radial-gradient(circle at 75% 22%, rgba(245,166,35,.30), transparent 33%),
    linear-gradient(145deg, var(--blue-950), var(--blue-900) 48%, #0d103f);
  color: white;
  overflow: hidden;
  position: relative;
}
.hero:before {
  content: "";
  position: absolute;
  inset: auto -12% -28% 50%;
  height: 420px;
  background: rgba(245,166,35,.08);
  transform: rotate(-14deg);
  border-radius: 80px;
}
.hero-content, .hero-card { position: relative; z-index: 1; }
.hero-content,
.hero-card {
  --scroll-y: 0px;
  transform: translateY(var(--scroll-y));
  transition: transform .18s linear;
  will-change: transform;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--orange-strong);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.eyebrow:before {
  content: "";
  width: 32px;
  height: 3px;
  background: currentColor;
  border-radius: 999px;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  margin: 16px 0 18px;
  font-size: clamp(2.55rem, 5vw, 5.35rem);
  line-height: .96;
  letter-spacing: -0.06em;
  max-width: 780px;
}
.hero p { max-width: 620px; color: rgba(255,255,255,.82); font-size: 1.15rem; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  min-height: 48px;
  padding: 13px 22px;
  background: linear-gradient(135deg, var(--orange), #ffd07a);
  color: var(--blue-950);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 16px 35px rgba(245,166,35,.25);
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 20px 42px rgba(245,166,35,.34); }
.btn.ghost {
  background: rgba(255,255,255,.09);
  color: white;
  border: 1px solid rgba(255,255,255,.20);
  box-shadow: none;
}
.btn.small { min-height: 40px; padding: 9px 15px; }
.btn.full { width: 100%; }
.btn.danger { background: #dc2626; color: white; box-shadow: none; }

.hero-card {
  border-radius: 34px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.17);
  padding: 14px;
  box-shadow: 0 32px 80px rgba(0,0,0,.25);
  align-self: center;
}
.hero-card img {
  width: 100%;
  height: auto;
  object-fit: initial;
  border-radius: 26px;
  animation: heroMediaFloat 7s ease-in-out infinite;
}
.floating-card {
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 32px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(17,20,93,.88);
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(16px);
  animation: heroBadgeFloat 7s ease-in-out infinite;
}
.floating-card strong, .floating-card span { display: block; }
.floating-card span { color: rgba(255,255,255,.72); }

@keyframes heroMediaFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes heroBadgeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(7px); }
}

.split {
  display: grid;
  grid-template-columns: .75fr 1.25fr;
  gap: 56px;
  align-items: start;
}
h2 {
  margin: 12px 0 18px;
  font-size: clamp(2rem, 3.5vw, 3.25rem);
  line-height: 1.02;
  letter-spacing: -.045em;
  color: var(--blue-950);
}
.split p, .section-heading p { color: var(--muted); font-size: 1.06rem; }
.section-heading { text-align: center; max-width: 730px; margin: 0 auto 34px; }
.section-heading .eyebrow { justify-content: center; }

.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.info-card, .service-card, .work-card, .contact-card, .client-box {
  background: var(--card);
  border: 1px solid rgba(17,20,93,.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .32s ease, box-shadow .32s ease, border-color .32s ease;
}
.info-card:hover,
.service-card:hover,
.work-card:hover,
.client-logo-card:hover,
.contact-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 78px rgba(17, 20, 93, .20);
  border-color: rgba(245,166,35,.26);
}
.info-card { padding: 26px; }
.structure-card { overflow: hidden; }
.structure-card-media-grid {
  margin: -26px -26px 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  background: #eef1f8;
}
.structure-card-media {
  aspect-ratio: 16 / 11;
  background: #eef1f8;
}
.structure-card-media img,
.structure-card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(245,166,35,.16);
  color: var(--blue-950);
  font-size: 1.35rem;
  margin-bottom: 16px;
}
.info-card h3, .service-card h3, .work-card h3 { color: var(--blue-950); line-height: 1.1; margin-bottom: 10px; }
.info-card p { color: var(--muted); margin-bottom: 0; }

.services, .works { width: 100%; padding-left: max(24px, calc((100% - 1120px) / 2)); padding-right: max(24px, calc((100% - 1120px) / 2)); background: white; }
.service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.service-card { padding: 30px; overflow: hidden; position: relative; }
.service-card:before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: var(--orange);
}
.service-card ul { padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.service-card li { list-style: none; color: #3d4556; display: flex; gap: 10px; align-items: flex-start; }
.service-card li:before { content: "✓"; color: var(--orange); font-weight: 900; }

.work-grid { display: grid; grid-template-columns: 1fr; gap: 26px; }
.work-card { padding: 26px; }
.work-head { display: grid; gap: 6px; margin-bottom: 18px; }
.work-head span {
  display: inline-flex;
  width: fit-content;
  background: rgba(245,166,35,.16);
  color: var(--blue-950);
  font-weight: 900;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: .8rem;
}
.work-head p { color: var(--muted); margin: 0; }
.work-photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}
.work-photos figure {
  margin: 0;
  overflow: hidden;
  border-radius: 22px;
  background: #f5f7fb;
  border: 1px solid rgba(17,20,93,.08);
}
.work-photos img { width: 100%; height: 220px; object-fit: cover; }
.work-photos figcaption { padding: 14px 16px 16px; color: #4d5668; font-weight: 600; }

.client-box { padding: 30px; display: grid; grid-template-columns: 1.5fr .75fr; gap: 28px; }
.tags { display: flex; flex-wrap: wrap; gap: 10px; align-content: flex-start; }
.tags span {
  border: 1px solid rgba(17,20,93,.12);
  background: #f7f8fe;
  color: var(--blue-950);
  padding: 9px 13px;
  border-radius: 999px;
  font-size: .92rem;
  font-weight: 800;
}
.segments { border-left: 1px solid rgba(17,20,93,.10); padding-left: 26px; }
.segments ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.segments li { color: #3f4859; font-weight: 700; }

.contact {
  display: grid;
  grid-template-columns: 1fr .8fr;
  gap: 32px;
  align-items: center;
}
.contact-card { padding: 30px; }
.contact-card a { color: var(--blue-900); font-weight: 800; }
.contact-card p { margin-bottom: 12px; }

footer {
  background: var(--blue-950);
  color: rgba(255,255,255,.75);
  padding: 32px 20px;
  text-align: center;
}
footer img { width: 150px; height: 60px; border-radius: 999px; object-fit: cover; margin: 0 auto 14px; }
footer a { color: var(--orange-strong); font-weight: 800; }

.validation { color: #dc2626; font-size: .9rem; font-weight: 700; }

@media (max-width: 980px) {
  .topbar { border-radius: 28px; align-items: flex-start; }
  .menu-btn { display: inline-flex; }
  .topbar nav {
    display: none;
    position: absolute;
    top: 78px;
    left: 0;
    right: 0;
    padding: 12px;
    border-radius: 24px;
    background: rgba(17,20,93,.96);
    flex-direction: column;
    align-items: stretch;
  }
  .topbar nav.open { display: flex; }
  .topbar:has(nav.open) {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
    background: rgba(17,20,93,.96);
  }
  .topbar nav a { text-align: center; }
  .hero { grid-template-columns: 1fr; padding-top: 130px; min-height: auto; }
  .split, .contact, .client-box { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-grid { grid-template-columns: 1fr; }
  .segments { border-left: 0; padding-left: 0; border-top: 1px solid rgba(17,20,93,.10); padding-top: 24px; }
}

@media (max-width: 620px) {
  .section { padding: 62px 0; }
  .hero { padding-left: 18px; padding-right: 18px; }
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; }
  .cards { grid-template-columns: 1fr; }
  .floating-card { position: static; margin-top: 12px; }
  .work-card, .service-card, .info-card, .client-box, .contact-card { padding: 22px; }
}

/* Ajustes v2: logos sem corte, clientes com logos e galeria equilibrada */
.brand img,
footer img,
.admin-brand img,
.login-card img {
    object-fit: contain !important;
    background: transparent;
    border: none;
    box-shadow: none;
}

.brand img {
  width: auto;
  min-width: 126px;
  max-width: 180px;
  height: 58px;
  padding: 5px 12px;
}

footer img {
  width: auto;
  max-width: 210px;
  height: 78px;
  padding: 8px 14px;
  border-radius: 18px;
}

.work-photos {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  align-items: stretch;
}
.work-photos figure {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.work-photos img {
  height: 260px;
  flex: 0 0 auto;
}
.work-photos figcaption {
  flex: 1;
  padding: 14px 16px;
  color: var(--muted);
  font-weight: 700;
}

.client-logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  align-content: start;
}
.client-logo-card {
  min-height: 132px;
  padding: 16px;
  border: 1px solid rgba(17,20,93,.08);
  border-radius: 20px;
  background: #fff;
  display: grid;
  grid-template-rows: 72px auto;
  align-items: center;
  justify-items: center;
  gap: 10px;
  box-shadow: 0 12px 32px rgba(17,20,93,.08);
}
.client-logo-card img {
  width: 100%;
  max-width: 130px;
  height: 72px;
  object-fit: contain;
}
.client-logo-card span {
  text-align: center;
  font-size: .82rem;
  line-height: 1.25;
  font-weight: 900;
  color: var(--blue-950);
}
.client-logo-card.text-only {
  min-height: 88px;
  grid-template-rows: 1fr;
  background: rgba(245,166,35,.12);
}

@media (max-width: 720px) {
  .brand img { height: 50px; max-width: 150px; }
  .client-logo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .client-logo-card { min-height: 118px; padding: 12px; }
  .client-logo-card img { height: 58px; }
}

/* Ajustes v3: performance visual, lightbox e animacoes suaves */
.rich-text > :last-child { margin-bottom: 0; }
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(34px) scale(.985);
  filter: blur(8px);
  transition: opacity .78s cubic-bezier(.2,.65,.22,1), transform .78s cubic-bezier(.2,.65,.22,1), filter .78s ease;
  will-change: opacity, transform, filter;
}
.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: none;
  filter: blur(0);
}
.reveal-on-scroll .section-heading,
.reveal-on-scroll .split > *,
.reveal-on-scroll .info-card,
.reveal-on-scroll .service-card,
.reveal-on-scroll .work-card,
.reveal-on-scroll .client-logo-card,
.reveal-on-scroll .segments,
.reveal-on-scroll .contact-card {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .62s cubic-bezier(.2,.65,.22,1), transform .62s cubic-bezier(.2,.65,.22,1);
}
.reveal-on-scroll.is-visible .section-heading,
.reveal-on-scroll.is-visible .split > *,
.reveal-on-scroll.is-visible .info-card,
.reveal-on-scroll.is-visible .service-card,
.reveal-on-scroll.is-visible .work-card,
.reveal-on-scroll.is-visible .client-logo-card,
.reveal-on-scroll.is-visible .segments,
.reveal-on-scroll.is-visible .contact-card {
  opacity: 1;
  transform: none;
}
.reveal-on-scroll.is-visible .section-heading { transition-delay: .04s; }
.reveal-on-scroll.is-visible .split > *:nth-child(1),
.reveal-on-scroll.is-visible .info-card:nth-child(1),
.reveal-on-scroll.is-visible .service-card:nth-child(1),
.reveal-on-scroll.is-visible .work-card:nth-child(1),
.reveal-on-scroll.is-visible .client-logo-card:nth-child(1) { transition-delay: .08s; }
.reveal-on-scroll.is-visible .split > *:nth-child(2),
.reveal-on-scroll.is-visible .info-card:nth-child(2),
.reveal-on-scroll.is-visible .service-card:nth-child(2),
.reveal-on-scroll.is-visible .work-card:nth-child(2),
.reveal-on-scroll.is-visible .client-logo-card:nth-child(2) { transition-delay: .16s; }
.reveal-on-scroll.is-visible .info-card:nth-child(3),
.reveal-on-scroll.is-visible .service-card:nth-child(3),
.reveal-on-scroll.is-visible .work-card:nth-child(3),
.reveal-on-scroll.is-visible .client-logo-card:nth-child(3) { transition-delay: .24s; }
.reveal-on-scroll.is-visible .info-card:nth-child(4),
.reveal-on-scroll.is-visible .service-card:nth-child(4),
.reveal-on-scroll.is-visible .work-card:nth-child(4),
.reveal-on-scroll.is-visible .client-logo-card:nth-child(4) { transition-delay: .32s; }
.reveal-on-scroll.is-visible .info-card:nth-child(n+5),
.reveal-on-scroll.is-visible .service-card:nth-child(n+5),
.reveal-on-scroll.is-visible .work-card:nth-child(n+5),
.reveal-on-scroll.is-visible .client-logo-card:nth-child(n+5) { transition-delay: .38s; }
.work-photo-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  overflow: hidden;
}
.work-photo-button img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  transition: transform .24s ease;
}
.work-photo-button video {
  width: 100%;
  height: 260px;
  object-fit: cover;
  background: #080a2a;
}
.work-photo-button:hover img { transform: scale(1.035); }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px 76px;
  background: rgba(5, 7, 35, .94);
  color: white;
}
.lightbox.is-open { display: flex; }
.lightbox figure {
  width: min(1100px, 100%);
  margin: 0;
  display: grid;
  gap: 14px;
}
.lightbox img,
.lightbox video {
  width: 100%;
  max-height: calc(100vh - 150px);
  object-fit: contain;
  border-radius: 18px;
  background: rgba(255,255,255,.06);
}
.lightbox figcaption {
  min-height: 28px;
  text-align: center;
  color: rgba(255,255,255,.82);
  font-weight: 700;
}
.lightbox-close,
.lightbox-nav {
  position: absolute;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.1);
  color: white;
  cursor: pointer;
  transition: .2s ease;
}
.lightbox-close:hover,
.lightbox-nav:hover { background: var(--orange); color: var(--blue-950); }
.lightbox-close {
  top: 22px;
  right: 22px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  font-size: 1.2rem;
  font-weight: 900;
}
.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 72px;
  border-radius: 18px;
  font-size: 2.6rem;
  line-height: 1;
}
.lightbox-nav.prev { left: 20px; }
.lightbox-nav.next { right: 20px; }

@media (max-width: 620px) {
  .lightbox { padding: 70px 14px 28px; }
  .lightbox-nav {
    width: 44px;
    height: 56px;
    top: auto;
    bottom: 18px;
    transform: none;
    font-size: 2rem;
  }
  .lightbox-nav.prev { left: 18px; }
  .lightbox-nav.next { right: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal-on-scroll,
  .reveal-on-scroll .section-heading,
  .reveal-on-scroll .split > *,
  .reveal-on-scroll .info-card,
  .reveal-on-scroll .service-card,
  .reveal-on-scroll .work-card,
  .reveal-on-scroll .client-logo-card,
  .reveal-on-scroll .segments,
  .reveal-on-scroll .contact-card,
  .hero-card,
  .hero-content,
  .hero-card img,
  .floating-card,
  .work-photo-button img,
  .btn {
    animation: none;
    transition: none;
  }
  .reveal-on-scroll,
  .reveal-on-scroll .section-heading,
  .reveal-on-scroll .split > *,
  .reveal-on-scroll .info-card,
  .reveal-on-scroll .service-card,
  .reveal-on-scroll .work-card,
  .reveal-on-scroll .client-logo-card,
  .reveal-on-scroll .segments,
  .reveal-on-scroll .contact-card {
    opacity: 1;
    transform: none;
    filter: none;
  }
}
