/* ==========================================================================
   1. VARIÁVEIS DE DESIGN & SETUP BASE
   ========================================================================== */
:root {
  --bg-color: #0f1012;
  --bg-card: #181a1d;
  --bg-dark-band: #141518;
  --text-main: #f3f4f6;
  --muted: #9ca3af;
  --accent: #22c55e; /* Tom de verde/destaque */
  --border-color: #2e3238;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1200px;
  --header-height: 80px;
  --radius: 8px;
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 12px;
}

/* ==========================================================================
   2. CABEÇALHO & NAVEGAÇÃO
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background-color: rgba(15, 16, 18, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

.nav-wrap {
  max-width: var(--max-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand img {
  height: 38px;
  width: auto;
  object-fit: contain;
}

.brand span {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  font-size: 15px;
}

.brand small {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 400;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav a {
  font-size: 15px;
  color: var(--muted);
  font-weight: 500;
}

.nav a:hover,
.nav a.active {
  color: var(--text-main);
}

.nav-cta {
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius);
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
}

.nav-cta:hover {
  background-color: var(--text-main);
  color: var(--bg-color);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 24px;
  cursor: pointer;
}

/* ==========================================================================
   3. SECÇÃO HERO COM EFEITO LED
   ========================================================================== */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-height));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 0 40px;
  overflow: hidden;
  background-color: #000;
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 100vh;
  transform: translate(-50%, -50%);
  object-fit: cover;
  pointer-events: none;
  opacity: 0.6;
}

/* Overlay de Matriz de LED */
.led-matrix-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.85;
  background-image: 
    radial-gradient(circle, rgba(0,0,0,0) 35%, rgba(10,10,12,0.92) 80%),
    radial-gradient(circle at center, rgba(255,255,255,0.15) 0%, rgba(0,0,0,0.85) 100%);
  background-size: 4px 4px;
  mix-blend-mode: multiply;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.display {
  font-size: clamp(48px, 7vw, 84px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 16px 0 24px;
}

.lead {
  font-size: clamp(18px, 2.5vw, 22px);
  color: var(--muted);
  max-width: 600px;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: var(--radius);
  background-color: var(--text-main);
  color: var(--bg-color);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid var(--text-main);
  cursor: pointer;
}

.button:hover {
  background-color: transparent;
  color: var(--text-main);
}

.button.secondary {
  background-color: transparent;
  color: var(--text-main);
  border-color: var(--border-color);
}

.button.secondary:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

.hero-bottom {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding-top: 40px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ==========================================================================
   4. ESTRUTURA GERAL DE SECÇÕES
   ========================================================================== */
.section {
  padding: 100px 0;
  border-bottom: 1px solid var(--border-color);
}

.dark-band {
  background-color: var(--bg-dark-band);
}

.page-intro {
  padding: 80px 0 60px;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-dark-band);
}

.page-intro h1 {
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.page-intro p {
  font-size: 18px;
  color: var(--muted);
  max-width: 600px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  margin-bottom: 60px;
  flex-wrap: wrap;
}

.section-head h2 {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.section-head p {
  color: var(--muted);
  max-width: 440px;
  font-size: 16px;
}

/* ==========================================================================
   5. CARDS DO PORTFÓLIO & IMAGENS (Sem Cortes / Proporção 16:9)
   ========================================================================== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
}

.card {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Proporção 16:9 sem cortes */
.card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #000;
  overflow: hidden;
  position: relative;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card-image img {
  transform: scale(1.04);
}

.card-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.tag {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 12px;
}

.card-body h3 {
  font-size: 22px;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.card-body p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 20px;
}

.text-link {
  font-size: 14px;
  font-weight: 600;
  margin-top: auto;
}

/* Filtros de Categorias */
.category-links {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.category-links a {
  padding: 8px 16px;
  border-radius: 20px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  font-size: 14px;
  color: var(--muted);
}

.category-links a:hover,
.category-links a.active {
  background-color: var(--text-main);
  color: var(--bg-color);
}

/* ==========================================================================
   6. LAYOUT SPLIT & ESTATÍSTICAS (Página Sobre)
   ========================================================================== */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.portrait img {
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.stats {
  display: flex;
  gap: 40px;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
}

.stat strong {
  display: block;
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
  color: var(--text-main);
}

.stat span {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   7. GRELHA DE SERVIÇOS
   ========================================================================== */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.service {
  padding: 36px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

.service .num {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 16px;
}

.service h3 {
  font-size: 22px;
  margin-bottom: 12px;
}

.service p {
  color: var(--muted);
  font-size: 15px;
}

/* ==========================================================================
   8. FORMULÁRIO DE CONTACTO
   ========================================================================== */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  padding: 14px 18px;
  border-radius: var(--radius);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-family: inherit;
  font-size: 15px;
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.notice {
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
}

/* ==========================================================================
   9. JANELA MODAL (Detalhes dos Projetos)
   ========================================================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal.active {
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================================================
   10. RODAPÉ (SITE FOOTER)
   ========================================================================== */
.site-footer {
  margin-top: auto;
  padding: 40px 0;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-color);
  font-size: 14px;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-inner a:hover {
  color: var(--text-main);
}

/* ==========================================================================
   11. RESPONSIVIDADE (MOBILE & TABLET)
   ========================================================================== */
@media (max-width: 900px) {
  .split,
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    display: none;
  }

  .nav.active {
    display: flex;
  }

  .nav-cta {
    display: none;
  }

  .section {
    padding: 60px 0;
  }
}