/* =====================
   DESIGN SYSTEM
   ===================== */
:root {
  --bg-primary: #0A0A0B;
  --bg-card: rgba(255, 255, 255, 0.03);
  --text-primary: #E8E6E3;
  --text-secondary: #8A8A8A;
  --accent-green: #00E5A0;
  --accent-purple: #6C63FF;
  --accent-coral: #FF6B6B;
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-card: rgba(255, 255, 255, 0.06);
  --max-width: 1200px;
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'Space Mono', monospace;
}

/* =====================
   RESET & BASE
   ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Background grid global */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* =====================
   LAYOUT UTILITIES
   ===================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}
section { position: relative; z-index: 1; }

/* =====================
   GLOW DIVIDER
   ===================== */
.glow-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-green), var(--accent-purple), transparent);
  opacity: 0.4;
  margin: 0;
}

/* =====================
   SCROLL ANIMATION
   ===================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* Fallback for no-JS and reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* =====================
   NAVBAR
   ===================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: background 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.navbar.scrolled {
  background: rgba(10, 10, 11, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--border-subtle);
}
.navbar__inner {
  display: flex;
  align-items: center;
  gap: 32px;
}
.navbar__logo {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
}
.navbar__links {
  display: flex;
  list-style: none;
  gap: 28px;
  margin: 0 auto;
}
.navbar__links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.navbar__links a:hover { color: var(--text-primary); }
.navbar__cta { flex-shrink: 0; }
.navbar__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}
.navbar__hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.navbar__hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__hamburger.open span:nth-child(2) { opacity: 0; }
.navbar__hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =====================
   BUTTONS (global)
   ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: scale(1.03); }
.btn--primary {
  background: var(--accent-green);
  color: #0A0A0B;
}
.btn--primary:hover {
  box-shadow: 0 0 20px rgba(0, 229, 160, 0.4);
}
.btn--outline {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid rgba(232, 230, 227, 0.2);
}
.btn--outline:hover {
  border-color: rgba(232, 230, 227, 0.5);
}

/* =====================
   MOBILE NAV
   ===================== */
@media (max-width: 768px) {
  .navbar__links {
    position: fixed;
    top: 0; left: 0; right: 0;
    flex-direction: column;
    background: rgba(10, 10, 11, 0.97);
    backdrop-filter: blur(16px);
    padding: 80px 24px 32px;
    gap: 20px;
    transform: translateY(-100%);
    transition: transform 0.3s ease, visibility 0.3s ease;
    z-index: 99;
    visibility: hidden;
    pointer-events: none;
  }
  .navbar__links.open {
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
  }
  .navbar__links a { font-size: 18px; }
  .navbar__cta { display: none; }
  .navbar__hamburger { display: flex; }
}

/* =====================
   HERO
   ===================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 140px 0 100px;
  position: relative;
  overflow: hidden;
}
.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
}
.hero__content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.hero__tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-green);
  background: rgba(0, 229, 160, 0.1);
  border: 1px solid rgba(0, 229, 160, 0.2);
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 28px;
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}
.hero__subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 40px;
  line-height: 1.7;
}
.hero__buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.hero__buttons .btn { font-size: 15px; padding: 12px 24px; }

/* Orb decorativo */
.hero__orb {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(0, 229, 160, 0.12) 0%,
    rgba(108, 99, 255, 0.07) 45%,
    transparent 70%
  );
  filter: blur(40px);
  pointer-events: none;
  z-index: 1;
}

@media (max-width: 768px) {
  .hero { padding: 100px 0 60px; }
  .hero__subtitle { font-size: 16px; }
  .hero__orb { width: 340px; height: 340px; top: -60px; }
}

/* =====================
   CAPABILITIES BAR
   ===================== */
