:root {
  scrollbar-width: none; /* Firefox */
}
:root::-webkit-scrollbar,
html::-webkit-scrollbar,
body::-webkit-scrollbar,
.modal::-webkit-scrollbar { display: none; } /* Chrome/Safari */
.modal { scrollbar-width: none; }
html, body { scrollbar-width: none; }
:root {
  --verde:     #87B26C;
  --terracota: #A33A29;
  --azul:      #395A8E;
  --header-bg: #EAEAEA;
  --bg:        #FFFFFF;
  --text:      #1A1A1A;
  --muted:     #6E6E6E;
  --footer-bg: #D9D9D9;
  --font:      Calibri, "Carlito", "Segoe UI", Roboto, Arial, sans-serif;
  --header-h:  80px;   /* altura real do header */
  --bump-h:    20px;   /* quanto o bump desce abaixo do header */
  /* margem lateral ÚNICA compartilhada por header, modal-header e
     modal-content — garante que ficha/logo/imagem fiquem sempre
     perfeitamente alinhados, em qualquer breakpoint */
  --page-margin: 20px;
}

* { box-sizing: border-box; }
body {
  margin: 0; font-family: var(--font); color: var(--text);
  background: var(--bg); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; cursor: pointer; }
button { font-family: inherit; cursor: pointer; }

/* ---------- SPLASH ---------- */
#splash {
  position: fixed; inset: 0; background: #fff; z-index: 999;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .6s ease;
}
#splash.hide { opacity: 0; pointer-events: none; }
#lottie-holder { width: min(120vw, 640px); height: min(120vw, 640px); }

/* ---------- LIGHTBOX ---------- */
#lightbox {
  position: fixed; inset: 0;
  background: rgba(255,255,255,.97);   /* fundo CLARO */
  z-index: 700;
  display: none; align-items: center; justify-content: center;
}
#lightbox.open { display: flex; }
#lightbox-img { max-width: 84vw; max-height: 88vh; object-fit: contain; }
#lightbox-close {
  position: absolute; top: 16px; right: 24px;
  background: none; border: none; color: var(--text);
  font-size: 40px; line-height: 1; cursor: pointer; padding: 4px 10px;
  z-index: 2;
}
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: none;
  color: var(--text); font-size: 48px; line-height: 1;
  cursor: pointer; padding: 20px 24px; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .2s ease;
}
.lightbox-nav:hover { opacity: .55; }
.lightbox-prev { left: 8px; }
.lightbox-next { right: 8px; }
#lightbox-counter {
  position: absolute; bottom: 24px; left: 0; right: 0;
  text-align: center; font-size: 13px; color: var(--muted);
}

/* ---------- HEADER ---------- */
#site-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: none;    /* transparente: a ondinha mostra o fundo da página */
  overflow: hidden;
  z-index: 100;
  display: flex; align-items: center;
  padding: 0 var(--page-margin);
  gap: 16px;
  opacity: 0; transform: translateY(-8px);
  transition: opacity .5s ease, transform .5s ease;
}
#site-header.show { opacity: 1; transform: translateY(0); }

/* SVG do notch: preenche o header exceto o recorte da ondinha */
.header-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0; pointer-events: none; display: block;
  overflow: hidden;
}

.logo-btn {
  position: relative; z-index: 1;
  background: none; border: none; padding: 0;
  height: 100%; display: flex; align-items: stretch; flex: 0 0 auto;
}
.logo-btn img, .logo-btn video {
  height: 100%; width: auto; display: block;
  /* aspect-ratio EXPLÍCITO (proporção real do vídeo: 1000×400 = 2.5:1).
     Sem isso, a largura do <video> depende dos metadados carregados pelo
     navegador — e como o header e o modal usam DOIS elementos <video>
     independentes, cada um podia calcular essa largura em momento
     diferente, fazendo a logo (e por consequência todo o nav à direita)
     mudar de largura/posição no instante em que um projeto é aberto. */
  aspect-ratio: 2.5 / 1;
}

#main-nav, #modal-nav {
  position: relative; z-index: 1;
  flex: 1;
  display: flex;
  justify-content: flex-end;   /* items à DIREITA */
  align-items: center;
  gap: 28px;
}
.nav-link {
  font-size: 14px; letter-spacing: .04em; font-weight: 600;
  color: var(--text); display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer; white-space: nowrap;
}
.nav-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: transparent; transform: scale(0);
  transition: transform .25s ease;
}
.nav-link.active .nav-dot,
.nav-link:hover .nav-dot { transform: scale(1); }

.lang-btn {
  position: relative; z-index: 1;
  background: none; border: none; margin-left: 32px;
  font-size: 12px; font-weight: 600; letter-spacing: .04em;
  color: var(--text); cursor: pointer; padding: 0; flex: 0 0 auto;
}
.lang-btn .lang-active { text-decoration: underline; }

