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

:root {
  --bg: #0f0b08;
  --surface: #1a1208;
  --border: #2e2010;
  --accent: #E07B3D;
  --accent-light: #F4A06A;
  --text: #f0e8df;
  --muted: #8a7060;
  --header-bg: rgba(15,11,8,.85);
  --metro: #E07B3D;
  --rodovia: #0ea5e9;
  --mineracao: #f59e0b;
}

[data-theme="light"] {
  --bg: #fdf6f0;
  --surface: #ffffff;
  --border: #e8d5c4;
  --accent: #C45A2B;
  --accent-light: #8B4A2D;
  --text: #2a1a0e;
  --muted: #7a5a46;
  --header-bg: rgba(253,246,240,.90);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background .3s, color .3s;
}

/* Grid background */
.bg-grid {
  position: fixed; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(224,123,61,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(224,123,61,.05) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background .3s, border-color .3s;
}

nav {
  max-width: 1100px; margin: 0 auto;
  padding: 1rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
}

.logo { display: flex; align-items: center; gap: .6rem; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--accent);
  display: grid; place-items: center;
  font-weight: 800; font-size: .9rem; color: #fff;
}
.logo-text { font-weight: 600; font-size: 1rem; }

nav ul { list-style: none; display: flex; gap: 2rem; }
nav a { color: var(--muted); text-decoration: none; font-size: .9rem; transition: color .2s; }
nav a:hover { color: var(--text); }

.theme-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  width: 36px; height: 36px; border-radius: 8px;
  cursor: pointer; font-size: 1rem;
  display: grid; place-items: center;
  transition: background .2s, border-color .2s, transform .1s;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--accent); transform: scale(1.05); }

main { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; padding: 0 2rem; }

/* Hero */
.hero {
  min-height: 85vh;
  display: grid; grid-template-columns: 1fr 1fr;
  align-items: center; gap: 4rem;
  padding: 5rem 0;
}

.badge {
  display: inline-block;
  background: rgba(224,123,61,.15);
  border: 1px solid rgba(224,123,61,.35);
  color: var(--accent-light);
  padding: .3rem .9rem; border-radius: 999px;
  font-size: .8rem; font-weight: 500;
  margin-bottom: 1.5rem;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; line-height: 1.15; margin-bottom: 1.2rem; }
.accent { color: var(--accent-light); }
.hero-content p { color: var(--muted); font-size: 1.1rem; margin-bottom: 2rem; max-width: 480px; }

.cta-group { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn-primary {
  background: var(--accent); color: #fff;
  padding: .7rem 1.6rem; border-radius: 8px;
  text-decoration: none; font-weight: 600; font-size: .95rem;
  transition: opacity .2s, transform .1s;
}
.btn-primary:hover { opacity: .85; transform: translateY(-1px); }

.btn-ghost {
  border: 1px solid var(--border); color: var(--text);
  padding: .7rem 1.6rem; border-radius: 8px;
  text-decoration: none; font-weight: 500; font-size: .95rem;
  transition: border-color .2s;
}
.btn-ghost:hover { border-color: var(--accent); }

/* Metro card */
.metro-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px; padding: 2rem;
  box-shadow: 0 0 60px rgba(224,123,61,.12);
}

.metro-line { display: flex; flex-direction: column; gap: 0; margin-bottom: 1.5rem; }

.metro-station {
  display: flex; align-items: center; gap: .75rem;
  font-size: .9rem; color: var(--muted);
  padding: .5rem 0;
}
.metro-station.active { color: var(--text); font-weight: 600; }

.station-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--border); flex-shrink: 0;
  transition: background .3s;
}
.metro-station.active .station-dot { background: var(--accent); box-shadow: 0 0 8px var(--accent); }

.metro-track {
  width: 2px; height: 20px; background: var(--border);
  margin-left: 5px;
}

.metro-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1rem; border-top: 1px solid var(--border); padding-top: 1.25rem;
}
.stat { text-align: center; }
.stat-val { display: block; font-size: 1.4rem; font-weight: 800; color: var(--accent-light); }
.stat-label { font-size: .75rem; color: var(--muted); }

/* Sections */
section { padding: 5rem 0; }
h2 { font-size: 1.8rem; font-weight: 700; margin-bottom: 2.5rem; }

/* Services */
.cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.75rem;
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--accent); transform: translateY(-3px); }
.card-icon { font-size: 1.8rem; margin-bottom: 1rem; }
.card h3 { font-size: 1rem; font-weight: 600; margin-bottom: .5rem; }
.card p { font-size: .875rem; color: var(--muted); }

/* Projects */
.project-list { display: flex; flex-direction: column; gap: 1rem; }
.project-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.5rem;
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 1.5rem;
  transition: border-color .2s;
}
.project-item:hover { border-color: var(--accent); }

.project-badge {
  padding: .3rem .8rem; border-radius: 999px;
  font-size: .75rem; font-weight: 600;
  white-space: nowrap;
}
.project-badge.metro { background: rgba(224,123,61,.2); color: #F4A06A; }
.project-badge.rodovia { background: rgba(14,165,233,.2); color: #38bdf8; }
.project-badge.mineracao { background: rgba(245,158,11,.2); color: #fbbf24; }

.project-info h3 { font-size: .95rem; font-weight: 600; margin-bottom: .25rem; }
.project-info p { font-size: .825rem; color: var(--muted); }

.project-progress { display: flex; align-items: center; gap: .75rem; min-width: 140px; }
.progress-bar { flex: 1; height: 6px; background: var(--border); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 999px; }
.project-progress span { font-size: .8rem; font-weight: 600; color: var(--accent-light); min-width: 32px; }

/* Contact */
.contact { text-align: center; }
.contact p { color: var(--muted); margin-bottom: 2rem; }

/* Footer */
footer {
  border-top: 1px solid var(--border);
  text-align: center; padding: 2rem;
  color: var(--muted); font-size: .85rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hero { grid-template-columns: 1fr; padding: 3rem 0; }
  .hero-visual { display: none; }
  .project-item { grid-template-columns: 1fr; }
}
