/* 
  APRENDORA.ONLINE 
  Brand & Animation Styling 
*/

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Inter:wght@400;500;600&family=Manrope:wght@600;700;800&display=swap');

:root {
  /* Brand Colors */
  --deep-ink: #172033;
  --aprendora-blue: #3E63DD;
  --digital-aqua: #46C7C3;
  --soft-lavender: #8D7CF6;
  --warm-coral: #F28C7F;
  --warm-ivory: #FAF8F4;
  --pure-white: #FFFFFF;
  --slate-gray: #667085;
  --soft-border: #E6E8EE;

  /* Typography */
  --font-display: 'Manrope', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-accent: 'DM Serif Display', serif;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 8rem;

  /* Easing */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

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

ul {
  list-style: none;
}

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

/* =========================================
   Typography Utilities
   ========================================= */
.accent-text {
  font-family: var(--font-accent);
  font-weight: 400;
  font-style: italic;
  color: var(--warm-coral);
}

.coral-accent {
  color: var(--warm-coral);
  font-family: var(--font-display);
  font-weight: 800;
  font-style: normal;
  position: relative;
  display: inline-block;
  padding: 0 4px;
  margin-right: 8px;
}

.coral-accent::after {
  content: '';
  position: absolute;
  bottom: 8%;
  left: -2%;
  width: 104%;
  height: 40%;
  background-color: rgba(255, 111, 97, 0.25);
  z-index: -1;
  transform: rotate(-1.5deg);
  border-radius: 2px;
}

.text-blue {
  color: var(--aprendora-blue);
}

.text-aqua {
  color: var(--digital-aqua);
}

.text-lavender {
  color: var(--soft-lavender);
}

.text-ivory {
  color: var(--warm-ivory);
}

.text-gray {
  color: var(--slate-gray);
}

.bg-ink {
  background-color: var(--deep-ink);
  color: var(--pure-white);
}

.bg-ivory {
  background-color: var(--warm-ivory);
}

/* =========================================
   Preloader
   ========================================= */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--warm-ivory);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.preloader-symbol {
  width: 64px;
  opacity: 0;
  transform: scale(0.9);
}

.preloader-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 0.1em;
  margin-top: var(--spacing-sm);
  opacity: 0;
}

/* =========================================
   Header
   ========================================= */
header {
  position: fixed;
  top: 0;
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  z-index: 1000;
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease, background-color 0.3s, backdrop-filter 0.3s;
}

header.scrolled {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
  background-color: rgba(250, 248, 244, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--soft-border);
}

.header-left {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.menu-icon {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--deep-ink);
  transition: opacity 0.3s;
}

.menu-icon:hover {
  opacity: 0.7;
}

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

.logo-container img {
  height: 48px; /* Reduced from 72px for a smaller, elegant header */
  width: auto;
}

.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.lang-selector {
  display: flex;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--slate-gray);
  font-family: var(--font-body);
  transition: color 0.3s;
}

.lang-btn.active {
  color: var(--aprendora-blue);
}

/* =========================================
   Hero Section (Kinetic Typography)
   ========================================= */
#hero {
  min-height: 100vh;
  position: relative;
  background: var(--neutral-light);
  /* As requested, #F7F8FC / light neutral */
  color: var(--deep-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
}

.kinetic-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, var(--neutral-light) 0%, #e2e5f0 100%);
  /* Fundo degradê claro */
}

.falling-element-bg {
  position: absolute;
  pointer-events: none;
  user-select: none;
}

.hero-content {
  width: 100%;
  max-width: 100vw;
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  justify-content: center;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(90px, 14vw, 240px);
  line-height: 0.8;
  letter-spacing: -0.05em;
  font-weight: 800;
  margin: 0;
  text-transform: uppercase;
  color: var(--deep-ink);
}

.hero-title .text-blue {
  color: var(--aprendora-blue);
}

#hero-scroll-indicator {
  position: absolute;
  bottom: var(--spacing-md);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
  z-index: 2;
  color: var(--deep-ink);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  font-weight: 600;
}