/* ---------- PÁGINAS ---------- */
.page { display: none; }
.page.active { display: block; }
#page-home { min-height: 0; }
#page-projetos, #page-pratica, #page-sobre, #page-contato {
  padding-top: var(--header-h);
}
#page-projetos { padding-bottom: 80px; }

/* ---------- HOME — hero ---------- */
.sobre-hero {
  position: relative; height: 100vh; overflow: hidden;
}
.sobre-hero img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity 1.2s ease;
}
.sobre-hero img.active { opacity: 1; }
.sobre-hero-shadow { display: none; /* sombra removida a pedido */ }

/* ---------- SOBRE — layout ---------- */
.sobre-page-content {
  max-width: 1100px; margin: 0 auto;
  padding: 40px 24px 60px;
}

/* linha superior: foto grupo + texto */
.sobre-hero-row {
  display: flex; gap: 48px; align-items: center;
}
.sobre-group-photo-wrap { flex: 0 0 40%; }
.sobre-group-photo { width: 100%; object-fit: cover; border-radius: 16px; }

.sobre-full-text { flex: 1; font-size: 15px; line-height: 1.65; }
.sobre-full-text p { margin: 0 0 16px; }
.sobre-full-text .sobre-divider { margin: 24px 0; }
.sobre-divider {
  height: 1px; width: 64px; background: #d5d5d5; margin: 40px auto;
}

/* logotipo animado (prática / about) */
.sobre-wordmark { width: 200px; }

/* equipe: grid de 3 cards com hover */
/* Giulia (1ª) maior, Julio (2ª) médio, Lucas (3ª) base.
   align-items: start + object-position:center top = topos das cabeças nivelados. */
.sobre-team-grid {
  display: grid;
  grid-template-columns: repeat(3, 240px);
  justify-content: space-between;
  padding: 140px 0 0;
}
.sobre-team-member {
  text-align: center;
  cursor: pointer;
  transition: transform .3s ease;
}
.sobre-team-member:hover { transform: scale(1.18); }
.sobre-team-photo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 12%;
  background: #d8d8d8;
  margin: 0 auto 14px;
  border-radius: 16px;
  display: block;
}
.sobre-team-name { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.sobre-team-bio  { font-size: 13px; color: var(--muted); line-height: 1.4; }

/* ---------- PRÁTICA — vazia ---------- */
#page-pratica { min-height: 50vh; }

/* ---------- PROJETOS ---------- */
#projects-list {
  padding-top: 32px;
  padding-bottom: 60px; /* espaço para o botão "+" não ser cortado */
}
.project-card {
  position: relative; margin-bottom: 4px; overflow: hidden;
  height: 62vw; max-height: 520px; cursor: pointer;
}
.project-card .carousel-track { display: flex; height: 100%; transition: transform .45s ease; }
.project-card .carousel-track img { width: 100%; height: 100%; object-fit: cover; flex: 0 0 100%; }
.project-info {
  position: absolute; top: 0; left: 0; right: 0;
  padding: 20px 20px 14px; color: #fff;
  background: linear-gradient(to bottom, rgba(0,0,0,.55), transparent);
  pointer-events: none;
}
.project-info h3 { margin: 0 0 4px; font-size: 19px; font-weight: 700; }
.project-info h3 span { font-weight: 400; }
.project-info .location { font-size: 14px; opacity: .9; }
.project-info hr { border: none; border-top: 1px solid rgba(255,255,255,.5); margin-top: 10px; }

.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: #fff; z-index: 3; padding: 10px;
  display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.55));
}
.carousel-arrow svg { width: 22px; height: 22px; }
.carousel-arrow.prev { left: 6px; }
.carousel-arrow.next { right: 6px; }
.carousel-dots {
  position: absolute; bottom: 12px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 6px; z-index: 3;
}
.carousel-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.5); }
.carousel-dots span.active { background: #fff; }
.load-more {
  display: block; margin: 40px auto 0;
  width: 46px; height: 46px; border-radius: 50%;
  background: #ececec; border: none; color: #8a8a8a; font-size: 22px;
}

/* ---------- MODAL ---------- */
.modal {
  position: fixed; inset: 0; z-index: 200;
  background: #fff; visibility: hidden; opacity: 0;
  transition: opacity .3s ease; overflow-y: auto;
}
.modal.open { visibility: visible; opacity: 1; }
.modal-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h); background: none;
  overflow: hidden;
  display: flex; align-items: center; padding: 0 var(--page-margin); gap: 16px; z-index: 5;
}
.modal-content { padding: calc(var(--header-h) + 24px) var(--page-margin) 0; }

