/* ==========================================================================
   SD Sanecon — Soares Dutra Saneamento e Construções
   Folha de estilo única. Sem frameworks, sem dependências.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Fontes (Techead — fonte oficial da marca, auto-hospedada)
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Techead';
  src: url('../fonts/TecheadThin.woff2') format('woff2'),
       url('../fonts/TecheadThin.woff') format('woff');
  font-weight: 100; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Techead';
  src: url('../fonts/TecheadLight.woff2') format('woff2'),
       url('../fonts/TecheadLight.woff') format('woff');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Techead';
  src: url('../fonts/TecheadRegular.woff2') format('woff2'),
       url('../fonts/TecheadRegular.woff') format('woff');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Techead';
  src: url('../fonts/TecheadBold.woff2') format('woff2'),
       url('../fonts/TecheadBold.woff') format('woff');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Techead';
  src: url('../fonts/TecheadBlack.woff2') format('woff2'),
       url('../fonts/TecheadBlack.woff') format('woff');
  font-weight: 900; font-style: normal; font-display: swap;
}

/* --------------------------------------------------------------------------
   2. Tokens — paleta tirada do brand book da marca
   -------------------------------------------------------------------------- */
:root {
  --navy-950: #010A26;
  --navy-900: #04123A;
  --navy-800: #0C2659;
  --navy-700: #123776;
  --blue-600: #005CA8;
  --blue-500: #006BC2;
  --blue-400: #2A6BBF;
  --blue-300: #61A4FC;
  --cream:    #F2E6DF;
  --slate:    #535463;

  --ink:        #0E1526;
  --ink-soft:   #4A566E;
  --ink-mute:   #78849C;
  --surface:    #FFFFFF;
  --surface-2:  #F5F7FB;
  --surface-3:  #EAEFF7;
  --line:       #DCE3EE;

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;
  --radius-xl: 30px;

  --shadow-sm: 0 1px 2px rgba(4, 18, 58, .06), 0 2px 8px rgba(4, 18, 58, .05);
  --shadow:    0 4px 12px rgba(4, 18, 58, .08), 0 12px 32px rgba(4, 18, 58, .08);
  --shadow-lg: 0 12px 28px rgba(4, 18, 58, .12), 0 32px 64px rgba(4, 18, 58, .16);

  --ease: cubic-bezier(.22, .61, .36, 1);
  --header-h: 82px;

  --wrap: 1240px;
  --gutter: clamp(20px, 5vw, 48px);
}

/* --------------------------------------------------------------------------
   3. Reset e base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Techead', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  font-size: clamp(1rem, .96rem + .2vw, 1.075rem);
  line-height: 1.68;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, picture, svg, video { display: block; max-width: 100%; }
img { height: auto; }

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }

a { color: var(--blue-500); text-decoration: none; }
a:hover { color: var(--blue-400); }

h1, h2, h3, h4 { line-height: 1.12; font-weight: 700; letter-spacing: -.015em; }

:focus-visible {
  outline: 3px solid var(--blue-300);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--blue-300); color: #fff; }

.skip-link {
  position: absolute; top: -100px; left: 16px; z-index: 999;
  background: var(--navy-900); color: #fff;
  padding: 12px 20px; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 700;
}
.skip-link:focus { top: 0; color: #fff; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   4. Layout
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(72px, 9vw, 128px); position: relative; }
.section--tight { padding-block: clamp(56px, 6vw, 88px); }

.section--dark {
  background: linear-gradient(160deg, var(--navy-950) 0%, var(--navy-800) 55%, var(--navy-900) 100%);
  color: #fff;
}
.section--soft { background: var(--surface-2); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .78rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--blue-500);
  margin-bottom: 18px;
}
.section--dark .eyebrow { color: var(--blue-300); }

.section-title {
  font-size: clamp(1.75rem, 1.15rem + 2.4vw, 2.85rem);
  max-width: 22ch;
}
.section-title--wide { max-width: 30ch; }

.lead {
  font-size: clamp(1.02rem, .97rem + .3vw, 1.18rem);
  color: var(--ink-soft);
  font-weight: 300;
  max-width: 68ch;
}
.section--dark .lead { color: rgba(255, 255, 255, .8); }

.section-head { max-width: 760px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head .lead { margin-top: 20px; }

/* --------------------------------------------------------------------------
   5. Botões
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 30px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease),
              background-color .25s var(--ease), color .25s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex: none; }

.btn--primary {
  background: linear-gradient(135deg, var(--blue-500), var(--blue-400));
  color: #fff;
  box-shadow: 0 8px 20px rgba(0, 107, 194, .32);
}
.btn--primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 107, 194, .42);
}

.btn--ghost {
  background: rgba(255, 255, 255, .07);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .3);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover {
  background: rgba(255, 255, 255, .16);
  color: #fff;
  transform: translateY(-2px);
}

.btn--outline {
  border: 1.5px solid var(--line);
  color: var(--navy-800);
  background: #fff;
}
.btn--outline:hover {
  border-color: var(--blue-400);
  color: var(--blue-500);
  transform: translateY(-2px);
}

.btn--sm { padding: 11px 22px; font-size: .82rem; }

/* --------------------------------------------------------------------------
   6. Cabeçalho
   -------------------------------------------------------------------------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  transition: background-color .3s var(--ease), box-shadow .3s var(--ease),
              height .3s var(--ease), backdrop-filter .3s var(--ease);
}
.header::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, rgba(1, 10, 38, .78), rgba(1, 10, 38, 0));
  transition: opacity .3s var(--ease);
}
.header.is-stuck {
  height: 68px;
  background: rgba(4, 18, 58, .88);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .08), 0 8px 30px rgba(1, 10, 38, .3);
}
.header.is-stuck::before { opacity: 0; }

.header__inner {
  display: flex; align-items: center; gap: 24px;
  width: 100%; max-width: var(--wrap);
  margin-inline: auto; padding-inline: var(--gutter);
}

.brand { display: flex; align-items: center; flex: none; }
.brand img {
  height: 34px; width: auto;
  transition: height .3s var(--ease);
}
.header.is-stuck .brand img { height: 29px; }

.nav { margin-left: auto; }
.nav__list { display: flex; align-items: center; gap: 4px; list-style: none; padding: 0; }
.nav__cta { display: none; }   /* só aparece no menu do celular */