/* =========================================
   Editorial Navigation Index
   ========================================= */
#nav-index {
  background-color: var(--deep-ink);
  color: var(--pure-white);
  padding: 120px var(--spacing-md);
  position: relative;
  z-index: 10;
}

.nav-index-header {
  max-width: 1200px;
  margin: 0 auto 80px auto;
}

.nav-index-header h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
  margin-bottom: 20px;
}

.nav-index-header p {
  color: var(--neutral-silver);
  font-size: 1.25rem;
}

.nav-index-list {
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-index-row {
  display: flex;
  align-items: center;
  padding: 40px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  color: var(--pure-white);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.nav-index-row:hover {
  padding-left: 20px;
  padding-right: 20px;
  background-color: rgba(255, 255, 255, 0.03);
  color: var(--digital-aqua);
}

.nav-number {
  font-size: 1rem;
  font-family: var(--font-mono);
  color: rgba(255, 255, 255, 0.3);
  margin-right: 40px;
  transition: color 0.4s ease;
}

.nav-index-row:hover .nav-number {
  color: var(--digital-aqua);
}

.nav-label {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  text-transform: uppercase;
}

.nav-arrow {
  margin-left: auto;
  font-size: 2rem;
  font-family: var(--font-display);
  opacity: 0;
  transform: translateX(-20px);
  transition: all 0.4s ease;
}

.nav-index-row:hover .nav-arrow {
  opacity: 1;
  transform: translateX(0);
}

.hero-actions {
  display: flex;
  gap: var(--spacing-sm);
  align-items: center;
}

.btn-primary {
  background-color: var(--aprendora-blue);
  color: var(--pure-white);
  padding: 1rem 2rem;
  border-radius: 4px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.3s var(--ease-out-expo), background-color 0.3s;
}

.btn-primary:hover {
  background-color: #2b4cb5;
  transform: translateY(-2px);
}

.btn-secondary {
  color: var(--pure-white);
  font-weight: 600;
  padding: 1rem 2rem;
  transition: color 0.3s;
}

.btn-secondary:hover {
  color: var(--aprendora-blue);
}

.hero-bg-graphic {
  position: absolute;
  right: -5%;
  top: 10%;
  width: 50vw;
  opacity: 0.05;
  z-index: 1;
  pointer-events: none;
}

.scroll-indicator {
  position: absolute;
  bottom: var(--spacing-md);
  left: var(--spacing-md);
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--slate-gray);
}

.scroll-dot {
  width: 8px;
  height: 8px;
  background-color: var(--digital-aqua);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

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

  50% {
    transform: scale(1.5);
    opacity: 0.5;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* =========================================
   Falling Letters Section
   ========================================= */
.kinetic-container {
  position: absolute;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  z-index: 1;
}

.falling-element {
  position: absolute;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--warm-ivory);
  /* Light color on dark background */
  opacity: 0;
  top: -100px;
  /* Start above */
}

/* Variant styles for falling elements */
.falling-element.color-blue {
  color: var(--aprendora-blue);
}

.falling-element.color-aqua {
  color: var(--digital-aqua);
}

.falling-element.color-lavender {
  color: var(--soft-lavender);
}

.falling-element.font-accent {
  font-family: var(--font-accent);
  font-weight: 400;
}

.falling-element.outline {
  color: transparent;
  -webkit-text-stroke: 2px var(--warm-ivory);
}

#kinetic-message-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--warm-ivory);
  padding: var(--spacing-xl) var(--spacing-md);
}

.kinetic-message {
  text-align: center;
  z-index: 10;
  width: 100%;
  max-width: 800px;
}

.kinetic-message h2 {
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 1.1;
  margin-bottom: var(--spacing-md);
}

/* =========================================
   Ascending Cards Section
   ========================================= */
#ascending-cards-section {
  position: relative;
  background-color: var(--pure-white);
  padding-top: var(--spacing-xl);
}

.discovery-intro {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--spacing-xl);
  padding: 0 var(--spacing-md);
}

.discovery-intro h2 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  margin-bottom: var(--spacing-md);
}