/* diagramação: esquerda=título+ficha, direita=carrossel.
   width:100vw + margem calc negativa = "full-bleed": este bloco ignora o
   max-width:1100px do .modal-content e se estende à largura real do viewport.
   padding-left E padding-right usam a MESMA variável --page-margin do
   header — a ficha fica exatamente sob a logo à esquerda, e a foto para
   exatamente na MESMA distância da borda à direita (margens simétricas). */
.modal-header-layout {
  display: flex; gap: 40px;
  align-items: flex-end;   /* texto alinhado na BASE da imagem */
  margin-bottom: 60px;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: var(--page-margin);
  padding-right: var(--page-margin);
}
.modal-header-left {
  flex: 0 0 160px; min-width: 0;
  /* compensa a "zona de respiro" desenhada DENTRO do próprio vídeo da logo
     (medido: o desenho só começa a 15.5% da largura do frame). Sem isso,
     a ficha alinhava com a BORDA do vídeo, não com o desenho visível da
     logo. offset = largura_do_vídeo(header-h*2.5) × 0.155 = header-h*0.3875 */
  margin-left: calc(var(--header-h) * 0.3875);
}
.modal-header-right { flex: 1; overflow: hidden; min-width: 0; } /* imagem até a borda direita */

.modal-title-row {   /* fallback legado — não usado no novo layout */
  display: flex; flex-wrap: wrap; justify-content: space-between;
  align-items: flex-start; gap: 24px; margin-bottom: 50px;
}
.modal-header-left h2 { font-size: 28px; font-weight: 700; margin: 0 0 24px; }
.modal-title-row h2 { font-size: 21px; margin: 0; }
.ficha { font-size: 14px; min-width: 220px; }
.ficha div { position: relative; padding: 12px 0; }
.ficha div:not(:first-child)::before {
  content: ""; position: absolute; top: 0; left: 0;
  width: 100%; border-top: .5pt solid rgba(0,0,0,.22);
}
.ficha b { font-weight: 700; }
.ficha-section-title {
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); padding-top: 20px;
}

.modal-gallery {
  position: relative; height: 62vw; max-height: 480px;
  overflow: hidden; margin-bottom: 50px;
}
/* galeria dentro do novo layout de cabeçalho do projeto */
.modal-header-right .modal-gallery {
  height: 60vh; max-height: 640px; margin-bottom: 0;
}
.modal-gallery .carousel-track { display: flex; height: 100%; transition: transform .45s ease; }
.modal-gallery img { width: 100%; height: 100%; object-fit: cover; flex: 0 0 100%; }

.modal-body-row { display: flex; gap: 24px; align-items: flex-start; margin-bottom: 28px; }
.modal-resumo { flex: 0 0 36%; font-weight: 700; font-size: 17px; line-height: 1.4; }
.modal-paragrafos { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.7; display: flex; flex-direction: column; gap: 16px; }
.modal-paragrafos p { margin: 0; }
/* carrossel dos desenhos técnicos (plantas, cortes, isométricos) */
.modal-plans-carousel {
  position: relative; overflow: hidden;
  margin-bottom: 40px;
}
.modal-plans-carousel .carousel-track {
  display: flex; transition: transform .45s ease;
}
.modal-plans-carousel img {
  width: 100%; flex: 0 0 100%;
  object-fit: contain; max-height: 70vh;
  cursor: zoom-in;
}
.modal-plans-carousel .carousel-arrow { color: var(--text); filter: none; }
.modal-plans-carousel .carousel-dots span { background: rgba(0,0,0,.25); }
.modal-plans-carousel .carousel-dots span.active { background: var(--text); }

/* bloco de fornecedores no fim da página do projeto */
.modal-fornecedores {
  margin: 0 0 48px;
  padding-top: 28px;
  border-top: 1px solid rgba(0,0,0,.15);
}
.modal-fornecedores h3 {
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 14px; font-weight: 700;
}
.fornecedores-list {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 4px 40px; font-size: 14px;
}
.fornecedores-list div { padding: 8px 0; }
.fornecedores-list b { font-weight: 700; }
.modal-back {
  display: block; margin: 12px auto 40px;
  width: 46px; height: 46px; border-radius: 50%;
  background: #ececec; border: none; font-size: 20px; color: #8a8a8a;
}

