/* ==========================================================
   Complemente Engenharia – landing page
   Paleta da marca: azul-noite #000C3E, branco, cinza #939393
   ========================================================== */

:root {
  --navy: #000C3E;          /* cor oficial – também é o fundo do logo */
  --navy-2: #0B1A55;
  --navy-3: #16276E;
  --grey: #939393;          /* cor oficial */
  --grey-light: #C9CBD1;
  --ink: #141A2E;
  --muted: #555C70;
  --line: #E2E4EB;
  --soft: #F3F4F7;
  --white: #FFFFFF;
  --wa: #25D366;
  --selecao: #4C7DFF;       /* destaque do elemento selecionado no visualizador 3D (mesma cor de COR_SELECAO em viewer3d.js) */

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 18px 40px -18px rgba(0, 12, 62, .35);
  --header-h: 72px;
  --container: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); }

body {
  margin: 0;
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; }
p { margin: 0 0 1em; }

.container { width: min(100% - 32px, var(--container)); margin-inline: auto; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--white); color: var(--navy); padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--grey-light); outline-offset: 3px; border-radius: 4px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px; border: 2px solid transparent;
  font: 600 .95rem/1 'Poppins', sans-serif; letter-spacing: .01em;
  text-decoration: none; cursor: pointer;
  transition: transform .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn svg { width: 20px; height: 20px; fill: currentColor; }
.btn:hover { transform: translateY(-2px); }
.btn-sm { padding: 10px 18px; font-size: .85rem; }
.btn-light { background: var(--white); color: var(--navy); }
.btn-light:hover { background: var(--grey-light); }
.btn-outline-light { border-color: rgba(255, 255, 255, .45); color: var(--white); }
.btn-outline-light:hover { border-color: var(--white); background: rgba(255, 255, 255, .08); }

/* ---------- Tipografia de seção ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .78rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: var(--navy-3); margin-bottom: 14px;
}
/* pequena cruz de marcação – elemento da identidade visual */
.eyebrow::before {
  content: ""; width: 14px; height: 14px; flex: none;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
}
.eyebrow-light { color: var(--grey-light); }

.section { padding: clamp(72px, 10vw, 120px) 0; }
.section-soft { background: var(--soft); }
.section-navy { background: var(--navy); color: var(--white); }

.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 600; color: var(--navy); }
.lead { font-size: 1.07rem; color: var(--muted); margin: 0; }

/* ---------- Cabeçalho ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--navy);
  transition: box-shadow .25s ease;
}
.site-header.scrolled { box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand img { height: 54px; width: auto; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) {
  color: var(--grey-light); text-decoration: none; font-size: .92rem; font-weight: 500;
  position: relative; padding: 6px 0;
}
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--white); transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.nav a:not(.btn):hover { color: var(--white); }
.nav a:not(.btn):hover::after { transform: scaleX(1); }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--white); margin: 5px 0; transition: transform .25s, opacity .25s; }
.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 ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px) 0 0 / 48px 48px,
    radial-gradient(1200px 600px at 85% 20%, var(--navy-3) 0%, transparent 60%),
    var(--navy);
  color: var(--white);
  padding: clamp(56px, 8vw, 110px) 0 clamp(72px, 10vw, 130px);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 5.2vw, 3.7rem); font-weight: 700; letter-spacing: -.02em; margin-bottom: 20px; }
.hero-lead { font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: var(--grey-light); max-width: 34em; margin-bottom: 32px; font-weight: 300; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 36px; }

.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 26px; }
.hero-points li { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--grey-light); }
.hero-points li::before {
  content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%;
  background: rgba(255, 255, 255, .12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.hero-figure { margin: 0; position: relative; }
.hero-card {
  background: var(--white); border-radius: var(--radius); padding: 10px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6);
  transform: perspective(1400px) rotateY(-6deg) rotateX(2deg);
  transition: transform .6s ease;
}
.hero-card:hover { transform: perspective(1400px) rotateY(0) rotateX(0); }
.hero-card img { border-radius: calc(var(--radius) - 6px); }
.hero-figure figcaption { display: flex; align-items: center; gap: 10px; margin-top: 18px; font-size: .85rem; color: var(--grey-light); }

/* Decoração: cruzes e blocos geométricos da identidade */
.hero-deco { position: absolute; inset: 0; pointer-events: none; }
.cross { position: absolute; width: 120px; height: 120px; opacity: .8; }
.cross::before, .cross::after { content: ""; position: absolute; background: var(--white); }
.cross::before { left: 0; right: 0; top: 50%; height: 3px; transform: translateY(-50%); }
.cross::after { top: 0; bottom: 0; left: 50%; width: 3px; transform: translateX(-50%); }
.cross-a { left: -40px; bottom: 60px; opacity: .35; }
.cross-b { right: 4%; top: 36px; width: 70px; height: 70px; opacity: .25; }
.block { position: absolute; background: var(--grey); opacity: .14; }
.block-a { width: 260px; height: 340px; right: -60px; bottom: -120px; clip-path: polygon(40% 0, 100% 0, 100% 100%, 0 100%, 0 40%); }
.block-b { width: 90px; height: 220px; left: 46%; bottom: -150px; clip-path: polygon(0 30%, 100% 0, 100% 100%, 0 100%); }

