/* ======================================================================
   MM Engenharia – principal.css
   Design system, componentes e utilitários
   ====================================================================== */

/* ── Variáveis de design ─────────────────────────────────────────────── */
:root {
  --bg-1: #080a0c;
  --bg-2: #0d1116;
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-brd: rgba(255, 255, 255, 0.12);
  --brand-start: #f6e27a;   /* ouro claro  */
  --brand-mid:   #e7c155;   /* ouro médio  */
  --brand-end:   #caa64c;   /* ouro escuro */
  --brand-txt:   #0b0d10;
  --muted:       #b6bcc6;
  --muted-2:     #93a0b0;
  --shadow:      0 10px 30px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .04);
  --radius:      16px;
}

/* ── Base ─────────────────────────────────────────────────────────────── */
html,
body {
  height: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: #e8edf2;
  background: linear-gradient(180deg, #080a0c, #0d1116);
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
  /* scroll-behavior removido – já feito via JS com offset correto para navbar fixa */
}

/* ── Utilitários ──────────────────────────────────────────────────────── */
.text-gradient-gold {
  background: linear-gradient(135deg, var(--brand-start), var(--brand-mid) 45%, var(--brand-end));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-title {
  font-weight: 800;
  letter-spacing: .3px;
  margin-bottom: .5rem;
}

.section-subtitle {
  color: var(--muted);
}

.divider {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 1.25rem 0;
}

/* ── Glassmorphism ────────────────────────────────────────────────────── */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-brd);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ── Botões ───────────────────────────────────────────────────────────── */
.btn-brand {
  background: linear-gradient(135deg, var(--brand-start), var(--brand-mid) 45%, var(--brand-end));
  color: var(--brand-txt);
  font-weight: 700;
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.25rem;
  box-shadow: 0 8px 24px rgba(226, 187, 65, 0.25);
  transition: transform .2s ease, box-shadow .3s ease, filter .2s ease;
  will-change: transform;
}

.btn-brand:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 12px 28px rgba(226, 187, 65, 0.35);
  color: var(--brand-txt);
}

.btn-outline-brand {
  border: 1px solid var(--brand-mid);
  color: #f8f2d2;
  border-radius: 999px;
  padding: 0.6rem 1.1rem;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.btn-outline-brand:hover {
  background: linear-gradient(135deg, rgba(246, 226, 122, 0.12), rgba(202, 166, 76, 0.12));
  color: #fff;
  border-color: var(--brand-end);
}

/* ── Navbar ───────────────────────────────────────────────────────────── */
.navbar {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(8, 10, 12, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.navbar .nav-link {
  color: #d7dde5;
  font-weight: 500;
  letter-spacing: .2px;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: #fff;
  text-shadow: 0 0 12px rgba(246, 226, 122, 0.2);
}

/* ── Hero / Header ────────────────────────────────────────────────────── */
.hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.hero .carousel-item {
  position: relative;
  height: 100vh;
  min-height: 560px;
}

.hero .carousel-item .kenburns {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  transform: scale(1.1);
  animation: kenburns 18s ease-in-out both;
  will-change: transform;
}

.hero .carousel-item:nth-child(2) .kenburns { animation-delay: .2s; }
.hero .carousel-item:nth-child(3) .kenburns { animation-delay: .4s; }

@keyframes kenburns {
  0%   { transform: scale(1.15) translate3d(0, 0, 0); }
  50%  { transform: scale(1.22) translate3d(0, 0, 0); }
  100% { transform: scale(1.10) translate3d(0, 0, 0); }
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 10, 12, 0.0) 0%, rgba(8, 10, 12, 0.35) 40%, rgba(8, 10, 12, 0.75) 100%),
    radial-gradient(800px 300px at 50% 100%, rgba(246, 226, 122, 0.08), transparent 60%);
  pointer-events: none;
  z-index: 1;
}

.hero-caption {
  position: absolute;
  bottom: 10vh;
  left: 0;
  right: 0;
  z-index: 2;
}

/* ── Sobre nós ────────────────────────────────────────────────────────── */
.about-img {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--glass-brd);
  content-visibility: auto;
  contain-intrinsic-size: 0 400px;
}

.about-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform .6s ease, filter .4s ease;
  filter: saturate(0.9);
  will-change: transform;
}

.about-img:hover img {
  transform: scale(1.05);
  filter: saturate(1);
}

/* ── Timeline Processos ───────────────────────────────────────────────── */
.timeline {
  display: flex;
  gap: 2rem;
  position: relative;
  padding: 1rem 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.timeline::-webkit-scrollbar        { height: 8px; }
.timeline::-webkit-scrollbar-thumb  { background: rgba(255, 255, 255, 0.12); border-radius: 999px; }

.timeline-step {
  min-width: 240px;
  position: relative;
  padding: 1.25rem;
  border-radius: var(--radius);
  text-align: left;
}

.timeline-step .step-badge {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(246, 226, 122, 0.2), rgba(202, 166, 76, 0.12));
  border: 1px solid rgba(246, 226, 122, 0.25);
  color: #fff;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 8px 24px rgba(226, 187, 65, .12);
  margin-bottom: .75rem;
}