.discovery-intro p {
  font-size: 1.25rem;
  color: var(--slate-gray);
}

.split-layout {
  display: flex;
  position: relative;
  padding: 0 var(--spacing-md);
  max-width: 1440px;
  margin: 0 auto;
}

.pinned-left {
  width: 40%;
  padding-right: var(--spacing-lg);
  /* The pinning will be handled by GSAP */
}

.pinned-left h2 {
  font-size: clamp(3rem, 5vw, 5rem);
  line-height: 1;
}

.scrolling-right {
  width: 60%;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
  padding-bottom: 20vh;
}

.learning-card {
  background: var(--warm-ivory);
  border-radius: 8px;
  padding: var(--spacing-md);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s;
  will-change: transform, opacity;
  border: 1px solid var(--soft-border);
}

.learning-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 20px 40px rgba(23, 32, 51, 0.05);
}

.card-image-placeholder {
  width: 100%;
  height: 250px;
  background-color: var(--soft-border);
  border-radius: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.card-image-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out-expo);
}

.learning-card:hover .card-image-placeholder img {
  transform: scale(1.04);
}

.card-category {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--aprendora-blue);
  letter-spacing: 0.05em;
}

.card-title {
  font-size: 1.5rem;
}

.card-desc {
  color: var(--slate-gray);
  font-size: 1rem;
}

.card-link {
  margin-top: auto;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.3s;
}

.card-link:hover {
  color: var(--aprendora-blue);
}



/* =========================================
   Aprenda -> Crie -> Evolua Sequence
   ========================================= */
#ace-sequence {
  height: 500vh;
  /* Long scroll duration */
  position: relative;
  background-color: var(--deep-ink);
  color: var(--pure-white);
}

.ace-container {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.ace-word {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: clamp(4rem, 15vw, 12rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  opacity: 0;
}

.ace-word.word-1 {
  color: var(--pure-white);
}

.ace-word.word-2 {
  color: var(--aprendora-blue);
}

.ace-word.word-3 {
  color: var(--digital-aqua);
}

.ace-particles {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.particle {
  position: absolute;
  background-color: var(--pure-white);
  border-radius: 50%;
  opacity: 0;
}

/* =========================================
   Editorial Manifesto
   ========================================= */
#manifesto {
  padding: var(--spacing-xl) var(--spacing-md);
  background-color: var(--warm-ivory);
  text-align: center;
}

.manifesto-label {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--slate-gray);
  margin-bottom: var(--spacing-lg);
  font-size: 0.9rem;
}

.manifesto-content {
  max-width: 900px;
  margin: 0 auto;
}

.manifesto-content h3 {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 500;
  margin-bottom: var(--spacing-md);
}

.manifesto-content p {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: var(--slate-gray);
  margin-bottom: var(--spacing-sm);
}

.manifesto-closing {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--aprendora-blue);
  margin-top: var(--spacing-lg);
}

/* =========================================
   Curated Paths & Grid
   ========================================= */
#paths,
#grid {
  padding: var(--spacing-xl) var(--spacing-md);
  background-color: var(--warm-ivory);
  max-width: 1440px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: var(--spacing-lg);
}

/* Varal Layout Structure */
#paths {
  /* Remove old padding if any, we want full height control */
  padding: 0;
  margin: 0;
  max-width: 100%;
  position: relative;
  /* GSAP will pin this section */
}

.varal-header {
  padding: var(--spacing-xl) var(--spacing-md) 0;
  max-width: 1440px;
  margin: 0 auto;
}

.varal-layout {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: stretch;
  max-width: 1440px;
  margin: 0 auto;
  min-height: 90vh; /* Viewport relative height for the pinned section */
  padding: var(--spacing-md);
  gap: var(--spacing-xl);
}