/* ---------- Tags ---------- */
.tag {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: .72rem; font-weight: 600; letter-spacing: .06em;
  background: var(--soft); color: var(--navy); border: 1px solid var(--line);
}
.tag-bim { background: var(--white); color: var(--navy); border-color: var(--white); letter-spacing: .14em; }

/* ---------- Serviços ---------- */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service {
  position: relative; padding: 34px 30px 30px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--white); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.service::before { /* canto chanfrado – eco do símbolo "C" */
  content: ""; position: absolute; top: -1px; left: -1px; width: 56px; height: 56px;
  background: var(--navy); clip-path: polygon(0 0, 100% 0, 0 100%); border-top-left-radius: var(--radius);
  opacity: 0; transition: opacity .25s ease;
}
.service:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.service:hover::before { opacity: 1; }
.service-icon {
  width: 60px; height: 60px; border-radius: 14px; display: grid; place-items: center;
  background: var(--navy); margin-bottom: 22px;
}
.service-icon svg { width: 34px; height: 34px; fill: none; stroke: var(--white); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.service h3 { font-size: 1.3rem; font-weight: 600; color: var(--navy); }
.service > p { color: var(--muted); font-size: .95rem; }
.service ul { list-style: none; padding: 18px 0 0; margin: 0; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.service li { display: flex; align-items: center; gap: 12px; font-weight: 500; font-size: .95rem; }
.service li::before { content: ""; width: 8px; height: 8px; background: var(--grey); transform: rotate(45deg); flex: none; }

/* ---------- BIM ---------- */
.bim-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.bim-figure { margin: 0; position: sticky; top: calc(var(--header-h) + 24px); }
.bim-figure img { border-radius: var(--radius); box-shadow: var(--shadow); }
.bim-figure figcaption { margin-top: 12px; font-size: .85rem; color: var(--muted); }

.steps { list-style: none; padding: 0; margin: 0 0 36px; display: grid; gap: 4px; }
.steps li { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.steps li:last-child { border-bottom: 0; }
.step-n { font-size: 1.5rem; font-weight: 700; color: var(--grey); line-height: 1.1; }
.steps h3 { font-size: 1.1rem; font-weight: 600; color: var(--navy); margin-bottom: 4px; }
.steps p { margin: 0; color: var(--muted); font-size: .95rem; }

.bim-meta { display: grid; gap: 22px; padding: 26px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); }
.bim-meta h4 { font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 12px; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 7px 14px; border-radius: 999px; background: var(--navy); color: var(--white); font-size: .85rem; font-weight: 500; }
.tools { margin: 0; font-weight: 500; }

/* ---------- Projetos ---------- */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.project {
  position: relative; display: flex; flex-direction: column; text-align: left; padding: 0; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--white);
  font: inherit; color: inherit; transition: transform .25s ease, box-shadow .25s ease;
}
.project:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.project-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--soft); }
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.project:hover .project-media img { transform: scale(1.05); }
.project-media .tag-bim { position: absolute; top: 14px; left: 14px; background: var(--navy); color: var(--white); border-color: var(--navy); }
.project-more {
  position: absolute; right: 14px; bottom: 14px; padding: 6px 12px; border-radius: 999px;
  background: rgba(0, 12, 62, .82); color: var(--white); font-size: .78rem; font-weight: 500;
  display: flex; align-items: center; gap: 6px;
}
/* O título é um botão "esticado": o ::after cobre o cartão inteiro e abre a galeria */
.project-open { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.project-open::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.project-open:focus-visible { outline: none; }
.project:has(.project-open:focus-visible) { outline: 3px solid var(--navy); outline-offset: 3px; }

/* Faixa "Ver Complementares em 3D": extensão do cartão, ocupa toda a largura embaixo */
.project-3d {
  position: relative; z-index: 2; width: 100%; box-sizing: border-box; display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 18px 24px; border: 0; border-top: 1px solid rgba(255, 255, 255, .18); border-radius: 0;
  background: var(--navy); color: var(--white); font-family: inherit; font-size: 1rem; font-weight: 600; line-height: 1.2;
  cursor: pointer; transition: background .2s ease;
}
.project-3d svg { width: 26px; height: 26px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.project-3d-seta { width: 20px !important; height: 20px !important; transition: transform .2s ease; }
.project-3d:hover { background: #001a6e; }
.project-3d:hover .project-3d-seta { transform: translateX(4px); }
.project-3d:focus-visible { outline: 3px solid var(--grey-light); outline-offset: -6px; }
.project-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.project-body h3 { font-size: 1.25rem; font-weight: 600; color: var(--navy); margin: 0; }
.project-place { color: var(--muted); font-size: .92rem; margin: 0; }
.project-desc { font-size: .92rem; margin: 4px 0 0; }
.projects-2x2 { grid-template-columns: repeat(2, 1fr); }
.projects-2x2 .project-media { aspect-ratio: 16 / 10; }
.project-specs { display: flex; gap: 18px; font-size: .88rem; margin: 4px 0 6px; color: var(--ink); }
.project-specs strong { font-weight: 600; }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; }
.note { margin: 28px 0 0; font-size: .82rem; color: var(--muted); max-width: 760px; }

/* ---------- Sobre ---------- */
.about { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(36px, 6vw, 88px); align-items: center; }
.about-photo { margin: 0; position: relative; }
.about-photo img { border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; position: relative; z-index: 1; }
.about-photo::before { /* moldura deslocada em cinza */
  content: ""; position: absolute; inset: 22px -22px -22px 22px; border: 2px solid var(--grey); border-radius: var(--radius);
}
.about-photo::after { /* cruz de marcação */
  content: ""; position: absolute; z-index: 2; left: -26px; top: -26px; width: 64px; height: 64px;
  background:
    linear-gradient(var(--white), var(--white)) center / 100% 3px no-repeat,
    linear-gradient(var(--white), var(--white)) center / 3px 100% no-repeat;
}
.about-text h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 600; color: var(--white); }
.about-text > p { color: var(--grey-light); font-size: 1.02rem; }
.person { margin-top: 30px; padding: 26px 28px; border-left: 3px solid var(--grey); background: rgba(255, 255, 255, .05); border-radius: 0 var(--radius) var(--radius) 0; }
.person p { margin: 0 0 6px; color: var(--grey-light); font-size: .95rem; }
.person .person-name { color: var(--white); font-size: 1.15rem; font-weight: 600; }
.person .person-role { color: var(--white); font-weight: 500; font-size: .9rem; margin-bottom: 12px; }
.person .person-crea { margin: 12px 0 0; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--grey); }

