/* ============================================================
   MORPHEUS IA — Design Tokens
   ============================================================ */

/* --- Variáveis compartilhadas (não mudam com tema) --- */
:root {
  --font-display: 'Orbitron', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --text-h1: clamp(2rem, 5vw, 3.5rem);
  --text-h2: clamp(1.5rem, 3.5vw, 2.5rem);
  --text-h3: clamp(1.125rem, 2vw, 1.375rem);
  --text-body: clamp(1rem, 1.2vw, 1.125rem);
  --text-small: 0.875rem;
  --space-section: clamp(4rem, 8vw, 7rem);
  --container-max: 1200px;
  --container-padding: clamp(1rem, 4vw, 2rem);
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-glow: 0.4s ease;
}

/* ============ TEMA LIGHT (padrão) ============ */
[data-theme="light"] {
  --color-bg-primary:      #F8F9FC;
  --color-bg-secondary:   #FFFFFF;
  --color-bg-tertiary:    #F0F2F8;
  --color-accent-primary:  #0099CC;
  --color-accent-secondary: #0066FF;
  --color-accent-matrix:   #00CC7A;
  --color-text-primary:    #1A1A2E;
  --color-text-secondary:  #4A4A6A;
  --color-border:          rgba(0, 130, 200, 0.18);
  --color-border-hover:    rgba(0, 130, 200, 0.35);
  --color-card-border:     rgba(0, 0, 0, 0.08);
  --color-nav-bg:          rgba(248, 249, 252, 0.9);
  --color-accent-soft:     rgba(0, 153, 204, 0.08);
  --color-accent-soft-hover: rgba(0, 153, 204, 0.1);
  --color-portal-glow:     rgba(0, 153, 204, 0.1);
  --glow-cyan: 0 0 20px rgba(0, 153, 204, 0.15), 0 0 40px rgba(0, 153, 204, 0.08);
  --glow-cyan-strong: 0 0 30px rgba(0, 153, 204, 0.25), 0 0 60px rgba(0, 153, 204, 0.12);
  --glow-text: none;
  --glow-text-strong: none;
  --glow-dot: none;
  --glow-dot-strong: 0 0 8px rgba(0, 153, 204, 0.3);
  --logo-filter: drop-shadow(0 0 15px rgba(0, 153, 204, 0.15));
  --gradient-timeline: linear-gradient(90deg, rgba(0, 153, 204, 0.08) 0%, rgba(0, 153, 204, 0.3) 50%, rgba(0, 153, 204, 0.08) 100%);
  --circuit-line: rgba(0, 153, 204, 0.02);
  --footer-border: rgba(0, 0, 0, 0.06);
}


/* ============ TEMA DARK ============ */
[data-theme="dark"] {
  --color-bg-primary:      #0A0A0F;
  --color-bg-secondary:   #121220;
  --color-bg-tertiary:    #1A1A30;
  --color-accent-primary:  #00D4FF;
  --color-accent-secondary: #0A84FF;
  --color-accent-matrix:   #00FF9C;
  --color-text-primary:    #E8E8F0;
  --color-text-secondary:  #8888A0;
  --color-border:          rgba(0, 212, 255, 0.2);
  --color-border-hover:    rgba(0, 212, 255, 0.5);
  --color-card-border:     rgba(136, 136, 160, 0.15);
  --color-nav-bg:          rgba(10, 10, 15, 0.85);
  --color-accent-soft:     rgba(0, 212, 255, 0.08);
  --color-accent-soft-hover: rgba(0, 212, 255, 0.1);
  --color-portal-glow:     rgba(0, 212, 255, 0.15);
  --glow-cyan: 0 0 20px rgba(0, 212, 255, 0.3), 0 0 40px rgba(0, 212, 255, 0.15);
  --glow-cyan-strong: 0 0 30px rgba(0, 212, 255, 0.5), 0 0 60px rgba(0, 212, 255, 0.25);
  --glow-text: 0 0 10px rgba(0, 212, 255, 0.5);
  --glow-text-strong: 0 0 20px rgba(0, 212, 255, 0.5);
  --glow-dot: 0 0 6px rgba(0, 212, 255, 0.5);
  --glow-dot-strong: 0 0 12px rgba(0, 212, 255, 0.6);
  --logo-filter: drop-shadow(0 0 30px rgba(0, 212, 255, 0.3)) drop-shadow(0 0 60px rgba(0, 212, 255, 0.15));
  --gradient-timeline: linear-gradient(90deg, rgba(0, 212, 255, 0.1) 0%, rgba(0, 212, 255, 0.4) 50%, rgba(0, 212, 255, 0.1) 100%);
  --circuit-line: rgba(0, 212, 255, 0.03);
  --footer-border: rgba(136, 136, 160, 0.1);
}

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

