/* ========================================
   Quantum Group — Design System & Styles
   ======================================== */

/* Reset básico */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

/* ========================================
   Design Tokens (CSS Custom Properties)
   ======================================== */

:root {
  /* Cores da marca */
  --brand-50: #eef6ff;
  --brand-100: #d6e9ff;
  --brand-200: #b3d4ff;
  --brand-300: #84b9ff;
  --brand-400: #5296ff;
  --brand-500: #2f74ff;
  --brand-600: #1e5ce0;
  --brand-700: #1b4bb3;
  --brand-800: #193f90;
  --brand-900: #152f66;

  /* Tema escuro (padrão) */
  --bg: #0b0f14;
  --surface: #121826;
  --muted: #93a4b7;
  --text: #eaf2ff;
  --accent: #2f74ff;

  /* Status */
  --ok: #22c55e;
  --warn: #f59e0b;
  --err: #ef4444;

  /* Layout */
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  --container: 1200px;
  --gutter: 24px;

  /* Tipografia */
  --font-display: "DM Sans", Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Tema claro */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f9fc;
    --surface: #ffffff;
    --text: #0b0f14;
    --muted: #506074;
    --accent: #1e5ce0;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  }
}

/* Override tema claro via data-attribute */
[data-theme="light"] {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --text: #0b0f14;
  --muted: #506074;
  --accent: #1e5ce0;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Override tema escuro via data-attribute */
[data-theme="dark"] {
  --bg: #0b0f14;
  --surface: #121826;
  --muted: #93a4b7;
  --text: #eaf2ff;
  --accent: #2f74ff;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

/* ========================================
   Base & Tipografia
   ======================================== */

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  background: var(--bg);
  color: var(--text);
  transition: background 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
}

h1 {
  font-size: clamp(32px, 5vw, 56px);
}

h2 {
  font-size: clamp(24px, 3.5vw, 40px);
}

h3 {
  font-size: clamp(20px, 2.5vw, 28px);
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.8;
}

/* ========================================
   Utilitários & Layout
   ======================================== */

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.grad {
  background: linear-gradient(90deg, var(--accent), #86b7ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ========================================
   Header (Sticky Navigation)
   ======================================== */

.site-header {
  position: sticky;
  top: 0;
  backdrop-filter: saturate(1.2) blur(8px);
  background: color-mix(in oklab, var(--bg) 85%, transparent);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 50;
  transition: background 0.3s ease;
}

[data-theme="light"] .site-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-block: 14px;
}

.logo {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.3px;
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s ease;
}

.nav {
  display: flex;
  gap: 18px;
  margin-left: auto;
  align-items: center;
}

.nav a {
  color: var(--text);
  opacity: 0.85;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.nav a:hover {
  opacity: 1;
}

.theme-toggle {
  margin-left: 8px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 16px;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .theme-toggle {
  border: 1px solid rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .theme-toggle:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Menu mobile (hamburger) */
.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 20px;
  margin-left: auto;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-direction: column;
    gap: 0;
    margin-left: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav.open {
    max-height: 500px;
  }

  .nav a {
    padding: 16px 24px;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .theme-toggle {
    margin: 0;
  }
}

/* ========================================
   Buttons
   ======================================== */

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  font-family: var(--font-body);
}

.btn-accent {
  background: var(--accent);
  color: white;
  box-shadow: var(--shadow);
}

.btn-accent:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(47, 116, 255, 0.3);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text);
  background: transparent;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
}

[data-theme="light"] .btn-ghost {
  border: 1px solid rgba(0, 0, 0, 0.18);
}

[data-theme="light"] .btn-ghost:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.3);
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
  padding: 72px 0;
  background: radial-gradient(1200px 500px at 80% 10%, rgba(47, 116, 255, 0.18), transparent);
  position: relative;
  overflow: hidden;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.hero__copy {
  z-index: 2;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  margin: 0 0 16px;
}

.hero p {
  color: var(--muted);
  max-width: 60ch;
  font-size: 18px;
  margin-bottom: 24px;
}

.hero__cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero__art {
  position: relative;
  height: 380px;
}

.orb {
  position: absolute;
  inset: auto auto 20% 10%;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #86b7ff 0%, #2f74ff 60%, transparent 70%);
  filter: blur(2px);
  opacity: 0.8;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

.mesh {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.065), rgba(0, 0, 0, 0.06));
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 960px) {
  .hero__inner {
    grid-template-columns: 1fr;
  }

  .hero__art {
    height: 280px;
  }

  .hero {
    padding: 48px 0;
  }
}