/* ---------- Contato ---------- */
.contacts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.contact {
  display: flex; flex-direction: column; gap: 4px; padding: 28px 24px; border-radius: var(--radius);
  border: 1px solid var(--line); text-decoration: none; background: var(--white);
  transition: transform .25s ease, box-shadow .25s ease;
}
a.contact:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.contact svg { width: 30px; height: 30px; fill: currentColor; color: var(--navy); margin-bottom: 14px; }
.contact-label { font-size: .76rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.contact-value { font-weight: 600; color: var(--navy); word-break: break-word; }
.contact-extra { font-size: .85rem; color: var(--muted); }
.contact-main { background: var(--navy); border-color: var(--navy); }
.contact-main svg, .contact-main .contact-value { color: var(--white); }
.contact-main .contact-label { color: var(--grey-light); }

/* ---------- Rodapé ---------- */
.site-footer { background: var(--navy); color: var(--grey-light); padding: 48px 0 40px; border-top: 1px solid rgba(255, 255, 255, .08); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; align-items: center; }
.footer-brand img { height: 48px; width: auto; margin-bottom: 10px; }
.footer-brand p { margin: 0; font-size: .9rem; }
.footer-info { font-size: .85rem; text-align: right; }
.footer-info p { margin: 0 0 6px; }
.footer-info strong { color: var(--white); font-weight: 500; }
.copy { color: var(--grey); }

/* ---------- WhatsApp flutuante ---------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
  background: var(--wa); box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
  transition: transform .2s ease;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 32px; height: 32px; fill: var(--white); }

/* ---------- Lightbox ---------- */
.lightbox {
  width: min(100vw - 32px, 1200px); max-height: calc(100vh - 32px); padding: 0; border: 0;
  border-radius: var(--radius); background: var(--navy); color: var(--white); overflow: hidden;
}
.lightbox::backdrop { background: rgba(0, 6, 30, .88); }
.lb-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 10px 24px; }
.lb-title { margin: 0; font-weight: 600; }
.lb-close { background: none; border: 0; color: var(--white); font-size: 2rem; line-height: 1; cursor: pointer; padding: 4px 8px; }
.lb-stage { position: relative; display: grid; place-items: center; background: #000820; height: min(72vh, 760px); }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .9); color: var(--navy); font-size: 1.8rem; line-height: 1; cursor: pointer;
}
.lb-prev { left: 14px; }
.lb-next { right: 14px; }
.lb-caption { margin: 0; padding: 14px 24px 18px; font-size: .9rem; color: var(--grey-light); display: flex; justify-content: space-between; gap: 16px; }
.lb-count { color: var(--grey); white-space: nowrap; }