.nav__link {
  display: block;
  white-space: nowrap;
  padding: 10px 15px;
  color: rgba(255, 255, 255, .88);
  font-size: .92rem;
  font-weight: 400;
  border-radius: 999px;
  position: relative;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.nav__link:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.nav__link.is-active { color: #fff; font-weight: 700; }
.nav__link.is-active::after {
  content: ''; position: absolute; left: 15px; right: 15px; bottom: 4px;
  height: 2px; border-radius: 2px; background: var(--blue-300);
}

.header__cta { flex: none; margin-left: 8px; }

.nav-toggle {
  display: none;
  width: 46px; height: 46px;
  margin-left: auto;
  border-radius: 12px;
  align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
}
.nav-toggle span {
  display: block; position: relative;
  width: 20px; height: 2px; border-radius: 2px; background: #fff;
  transition: transform .3s var(--ease), background-color .2s var(--ease);
}
.nav-toggle span::before, .nav-toggle span::after {
  content: ''; position: absolute; left: 0;
  width: 20px; height: 2px; border-radius: 2px; background: #fff;
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after  { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { top: 0; transform: rotate(-45deg); }

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: min(100svh, 860px);
  display: flex; align-items: center;
  padding-block: calc(var(--header-h) + 56px) 96px;
  overflow: hidden;
  background: var(--navy-950);
  color: #fff;
}

.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1.6s var(--ease);
  will-change: opacity;
}
.hero__slide.is-active { opacity: 1; }
.hero__slide img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 45%;
  transform: scale(1.06);
  animation: heroDrift 18s ease-out forwards;
  animation-play-state: paused;
}
.hero__slide.is-active img { animation-play-state: running; }

@keyframes heroDrift {
  from { transform: scale(1.02); }
  to   { transform: scale(1.12); }
}

.hero__scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(105deg, rgba(1, 10, 38, .93) 0%, rgba(4, 18, 58, .82) 42%, rgba(12, 38, 89, .55) 100%),
    linear-gradient(to top, rgba(1, 10, 38, .92) 0%, rgba(1, 10, 38, 0) 45%);
}

.hero__inner { position: relative; z-index: 2; width: 100%; }
.hero__content { max-width: 940px; }

