/* =====================================================================
   styles.css — non-critical CSS, async loaded.
   Glassmorphism + terminal mockup + gradient borders.
====================================================================== */

/* === Container === */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow { max-width: 760px; }

.container--split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  align-items: center;
}

@media (min-width: 880px) {
  .container--split {
    grid-template-columns: 1.1fr 1fr;
    gap: 80px;
  }
  .container--split-reverse { grid-template-columns: 1fr 1.1fr; }
  .container--split-reverse .split__media { order: -1; }
}

/* === Section base === */
.section {
  padding: 100px 0;
  position: relative;
}

@media (max-width: 768px) {
  .section { padding: 72px 0; }
}

.section--alt {
  background: var(--surface-950);
  border-top: 1px solid var(--surface-800);
  border-bottom: 1px solid var(--surface-800);
  position: relative;
}

.section--alt::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(34, 197, 94, 0.04), transparent),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(124, 58, 237, 0.04), transparent);
  pointer-events: none;
}

.section--alt > .container { position: relative; z-index: 1; }

.section__head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 64px;
}

.section__eyebrow {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section__title {
  font-size: clamp(28px, 4.5vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.section__title--left { text-align: left; }

.section__subtitle {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.6;
}

.section__text {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 24px;
}

.section__text--small { font-size: 14px; }
.section__text strong { color: var(--text); font-weight: 600; }

/* ============================================================
   Profile cards (Pra quem é) — minimalist, technical, no emoji
============================================================ */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 720px) {
  .grid--2 { grid-template-columns: 1fr 1fr; }
}

.profile-card {
  position: relative;
  background: var(--surface-900);
  border: 1px solid var(--surface-800);
  border-radius: var(--r-lg);
  padding: 32px 28px;
  overflow: hidden;
  transition: all .3s var(--ease-out);
}

/* Glow border (gradient on hover) */
.profile-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--r-lg);
  padding: 1px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.4), rgba(124, 58, 237, 0.4));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .3s var(--ease-out);
  pointer-events: none;
}

.profile-card:hover {
  background: var(--surface-950);
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(34, 197, 94, 0.08);
}

.profile-card:hover::before { opacity: 1; }

.profile-card__num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  margin-bottom: 24px;
  display: inline-block;
  padding: 4px 8px;
  background: var(--surface-800);
  border-radius: 4px;
}

.profile-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(124, 58, 237, 0.15));
  border: 1px solid rgba(34, 197, 94, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-light);
  margin-bottom: 20px;
  transition: all .3s var(--ease-out);
}

.profile-card__icon svg {
  width: 22px;
  height: 22px;
}

.profile-card:hover .profile-card__icon {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.25), rgba(124, 58, 237, 0.25));
  border-color: rgba(34, 197, 94, 0.4);
}

.profile-card__title {
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.profile-card__text {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 18px;
}

.profile-card__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--surface-800);
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.profile-card__tag::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 6px var(--primary);
}

/* ============================================================
   Bullets (a grande mudança)
============================================================ */
.bullets {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
}

.bullets li {
  position: relative;
  padding: 16px 0 16px 36px;
  border-bottom: 1px solid var(--surface-800);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bullets li:last-child { border-bottom: none; }

.bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 22px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--primary) 0%, var(--primary) 30%, transparent 31%),
    rgba(34, 197, 94, 0.1);
  background-size: 100% 100%;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.bullets li::after {
  content: '';
  position: absolute;
  left: 8px;
  top: 28px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bg);
}

.bullets strong {
  color: var(--text);
  font-weight: 600;
  font-size: 16px;
}

.bullets span {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

/* ============================================================
   Terminal mockup (split media)
============================================================ */
.terminal {
  background: var(--surface-950);
  border: 1px solid var(--surface-800);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px var(--surface-800),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  position: relative;
}

.terminal::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--r-lg) + 2px);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.4), rgba(124, 58, 237, 0.4));
  z-index: -1;
  filter: blur(20px);
  opacity: 0.5;
}

.terminal__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--surface-900);
  border-bottom: 1px solid var(--surface-800);
}

.terminal__dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: block;
}