/* ---------- Animação de entrada ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .hero-card { transform: none; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 1024px) {
  .contacts { grid-template-columns: repeat(2, 1fr); }
  .projects { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .brand img { height: 44px; }
  .cross-b { display: none; }
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy); padding: 8px 16px 20px; border-top: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 16px 30px rgba(0, 0, 0, .3);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
  .nav a:not(.btn)::after { display: none; }
  .nav .btn { margin-top: 16px; }

  .hero-inner, .bim-grid, .about { grid-template-columns: 1fr; }
  .hero-card { transform: none; }
  .services { grid-template-columns: 1fr; }
  .bim-figure { position: static; }
  .about-photo { max-width: 420px; margin: 0 22px 22px 0; }
  .footer-info { text-align: left; }
}

@media (max-width: 600px) {
  .projects, .contacts { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 100%; }
  .lb-nav { width: 40px; height: 40px; font-size: 1.5rem; }
  .lb-stage { height: 60vh; }
  .lb-caption { flex-direction: column; gap: 4px; }
  .wa-float { width: 54px; height: 54px; right: 16px; bottom: 16px; }
}

/* ---------- Visualizador 3D ---------- */
.v3d {
  position: relative; width: 100%; height: 100%; min-height: 280px; overflow: hidden;
  background: #b4bccb; color: var(--ink);
}
.v3d--escuro { background: #000820; color: var(--white); }
.v3d-palco { position: absolute; inset: 0; }
.v3d-palco canvas { display: block; width: 100%; height: 100%; outline: none; touch-action: none; }
.v3d-palco canvas:focus-visible { outline: 3px solid var(--grey-light); outline-offset: -3px; }

.v3d-barra { position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 8px; z-index: 2; }
.v3d-barra[hidden] { display: none; }
.v3d-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: rgba(255, 255, 255, .92); color: var(--navy); box-shadow: 0 4px 14px rgba(0, 12, 62, .25);
  transition: transform .2s ease, background .2s ease;
}
.v3d-btn:hover { transform: scale(1.06); background: var(--white); }
.v3d-btn:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.v3d--escuro .v3d-btn:focus-visible { outline-color: var(--white); }
.v3d-btn[aria-pressed="true"] { background: var(--navy); color: var(--white); }
.v3d-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.v3d-dica {
  position: absolute; left: 12px; bottom: 12px; right: 70px; margin: 0; z-index: 2; pointer-events: none;
  font-size: .8rem; color: var(--ink); transition: opacity .5s ease;
}
.v3d--escuro .v3d-dica { color: var(--grey-light); }
.v3d-dica[hidden], .v3d-dica--oculta { opacity: 0; }