.timeline-rail {
  position: absolute;
  left: 0;
  right: 0;
  top: 32px;
  height: 2px;
  background: rgba(246, 226, 122, 0.15);
  z-index: 0;
}

/* ── Serviços ─────────────────────────────────────────────────────────── */
.service-card {
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  border: 1px solid transparent;
  will-change: transform;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(246, 226, 122, 0.35);
  box-shadow: 0 16px 40px rgba(226, 187, 65, .12);
}

.service-icon {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(246, 226, 122, 0.14), rgba(202, 166, 76, 0.10));
  border: 1px solid rgba(246, 226, 122, 0.22);
  font-size: 1.4rem;
  color: #ffeaa7;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}

/* ── Equipe ───────────────────────────────────────────────────────────── */
.team-card img {
  height: 320px;
  object-fit: cover;
  filter: saturate(.9);
  transition: transform .4s ease, filter .4s ease;
  will-change: transform;
}

.team-card:hover img {
  transform: scale(1.03);
  filter: saturate(1);
}

/* ── Portfólio / Galeria ──────────────────────────────────────────────── */
.project-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--glass-brd);
  background: #0b0f14;
  aspect-ratio: 4 / 3;
  content-visibility: auto;
  contain-intrinsic-size: 0 300px;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease, filter .4s ease;
  transform: scale(1.02);
  will-change: transform;
}

.project-card .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, .55) 100%);
  opacity: 0;
  transition: opacity .35s ease;
}

.project-card .title {
  position: absolute;
  left: 16px;
  bottom: 14px;
  right: 16px;
  color: #fff;
  font-weight: 700;
  letter-spacing: .3px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .35s ease, transform .35s ease;
  text-shadow: 0 6px 18px rgba(0, 0, 0, .45);
}

.project-card:hover img        { transform: scale(1.07); filter: brightness(.85); }
.project-card:hover .overlay   { opacity: 1; }
.project-card:hover .title     { opacity: 1; transform: translateY(0); }

/* ── Instagram Preview ────────────────────────────────────────────────── */
.insta-header {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin-bottom: 1rem;
}

.mm-logo         { width: 40px; height: 40px; }
.mm-logo > img   { width: 100%; height: 100%; object-fit: cover; }

.insta-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-start), var(--brand-end));
  padding: 2px;
  flex-shrink: 0;
}

.insta-avatar > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #0d1116;
}

.insta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  content-visibility: auto;
  contain-intrinsic-size: 0 600px;
}

.insta-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--glass-brd);
  background: #0b0f14;
}

.insta-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform .4s ease, filter .3s ease;
  will-change: transform;
}

.insta-item:hover img {
  transform: scale(1.06);
  filter: brightness(.9);
}

/* ── Contato ──────────────────────────────────────────────────────────── */
.contact-info .list-group-item {
  background: transparent;
  color: #d7dde5;
  border-color: rgba(255, 255, 255, .08);
}

/* Mapa P&B */
.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--glass-brd);
  filter: grayscale(1) contrast(1.05) brightness(0.85);
}

.map-wrap iframe {
  display: block;
  width: 100%;
  height: 360px;
}

/* ── Logo ─────────────────────────────────────────────────────────────── */
.footer-brand .logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-start), var(--brand-end));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-txt);
  font-weight: 900;
}

/* ── Footer ───────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid rgba(255, 255, 255, .08);
  background: rgba(10, 12, 14, 0.6);
  backdrop-filter: blur(16px);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 800;
  letter-spacing: .3px;
}

.social a {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .12);
  color: #e8edf2;
  margin-right: .5rem;
  transition: all .2s ease;
  background: rgba(255, 255, 255, 0.02);
}

.social a:hover {
  border-color: rgba(246, 226, 122, 0.45);
  color: #fff;
  box-shadow: 0 6px 18px rgba(226, 187, 65, .15);
}

.final-bar {
  border-top: 1px solid rgba(255, 255, 255, .08);
  background: rgba(6, 7, 9, 0.75);
  backdrop-filter: blur(12px);
  padding: .8rem 0;
  font-size: .95rem;
}

/* ── Responsividade ───────────────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .hero,
  .hero .carousel-item {
    height: 80vh;
    min-height: 520px;
  }
}

/* Evita overflow do cabeçalho Instagram em telas pequenas */
@media (max-width: 575.98px) {
  .insta-header {
    flex-wrap: nowrap;
    overflow: hidden;
  }
  .insta-header > * {
    min-width: 0;
  }
}