.hero__title {
  font-size: clamp(1.8rem, 1.1rem + 2.6vw, 3.05rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.hero__title em {
  font-style: normal;
  background: linear-gradient(100deg, var(--blue-300), #9CC6FF);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

.hero__text {
  margin-top: 26px;
  font-size: clamp(1.03rem, .98rem + .4vw, 1.25rem);
  font-weight: 300;
  line-height: 1.6;
  color: rgba(255, 255, 255, .84);
  max-width: 62ch;
}

.hero__actions {
  margin-top: 40px;
  display: flex; flex-wrap: wrap; gap: 14px;
}

/* linha fina com as três frentes de trabalho, no lugar dos números:
   ancora o banner sem peso visual e deixa o título respirar */
.hero__pillars {
  list-style: none; padding: 0;
  margin-top: clamp(44px, 5.5vw, 68px);
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, .17);
  display: flex; flex-wrap: wrap;
  gap: 14px clamp(22px, 2.6vw, 34px);
}
.hero__pillars li {
  display: flex; align-items: center; gap: 11px;
  font-size: .8rem; font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase;
  color: rgba(255, 255, 255, .74);
}
.hero__pillars li::before {
  content: ''; flex: none;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--blue-300);
}

/* --------------------------------------------------------------------------
   8. Quem somos
   -------------------------------------------------------------------------- */
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(36px, 5vw, 76px);
  align-items: center;
}

.about__body p + p { margin-top: 18px; }

.about__quote {
  margin-top: 34px;
  padding: 24px 28px;
  border-left: 3px solid var(--blue-400);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: linear-gradient(100deg, rgba(42, 107, 191, .08), rgba(42, 107, 191, 0));
  font-size: clamp(1.1rem, 1rem + .5vw, 1.35rem);
  font-weight: 700;
  line-height: 1.34;
  color: var(--navy-800);
}

.about__figure { position: relative; }
.about__figure img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.about__badge {
  position: absolute; left: -22px; bottom: 34px;
  padding: 20px 26px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--blue-500), var(--navy-800));
  color: #fff;
  box-shadow: var(--shadow-lg);
  max-width: 230px;
}
.about__badge b { display: block; font-size: 2.1rem; font-weight: 900; line-height: 1; }
.about__badge span { display: block; margin-top: 6px; font-size: .84rem; line-height: 1.35; opacity: .86; }

.leaders {
  margin-top: 30px;
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.leader {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.leader svg { width: 22px; height: 22px; flex: none; color: var(--blue-500); margin-top: 2px; }
.leader b { display: block; font-size: .98rem; color: var(--navy-800); }
.leader span { display: block; font-size: .85rem; line-height: 1.45; color: var(--ink-mute); }

/* --------------------------------------------------------------------------
   9. Áreas de atuação
   -------------------------------------------------------------------------- */
.areas__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 18px;
}

.area {
  position: relative;
  padding: 32px 30px 34px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease),
              border-color .35s var(--ease);
}
.area::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 3px;
  background: linear-gradient(90deg, var(--blue-500), var(--blue-300));
  transform: scaleX(0); transform-origin: left;
  transition: transform .45s var(--ease);
}
.area:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: transparent;
}
.area:hover::after { transform: scaleX(1); }

.area__icon {
  width: 54px; height: 54px;
  display: grid; place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(0, 107, 194, .12), rgba(97, 164, 252, .16));
  color: var(--blue-500);
  margin-bottom: 22px;
}
.area__icon svg { width: 27px; height: 27px; }

.area h3 { font-size: 1.14rem; color: var(--navy-800); margin-bottom: 10px; }
.area p { font-size: .95rem; color: var(--ink-soft); font-weight: 300; line-height: 1.6; }

/* --------------------------------------------------------------------------
   10. Método Não Destrutivo
   -------------------------------------------------------------------------- */
.mnd__grid {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}
.mnd__figure img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(1, 10, 38, .45);
}

.mnd__list { list-style: none; padding: 0; margin-top: 32px; display: grid; gap: 14px; }
.mnd__list li {
  display: flex; gap: 14px; align-items: flex-start;
  font-size: .98rem;
  color: rgba(255, 255, 255, .86);
  font-weight: 300;
}
.mnd__list svg {
  width: 22px; height: 22px; flex: none; margin-top: 2px;
  color: var(--blue-300);
}
.mnd__list b { font-weight: 700; color: #fff; }

.mnd__note {
  margin-top: 30px;
  padding: 18px 22px;
  border-radius: var(--radius);
  background: rgba(97, 164, 252, .12);
  border: 1px solid rgba(97, 164, 252, .28);
  font-size: .95rem;
  color: rgba(255, 255, 255, .9);
}

/* --------------------------------------------------------------------------
   11. Galeria de obras
   -------------------------------------------------------------------------- */
.gallery__top {
  display: flex; flex-wrap: wrap; gap: 24px;
  align-items: flex-end; justify-content: space-between;
  margin-bottom: 34px;
}

.filters { display: flex; flex-wrap: wrap; gap: 9px; }
.filter {
  padding: 10px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  font-size: .87rem; font-weight: 700;
  color: var(--ink-soft);
  transition: all .25s var(--ease);
}
.filter:hover { border-color: var(--blue-300); color: var(--blue-500); }
.filter.is-active {
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: #fff;
}

.gallery__count { font-size: .88rem; color: var(--ink-mute); }

/* Masonry em colunas: cada card fica com a altura da sua foto, então nenhuma
   imagem precisa ser cortada para encaixar numa grade de linhas iguais. */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 20px;
}

