/* ============================================
   ARA Sistemas Educacionais — Premium Landing
   ============================================ */

:root {
  --black-deep: #050505;
  --black-graphite: #0f0f0f;
  --white: #ffffff;
  --gray-soft: #d9d9d9;
  --gray-muted: #888888;
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-hover: rgba(255, 255, 255, 0.07);
  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-fast: 0.2s ease;
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 120px;
  --container: 1200px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--black-deep);
  color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul { list-style: none; }

/* Canvas backgrounds */
#starfield,
#constellation {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

#constellation { z-index: 1; }

/* Container */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

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

/* Glassmorphism */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 100px;
  transition: var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background: var(--white);
  color: var(--black-deep);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(255, 255, 255, 0.15);
}

.btn--ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--glass-border);
}

.btn--ghost:hover {
  background: var(--glass-hover);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn--sm { padding: 10px 20px; font-size: 0.875rem; }
.btn--lg { padding: 16px 32px; font-size: 1rem; }
.btn--xl {
  padding: 20px 48px;
  font-size: 1.125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  transition: var(--transition);
}

.header--scrolled {
  background: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.header__logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 12px;
}

.header__logo-icon {
  height: 52px;
  width: auto;
  max-width: none;
  flex-shrink: 0;
}

.header__logo-type {
  height: 36px;
  width: auto;
  max-width: none;
  object-fit: contain;
}

@media (min-width: 640px) {
  .header__logo-icon { height: 58px; }
  .header__logo-type { height: 42px; }
}

@media (min-width: 768px) {
  .header__logo-icon { height: 64px; }
  .header__logo-type { height: 48px; }
}

@media (min-width: 1024px) {
  .header__logo-icon { height: 68px; }
  .header__logo-type { height: 52px; }
}

.header__nav {
  display: none;
}

.header__menu {
  display: flex;
  gap: 32px;
}

.nav-link {
  font-size: 0.875rem;
  color: var(--gray-soft);
  transition: color var(--transition-fast);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--white);
  transition: width var(--transition);
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--white);
}

.nav-link:hover::after { width: 100%; }

.header__cta { display: none; }

.header__toggle {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  z-index: 110;
}

.header__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: var(--transition);
  transform-origin: center;
}

.header__toggle.active span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.header__toggle.active span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

/* Mobile nav open */
.header__nav.open {
  display: flex;
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 5, 0.97);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  align-items: center;
  justify-content: center;
  z-index: 105;
}

.header__nav.open .header__menu {
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.header__nav.open .nav-link {
  font-size: 1.25rem;
}

/* Hero */
.hero {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--header-h) + 40px) 0 80px;
}

.hero__grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

.hero__badge {
  display: inline-block;
  padding: 8px 16px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-soft);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  margin-bottom: 24px;
}

.hero__title {
  font-size: clamp(2.25rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--white) 0%, var(--gray-soft) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--gray-soft);
  max-width: 540px;
  margin-bottom: 40px;
  line-height: 1.7;
}

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

.hero__visual {
  display: flex;
  justify-content: center;
}

.hero__illustration {
  position: relative;
  padding: 40px;
  max-width: 480px;
  width: 100%;
}

.hero__illustration img {
  width: 100%;
  height: auto;
  animation: float 6s ease-in-out infinite;
}

.hero__orbit {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.hero__orbit--1 {
  inset: 10%;
  animation: spin 30s linear infinite;
}

.hero__orbit--2 {
  inset: 0;
  animation: spin 45s linear infinite reverse;
  border-style: dashed;
}

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

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hero__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--gray-muted);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--gray-muted), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* Numbers */
.numbers {
  position: relative;
  z-index: 2;
  padding: 80px 0;
  background: linear-gradient(180deg, transparent, var(--black-graphite) 50%, transparent);
}

.numbers__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.numbers__item {
  padding: 32px 24px;
  text-align: center;
  transition: var(--transition);
}

.numbers__item:hover {
  background: var(--glass-hover);
  transform: translateY(-4px);
}

.numbers__value {
  display: block;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--white), var(--gray-soft));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.numbers__label {
  font-size: 0.8125rem;
  color: var(--gray-muted);
  letter-spacing: 0.02em;
}

/* Sections */
.section {
  position: relative;
  z-index: 2;
  padding: 100px 0;
}

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

.section__tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray-muted);
  margin-bottom: 16px;
}

.section__title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 16px;
}

.section__desc {
  color: var(--gray-soft);
  font-size: 1.0625rem;
}

/* Services */
.services__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.service-card {
  padding: 32px;
  transition: var(--transition);
  cursor: default;
}

.service-card:hover {
  background: var(--glass-hover);
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.15);
}

.service-card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--gray-soft);
}

.service-card__icon svg {
  width: 28px;
  height: 28px;
}

.service-card__title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.service-card__desc {
  font-size: 0.9375rem;
  color: var(--gray-muted);
  line-height: 1.6;
}

/* Differentials */
.differentials {
  background: var(--black-graphite);
}

.differentials__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.diff-card {
  background: var(--black-graphite);
  padding: 32px;
  transition: var(--transition);
}

.diff-card:hover {
  background: rgba(255, 255, 255, 0.03);
}

.diff-card__num {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-muted);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.diff-card__title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.diff-card__desc {
  font-size: 0.9375rem;
  color: var(--gray-muted);
  line-height: 1.6;
}

/* About */
.about__grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