.capabilities {
  padding: 40px 0;
}
.capabilities__track {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.cap-tag {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  padding: 7px 16px;
  border-radius: 20px;
  cursor: default;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.cap-tag:hover {
  color: var(--accent-green);
  border-color: rgba(0, 229, 160, 0.4);
}

@media (max-width: 768px) {
  .capabilities__track {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 8px;
    scrollbar-width: none;
  }
  .capabilities__track::-webkit-scrollbar { display: none; }
}

/* =====================
   SECTION SHARED
   ===================== */
.section-services,
.section-how,
.section-for-whom,
.section-differentials,
.section-cta {
  padding: 96px 0;
}
.section-header {
  text-align: center;
  margin-bottom: 56px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 44px);
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.2;
}
.section-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* =====================
   PHASE CARDS
   ===================== */
.phases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.phase-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, border-top-color 0.25s ease;
}
/* Top border accent via data-accent */
.phase-card[data-accent="green"] { border-top: 3px solid var(--accent-green); }
.phase-card[data-accent="purple"] { border-top: 3px solid var(--accent-purple); }
.phase-card[data-accent="coral"]  { border-top: 3px solid var(--accent-coral); }

.phase-card:hover { transform: translateY(-4px); }

.phase-card__num {
  position: absolute;
  top: 12px; right: 20px;
  font-family: var(--font-body);
  font-size: 72px;
  font-weight: 800;
  line-height: 1;
  opacity: 0.06;
  color: var(--text-primary);
  pointer-events: none;
  user-select: none;
}
.phase-card[data-accent="green"] .phase-card__num { color: var(--accent-green); opacity: 0.15; }
.phase-card[data-accent="purple"] .phase-card__num { color: var(--accent-purple); opacity: 0.15; }
.phase-card[data-accent="coral"]  .phase-card__num { color: var(--accent-coral); opacity: 0.15; }

.phase-card__icon {
  font-size: 20px;
  margin-bottom: 12px;
}
.phase-card[data-accent="green"] .phase-card__icon { color: var(--accent-green); }
.phase-card[data-accent="purple"] .phase-card__icon { color: var(--accent-purple); }
.phase-card[data-accent="coral"]  .phase-card__icon { color: var(--accent-coral); }

.phase-card__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.phase-card__model {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.phase-card[data-accent="green"] .phase-card__model { color: var(--accent-green); }
.phase-card[data-accent="purple"] .phase-card__model { color: var(--accent-purple); }
.phase-card[data-accent="coral"]  .phase-card__model { color: var(--accent-coral); }

.phase-card__desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}
.phase-card__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.phase-card__list li {
  font-size: 13px;
  color: var(--text-secondary);
  padding-left: 16px;
  position: relative;
}
.phase-card__list li::before {
  content: '—';
  position: absolute;
  left: 0;
  opacity: 0.4;
}

@media (max-width: 1024px) {
  .phases-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .phases-grid { grid-template-columns: 1fr; }
  .section-services, .section-how, .section-for-whom, .section-differentials, .section-cta { padding: 64px 0; }
}

/* =====================
   TIMELINE — HORIZONTAL (desktop) / VERTICAL (mobile)
   ===================== */
.timeline {
  display: flex;
  flex-direction: row;
  gap: 0;
  position: relative;
}
.timeline__step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.timeline__dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid var(--accent-green);
  background: var(--bg-primary);
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}
.timeline__connector {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(0,229,160,0.5), rgba(0,229,160,0.1));
  z-index: 1;
}
.timeline__step:last-child .timeline__connector { display: none; }

.timeline__content {
  margin-top: 16px;
  text-align: center;
  padding: 0 8px;
}
.timeline__num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-green);
  font-weight: 700;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 4px;
}
.timeline__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.timeline__desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Vertical no mobile */
@media (max-width: 768px) {
  .timeline {
    flex-direction: column;
    padding-left: 20px;
    gap: 0;
  }
  .timeline__step {
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 28px;
  }
  .timeline__step:last-child { padding-bottom: 0; }
  .timeline__dot {
    margin-top: 3px;
    flex-shrink: 0;
  }
  .timeline__connector {
    top: 14px;
    left: 6px;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,229,160,0.5), rgba(0,229,160,0.1));
  }
  .timeline__content {
    margin-top: 0;
    text-align: left;
    padding: 0;
  }
}