.work {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--navy-900);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), opacity .3s var(--ease);
}
.work:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.work[hidden] { display: none; }

/* Retrato 4:5: quase todo o acervo é foto de celular na vertical, e esse
   formato aproveita melhor a grade. A foto completa, sem corte nenhum, está
   no visualizador que abre ao clicar no card. */
.work__media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--navy-800); }
.work__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease), opacity .5s var(--ease);
}
.work:hover .work__media img { transform: scale(1.07); }

/* escurece o pé da foto para o texto ficar legível em qualquer imagem */
.work__media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top,
              rgba(1, 10, 38, .97) 0%,
              rgba(1, 10, 38, .92) 22%,
              rgba(1, 10, 38, .62) 46%,
              rgba(1, 10, 38, .18) 74%,
              rgba(1, 10, 38, .04) 100%);
}

.work__body {
  position: absolute; inset: auto 0 0 0; z-index: 2;
  padding: 22px 24px 24px;
  color: #fff;
  text-shadow: 0 1px 12px rgba(1, 10, 38, .55);
}
.work__cat {
  display: inline-block;
  font-size: .68rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--blue-300);
  margin-bottom: 8px;
}
.work__title { font-size: 1.1rem; line-height: 1.22; }
.work__place {
  margin-top: 5px;
  font-size: .86rem; font-weight: 300;
  color: rgba(255, 255, 255, .76);
}

.work__btn {
  margin-top: 15px;
  display: inline-flex; align-items: center; gap: 8px;
  white-space: nowrap;
  font-size: .78rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--blue-300);
}
/* estica a área clicável do botão por todo o card, sem perder a semântica */
.work__btn::after { content: ''; position: absolute; inset: 0; z-index: 4; }
.work__btn svg {
  width: 15px; height: 15px;
  transition: transform .3s var(--ease);
}
.work:hover .work__btn svg { transform: translateX(4px); }

.work__badge {
  position: absolute; top: 16px; right: 16px; z-index: 3;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(1, 10, 38, .58);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .22);
  color: #fff;
  font-size: .76rem; font-weight: 700;
}
.work__badge svg { width: 14px; height: 14px; }

.gallery__empty {
  padding: 56px 20px; text-align: center;
  color: var(--ink-mute);
}

/* --------------------------------------------------------------------------
   12. Lightbox
   -------------------------------------------------------------------------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: none;
  background: rgba(1, 8, 26, .97);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.lightbox.is-open { display: grid; grid-template-rows: auto 1fr auto; }
.lightbox.is-visible { opacity: 1; }

.lb__bar {
  display: flex; align-items: center; gap: 18px;
  padding: 12px clamp(14px, 3vw, 28px);
  color: #fff;
}
.lb__meta { min-width: 0; }
.lb__title {
  font-size: clamp(.95rem, .9rem + .3vw, 1.12rem);
  font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lb__place { font-size: .82rem; font-weight: 300; color: rgba(255, 255, 255, .62); }

.lb__counter {
  margin-left: auto;
  font-size: .85rem;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, .7);
  flex: none;
}

.lb__close, .lb__nav {
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  color: #fff;
  transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.lb__close { width: 44px; height: 44px; flex: none; }
.lb__close:hover, .lb__nav:hover { background: rgba(255, 255, 255, .22); }
.lb__close svg, .lb__nav svg { width: 20px; height: 20px; }

.lb__stage {
  position: relative;
  display: grid; place-items: center;
  min-height: 0;
  overflow: hidden;
  padding: 0 clamp(8px, 2vw, 20px);
}
/* Posicionamento absoluto puro, sem grid nem flex no meio do caminho: item de
   grid carrega min-height:auto, que impede a foto de encolher abaixo do
   tamanho natural — era isso que fazia a imagem vazar e ser cortada. */
