/* Sena Moreira Engenharia — landing page
   Paleta extraída da logo (azul, vermelho, preto sobre branco).
   CSS próprio, sem framework. */

:root {
  --ink: #0e1420;
  --ink-soft: #59637a;
  --navy: #0c1836;
  --navy-deep: #081026;
  --blue: #2647d6;
  --blue-dark: #1b34a8;
  --blue-tint: #eef1fb;
  --red: #e01e2b;
  --red-dark: #b91622;
  --line: #d9dce4;
  --canvas: #e9ecf2;
  --canvas-deep: #dde1ea;
  --surface: #ffffff;
  --white: #ffffff;
  --font-head: "Archivo", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
  color: var(--ink);
}

h1 { font-size: clamp(2.4rem, 3vw + 1.6rem, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 1.6vw + 1.2rem, 2.5rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 600; }

p { margin: 0 0 1em; }

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--white);
  padding: 10px 16px;
  z-index: 200;
}
.skip-link:focus { left: 16px; top: 16px; }

/* ---------- botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background-color 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px); }

.btn-primary {
  background: var(--red);
  color: var(--white);
}
.btn-primary:hover { background: var(--red-dark); box-shadow: 0 14px 28px -12px rgba(224, 30, 43, 0.55); }

.btn-outline {
  border-color: var(--blue);
  color: var(--blue);
}
.btn-outline:hover { background: var(--blue); color: var(--white); box-shadow: 0 14px 28px -14px rgba(38, 71, 214, 0.55); }

.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--white);
}
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--white); }

.btn-ghost {
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--ink); }

.btn-sm { padding: 9px 18px; font-size: 0.85rem; }

.btn-whatsapp {
  background: #25d366;
  color: var(--white);
}
.btn-whatsapp:hover { background: #1ebc59; }
.btn-whatsapp svg { width: 18px; height: 18px; fill: currentColor; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(233, 236, 242, 0.68);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
}
.site-header.is-scrolled {
  border-color: var(--line);
  box-shadow: 0 4px 20px -12px rgba(16, 19, 26, 0.15);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 78px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--ink);
  flex: none;
}
.brand img { border-radius: 6px; }
.brand span { display: flex; flex-direction: column; line-height: 1.15; font-size: 1.05rem; }
.brand small { font-family: var(--font-body); font-weight: 500; font-size: 0.63rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.08em; }

.nav ul {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav a {
  position: relative;
  display: inline-block;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--ink-soft);
  padding: 8px 12px;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 14px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}
.nav-toggle span {
  width: 20px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero (split, minimalista) ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: 640px;
}
.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 90px 64px 90px 24px;
  max-width: 620px;
  margin-left: auto;
}
.hero-text h1,
.hero-text .lede { max-width: 100%; overflow-wrap: break-word; }
.hero-badge { align-self: flex-start; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 16px 7px 12px;
  margin-bottom: 22px;
  transition: border-color 0.2s ease, transform 0.3s var(--ease);
}
.hero-badge:hover { border-color: var(--red); transform: translateY(-2px); }
.hero-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  flex: none;
  box-shadow: 0 0 0 3px rgba(224, 30, 43, 0.18);
}
.hero .lede { font-size: 1.08rem; color: var(--ink-soft); max-width: 520px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; }

/* ---------- carrossel do hero ---------- */
.hero-media { position: relative; overflow: hidden; background: var(--navy); min-height: 340px; min-width: 0; }
.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1.4s var(--ease), transform 6s linear;
}
.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}
.hero-dots {
  position: absolute;
  left: 20px;
  bottom: 20px;
  z-index: 2;
  display: flex;
  gap: 6px;
}
.hero-dots span {
  width: 18px;
  height: 3px;
  background: rgba(255, 255, 255, 0.4);
  transition: background-color 0.3s ease;
}
.hero-dots span.is-active { background: var(--white); }

/* entrada animada do hero */
.hero [data-in] {
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.8s var(--ease) forwards;
}
.hero .hero-badge { animation-delay: 0.05s; }
.hero h1 { animation-delay: 0.15s; }
.hero .lede { animation-delay: 0.32s; }
.hero .hero-cta { animation-delay: 0.46s; }
@keyframes rise {
  to { opacity: 1; transform: none; }
}

/* ---------- seções gerais ---------- */
.section { padding: 108px 0; }
.section-alt { background: var(--canvas-deep); }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 12px;
}
.kicker::before { content: ""; width: 22px; height: 2px; background: var(--blue); }
.center { text-align: center; margin-left: auto; margin-right: auto; justify-content: center; }
h2.center { max-width: 640px; }

