/* ===== Variables ===== */
:root {
  --bg: #0a0e17;
  --bg-alt: #111827;
  --bg-card: #1a2234;
  --bg-card-hover: #1f2a40;
  --text: #e8ecf4;
  --text-muted: #8b95a8;
  --accent: #00d4aa;
  --accent-dim: #00a888;
  --accent-glow: rgba(0, 212, 170, 0.25);
  --gradient: linear-gradient(135deg, #00d4aa 0%, #00a3ff 100%);
  --border: rgba(255, 255, 255, 0.08);
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', system-ui, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --container: 1140px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
}

.logo-icon {
  color: var(--accent);
  font-size: 1.6rem;
}

.accent { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
}

.nav-links a:hover { color: var(--text); }

.btn-nav {
  background: var(--accent) !important;
  color: var(--bg) !important;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  font-weight: 600 !important;
  transition: background var(--transition), transform var(--transition) !important;
}

.btn-nav:hover {
  background: var(--accent-dim) !important;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--gradient);
  color: var(--bg);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-full { width: 100%; }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(0, 212, 170, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 20% 80%, rgba(0, 163, 255, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
}

.hero-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: rgba(0, 212, 170, 0.1);
  border: 1px solid rgba(0, 212, 170, 0.25);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1.5rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
}

.stat span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hero-visual {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  width: 320px;
  height: 320px;
  perspective: 800px;
  z-index: 1;
  opacity: 0.7;
}

.printer-cube {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  animation: rotateCube 20s linear infinite;
}

.cube-face {
  position: absolute;
  width: 200px;
  height: 200px;
  top: 50%;
  left: 50%;
  margin: -100px;
  border: 2px solid rgba(0, 212, 170, 0.3);
  background: rgba(0, 212, 170, 0.05);
  backdrop-filter: blur(4px);
}

.cube-face.front  { transform: translateZ(100px); }
.cube-face.back   { transform: rotateY(180deg) translateZ(100px); }
.cube-face.right  { transform: rotateY(90deg) translateZ(100px); }
.cube-face.left   { transform: rotateY(-90deg) translateZ(100px); }
.cube-face.top    { transform: rotateX(90deg) translateZ(100px); }
.cube-face.bottom { transform: rotateX(-90deg) translateZ(100px); }

@keyframes rotateCube {
  from { transform: rotateX(-15deg) rotateY(0deg); }
  to   { transform: rotateX(-15deg) rotateY(360deg); }
}

/* ===== Sections ===== */
.section {
  padding: 100px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3.5rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ===== Filter ===== */
.filter-bar {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.filter-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

/* ===== Cards Grid ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 212, 170, 0.3);
  box-shadow: var(--shadow);
}

.card-img {
  position: relative;
  height: 180px;
  background: linear-gradient(
    135deg,
    hsl(var(--hue, 200), 40%, 15%) 0%,
    hsl(var(--hue, 200), 30%, 8%) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-placeholder {
  font-size: 3.5rem;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}

.card-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 0.3rem 0.75rem;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
}

.card-body {
  padding: 1.5rem;
}

.card-body h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.card-body p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.card-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.card-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap var(--transition);
}

.card-link:hover { text-decoration: underline; }

.modelo-card.hidden { display: none; }

/* ===== Projetos ===== */
.projetos-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.projeto-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 2rem;
  align-items: center;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}

.projeto-item:hover {
  border-color: rgba(0, 212, 170, 0.25);
  transform: translateX(4px);
}

.projeto-num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: rgba(0, 212, 170, 0.2);
  line-height: 1;
}

.projeto-cat {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.projeto-content h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0.25rem 0 0.5rem;
}

.projeto-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.projeto-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.projeto-tags span {
  padding: 0.25rem 0.65rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.projeto-visual {
  width: 80px;
  height: 80px;
  border-radius: var(--radius);
  background: linear-gradient(
    135deg,
    hsl(var(--hue, 200), 50%, 20%) 0%,
    hsl(var(--hue, 200), 40%, 10%) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

/* ===== Gallery ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 1rem;
}

.gallery-item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

.gallery-item.large {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-item.wide {
  grid-column: span 2;
}

.gallery-inner {
  width: 100%;
  height: 100%;
  background: linear-gradient(
    160deg,
    hsl(var(--hue, 200), 45%, 18%) 0%,
    hsl(var(--hue, 200), 35%, 8%) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition: transform var(--transition);
}

.gallery-inner:hover { transform: scale(1.02); }

.gallery-emoji {
  font-size: 3.5rem;
  transition: transform var(--transition);
}

.gallery-inner:hover .gallery-emoji {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem;
  opacity: 0;
  transition: opacity var(--transition);
}

.gallery-inner:hover .gallery-overlay { opacity: 1; }

.gallery-overlay h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  margin-bottom: 0.15rem;
}

.gallery-overlay p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== Services ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.service-card {
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}

.service-card:hover {
  border-color: rgba(0, 212, 170, 0.3);
  transform: translateY(-3px);
}

.service-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.materials-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.5rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.materials-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.materials-list {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.material {
  padding: 0.35rem 0.85rem;
  background: rgba(0, 212, 170, 0.1);
  border: 1px solid rgba(0, 212, 170, 0.2);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
}

/* ===== Contact ===== */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: start;
}

.contact-info h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin-bottom: 0.75rem;
}

.contact-info > p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-details li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.contact-icon {
  font-size: 1.25rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border-radius: 10px;
  flex-shrink: 0;
}

.contact-details strong {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.contact-details a {
  color: var(--accent);
  transition: opacity var(--transition);
}

.contact-details a:hover { opacity: 0.8; }

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group textarea { resize: vertical; min-height: 100px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-note {
  margin-top: 1rem;
  font-size: 0.9rem;
  text-align: center;
  color: var(--accent);
}

.form-note.error { color: #ff6b6b; }

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 0;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 2rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

.footer-links h4 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--accent); }

.footer-links li { margin-bottom: 0.5rem; }

.footer-bottom {
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .hero-visual { display: none; }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-item.large {
    grid-column: span 2;
    grid-row: span 1;
  }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1.5rem;
    gap: 0;
    transform: translateY(-120%);
    opacity: 0;
    transition: all var(--transition);
    pointer-events: none;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-links li {
    width: 100%;
    border-bottom: 1px solid var(--border);
  }

  .nav-links a {
    display: block;
    padding: 1rem 0;
  }

  .btn-nav {
    display: inline-block;
    margin-top: 0.5rem;
    text-align: center;
  }

  .hero { padding-top: 100px; }
  .hero-stats { gap: 1.5rem; }

  .projeto-item {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .projeto-num { font-size: 1.5rem; }
  .projeto-visual { display: none; }

  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .form-row { grid-template-columns: 1fr; }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 180px;
  }

  .gallery-item.large,
  .gallery-item.wide {
    grid-column: span 1;
  }
}

@media (max-width: 480px) {
  .cards-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
}