.lb__figure {
  position: absolute;
  inset: 0;
}
.lb__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;   /* a foto cabe inteira, seja vertical ou horizontal */
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.lb__img.is-ready { opacity: 1; }

.lb__spinner {
  position: absolute;
  top: 50%; left: 50%;
  margin: -17px 0 0 -17px;
  z-index: 2;
  width: 34px; height: 34px;
  border: 3px solid rgba(255, 255, 255, .2);
  border-top-color: var(--blue-300);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  opacity: 0; transition: opacity .2s;
}
.lb__spinner.is-on { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }

.lb__nav {
  position: absolute; top: 50%;
  transform: translateY(-50%);
  width: 52px; height: 52px;
  z-index: 3;
}
.lb__nav--prev { left: clamp(6px, 2vw, 22px); }
.lb__nav--next { right: clamp(6px, 2vw, 22px); }
.lb__nav:disabled { opacity: .25; cursor: default; }

.lb__foot { padding: 10px clamp(14px, 3vw, 28px) 14px; }

.lb__caption {
  text-align: center;
  font-size: .88rem;
  font-weight: 300;
  color: rgba(255, 255, 255, .76);
  min-height: 1.4em;
  margin-bottom: 10px;
  padding-inline: 8px;
}

.lb__strip {
  display: flex; gap: 9px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .28) transparent;
  justify-content: flex-start;
}
.lb__strip::-webkit-scrollbar { height: 6px; }
.lb__strip::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .28); border-radius: 3px; }

/* em tela baixa a tira de miniaturas sai, para a foto ganhar a altura dela */
@media (max-height: 760px) {
  .lb__strip { display: none; }
}

.lb__thumb {
  flex: none;
  width: 70px; height: 50px;
  border-radius: 7px;
  overflow: hidden;
  opacity: .42;
  border: 2px solid transparent;
  transition: opacity .25s var(--ease), border-color .25s var(--ease);
}
/* contain também aqui: a miniatura mostra o enquadramento real da foto */
.lb__thumb img { width: 100%; height: 100%; object-fit: contain; background: rgba(255, 255, 255, .06); }
.lb__thumb:hover { opacity: .8; }
.lb__thumb.is-active { opacity: 1; border-color: var(--blue-300); }

/* --------------------------------------------------------------------------
   13. Clientes
   -------------------------------------------------------------------------- */
.clients__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 14px;
}
.client {
  display: grid; place-items: center;
  aspect-ratio: 16 / 9;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.client:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.client img {
  max-height: 100%; max-width: 100%;
  width: auto; object-fit: contain;
  filter: grayscale(1); opacity: .62;
  transition: filter .3s var(--ease), opacity .3s var(--ease);
}
.client:hover img { filter: grayscale(0); opacity: 1; }

.client--empty {
  border-style: dashed;
  border-color: var(--surface-3);
  background: transparent;
  color: var(--ink-mute);
  font-size: .8rem;
  text-align: center;
  gap: 8px;
}
.client--empty svg { width: 26px; height: 26px; opacity: .4; }

/* --------------------------------------------------------------------------
   14. Contato
   -------------------------------------------------------------------------- */
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: clamp(36px, 5vw, 64px);
  align-items: start;
}