/* ---------- sobre ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 72px;
  align-items: stretch;
}
.about-img { position: relative; overflow: hidden; border-radius: 4px; }
.about-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
  transition: transform 0.7s var(--ease);
}
.about-img:hover img { transform: scale(1.06); }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.stat strong {
  display: block;
  font-family: var(--font-head);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat span { font-size: 0.82rem; color: var(--ink-soft); }

/* ---------- serviços ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: 56px;
  background: var(--line);
  border: 1px solid var(--line);
}
.service-card {
  background: var(--surface);
  overflow: hidden;
  transition: background-color 0.3s ease;
}
.service-card:hover { background: var(--canvas); }
.service-card .service-media { overflow: hidden; height: 220px; }
.service-card img { height: 100%; width: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.service-card:hover img { transform: scale(1.08); }
.service-body { padding: 32px; }
.service-body h3 { margin-bottom: 10px; display: flex; align-items: baseline; gap: 10px; }
.service-num { font-family: var(--font-head); color: var(--blue); font-size: 0.85rem; }
.service-body p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }

/* ---------- galeria de projetos (grid uniforme, crop centralizado por foto) ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 56px;
}
.gallery-item {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  cursor: zoom-in;
  background: var(--surface);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease), filter 0.4s ease;
  filter: grayscale(0.15);
}
.gallery-item::after {
  content: "+";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--white);
  background: rgba(16, 19, 26, 0);
  transition: background-color 0.35s ease, opacity 0.35s ease;
  opacity: 0;
}
.gallery-item:hover::after { background: rgba(16, 19, 26, 0.45); opacity: 1; }
.gallery-item:hover img { transform: scale(1.08); filter: grayscale(0); }

.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 92vw;
  max-height: 90vh;
}
.lightbox::backdrop { background: rgba(10, 12, 16, 0.92); }
.lightbox img { max-width: 92vw; max-height: 90vh; width: auto; height: auto; object-fit: contain; display: block; }
.lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.18); }
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }
@media (max-width: 640px) {
  .lightbox-nav { width: 40px; height: 40px; font-size: 1.5rem; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

/* ---------- plataforma trena ---------- */
.trena {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--white);
}
.trena-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}
.trena h2 { color: var(--white); }
.trena .kicker { color: var(--red); }
.trena .kicker::before { background: var(--red); }
.trena .lede { color: rgba(255, 255, 255, 0.72); }
.trena-destaque {
  margin: 22px 0 30px;
  padding: 2px 0 2px 18px;
  border-left: 3px solid var(--red);
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--white);
}
.trena-list {
  list-style: none;
  margin: 30px 0 36px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.trena-list li {
  position: relative;
  padding-left: 32px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
}
.trena-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--red);
  border-radius: 50%;
}
.trena-list li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 11px;
  width: 6px;
  height: 6px;
  background: var(--red);
  border-radius: 50%;
}
.trena-cta { display: flex; flex-wrap: wrap; gap: 14px; }

.trena-visual { display: flex; justify-content: center; }
.trena-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 28px;
  width: 100%;
  max-width: 360px;
}
.trena-card-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.92rem;
  font-weight: 500;
}
.trena-card-row:last-child { border-bottom: none; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot-ok { background: #3ecf7e; }
.dot-wait { background: #f0b429; }
.dot-blue { background: #5b7cf0; }

/* ---------- contato ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: start;
}
.contact-list {
  list-style: none;
  margin: 26px 0 30px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.contact-list strong {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-bottom: 4px;
}
.contact-list a { text-decoration: none; font-weight: 600; color: var(--ink); }
.contact-list a:hover { color: var(--blue); }
.contact-list span { font-weight: 500; }

.map-wrap {
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 4 / 3;
  filter: grayscale(0.3) contrast(1.05);
  transition: filter 0.4s ease;
}
.map-wrap:hover { filter: none; }
.map-wrap iframe { width: 100%; height: 100%; border: 0; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.65);
  padding: 44px 0;
  font-size: 0.85rem;
}
.footer-inner { text-align: center; }
.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
}
.footer-brand img { border-radius: 6px; }
.footer-credits { margin-top: 10px; }
.footer-credits a { color: rgba(255, 255, 255, 0.85); }

/* ---------- whatsapp flutuante ---------- */
.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 150;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px -6px rgba(37, 211, 102, 0.6);
  transition: transform 0.3s var(--ease);
}
.whatsapp-float:hover { transform: scale(1.1) rotate(-6deg); }
.whatsapp-float svg { width: 30px; height: 30px; fill: var(--white); }

/* ---------- reveal ao rolar ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: none; }
.services-grid.is-visible .service-card { opacity: 1; transform: none; }
.services-grid .service-card {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), background-color 0.3s ease;
}
.services-grid.is-visible .service-card:nth-child(1) { transition-delay: 0.05s; }
.services-grid.is-visible .service-card:nth-child(2) { transition-delay: 0.15s; }
.services-grid.is-visible .service-card:nth-child(3) { transition-delay: 0.25s; }
.services-grid.is-visible .service-card:nth-child(4) { transition-delay: 0.35s; }

.gallery-grid .gallery-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.gallery-grid.is-visible .gallery-item { opacity: 1; transform: none; }
.gallery-grid.is-visible .gallery-item:nth-child(4n+1) { transition-delay: 0.04s; }
.gallery-grid.is-visible .gallery-item:nth-child(4n+2) { transition-delay: 0.11s; }
.gallery-grid.is-visible .gallery-item:nth-child(4n+3) { transition-delay: 0.18s; }
.gallery-grid.is-visible .gallery-item:nth-child(4n+4) { transition-delay: 0.25s; }

/* ---------- responsivo ---------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-text { max-width: none; margin: 0; padding: 56px 24px 40px; }
  .hero-media img { min-height: 320px; }
  .about-grid, .trena-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-img { order: -1; aspect-ratio: 4 / 3; }
  .services-grid { grid-template-columns: 1fr; }
  .trena-visual { order: -1; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav {
    position: fixed;
    inset: 78px 0 0 0;
    background: var(--canvas);
    padding: 24px;
    transform: translateX(100%);
    transition: transform 0.3s var(--ease);
    overflow-y: auto;
  }
  .nav.is-open { transform: translateX(0); }
  .nav ul { flex-direction: column; gap: 4px; }
  .nav a {
    display: block;
    padding: 14px 6px;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--line);
  }
  .nav a::after { display: none; }
  .nav-toggle { display: flex; }
  .header-actions .btn-ghost { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats .stat:last-child { grid-column: span 2; }
  .section { padding: 72px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero [data-in], .hero-media, [data-reveal], .services-grid .service-card, .gallery-grid .gallery-item {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
}