/* ============================================================
   ACESSIBILIDADE
   ============================================================ */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 1000;
  padding: 0.75rem 1.5rem;
  background: var(--color-accent-primary);
  color: var(--color-bg-primary);
  font-weight: 600;
  border-radius: 0.5rem;
  transition: top var(--transition-fast);
}
.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 2px solid var(--color-accent-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}
section { padding: var(--space-section) 0; }

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: 800;
  text-align: center;
  margin-bottom: 1.5rem;
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--color-accent-primary);
  margin: 0.75rem auto 0;
  border-radius: 2px;
  box-shadow: var(--glow-cyan);
}
.section-subtitle {
  text-align: center;
  color: var(--color-text-secondary);
  font-size: var(--text-body);
  margin-bottom: 3rem;
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--color-nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}
.nav {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav__logo {
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--color-text-primary);
  letter-spacing: 1px;
}
.nav__logo-accent {
  color: var(--color-accent-primary);
  text-shadow: var(--glow-text);
}
.nav__menu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}
.nav__link {
  text-decoration: none;
  color: var(--color-text-primary);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.5rem 0.875rem;
  border-radius: 6px;
  transition: color var(--transition-fast), background var(--transition-fast);
}
.nav__link:hover, .nav__link:focus-visible {
  color: var(--color-accent-primary);
  background: var(--color-accent-soft);
}

/* Seletor de idioma */
.nav__lang {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0 0.5rem;
}
.lang-btn {
  background: none;
  border: none;
  color: var(--color-text-secondary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  border-radius: 4px;
  transition: color var(--transition-fast), background var(--transition-fast);
}
.lang-btn[aria-pressed="true"] {
  color: var(--color-accent-primary);
  background: var(--color-accent-soft-hover);
}
.lang-btn:hover { color: var(--color-accent-primary); }
.lang-divider { color: var(--color-text-secondary); user-select: none; }

/* Botão de toggle de tema */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--color-accent-primary);
  color: var(--color-accent-primary);
  box-shadow: var(--glow-cyan);
}
.theme-toggle svg { width: 18px; height: 18px; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

.nav__cta {
  text-decoration: none;
  color: var(--color-accent-primary);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--color-accent-primary);
  border-radius: 50px;
  transition: box-shadow var(--transition-glow), background var(--transition-fast);
}
.nav__cta:hover, .nav__cta:focus-visible {
  background: var(--color-accent-soft-hover);
  box-shadow: var(--glow-cyan);
}

/* Toggle mobile */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.nav__toggle-bar {
  width: 24px;
  height: 2px;
  background: var(--color-text-primary);
  border-radius: 2px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 72px;
}
.hero__bg { position: absolute; inset: 0; z-index: 0; }

.hero__portal {
  position: absolute;
  top: 50%;
  right: -10%;
  width: 600px;
  height: 600px;
  transform: translateY(-50%);
  background: radial-gradient(circle, var(--color-portal-glow) 0%, transparent 60%);
  animation: portalPulse 6s ease-in-out infinite;
}
@keyframes portalPulse {
  0%, 100% { opacity: 0.6; transform: translateY(-50%) scale(1); }
  50% { opacity: 1; transform: translateY(-50%) scale(1.05); }
}