/* Coluna Esquerda: Stack de Cards */
.varal-left {
  flex: 1 1 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.varal-card {
  position: absolute;
  width: 100%;
  max-width: 450px;
  background: var(--pure-white);
  border-radius: 12px;
  padding: var(--spacing-md);
  box-shadow: 0 30px 60px rgba(23, 32, 51, 0.1);
  border: 1px solid var(--soft-border);
  /* Initial state for animation */
  transform: translateY(150vh); 
  will-change: transform;
}

.varal-card .card-image-placeholder {
  width: 100%;
  height: 200px;
  background-color: var(--soft-border);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: var(--spacing-sm);
}

.varal-card .card-image-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.varal-card .card-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.varal-card .card-category {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--aprendora-blue);
  text-transform: uppercase;
}

.varal-card .card-title {
  font-size: 1.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
}

.varal-card .card-desc {
  font-size: 0.95rem;
  color: var(--deep-ink);
  opacity: 0.8;
  margin-bottom: 1rem;
}

.varal-card .card-link {
  font-weight: 600;
  color: var(--aprendora-blue);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

/* Coluna Direita: Paginação */
.varal-right {
  flex: 1 1 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.varal-pagination {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.varal-pag-item {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--deep-ink);
  opacity: 0.3;
  transition: opacity 0.4s var(--ease-out-expo), transform 0.4s var(--ease-out-expo);
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.varal-pag-item span {
  font-size: 1rem;
  font-family: var(--font-body);
  font-weight: 600;
  opacity: 0.5;
}

.varal-pag-item.active {
  opacity: 1;
  transform: translateX(10px);
}

@media (max-width: 768px) {
  .varal-layout {
    flex-direction: column-reverse;
    height: auto;
    min-height: 100vh;
  }
  .varal-right {
    flex: none;
    padding-bottom: var(--spacing-md);
  }
  .varal-left {
    height: 60vh;
  }
}

/* =========================================
   Kinetic Marquee
   ========================================= */
#marquee {
  overflow: hidden;
  white-space: nowrap;
  padding: var(--spacing-xl) 0;
  background-color: var(--pure-white);
}

.marquee-inner {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 800;
  text-transform: uppercase;
}

.marquee-inner span {
  display: inline-block;
  padding-right: 2rem;
}

.marquee-inner span:nth-child(even) {
  color: transparent;
  -webkit-text-stroke: 2px var(--deep-ink);
}

/* =========================================
   Final CTA
   ========================================= */
#final-cta {
  background-color: var(--deep-ink);
  color: var(--pure-white);
  padding: var(--spacing-xl) var(--spacing-md);
  text-align: center;
  position: relative;
  overflow: hidden;
}

#final-cta h2 {
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 1;
  margin-bottom: var(--spacing-md);
}

#final-cta p {
  font-size: 1.5rem;
  color: var(--slate-gray);
  margin-bottom: var(--spacing-lg);
}

/* =========================================
   Footer
   ========================================= */
footer {
  background-color: var(--pure-white);
  padding: var(--spacing-xl) var(--spacing-md) var(--spacing-md);
  position: relative;
  overflow: hidden;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--spacing-md);
  max-width: 1440px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.footer-col h4 {
  margin-bottom: var(--spacing-sm);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col a {
  color: var(--slate-gray);
  transition: color 0.3s;
}

.footer-col a:hover {
  color: var(--aprendora-blue);
}

.footer-bottom {
  max-width: 1440px;
  margin: var(--spacing-xl) auto 0;
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--soft-border);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  color: var(--slate-gray);
  font-size: 0.9rem;
}

.footer-logo-bg {
  position: absolute;
  bottom: -10%;
  right: -5%;
  width: 40vw;
  opacity: 0.15;
  z-index: 1;
  pointer-events: none;
}

/* =========================================
   Responsive Adjustments
   ========================================= */
@media (max-width: 1024px) {
  .split-layout {
    flex-direction: column;
  }

  .pinned-left {
    width: 100%;
    margin-bottom: var(--spacing-lg);
    /* GSAP will need to disable pinning or change behavior for mobile */
  }

  .scrolling-right {
    width: 100%;
    padding-bottom: var(--spacing-md);
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    /* In a real scenario, implement a hamburger menu here */
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--spacing-sm);
    text-align: center;
  }
}

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