/* ---------- CONTATO (footer) ---------- */
#page-contato { background: var(--footer-bg); min-height: calc(100vh - var(--header-h)); }
.site-footer {
  background: var(--footer-bg);
  font-size: 14px;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: row;
  justify-content: center;   /* conjunto centralizado na página */
  align-items: center;
  gap: 300px;                /* espaçamento entre esquerda e direita */
  padding: 40px 24px;
}
.footer-left {
  height: 520px;             /* MESMA altura do SVG da direita */
  display: flex; flex-direction: column; justify-content: space-between;
  flex: 0 0 auto;
}
/* "FALE CONOSCO" alinhado ao topo (mesma linha do topo da logo) */
.footer-form { margin-top: 0; }
.footer-form h3 { margin-top: 0; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { width: fit-content; }
.footer-links a:hover { text-decoration: underline; }
.footer-form h3 { font-size: 13px; letter-spacing: .04em; margin-bottom: 14px; }
.contact-form { display: flex; flex-direction: column; gap: 10px; max-width: 420px; }
.form-row { display: flex; gap: 10px; }
.contact-form input, .contact-form textarea {
  border: 1px solid #b7b7b7; background: transparent;
  padding: 10px 12px; font-family: inherit; font-size: 13px;
  flex: 1; border-radius: 6px;
}
.contact-form textarea { min-height: 70px; resize: vertical; }
.contact-form button {
  align-self: flex-start; background: var(--text); color: #fff;
  border: none; padding: 10px 22px; font-size: 13px;
  margin-top: 4px; border-radius: 6px;
}
.footer-copy { font-size: 11px; color: var(--muted); }

/* Coluna direita: altura EXPLÍCITA em px (não %) — assim o SVG sempre
   renderiza, e a largura sai automaticamente do viewBox 507×546.
   Como .footer-left tem a mesma altura, topo e base batem exatamente. */
.footer-logo-text {
  flex: 0 0 auto;
  height: 520px;
}
.footer-logo-text svg {
  height: 520px;
  width: auto;
  display: block;
}
.footer-svg-link { cursor: pointer; }
.footer-svg-link path { transition: opacity .2s ease; }
.footer-svg-link:hover path { opacity: .6; }

/* ---------- DESKTOP ---------- */
@media (min-width: 600px) {
}

@media (min-width: 900px) {
  :root { --page-margin: 40px; }
  #main-nav, #modal-nav { gap: 36px; }

  .sobre-page-content { padding: 48px 40px 80px; }
  .sobre-hero-row { gap: 60px; }
  .sobre-team-grid { padding-top: 160px; grid-template-columns: repeat(3, 240px); }

  #projects-list { max-width: 1100px; margin: 0 auto; padding-top: 40px; }
  .project-card { height: 38vw; max-height: 560px; border-radius: 4px; margin-bottom: 20px; }

  .modal-content { max-width: 1100px; margin: 0 auto; }
  .modal-title-row { flex-wrap: nowrap; }
  .ficha { min-width: 0; }
  .modal-header-layout { gap: 56px; }
  .modal-header-left { flex: 0 0 220px; }  /* ficha com largura fixa à esquerda */
  /* galeria desktop: fica mais alta quando está no layout de cabeçalho */
  .modal-header-right .modal-gallery { height: 70vh; max-height: 720px; }
  .modal-gallery { height: 40vw; }
  .modal-body-row { gap: 48px; }
  .modal-resumo { flex-basis: 30%; font-size: 19px; }
  .modal-paragrafos { font-size: 14px; }
  .modal-body-row { gap: 48px; }
  .modal-resumo { flex-basis: 30%; font-size: 19px; }
  .modal-paragrafos { font-size: 14px; }
}

/* telas estreitas: uma coluna centralizada */
/* ── HEADER EM TELAS ESTREITAS ── */
@media (max-width: 899px) {
  :root { --header-h: 64px; }
  :root { --page-margin: 14px; }
  #site-header, .modal-header { gap: 8px; }
  .logo-btn img, .logo-btn video { height: 80%; }
  #main-nav, #modal-nav { gap: 12px; }
  .nav-link { font-size: 11px; letter-spacing: 0; gap: 4px; }
  .nav-dot { width: 5px; height: 5px; }
  .lang-btn { margin-left: 12px; font-size: 10px; }
}

@media (max-width: 620px) {
  :root { --page-margin: 10px; }
  #site-header, .modal-header { gap: 6px; }
  #main-nav, #modal-nav { gap: 8px; }
  .nav-link { font-size: 9.5px; gap: 3px; }
  .nav-dot { width: 4px; height: 4px; }
  .lang-btn { margin-left: 8px; font-size: 9px; }
}

@media (max-width: 899px) {
  .sobre-team-grid {
    grid-template-columns: 240px;
    justify-content: center;
    gap: 48px;
  }
  /* rodapé empilhado: alturas fixas só fazem sentido lado a lado */
  .site-footer {
    flex-direction: column;
    align-items: center;
    gap: 48px;
    padding: 48px 24px;
  }
  .footer-left { height: auto; width: 100%; max-width: 420px; gap: 28px; }
  .footer-logo-text { height: auto; width: 100%; max-width: 340px; }
  .footer-logo-text svg { height: auto; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; }
}