/* =====================
   SEGMENT CARDS (Para Quem)
   ===================== */
.segment-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.segment-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 28px;
  transition: border-color 0.25s ease;
}
.segment-card:hover {
  border-color: rgba(0, 229, 160, 0.35);
}
.segment-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-green);
  background: rgba(0, 229, 160, 0.08);
  border: 1px solid rgba(0, 229, 160, 0.2);
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 14px;
}
.segment-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.segment-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

@media (max-width: 1024px) {
  .segment-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .segment-grid { grid-template-columns: 1fr; }
}

/* =====================
   DIFERENCIAIS (2×2 grid)
   ===================== */
.diff-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px 48px;
  max-width: 860px;
  margin: 0 auto;
}
.diff-item {}
.diff-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.diff-title::before {
  content: '◆';
  color: var(--accent-green);
  font-size: 10px;
  margin-top: 4px;
  flex-shrink: 0;
}
.diff-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-left: 20px;
}

@media (max-width: 768px) {
  .diff-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* =====================
   CTA FINAL
   ===================== */
.section-cta { text-align: center; }
.cta-inner {
  max-width: 640px;
  margin: 0 auto;
}
.cta-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 44px);
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.2;
}
.cta-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 36px;
  line-height: 1.7;
}
.cta-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.btn--large { font-size: 15px; padding: 14px 28px; }
.cta-note {
  font-size: 13px;
  color: var(--text-secondary);
  opacity: 0.7;
}

/* =====================
   FOOTER
   ===================== */
.footer {
  padding-bottom: 40px;
}
.footer__inner {
  padding-top: 40px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 16px 32px;
}
.footer__logo {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--text-primary);
  text-decoration: none;
  grid-column: 1;
  grid-row: 1;
}
.footer__links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  grid-column: 2;
  grid-row: 1;
}
.footer__links a {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}
.footer__links a:hover { color: var(--text-primary); }
.footer__social {
  display: flex;
  gap: 12px;
  align-items: center;
  grid-column: 3;
  grid-row: 1;
}
.footer__social a {
  color: var(--text-secondary);
  transition: color 0.2s;
}
.footer__social a:hover { color: var(--accent-green); }
.footer__copy {
  font-size: 12px;
  color: var(--text-secondary);
  opacity: 0.5;
  grid-column: 1 / -1;
  grid-row: 2;
}

@media (max-width: 768px) {
  .footer__inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    justify-items: center;
    text-align: center;
    gap: 20px;
  }
  .footer__logo, .footer__links, .footer__social, .footer__copy {
    grid-column: 1; grid-row: auto;
  }
  .footer__links { justify-content: center; }
}

/* =====================
   ACCESSIBILITY
   ===================== */
:focus-visible {
  outline: 2px solid var(--accent-green);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Scroll margin to compensate for fixed navbar */
#servicos, #como-funciona, #para-quem, #contato {
  scroll-margin-top: 80px;
}

/* =====================
   PORTFOLIO
   ===================== */
.section-portfolio {
  padding: 96px 0;
}
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.portfolio-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 28px;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.portfolio-card:hover {
  border-color: rgba(0, 229, 160, 0.3);
  transform: translateY(-3px);
}
.portfolio-card__header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}
.portfolio-card__icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}
.portfolio-card__sector {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-green);
  margin-bottom: 4px;
}
.portfolio-card__name {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}
.portfolio-card__desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 18px;
}
.portfolio-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.portfolio-card__tags span {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: 20px;
  transition: color 0.2s, border-color 0.2s;
}
.portfolio-card:hover .portfolio-card__tags span {
  color: var(--accent-green);
  border-color: rgba(0, 229, 160, 0.3);
}

@media (max-width: 768px) {
  .portfolio-grid { grid-template-columns: 1fr; }
  .section-portfolio { padding: 64px 0; }
}
