/* ===== Variables ===== */
:root {
  --black: #1A1A1A;
  --blue: #0F62FE;
  --blue-dark: #0043ce;
  --gray: #F5F5F5;
  --white: #FFFFFF;
  --text-muted: #666;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.12);
  --radius: 12px;
  --transition: 0.3s ease;
  --header-h: 80px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  font-family: 'Poppins', sans-serif;
  color: var(--black);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
  width: min(1140px, 92vw);
  margin: 0 auto;
}

.text-blue { color: var(--blue); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}
.btn--primary {
  background: var(--blue);
  color: var(--white);
}
.btn--primary:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 98, 254, 0.35);
}
.btn--outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}
.btn--outline:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--white);
}
.btn--whatsapp {
  background: #25D366;
  color: var(--white);
  padding: 10px 20px;
  font-size: 0.875rem;
}
.btn--whatsapp svg { width: 18px; height: 18px; fill: currentColor; }
.btn--whatsapp:hover { background: #1da851; }

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: box-shadow var(--transition);
}
.header--scrolled { box-shadow: var(--shadow); }
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 16px;
}
.header__logo img { height: 56px; width: auto; }
.nav__list { display: flex; gap: 32px; }
.nav__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--black);
  transition: color var(--transition);
  position: relative;
}
.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--blue);
  transition: width var(--transition);
}
.nav__link:hover { color: var(--blue); }
.nav__link:hover::after { width: 100%; }
.nav__whatsapp { display: none; }
.header__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.header__toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--black);
  transition: var(--transition);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero__carousel {
  position: absolute;
  inset: 0;
}
.hero__slide {
  position: absolute;
  inset: 0;
  background-color: #1a1a1a;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1.2s ease, transform 6s ease;
  overflow: hidden;
}
.hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.hero__slide--active {
  opacity: 1;
  transform: scale(1);
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26,26,26,0.82) 0%, rgba(26,26,26,0.55) 60%, rgba(15,98,254,0.25) 100%);
}
.hero__content {
  position: relative;
  z-index: 2;
  padding: calc(var(--header-h) + 48px) 0 80px;
  max-width: 680px;
}
.hero__badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(15,98,254,0.2);
  border: 1px solid rgba(15,98,254,0.4);
  border-radius: 50px;
  color: #7eb3ff;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero__title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 20px;
}
.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: rgba(255,255,255,0.85);
  margin-bottom: 32px;
  max-width: 540px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; }
.hero__dots {
  display: flex;
  gap: 10px;
  margin-top: 40px;
}
.hero__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
}
.hero__dot--active {
  background: var(--blue);
  width: 28px;
  border-radius: 5px;
}

/* ===== Marquee ===== */
.marquee {
  background: var(--black);
  color: var(--white);
  padding: 14px 0;
  overflow: hidden;
}
.marquee__track {
  display: flex;
  gap: 24px;
  white-space: nowrap;
  animation: marquee 18s linear infinite;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.marquee__track span:nth-child(even) { color: var(--blue); }
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===== Sections ===== */
.section { padding: 96px 0; }
.section--gray { background: var(--gray); }
.section__header { text-align: center; margin-bottom: 56px; }
.section__label {
  display: inline-block;
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section__title {
  font-size: clamp(1.75rem, 3.5vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 12px;
}
.section__desc {
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

/* ===== Services ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.service-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid rgba(0,0,0,0.04);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.service-card--wide {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 24px;
}
.service-card--wide .service-card__icon { flex-shrink: 0; }
.service-card__icon {
  width: 52px; height: 52px;
  background: rgba(15,98,254,0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--blue);
}
.service-card__icon svg { width: 26px; height: 26px; }
.service-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.service-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ===== Works ===== */
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}
.work-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.work-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}
.work-card__img,
.work-card__slider {
  height: 220px;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s ease;
}
.work-card:hover .work-card__img { transform: scale(1.05); }
.work-card__slider {
  position: relative;
  overflow: hidden;
}
.work-card__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.work-card__slide--active {
  opacity: 1;
}
.work-card:hover .work-card__slide--active {
  transform: scale(1.05);
  transition: opacity 0.8s ease, transform 0.6s ease;
}
.work-card__body { padding: 24px; overflow: hidden; }
.work-card__tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--blue);
  background: rgba(15,98,254,0.1);
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
}
.work-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.work-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
}
/* ===== Trust bar ===== */
.trust-bar {
  background: var(--blue);
  padding: 48px 0;
  color: var(--white);
}
.trust-bar__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}
.trust-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.trust-item__icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.trust-item__icon svg { width: 22px; height: 22px; }
.trust-item strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 4px;
}
.trust-item span {
  font-size: 0.8rem;
  opacity: 0.85;
  line-height: 1.4;
}