.contact__info { display: grid; gap: 12px; margin-top: 34px; }
.info-item {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .13);
  transition: background-color .25s var(--ease), border-color .25s var(--ease);
}
a.info-item:hover { background: rgba(255, 255, 255, .11); border-color: rgba(97, 164, 252, .45); color: #fff; }
.info-item__ico {
  width: 42px; height: 42px; flex: none;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(97, 164, 252, .16);
  color: var(--blue-300);
}
.info-item__ico svg { width: 20px; height: 20px; }
.info-item b { display: block; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--blue-300); margin-bottom: 3px; }
.info-item span { display: block; color: #fff; font-size: .98rem; line-height: 1.45; }

/* Formulário */
.form {
  padding: clamp(26px, 3.5vw, 40px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  color: var(--ink);
}
.form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.field { display: grid; gap: 7px; }
.field--full { grid-column: 1 / -1; }
.field label {
  font-size: .82rem; font-weight: 700;
  color: var(--navy-800);
  letter-spacing: .02em;
}
.field label span { color: var(--blue-500); }
.field input, .field textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: .97rem;
  font-weight: 300;
  transition: border-color .2s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { resize: vertical; min-height: 122px; line-height: 1.55; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--blue-400);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(42, 107, 191, .14);
}
.field input:user-invalid, .field textarea:user-invalid { border-color: #D14343; }

.form__foot {
  margin-top: 22px;
  display: flex; flex-wrap: wrap; gap: 16px;
  align-items: center; justify-content: space-between;
}
.form__hint { font-size: .8rem; color: var(--ink-mute); max-width: 38ch; }

.form__msg {
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: .92rem;
  display: none;
}
.form__msg.is-ok   { display: block; background: #E7F6EC; color: #15633A; border: 1px solid #A8DCBE; }
.form__msg.is-err  { display: block; background: #FDECEC; color: #9B2C2C; border: 1px solid #F2BDBD; }

.hp { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

.btn[aria-busy="true"] { opacity: .7; pointer-events: none; }

.map {
  margin-top: 18px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .14);
  line-height: 0;
}
.map iframe { width: 100%; height: 240px; border: 0; filter: grayscale(.25) contrast(1.05); }

/* --------------------------------------------------------------------------
   15. Rodapé
   -------------------------------------------------------------------------- */
.footer {
  background: var(--navy-950);
  color: rgba(255, 255, 255, .62);
  padding-block: clamp(48px, 6vw, 72px) 0;
  font-size: .9rem;
}
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 1fr));
  gap: clamp(30px, 4vw, 56px);
}
.footer__brand img { height: 32px; width: auto; margin-bottom: 18px; }
.footer__brand p { max-width: 42ch; font-weight: 300; line-height: 1.65; }

.footer h3 {
  font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
  color: #fff; margin-bottom: 16px;
}
.footer ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.footer a { color: rgba(255, 255, 255, .62); }
.footer a:hover { color: #fff; }

.footer__bottom {
  margin-top: clamp(38px, 5vw, 56px);
  padding-block: 22px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: center; justify-content: space-between;
  font-size: .82rem;
}

/* Botão flutuante do WhatsApp */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  box-shadow: 0 8px 24px rgba(37, 211, 102, .42);
  transition: transform .25s var(--ease);
}
.wa-float:hover { transform: scale(1.08); color: #fff; }
.wa-float svg { width: 29px; height: 29px; }

/* --------------------------------------------------------------------------
   16. Animação de entrada
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }
.reveal[data-delay="5"] { transition-delay: .4s; }

/* --------------------------------------------------------------------------
   17. Responsivo
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .about__grid, .mnd__grid, .contact__grid { grid-template-columns: minmax(0, 1fr); }
  .about__figure { order: -1; max-width: 560px; }
  .about__badge { left: 16px; }
  .mnd__figure { max-width: 620px; }
  .footer__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 1000px) {
  .header__cta { display: none; }
  .nav-toggle { display: flex; }
  .nav__cta { display: list-item; }

  .nav {
    position: fixed; inset: 0 0 auto 0;
    margin: 0;
    padding: calc(var(--header-h) + 14px) var(--gutter) 26px;
    background: rgba(4, 18, 58, .98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    transform: translateY(-102%);
    transition: transform .38s var(--ease);
    box-shadow: 0 24px 50px rgba(1, 10, 38, .5);
  }
  .nav.is-open { transform: none; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav__link { padding: 14px 16px; border-radius: var(--radius-sm); font-size: 1.02rem; }
  .nav__link.is-active::after { display: none; }
  .nav__link.is-active { background: rgba(97, 164, 252, .16); }
  .nav__cta { margin-top: 14px; }
  .nav__cta .btn { width: 100%; }
}

@media (max-width: 620px) {
  .form__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__pillars { gap: 11px 22px; padding-top: 22px; }
  .hero__pillars li { font-size: .74rem; }
  .hero__actions .btn { flex: 1 1 100%; }
  .gallery__top { align-items: flex-start; }
  .lb__nav { width: 44px; height: 44px; }
  .lb__thumb { width: 60px; height: 44px; }
  .footer__grid { grid-template-columns: minmax(0, 1fr); }
  .about__badge { position: static; margin-top: 16px; max-width: none; }
  .wa-float { width: 52px; height: 52px; right: 14px; bottom: 14px; }
}

/* --------------------------------------------------------------------------
   18. Preferências do usuário
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero__slide img { animation: none; transform: scale(1.02); }
}

@media print {
  .header, .hero__media, .wa-float, .lightbox, .filters, .form { display: none !important; }
  body { color: #000; }
  .section { padding-block: 18px; }
}