.hero__circuit {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--circuit-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--circuit-line) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero__container {
  position: relative;
  z-index: 1;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  width: 100%;
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-h1);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}
.hero__title-accent {
  color: var(--color-accent-primary);
  text-shadow: var(--glow-text-strong);
}
.title-accent {
  color: var(--color-accent-primary);
  text-shadow: var(--glow-text);
}

.hero__subtitle {
  font-size: var(--text-body);
  color: var(--color-text-secondary);
  margin-bottom: 2.5rem;
  max-width: 480px;
}

.hero__pills { display: flex; gap: 1rem; flex-wrap: wrap; }
.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-glow);
}
.pill:hover { transform: translateY(-2px); }
.pill--red {
  background: var(--color-accent-primary);
  color: var(--color-bg-primary);
  box-shadow: var(--glow-cyan);
}
.pill--red:hover { box-shadow: var(--glow-cyan-strong); }
.pill--blue {
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-text-secondary);
}
.pill--blue:hover {
  color: var(--color-text-primary);
  border-color: var(--color-text-primary);
}

.hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero__logo {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  filter: var(--logo-filter);
  animation: logoFloat 6s ease-in-out infinite;
}
@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ============================================================
   CUSTO DE NÃO AUTOMATIZAR
   ============================================================ */
.cost-section { background: var(--color-bg-secondary); }

.cost-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}
.cost-card {
  text-align: center;
  padding: 2rem;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-card-border);
  border-radius: 12px;
  transition: border-color var(--transition-fast);
}
.cost-card:hover { border-color: var(--color-border-hover); }

.cost-card__icon {
  width: 48px;
  height: 48px;
  color: var(--color-accent-primary);
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cost-card__icon svg {
  width: 100%;
  height: 100%;
  display: block;
  flex-shrink: 0;
}
.cost-card h3 { font-size: var(--text-h3); margin-bottom: 0.5rem; }
.cost-card p { color: var(--color-text-secondary); font-size: var(--text-small); }

/* ============================================================
   PROPOSTA DE VALOR
   ============================================================ */
.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.value-card {
  padding: 2.5rem 2rem;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-glow);
}
.value-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-border-hover);
  box-shadow: var(--glow-cyan);
}
.value-card__icon {
  width: 48px;
  height: 48px;
  color: var(--color-accent-primary);
  margin-bottom: 1.5rem;
}
.value-card__icon svg { width: 100%; height: 100%; }
.value-card h3 { font-size: var(--text-h3); margin-bottom: 0.75rem; }
.value-card p { color: var(--color-text-secondary); }

/* ============================================================
   SOLUÇÕES
   ============================================================ */
.solutions-section { background: var(--color-bg-secondary); }

.solutions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.solution-card {
  padding: 2rem;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-glow);
}
.solution-card:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--glow-cyan);
}
.solution-card__icon {
  width: 40px;
  height: 40px;
  color: var(--color-accent-primary);
  margin-bottom: 1.25rem;
}
.solution-card__icon svg { width: 100%; height: 100%; }
.solution-card h3 { font-size: var(--text-h3); margin-bottom: 0.5rem; }
.solution-card > p {
  color: var(--color-text-secondary);
  font-size: var(--text-small);
  margin-bottom: 1rem;
}
.solution-card__list { list-style: none; margin-bottom: 1.5rem; }
.solution-card__list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: var(--text-small);
  color: var(--color-text-primary);
}
.solution-card__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 6px;
  height: 6px;
  background: var(--color-accent-primary);
  border-radius: 50%;
  box-shadow: var(--glow-dot);
}
.solution-card__link {
  text-decoration: none;
  color: var(--color-accent-primary);
  font-size: var(--text-small);
  font-weight: 600;
  transition: text-shadow var(--transition-glow);
}
.solution-card__link:hover { text-shadow: var(--glow-text); }

/* ============================================================
   CO-DESIGN — Timeline
   ============================================================ */