/* ===== About ===== */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.about__content p {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 0.95rem;
}
.about__content .btn { margin-top: 16px; }
.about__card {
  background: var(--black);
  border-radius: var(--radius);
  padding: 48px 40px;
  text-align: center;
  color: var(--white);
}
.about__logo-wrap {
  display: inline-block;
  background: var(--white);
  border-radius: 12px;
  padding: 20px 28px;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}
.about__logo {
  width: 140px;
  height: auto;
  display: block;
  margin: 0 auto;
}
.about__slogan {
  font-size: 0.95rem;
  opacity: 0.85;
  margin-bottom: 32px;
  line-height: 1.5;
}
.about__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 24px;
}
.about__stats strong {
  display: block;
  font-size: 1.4rem;
  color: var(--blue);
  filter: brightness(1.4);
}
.about__stats span {
  font-size: 0.75rem;
  opacity: 0.7;
}

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: var(--gray);
  border-radius: var(--radius);
  transition: var(--transition);
  border: 2px solid transparent;
}
.contact-card svg {
  width: 28px; height: 28px;
  flex-shrink: 0;
  color: var(--blue);
}
.contact-card--whatsapp svg { fill: #25D366; stroke: none; }
.contact-card strong {
  display: block;
  font-size: 0.875rem;
  margin-bottom: 2px;
}
.contact-card span {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.contact-card--whatsapp:hover,
a.contact-card:hover {
  border-color: var(--blue);
  background: var(--white);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

/* ===== Footer ===== */
.footer {
  background: var(--black);
  color: rgba(255,255,255,0.7);
  padding: 48px 0 32px;
  text-align: center;
}
.footer__logo-wrap {
  display: inline-block;
  background: var(--white);
  border-radius: 10px;
  padding: 12px 20px;
  margin-bottom: 16px;
}
.footer__logo {
  width: 100px;
  height: auto;
  display: block;
  margin: 0;
  opacity: 1;
}
.footer p { font-size: 0.9rem; margin-bottom: 8px; }
.footer__copy { font-size: 0.8rem; opacity: 0.5; margin-top: 16px; }

/* ===== WhatsApp float ===== */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  width: 60px; height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(37,211,102,0.45);
  transition: transform var(--transition);
}
.whatsapp-float svg {
  width: 32px; height: 32px;
  fill: var(--white);
  position: relative;
  z-index: 2;
}
.whatsapp-float:hover { transform: scale(1.1); }
.whatsapp-float__pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #25D366;
  animation: pulse 2s ease-out infinite;
  z-index: 1;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* ===== Scroll reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal--visible {
  opacity: 1;
  transform: translateY(0);
}
#trabalhos .work-card.reveal {
  transform: translateY(18px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
#trabalhos .section__header.reveal {
  transition: opacity 0.45s ease, transform 0.45s ease;
}

/* ===== Touch & safe areas ===== */
@supports (padding: max(0px)) {
  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}

/* Disable hover lift on touch devices */
@media (hover: none) {
  .service-card:hover,
  .work-card:hover,
  .contact-card--whatsapp:hover,
  a.contact-card:hover {
    transform: none;
    box-shadow: var(--shadow);
  }
  .work-card:hover .work-card__img,
  .work-card:hover .work-card__slide--active {
    transform: none;
  }
  .btn--primary:hover { transform: none; }
}

/* ===== Tablet ===== */
@media (max-width: 900px) {
  :root { --header-h: 72px; }

  .container { width: min(1140px, 94vw); }

  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    padding: 24px 24px calc(24px + env(safe-area-inset-bottom));
    box-shadow: var(--shadow);
    transform: translateX(100%);
    opacity: 1;
    transition: transform 0.35s ease;
    pointer-events: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 999;
  }
  .nav--open {
    transform: translateX(0);
    pointer-events: all;
  }
  .nav__list {
    flex-direction: column;
    gap: 8px;
    text-align: center;
    padding-top: 16px;
  }
  .nav__link {
    display: block;
    padding: 14px 16px;
    font-size: 1rem;
    min-height: 48px;
    line-height: 1.25;
  }
  .nav__link::after { display: none; }
  .nav__whatsapp {
    display: list-item;
    margin-top: 16px;
  }
  .nav__whatsapp-btn {
    width: 100%;
    min-height: 52px;
    font-size: 1rem;
  }
  .header__toggle {
    display: flex;
    min-width: 48px;
    min-height: 48px;
    align-items: center;
    justify-content: center;
  }
  .header__toggle--active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .header__toggle--active span:nth-child(2) { opacity: 0; }
  .header__toggle--active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
  .header__cta { display: none; }
  .about { grid-template-columns: 1fr; gap: 40px; }
  .service-card--wide { flex-direction: column; text-align: center; }
  .service-card--wide .service-card__icon { margin-bottom: 0; }
  .works-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .section__header { margin-bottom: 40px; }
}

/* ===== Smartphone ===== */
@media (max-width: 600px) {
  :root { --header-h: 64px; }

  html { scroll-padding-top: calc(var(--header-h) + 8px); }

  .container { width: 100%; padding-left: 16px; padding-right: 16px; }

  .header__logo img { height: 44px; }

  .section { padding: 56px 0; }
  .section__header { margin-bottom: 32px; }
  .section__title { font-size: 1.5rem; }
  .section__desc { font-size: 0.9rem; padding: 0 4px; }

  /* Hero */
  .hero {
    min-height: 100dvh;
    min-height: -webkit-fill-available;
  }
  .hero__overlay {
    background: linear-gradient(
      180deg,
      rgba(26, 26, 26, 0.88) 0%,
      rgba(26, 26, 26, 0.75) 50%,
      rgba(26, 26, 26, 0.9) 100%
    );
  }
  .hero__content {
    padding: calc(var(--header-h) + 24px) 0 48px;
    max-width: 100%;
  }
  .hero__badge { font-size: 0.7rem; padding: 5px 12px; margin-bottom: 14px; }
  .hero__title { font-size: 1.65rem; margin-bottom: 14px; }
  .hero__subtitle { font-size: 0.95rem; margin-bottom: 24px; line-height: 1.5; }
  .hero__actions { flex-direction: column; gap: 12px; }
  .hero__actions .btn {
    width: 100%;
    min-height: 52px;
    font-size: 1rem;
  }
  .hero__dots { margin-top: 28px; gap: 8px; }
  .hero__dot {
    width: 12px;
    height: 12px;
    padding: 0;
  }
  .hero__dot--active { width: 32px; }

  .marquee { padding: 12px 0; }
  .marquee__track { font-size: 0.75rem; gap: 16px; }

  /* Nossos Serviços — compacto no celular */
  #servicos.section {
    padding: 40px 0;
  }
  #servicos .section__header {
    margin-bottom: 20px;
  }
  #servicos .section__title {
    font-size: 1.35rem;
    margin-bottom: 6px;
  }
  #servicos .section__desc {
    font-size: 0.8rem;
    line-height: 1.4;
  }
  #servicos .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  #servicos .service-card {
    padding: 14px 10px;
  }
  #servicos .service-card__icon {
    width: 36px;
    height: 36px;
    margin-bottom: 8px;
    border-radius: 8px;
  }
  #servicos .service-card__icon svg {
    width: 18px;
    height: 18px;
  }
  #servicos .service-card h3 {
    font-size: 0.8rem;
    margin-bottom: 0;
    line-height: 1.25;
  }
  #servicos .service-card p {
    display: none;
  }
  #servicos .service-card--wide {
    grid-column: 1 / -1;
    flex-direction: row;
    text-align: left;
    gap: 12px;
    padding: 14px 16px;
  }
  #servicos .service-card--wide .service-card__icon {
    margin-bottom: 0;
    flex-shrink: 0;
  }
  #servicos .service-card--wide h3 {
    font-size: 0.85rem;
  }
  #servicos .service-card--wide p {
    display: block;
    font-size: 0.72rem;
    margin-top: 4px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .works-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .work-card__img,
  .work-card__slider { height: 200px; }
  .work-card__body { padding: 20px; }
  .work-card h3 {
    font-size: 1rem;
    line-height: 1.35;
    word-break: break-word;
  }
  .work-card p { font-size: 0.85rem; }

  .trust-bar { padding: 36px 0; }
  .trust-bar__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .trust-item { gap: 14px; }

  .about__card { padding: 32px 24px; }
  .about__logo { width: 110px; }
  .about__stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .about__stats strong { font-size: 1.15rem; }
  .about__stats span { font-size: 0.65rem; }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .contact-card {
    padding: 18px 16px;
    min-height: 72px;
  }

  .footer {
    padding: 40px 16px calc(100px + env(safe-area-inset-bottom));
  }

  .whatsapp-float {
    bottom: max(16px, env(safe-area-inset-bottom));
    right: max(16px, env(safe-area-inset-right));
    width: 56px;
    height: 56px;
  }
  .whatsapp-float svg { width: 28px; height: 28px; }
}

/* Very small phones */
@media (max-width: 380px) {
  .hero__title { font-size: 1.45rem; }
  .about__stats { grid-template-columns: 1fr; text-align: center; }
}

/* Menu backdrop */
@media (max-width: 900px) {
  .nav-backdrop {
    position: fixed;
    inset: 0;
    top: var(--header-h);
    background: rgba(26, 26, 26, 0.45);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
  }
  .nav-backdrop--visible {
    opacity: 1;
    pointer-events: all;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee__track { animation: none; }
  .hero__slide { transition: opacity 0.4s ease; transform: none !important; }
  .reveal { transition: opacity 0.3s ease; transform: none; }
  .whatsapp-float__pulse { animation: none; }
}