.v3d-estado { position: absolute; inset: 0; z-index: 3; display: none; place-items: center; align-content: center; gap: 14px; padding: 24px; text-align: center; }
.v3d-estado--carregando, .v3d-estado--aviso { display: grid; }
.v3d-estado--aviso { background: inherit; }
.v3d-estado p { margin: 0; max-width: 46ch; }
.v3d-estado img { max-width: min(100%, 420px); border-radius: var(--radius-sm); }
.v3d-trilho { width: min(320px, 80%); height: 8px; border-radius: 99px; background: rgba(127, 134, 160, .3); overflow: hidden; }
.v3d-preenchido { height: 100%; width: 0; background: var(--navy); border-radius: inherit; transition: width .2s ease; }
.v3d--escuro .v3d-preenchido { background: var(--white); }
.v3d-trilho--indeterminado .v3d-preenchido { width: 40%; animation: v3d-vai-e-vem 1.2s ease-in-out infinite alternate; }
@keyframes v3d-vai-e-vem { from { transform: translateX(-10%); } to { transform: translateX(150%); } }

/* Tela cheia "simulada" (para aparelhos sem tela cheia real, como o iPhone) */
.v3d--cheia { position: fixed; inset: 0; z-index: 2000; width: 100vw; height: 100dvh; max-height: none; }

/* Janela do visualizador dentro do site */
.v3d-host { height: min(72vh, 760px); background: #b4bccb; }

@media (max-width: 600px) {
  .v3d-host { height: 62vh; }
  .v3d-dica { right: 64px; font-size: .75rem; }
}

/* Tela "O que você quer ver em 3D?" (projetos com mais de um modelo) */
.v3d-escolha { min-height: 100%; box-sizing: border-box; display: grid; align-content: center; gap: 14px; padding: 24px clamp(16px, 10vw, 140px); background: var(--white); color: var(--ink); overflow: auto; }
.v3d-escolha h3 { margin: 0; color: var(--navy); font-size: 1.2rem; }
.v3d-escolha ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.v3d-escolha-item {
  width: 100%; min-height: 58px; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  text-align: left; padding: 14px 18px; border-radius: var(--radius-sm); border: 1.5px solid var(--navy);
  background: var(--white); color: var(--navy); font: inherit; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease;
}
.v3d-escolha-item:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.v3d-escolha-item:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.v3d-escolha-item span { font-size: .85rem; color: var(--muted); text-align: right; }
.v3d-escolha-todos { background: var(--navy); color: var(--white); }
.v3d-escolha-todos span { color: var(--grey-light); }
.v3d-escolha-aviso { margin: 0; font-size: .88rem; }
.v3d-escolha-aviso[hidden] { display: none; }

/* Painel de camadas do visualizador */
.v3d-camadas {
  position: absolute; top: 12px; left: 12px; z-index: 2; max-width: min(280px, 62%); max-height: 60%; overflow: auto;
  padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, .94); color: var(--ink); font-size: .88rem;
  box-shadow: 0 4px 14px rgba(0, 12, 62, .25);
}
.v3d-camadas[hidden] { display: none; }
.v3d-camadas summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.v3d-camadas ul { list-style: none; margin: 4px 0 2px; padding: 0; display: grid; gap: 2px; }
.v3d-camadas li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 10px; }
.v3d-camadas label { display: flex; align-items: center; gap: 10px; min-height: 36px; cursor: pointer; }
.v3d-camadas input { width: 18px; height: 18px; accent-color: var(--navy); }
.v3d-camada-info { font-size: .75rem; color: var(--muted); }
.v3d--escuro .v3d-camadas { background: rgba(0, 12, 62, .92); color: var(--white); }
.v3d--escuro .v3d-camada-info { color: var(--grey-light); }
@media (max-width: 600px) { .v3d-camadas { max-width: calc(100% - 80px); } .v3d-camadas label { min-height: 40px; } }

