/* --- Variáveis e reset --- */
:root {
  --color-bg: #0f1419;
  --color-surface: #1a2332;
  --color-text: #e6edf3;
  --color-text-muted: #8b949e;
  --color-accent: #58a6ff;
  --color-accent-hover: #79b8ff;
  --font-sans: "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
  --max-width: 720px;
  --header-height: 64px;
  --space: 1.5rem;
  --radius: 8px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

/* --- Header --- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: 0 var(--space);
  background: var(--color-surface);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo {
  max-height: 40px;
  width: auto;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--color-text);
}

.menu-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

.header.is-open .menu-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.header.is-open .menu-toggle-bar:nth-child(2) {
  opacity: 0;
}

.header.is-open .menu-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  color: var(--color-text);
  font-weight: 500;
  text-decoration: none;
}

.nav-list a:hover {
  color: var(--color-accent);
  text-decoration: none;
}

/* --- Hero --- */
.hero {
  min-height: 40vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem var(--space);
  text-align: center;
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-bg) 100%);
}

.hero-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  margin: 0;
  font-size: 1.1rem;
  color: var(--color-text-muted);
}

/* --- Sections --- */
.section {
  padding: 4rem var(--space);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-title {
  margin: 0 0 2rem;
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  color: var(--color-text);
}

/* --- SOBRE NÓS --- */
.section-sobre {
  background: var(--color-bg);
}

.sobre-content {
  max-width: 65ch;
  margin: 0 auto;
}

.sobre-subtitle {
  margin: 2rem 0 1rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-accent);
}

.sobre-content p {
  margin: 0 0 1rem;
  color: var(--color-text);
}

.sobre-assinatura {
  margin-top: 2rem !important;
  font-size: 1.1rem;
}

/* --- PROJETOS --- */
.section-projetos {
  background: var(--color-surface);
}

.projetos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space);
}

.projeto-card {
  padding: var(--space);
  background: var(--color-bg);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.projeto-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.projeto-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* --- Formulários --- */
.form {
  max-width: 480px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: var(--space);
}

.form-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-text-muted);
  opacity: 0.8;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space);
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-bg);
  background: var(--color-accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s;
}

.btn:hover {
  background: var(--color-accent-hover);
}

/* --- CONTATE-NOS --- */
.section-contato {
  background: var(--color-bg);
}

.contato-wrap {
  display: grid;
  gap: 2rem;
}

.contato-info {
  max-width: 480px;
  margin: 0 auto;
}

.contato-info p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* --- ORÇAMENTOS --- */
.section-orcamentos {
  background: var(--color-surface);
}

/* --- Footer --- */
.footer {
  padding: 2rem var(--space);
  background: var(--color-surface);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}

.footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-brand {
  margin: 0;
  font-weight: 600;
  font-size: 1.1rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.footer-nav a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--color-accent);
}

.footer-year {
  margin: 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* --- Responsivo: menu mobile --- */
@media (max-width: 640px) {
  .menu-toggle {
    display: flex;
  }

  .nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .header.is-open .nav {
    max-height: 280px;
  }

  .nav-list {
    flex-direction: column;
    padding: var(--space);
    gap: 0.5rem;
  }

  .nav-list a {
    display: block;
    padding: 0.5rem 0;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 3rem var(--space);
  }

  .projetos-grid {
    grid-template-columns: 1fr;
  }
}