.terminal__dot--red { background: #ff5f57; }
.terminal__dot--yellow { background: #febc2e; }
.terminal__dot--green { background: #28c840; }

.terminal__title {
  margin-left: 12px;
  font-size: 12px;
  color: var(--text-dim);
}

.terminal__body {
  padding: 20px 18px;
  line-height: 1.8;
}

.terminal__line {
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
}

.terminal__prompt {
  color: var(--primary);
  margin-right: 8px;
  font-weight: 600;
}

.terminal__out { color: var(--text-muted); }

.terminal__out--ok {
  color: var(--primary-light);
}

.terminal__cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--primary);
  vertical-align: -3px;
  animation: cursor-blink 1.1s steps(1) infinite;
  margin-left: 2px;
}

@keyframes cursor-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* ============================================================
   Lessons (Aula 01..04)
============================================================ */
.lessons {
  display: grid;
  gap: 12px;
  max-width: 800px;
  margin: 0 auto;
}

.lesson {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 28px;
  padding: 24px 28px;
  background: var(--surface-900);
  border: 1px solid var(--surface-800);
  border-radius: var(--r-lg);
  position: relative;
  overflow: hidden;
  transition: all .3s var(--ease-out);
}

.lesson::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 100%);
  opacity: 0.5;
  transition: opacity .3s var(--ease-out);
}

.lesson:hover {
  background: var(--surface-950);
  transform: translateX(4px);
  border-color: var(--surface-700);
}

.lesson:hover::before { opacity: 1; }

.lesson__num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  position: relative;
}

.lesson__num::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
  transform: translateY(-50%);
}

.lesson__title {
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.lesson__text {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

@media (max-width: 640px) {
  .lesson {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 20px 22px 22px 28px;
  }
  .lesson__num::after { display: none; }
}

/* ============================================================
   Avatar (Rodolfo)
============================================================ */
.avatar-frame {
  position: relative;
  max-width: 320px;
  margin: 0 auto;
  aspect-ratio: 1;
}

.avatar-frame::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: conic-gradient(
    from var(--angle, 0deg),
    var(--primary) 0%,
    var(--accent) 25%,
    transparent 50%,
    var(--primary) 75%,
    var(--accent) 100%
  );
  filter: blur(12px);
  opacity: 0.5;
  animation: rotate-border 8s linear infinite;
  z-index: -1;
}

.avatar-frame::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: conic-gradient(
    from var(--angle, 0deg),
    var(--primary) 0%,
    var(--accent) 50%,
    var(--primary) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 2px;
  animation: rotate-border 8s linear infinite;
  z-index: 0;
}

.avatar-frame img {
  border-radius: 50%;
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--surface-900);
}

/* ============================================================
   Stats (Sobre o Rodolfo)
============================================================ */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 32px 0;
}

.stat {
  text-align: left;
  padding: 22px 18px;
  background: var(--surface-900);
  border: 1px solid var(--surface-800);
  border-radius: var(--r-md);
  position: relative;
  overflow: hidden;
}

.stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.4), transparent);
}

.stat__num {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(22px, 3.5vw, 30px);
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
  line-height: 1;
}

.stat__label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 8px;
  font-weight: 500;
}

@media (max-width: 540px) {
  .stats { grid-template-columns: 1fr; gap: 8px; }
  .stat { padding: 16px 18px; }
}

/* ============================================================
   CTA section (final)
============================================================ */
.section--cta {
  padding: 120px 0;
  text-align: center;
  position: relative;
  background: var(--bg);
}

.section--cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle 600px at 50% 30%, rgba(34, 197, 94, 0.18), transparent),
    radial-gradient(circle 600px at 50% 70%, rgba(124, 58, 237, 0.15), transparent);
  z-index: 0;
}

.section--cta > .container { position: relative; z-index: 1; }

.section--cta .section__eyebrow {
  border-left: 2px solid var(--primary);
  padding-left: 12px;
  margin-bottom: 24px;
}

.cta-section__title {
  font-size: clamp(30px, 5.5vw, 52px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 18px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.cta-section__text {
  font-size: 17px;
  color: var(--text-muted);
  margin-bottom: 36px;
}

.cta--inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: auto;
  padding: 18px 36px;
  text-decoration: none;
  margin-top: 0;
}

.cta--inline svg {
  width: 18px;
  height: 18px;
  transition: transform .3s var(--ease-out);
}

.cta--inline:hover svg { transform: translateX(4px); }

/* ============================================================
   Footer
============================================================ */
.footer {
  padding: 36px 0;
  border-top: 1px solid var(--surface-800);
  background: var(--surface-950);
}

.footer p {
  font-size: 13px;
  color: var(--text-dim);
  text-align: center;
}

.footer a {
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px dashed var(--surface-700);
  padding-bottom: 1px;
  transition: color .2s, border-color .2s;
}

.footer a:hover { color: var(--primary); border-color: var(--primary); }

/* ============================================================
   Animations / a11y
============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