/* Filtro por categoria e dados do elemento */
.v3d-camadas ul + .v3d-categorias { margin-top: 8px; padding-top: 6px; border-top: 1px solid rgba(127, 134, 160, .35); }
.v3d-categorias[hidden], .v3d-lista-camadas[hidden] { display: none; }
.v3d-camadas li { flex-wrap: nowrap; }
.v3d-camadas label { flex: 1 1 auto; min-width: 0; }
.v3d-camada-info { white-space: nowrap; }
.v3d-categorias ul { list-style: none; margin: 2px 0; padding: 0; display: grid; gap: 2px; }
.v3d-subtitulo { margin: 4px 0 2px; font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.v3d--escuro .v3d-subtitulo { color: var(--grey-light); }

.v3d-info {
  position: absolute; right: 12px; bottom: 12px; z-index: 3; width: min(320px, calc(100% - 24px)); max-height: 55%; overflow: auto; box-sizing: border-box;
  padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, .96); color: var(--ink); font-size: .88rem;
  box-shadow: 0 8px 24px rgba(0, 12, 62, .35); border-left: 5px solid var(--selecao);
}
.v3d-info[hidden] { display: none; }
.v3d--escuro .v3d-info { background: rgba(0, 12, 62, .96); color: var(--white); }
.v3d-info-topo { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.v3d-info-titulo { margin: 0; font-weight: 600; font-size: 1rem; color: var(--navy); }
.v3d--escuro .v3d-info-titulo { color: var(--white); }
.v3d-info-fechar { background: none; border: 0; color: inherit; font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0 4px; min-width: 32px; min-height: 32px; }
.v3d-info dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; }
.v3d-info dt { color: var(--muted); }
.v3d--escuro .v3d-info dt { color: var(--grey-light); }
.v3d-info dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
@media (max-width: 600px) { .v3d-info { left: 8px; right: 8px; width: auto; bottom: 8px; max-height: 45%; } }

/* Seletor de cor por categoria e botão de restaurar */
.v3d-cor { width: 24px; height: 24px; padding: 0; border: 1px solid rgba(127, 134, 160, .7); border-radius: 50%; background: none; cursor: pointer; flex: none; overflow: hidden; }
.v3d-cor::-webkit-color-swatch-wrapper { padding: 0; }
.v3d-cor::-webkit-color-swatch { border: 0; border-radius: 50%; }
.v3d-cor::-moz-color-swatch { border: 0; border-radius: 50%; }
.v3d-cor:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.v3d--escuro .v3d-cor:focus-visible { outline-color: var(--white); }
.v3d-link { background: none; border: 0; padding: 8px 0 2px; color: var(--navy); font: inherit; font-size: .8rem; text-decoration: underline; cursor: pointer; }
.v3d--escuro .v3d-link { color: var(--white); }