/* ========================================
   Sections
   ======================================== */

section {
  padding: 56px 0;
}

.section-head {
  text-align: center;
  margin-bottom: 48px;
}

.section-head h2 {
  font-family: var(--font-display);
  margin: 0 0 12px;
}

.section-head p {
  color: var(--muted);
  margin: 0;
  font-size: 18px;
  max-width: 70ch;
  margin-inline: auto;
}

/* ========================================
   Cards & Grid
   ======================================== */

.grid.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  border-color: rgba(47, 116, 255, 0.3);
}

[data-theme="light"] .card {
  border: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .card:hover {
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.card h3 {
  margin: 0;
  font-size: 22px;
}

.badge {
  display: inline-block;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(47, 116, 255, 0.15);
  color: #cfe0ff;
  font-weight: 600;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

[data-theme="light"] .badge {
  background: rgba(47, 116, 255, 0.15);
  color: #1e5ce0;
}

.link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  margin-top: auto;
}

.link:hover {
  transform: translateX(4px);
}

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

@media (max-width: 640px) {
  .grid.cards {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   Footer
   ======================================== */

.site-footer {
  margin-top: 80px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  padding: 48px 0 24px;
}

[data-theme="light"] .site-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 32px;
  margin-bottom: 24px;
}

.footer__grid strong {
  display: block;
  font-size: 18px;
  margin-bottom: 8px;
}

.footer__grid p {
  color: var(--muted);
  font-size: 14px;
}

.foot-nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.foot-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.foot-nav a:hover {
  color: var(--text);
}

.copyright {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin: 0;
}

[data-theme="light"] .copyright {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

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

/* ========================================
   Formulário
   ======================================== */

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  transition: all 0.2s ease;
}

[data-theme="light"] .form-group input,
[data-theme="light"] .form-group textarea,
[data-theme="light"] .form-group select {
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 116, 255, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* ========================================
   Content Pages
   ======================================== */

.content-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px;
}

.content-section h2 {
  margin-top: 48px;
  margin-bottom: 16px;
}

.content-section h3 {
  margin-top: 32px;
  margin-bottom: 12px;
}

.content-section ul, .content-section ol {
  padding-left: 24px;
  color: var(--muted);
}

.content-section li {
  margin-bottom: 8px;
}

.content-section strong {
  color: var(--text);
}

/* ========================================
   Accordion
   ======================================== */

.accordion {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  margin-bottom: 16px;
}

.accordion-header {
  padding: 20px 24px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  transition: background 0.2s ease;
}

.accordion-header:hover {
  background: rgba(255, 255, 255, 0.03);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.accordion-content.open {
  max-height: 1000px;
}

.accordion-body {
  padding: 0 24px 20px;
  color: var(--muted);
}

/* ========================================
   Features / Steps
   ======================================== */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  margin-top: 48px;
}

.feature {
  text-align: center;
  padding: 24px;
}

.feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: rgba(47, 116, 255, 0.15);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

.feature h3 {
  margin-bottom: 12px;
}

.feature p {
  color: var(--muted);
  font-size: 16px;
}

/* ========================================
   Diagram (Ecossistema)
   ======================================== */

.ecosystem-diagram {
  position: relative;
  max-width: 800px;
  margin: 48px auto;
  padding: 48px;
  text-align: center;
}

.ecosystem-center {
  width: 180px;
  height: 180px;
  margin: 0 auto 48px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: white;
  box-shadow: 0 0 60px rgba(47, 116, 255, 0.5);
}

.ecosystem-nodes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.ecosystem-node {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 20px;
  font-size: 14px;
  font-weight: 600;
}

/* ========================================
   Responsive Utilities
   ======================================== */

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .btn {
    padding: 10px 20px;
    font-size: 14px;
  }

  section {
    padding: 40px 0;
  }

  .section-head {
    margin-bottom: 32px;
  }
}