.process-timeline {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  position: relative;
}
.process-timeline::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  background: var(--gradient-timeline);
}
.process-step {
  text-align: center;
  position: relative;
  padding: 0 0.5rem;
}
.process-step__dot {
  width: 14px;
  height: 14px;
  background: var(--color-accent-primary);
  border-radius: 50%;
  margin: 18px auto 1.5rem;
  box-shadow: var(--glow-dot-strong);
  position: relative;
  z-index: 1;
}
.process-step__number {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--color-accent-secondary);
  font-weight: 600;
  display: block;
  margin-bottom: 0.5rem;
}
.process-step h3 { font-size: var(--text-h3); margin-bottom: 0.5rem; }
.process-step p {
  color: var(--color-text-secondary);
  font-size: var(--text-small);
}

/* ============================================================
   SOBRE
   ============================================================ */
.about-section { background: var(--color-bg-secondary); }
.about-content { max-width: 720px; margin: 0 auto; }
.about-content p {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--color-text-primary);
  margin-bottom: 1.5rem;
}
.about-content p:first-child {
  font-style: italic;
  color: var(--color-text-secondary);
  border-left: 3px solid var(--color-accent-primary);
  padding-left: 1.5rem;
}

/* ============================================================
   CONTATO
   ============================================================ */
.contact-section { text-align: center; }
.contact-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2.5rem;
  background: var(--color-accent-primary);
  color: var(--color-bg-primary);
  font-size: 1.125rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 50px;
  transition: transform var(--transition-fast), box-shadow var(--transition-glow);
  box-shadow: var(--glow-cyan);
}
.contact-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-cyan-strong);
}
.contact-note {
  margin-top: 1.5rem;
  color: var(--color-text-secondary);
  font-size: var(--text-small);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-bg-primary);
  border-top: 1px solid var(--color-border);
  padding: 3rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.125rem;
  color: var(--color-text-primary);
  display: block;
  margin-bottom: 0.75rem;
}
.footer-logo-accent { color: var(--color-accent-primary); }
.footer-col h4 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--color-text-primary);
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col a {
  text-decoration: none;
  color: var(--color-text-secondary);
  font-size: var(--text-small);
  transition: color var(--transition-fast);
}
.footer-col a:hover { color: var(--color-accent-primary); }
.footer-col p {
  color: var(--color-text-secondary);
  font-size: var(--text-small);
  max-width: 280px;
}
.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--footer-border);
}
.footer-bottom p {
  color: var(--color-text-secondary);
  font-size: var(--text-small);
}

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 900px) {
  .hero__container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero__visual { order: -1; }
  .hero__logo { width: 200px; margin: 0 auto; }
  .hero__pills { justify-content: center; }
  .hero__subtitle { margin-left: auto; margin-right: auto; }

  .cost-grid,
  .value-grid { grid-template-columns: 1fr; }
  .solutions-grid { grid-template-columns: 1fr; }

  .process-timeline {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .process-timeline::before { display: none; }
  .process-step__dot { margin: 0 auto 1rem; }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-col p { margin: 0 auto; }
}

@media (max-width: 768px) {
  .nav__toggle { display: flex; }
  .nav__menu {
    position: fixed;
    top: 72px;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--color-nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem;
    transform: translateY(-200%);
    transition: transform var(--transition-base);
    z-index: 99;
  }
  .nav__menu.is-open { transform: translateY(0); }
  .nav__menu li { width: 100%; }
  .nav__link {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 8px;
  }
  .nav__lang {
    justify-content: center;
    padding: 0.75rem 1rem;
  }
  .nav__cta {
    text-align: center;
    margin-top: 0.5rem;
  }
  .theme-toggle { margin: 0.5rem auto; }
}

@media (max-width: 480px) {
  .hero__pills {
    flex-direction: column;
    align-items: stretch;
  }
  .pill { justify-content: center; text-align: center; }
}

/* ============================================================
   ANIMAÇÕES DE ENTRADA
   ============================================================ */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}