.about__constellation {
  position: relative;
  max-width: 400px;
  margin: 0 auto;
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about__constellation img {
  width: 100%;
  max-width: 280px;
  height: auto;
}

.about__text p {
  color: var(--gray-soft);
  margin-bottom: 16px;
  font-size: 1.0625rem;
  line-height: 1.8;
}

.about__text p:last-child { margin-bottom: 0; }

/* Testimonials */
.testimonials__carousel {
  overflow: hidden;
}

.testimonials__track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.testimonial {
  flex: 0 0 100%;
  padding: 48px 40px;
  margin: 0;
}

.testimonial__text {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  line-height: 1.8;
  color: var(--gray-soft);
  font-style: italic;
  margin-bottom: 32px;
}

.testimonial__author {
  display: flex;
  align-items: center;
  gap: 16px;
}

.testimonial__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-soft);
}

.testimonial__name {
  display: block;
  font-style: normal;
  font-weight: 600;
  font-size: 1rem;
}

.testimonial__role {
  font-size: 0.875rem;
  color: var(--gray-muted);
}

.testimonials__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 32px;
}

.testimonials__btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  color: var(--gray-soft);
}

.testimonials__btn:hover {
  background: var(--glass-hover);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.2);
}

.testimonials__btn svg {
  width: 20px;
  height: 20px;
}

.testimonials__dots {
  display: flex;
  gap: 8px;
}

.testimonials__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--glass-border);
  border: none;
  padding: 0;
  transition: var(--transition-fast);
  cursor: pointer;
}

.testimonials__dot.active {
  background: var(--white);
  width: 24px;
  border-radius: 4px;
}

/* Timeline */
.timeline {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--glass-border), transparent);
}

.timeline__item {
  display: flex;
  gap: 24px;
  margin-bottom: 32px;
  position: relative;
}

.timeline__item:last-child { margin-bottom: 0; }

.timeline__marker {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--black-deep);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 1;
  transition: var(--transition);
}

.timeline__item:hover .timeline__marker {
  background: var(--white);
  color: var(--black-deep);
  border-color: var(--white);
}

.timeline__content {
  flex: 1;
  padding: 24px 28px;
  transition: var(--transition);
}

.timeline__item:hover .timeline__content {
  background: var(--glass-hover);
}

.timeline__title {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.timeline__desc {
  font-size: 0.9375rem;
  color: var(--gray-muted);
}

/* FAQ */
.faq__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq__item {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: var(--transition-fast);
}

.faq__item:hover,
.faq__item.active {
  border-color: rgba(255, 255, 255, 0.15);
}

.faq__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  text-align: left;
  font-size: 1rem;
  font-weight: 500;
  transition: var(--transition-fast);
}

.faq__question:hover { color: var(--gray-soft); }

.faq__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform var(--transition);
  color: var(--gray-muted);
}

.faq__item.active .faq__icon {
  transform: rotate(180deg);
}

.faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq__item.active .faq__answer {
  max-height: 300px;
}

.faq__answer p {
  padding: 0 24px 20px;
  color: var(--gray-muted);
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* CTA Final */
.cta-final {
  position: relative;
  z-index: 2;
  padding: 100px 0;
}

.cta-final__inner {
  text-align: center;
  padding: 80px 40px;
  background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
}

.cta-final__title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.cta-final__subtitle {
  color: var(--gray-soft);
  font-size: 1.0625rem;
  max-width: 520px;
  margin: 0 auto 40px;
}

/* Contact */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.contact__card {
  padding: 32px;
  transition: var(--transition);
  display: block;
}

.contact__card:hover {
  background: var(--glass-hover);
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.15);
}

.contact__icon {
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  color: var(--gray-soft);
}

.contact__icon svg {
  width: 24px;
  height: 24px;
}

.contact__label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-muted);
  margin-bottom: 6px;
}

.contact__value {
  font-size: 1rem;
  font-weight: 500;
  word-break: break-word;
}

/* Footer */
.footer {
  position: relative;
  z-index: 2;
  padding: 48px 0;
  border-top: 1px solid var(--glass-border);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer__logo-icon,
.footer__logo-type {
  max-width: none;
}

.footer__logo-icon {
  height: 40px;
  width: auto;
}

.footer__logo-type {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.footer__tagline {
  font-size: 0.875rem;
  color: var(--gray-muted);
}

.footer__copy {
  font-size: 0.8125rem;
  color: var(--gray-muted);
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 28px;
  left: 28px;
  z-index: 99;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  transition: opacity 0.4s ease, transform 0.4s ease, background 0.3s ease, border-color 0.3s ease;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--glass-hover);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.back-to-top svg {
  width: 22px;
  height: 22px;
}

/* WhatsApp Float */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 99;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(37, 211, 102, 0.35);
  transition: var(--transition);
}

.whatsapp-float:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 40px rgba(37, 211, 102, 0.5);
}

.whatsapp-float svg {
  width: 30px;
  height: 30px;
  color: var(--white);
  position: relative;
  z-index: 2;
}

.whatsapp-float__pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #25d366;
  animation: pulse 2s ease-out infinite;
  z-index: 1;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* Fade in on scroll */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Focus styles (accessibility) */
:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

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

  html { scroll-behavior: auto; }

  .fade-in {
    opacity: 1;
    transform: none;
  }
}

/* Tablet */
@media (min-width: 640px) {
  .numbers__grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .services__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .differentials__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Desktop */
@media (min-width: 768px) {
  .header__nav { display: block; }
  .header__cta { display: inline-flex; }
  .header__toggle { display: none; }

  .hero__grid {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }

  .about__grid {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }

  .about__constellation { margin: 0; }

  .timeline::before { left: 50%; transform: translateX(-50%); }

  .timeline__item {
    justify-content: flex-end;
    padding-right: calc(50% + 32px);
  }

  .timeline__item:nth-child(even) {
    justify-content: flex-start;
    padding-right: 0;
    padding-left: calc(50% + 32px);
    flex-direction: row-reverse;
  }

  .timeline__marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
}

@media (min-width: 1024px) {
  .services__grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .differentials__grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .testimonial {
    padding: 56px 64px;
  }
}
