/* ---------- Tokens ---------- */
:root {
  --bg-primary: #060b16;
  --bg-secondary: #0d1526;
  --bg-elevated: #111c33;

  --color-blue: #3b82f6;
  --color-cyan: #22d3ee;
  --color-teal: #14e8a0;

  /* cores do logotipo extraídas do banner oficial do canal */
  --brand-node: #0e91c4;
  --brand-neural: #0cbe92;

  --text-primary: #eaf0fa;
  --text-muted: #8592ad;
  --text-faint: #56617a;

  --line: rgba(234, 240, 250, 0.09);

  --font-display: 'Sora', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;

  --gradient-brand: linear-gradient(90deg, var(--color-blue), var(--color-cyan) 55%, var(--color-teal));

  --max-width: 1140px;
}

/* ---------- Reset ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-teal);
  color: var(--bg-primary);
  padding: 10px 16px;
  z-index: 1000;
  font-weight: 600;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
}

:focus-visible {
  outline: 2px solid var(--color-cyan);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
}

h3 {
  font-size: 1.15rem;
  font-weight: 600;
}

p {
  color: var(--text-muted);
}

.section {
  padding: clamp(4rem, 8vw, 7rem) 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.btn-primary {
  background: var(--gradient-brand);
  color: #051019;
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text-primary);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--color-cyan);
}

/* ---------- Header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 11, 22, 0.75);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-primary);
}

.logo-mark {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.brand-wordmark {
  letter-spacing: 0.01em;
}

.brand-node {
  color: var(--brand-node);
}

.brand-neural {
  color: var(--brand-neural);
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

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

.nav-links a.nav-cta {
  border: 1px solid var(--line);
  padding: 0.5rem 1.1rem;
  border-radius: 7px;
  color: var(--text-primary);
}

.nav-links a.nav-cta:hover {
  border-color: var(--color-teal);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text-primary);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(4.5rem, 10vw, 7rem) 0 clamp(4rem, 8vw, 6rem);
}

#neuralCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 3rem;
}

.hero-kicker {
  color: var(--color-teal);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.hero-copy h1 {
  font-size: clamp(2.3rem, 5vw, 3.4rem);
  max-width: 14ch;
  margin-bottom: 1.25rem;
}

.hero-typewriter {
  font-size: 1.15rem;
  color: var(--text-muted);
  min-height: 1.8em;
  max-width: 42ch;
  margin-bottom: 2.2rem;
}

.hero-typewriter .cursor {
  display: inline-block;
  width: 2px;
  background: var(--color-cyan);
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo {
  width: min(320px, 80%);
  height: auto;
  filter: drop-shadow(0 0 40px rgba(20, 232, 160, 0.25));
}

/* ---------- Sobre ---------- */
.sobre-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: start;
}

.sobre-text h2 {
  margin-bottom: 1.25rem;
}

.sobre-text p {
  max-width: 56ch;
  margin-bottom: 1rem;
}

.sobre-pillars {
  list-style: none;
  border-left: 1px solid var(--line);
  padding-left: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.sobre-pillars li {
  display: flex;
  gap: 1rem;
  position: relative;
}

.pillar-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pillar-color);
  box-shadow: 0 0 12px var(--pillar-color);
  margin-top: 0.4rem;
  flex-shrink: 0;
  position: relative;
}

.pillar-dot::before {
  content: '';
  position: absolute;
  left: -1.75rem;
  top: 50%;
  width: 1rem;
  height: 1px;
  background: var(--line);
}

.sobre-pillars h3 {
  margin-bottom: 0.3rem;
}

.sobre-pillars p {
  font-size: 0.95rem;
}

/* ---------- Trilha (node network) ---------- */
.trilha {
  background: var(--bg-secondary);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.trilha h2 {
  margin-bottom: 0.6rem;
}

.trilha-intro {
  max-width: 46ch;
  margin-bottom: 3rem;
}

.node-trail {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}

.node {
  position: relative;
  padding: 0 1.5rem 0 0;
}

.node:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 22px;
  left: calc(44px + 0.5rem);
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--color-cyan), transparent);
}

.node-marker {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-cyan);
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
}

.node-body h3 {
  margin-bottom: 0.5rem;
}

.node-body p {
  font-size: 0.95rem;
  max-width: 30ch;
}

/* ---------- Materiais ---------- */
.materiais h2 {
  margin-bottom: 0.6rem;
}

.materiais-intro {
  max-width: 52ch;
  margin-bottom: 3rem;
}

.materiais-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.material-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.material-card:hover {
  border-color: var(--color-cyan);
  transform: translateY(-3px);
}

.material-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.material-tag {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-teal);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.2rem 0.55rem;
}

.material-status {
  font-size: 0.8rem;
  color: var(--text-faint);
}

.material-card h3 {
  font-size: 1.1rem;
}

.material-card p {
  font-size: 0.95rem;
}

/* ---------- Contato ---------- */
.contato-inner {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.contato-inner h2 {
  margin-bottom: 1rem;
}

.contato-inner p {
  margin-bottom: 2.25rem;
}

.contato-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

/* ---------- Erro 404 ---------- */
.erro-inner {
  text-align: center;
  max-width: 560px;
}

.erro-codigo {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 6rem);
  font-weight: 700;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}

.erro-inner h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin: 1rem 0 0.75rem;
}

.erro-inner p {
  margin-bottom: 2rem;
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.logo-footer {
  font-size: 1rem;
}

.footer-slogan {
  font-size: 0.9rem;
  color: var(--text-muted);
}

footer p {
  font-size: 0.85rem;
  color: var(--text-faint);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: -1;
  }

  .hero-logo {
    width: min(220px, 60%);
  }

  .sobre-grid {
    grid-template-columns: 1fr;
  }

  .node-trail {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .node:not(:last-child)::after {
    display: none;
  }

  .materiais-grid {
    grid-template-columns: 1fr;
  }
}

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

  .nav-links {
    position: fixed;
    top: 65px;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 1rem 24px 1.5rem;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }

  .nav-links.open {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
  }

  .nav-links li {
    width: 100%;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-links li:last-child {
    border-bottom: none;
    padding-top: 1rem;
  }

  .nav-cta {
    display: inline-flex;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  #neuralCanvas {
    display: none;
  }

  .hero-typewriter .cursor {
    animation: none;
  }

  .btn-primary:hover {
    transform: none;
  }
}
