/* css/layout.css - Navbar, Hero, Sobre Nós e Rodapé */

/* ==========================================================================
   NAVBAR
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: all var(--transition-normal);
  background: transparent;
  border-bottom: 1px solid transparent;
  animation: headerEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.header.scrolled {
  height: var(--nav-height-shrunk);
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  box-shadow: var(--shadow-sm);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* Brand Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-headings);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  user-select: none;
  animation: navItemEntrance 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.12s both;
}

.logo img {
  height: 42px;
  width: auto;
  transition: transform var(--transition-spring);
}

.logo:hover img {
  transform: rotate(-10deg) scale(1.1);
}

.logo-text {
  letter-spacing: -0.03em;
  font-weight: 800;
}

.logo-text span {
  color: var(--brand-mint);
  text-shadow: var(--glow-mint-sm);
}

/* Nav Menu */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  list-style: none;
}

.nav-link {
  font-family: var(--font-headings);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 0.5rem 0;
  cursor: pointer;
  animation: navItemEntrance 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.nav-menu .nav-link:nth-child(1) { animation-delay: 0.18s; }
.nav-menu .nav-link:nth-child(2) { animation-delay: 0.24s; }
.nav-menu .nav-link:nth-child(3) { animation-delay: 0.3s; }
.nav-menu .nav-link:nth-child(4) { animation-delay: 0.36s; }
.nav-menu .nav-link:nth-child(5) { animation-delay: 0.42s; }

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--brand-mint);
  box-shadow: var(--glow-mint-sm);
  transition: width var(--transition-normal);
}

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

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

.nav-link.active {
  color: var(--brand-mint);
  font-weight: 600;
}

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

/* Actions in Nav (Theme & CTA) */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  animation: navItemEntrance 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.48s both;
}

.theme-toggle {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  width: 42px;
  height: 42px;
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  background: var(--border-glass-hover);
  border-color: var(--brand-mint);
  color: var(--brand-mint);
  box-shadow: var(--glow-mint-sm);
}

.theme-toggle .sun-icon {
  display: none;
}

[data-theme="light"] .theme-toggle .moon-icon {
  display: none;
}

[data-theme="light"] .theme-toggle .sun-icon {
  display: block;
}

/* Mobile Menu Trigger */
.menu-btn {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 20px;
  cursor: pointer;
  z-index: 1001;
}

.menu-btn span {
  display: block;
  height: 2.5px;
  width: 100%;
  background-color: var(--text-primary);
  border-radius: var(--border-radius-full);
  transition: all var(--transition-normal);
}

@media (max-width: 992px) {
  .menu-btn {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-glass);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 3rem;
    gap: 2rem;
    z-index: 999;
    transition: right var(--transition-normal);
    box-shadow: var(--shadow-lg);
  }
  
  .nav-menu.open {
    right: 0;
  }
  
  .menu-btn.open span:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
  }
  
  .menu-btn.open span:nth-child(2) {
    opacity: 0;
  }
  
  .menu-btn.open span:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
  }
  
  .nav-actions {
    display: none; /* Relocate inside mobile nav if needed, or hide */
  }
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: var(--nav-height);
  overflow: hidden;
}

/* Interactive abstract background */
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.hero-glow-1 {
  position: absolute;
  top: -10%;
  right: -10%;
  width: 50%;
  height: 60%;
  background: radial-gradient(circle, rgba(85, 203, 150, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
  filter: blur(80px);
  animation: heroAtmosphereIn 1.3s ease-out 0.15s both;
}

.hero-glow-2 {
  position: absolute;
  bottom: -10%;
  left: -10%;
  width: 45%;
  height: 50%;
  background: radial-gradient(circle, rgba(20, 110, 81, 0.2) 0%, rgba(0, 0, 0, 0) 70%);
  filter: blur(80px);
  animation: heroAtmosphereIn 1.35s ease-out 0.22s both;
}

/* Decorative geometric grids */
.hero-grid {
  position: absolute;
  right: 5%;
  top: 15%;
  width: 400px;
  height: 400px;
  background-image: radial-gradient(rgba(85, 203, 150, 0.15) 1.5px, transparent 1.5px);
  background-size: 24px 24px;
  transform: rotate(-10deg);
  z-index: 1;
  animation: heroGridEntrance 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.28s both;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 3rem;
  position: relative;
  z-index: 2;
}

.hero-content {
  display: flex;
  flex-direction: flex-start;
  flex-direction: column;
}

.hero-slogan {
  font-size: 1.2rem;
  color: var(--brand-mint);
  font-family: var(--font-headings);
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: heroTextEntrance 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}

.hero-slogan::before {
  content: '';
  display: block;
  width: 30px;
  height: 2px;
  background-color: var(--brand-mint);
  box-shadow: var(--glow-mint-sm);
}

.hero-title {
  margin-bottom: 1.5rem;
  line-height: 1.1;
  animation: heroTitleEntrance 0.82s cubic-bezier(0.16, 1, 0.3, 1) 0.34s both;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 600px;
  animation: heroTextEntrance 0.78s cubic-bezier(0.16, 1, 0.3, 1) 0.46s both;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  animation: heroTextEntrance 0.78s cubic-bezier(0.16, 1, 0.3, 1) 0.58s both;
}

/* Graphic Hero Right */
.hero-graphic {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  perspective: 900px;
  animation: heroVisualEntrance 0.95s cubic-bezier(0.16, 1, 0.3, 1) 0.42s both;
}

.hero-graphic-shell {
  --hero-shift-x: 0px;
  --hero-shift-y: 0px;
  --hero-tilt-x: 0deg;
  --hero-tilt-y: 0deg;
  --hero-look-x: 0px;
  --hero-look-y: 0px;
  --hero-core-x: 0px;
  --hero-core-y: 0px;
  --hero-logo-x: 0px;
  --hero-logo-y: 0px;
  width: min(380px, 82vw);
  aspect-ratio: 1;
  position: relative;
  isolation: isolate;
  cursor: pointer;
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-graphic-shell::before {
  content: '';
  position: absolute;
  inset: -58px;
  border-radius: 50%;
  background:
    conic-gradient(
      from 120deg,
      transparent 0deg,
      rgba(85, 203, 150, 0.28) 48deg,
      transparent 96deg,
      rgba(var(--theme-info-rgb), 0.18) 176deg,
      transparent 245deg,
      rgba(var(--theme-admin-rgb), 0.18) 306deg,
      transparent 360deg
    );
  opacity: 0.52;
  filter: blur(0.5px);
  animation: rotateCounter 22s linear infinite;
  z-index: -2;
}

.hero-graphic-shell::after {
  content: '';
  position: absolute;
  inset: -28px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(85, 203, 150, 0.14), transparent 48%),
    linear-gradient(90deg, transparent 49%, rgba(85, 203, 150, 0.14) 50%, transparent 51%),
    linear-gradient(0deg, transparent 49%, rgba(85, 203, 150, 0.1) 50%, transparent 51%);
  opacity: 0.4;
  z-index: -1;
  transform: rotate(-10deg);
  transition: opacity var(--transition-normal), transform var(--transition-normal);
}

.hero-graphic-circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px dashed rgba(85, 203, 150, 0.35);
  position: absolute;
  inset: 0;
  animation: rotateClockwise 30s linear infinite;
  box-shadow: inset 0 0 40px rgba(85, 203, 150, 0.04);
}

.hero-orbit-ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero-orbit-ring.ring-outer {
  inset: -28px;
  border: 1px solid rgba(85, 203, 150, 0.08);
  box-shadow: 0 0 50px rgba(85, 203, 150, 0.08);
}

.hero-orbit-ring.ring-inner {
  inset: 42px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left-color: rgba(85, 203, 150, 0.24);
  border-bottom-color: rgba(var(--theme-info-rgb), 0.18);
  animation: rotateClockwise 18s linear infinite;
}

.hero-orbit-dot {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand-mint);
  box-shadow: 0 0 18px rgba(85, 203, 150, 0.85);
  z-index: 4;
}

.hero-orbit-dot.dot-1 {
  top: 2%;
  left: 54%;
}

.hero-orbit-dot.dot-2 {
  right: 4%;
  bottom: 27%;
  background: var(--theme-info);
  box-shadow: 0 0 18px rgba(var(--theme-info-rgb), 0.8);
}

.hero-orbit-dot.dot-3 {
  left: 7%;
  bottom: 24%;
  background: var(--theme-admin);
  box-shadow: 0 0 18px rgba(var(--theme-admin-rgb), 0.75);
}

.hero-graphic-core {
  position: absolute;
  top: 10%;
  left: 10%;
  width: 80%;
  height: 80%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 30%, rgba(85, 203, 150, 0.16), transparent 34%),
    linear-gradient(145deg, rgba(20, 110, 81, 0.16), rgba(7, 12, 10, 0.94) 62%),
    var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    var(--shadow-lg),
    inset 0 0 20px rgba(85, 203, 150, 0.08),
    0 0 90px rgba(85, 203, 150, 0.1);
  animation: floatEffect 6s ease-in-out infinite;
  overflow: hidden;
  transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.hero-graphic-core::before {
  content: '';
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 48%);
  opacity: 0.38;
  pointer-events: none;
}

.hero-graphic-core img {
  width: 55%;
  height: auto;
  filter: drop-shadow(0 0 15px rgba(85, 203, 150, 0.3));
  position: relative;
  z-index: 2;
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), filter var(--transition-normal);
}

.hero-floating-badge {
  position: absolute;
  --badge-accent: var(--brand-mint);
  padding: 0.8rem 1.15rem;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 42%),
    rgba(7, 13, 11, 0.86);
  border: 1px solid color-mix(in srgb, var(--badge-accent), transparent 62%);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24), 0 0 24px color-mix(in srgb, var(--badge-accent), transparent 86%);
  font-family: var(--font-headings);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  z-index: 5;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), border-color var(--transition-normal), box-shadow var(--transition-normal), background var(--transition-normal);
}

.hero-floating-badge svg {
  stroke: var(--badge-accent);
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--badge-accent), transparent 35%));
}

.hero-floating-badge.badge-1 {
  --badge-accent: var(--theme-info);
  top: 12%;
  right: -13%;
  animation: floatEffect 5s ease-in-out infinite alternate;
}

.hero-floating-badge.badge-2 {
  --badge-accent: var(--theme-enferm);
  bottom: 14%;
  left: -18%;
  animation: floatEffect 7s ease-in-out infinite alternate;
}

.hero-floating-badge.badge-3 {
  --badge-accent: var(--theme-admin);
  right: 3%;
  bottom: -9%;
  animation: floatEffect 6.5s ease-in-out infinite alternate;
}

.hero-graphic-shell:hover,
.hero-graphic-shell.is-magnetized {
  transform:
    translate3d(var(--hero-shift-x), calc(-8px + var(--hero-shift-y)), 0)
    rotateX(var(--hero-tilt-x))
    rotateY(var(--hero-tilt-y));
}

.hero-graphic-shell:hover::after {
  opacity: 0.68;
  transform: rotate(0deg) scale(1.03);
}

.hero-graphic-shell:hover .hero-graphic-circle,
.hero-graphic-shell:hover .hero-orbit-ring.ring-inner {
  animation-duration: 10s;
}

.hero-graphic-shell:hover .hero-graphic-core,
.hero-graphic-shell.is-magnetized .hero-graphic-core {
  transform: translate3d(var(--hero-core-x), var(--hero-core-y), 0) scale(1.04);
  border-color: rgba(85, 203, 150, 0.34);
  box-shadow:
    var(--shadow-lg),
    inset 0 0 30px rgba(85, 203, 150, 0.13),
    0 0 120px rgba(85, 203, 150, 0.2);
}

.hero-graphic-shell:hover .hero-graphic-core img,
.hero-graphic-shell.is-magnetized .hero-graphic-core img {
  transform: translate3d(var(--hero-logo-x), var(--hero-logo-y), 0) scale(1.08) rotate(-2deg);
  filter: drop-shadow(0 0 25px rgba(85, 203, 150, 0.55));
}

.hero-graphic-shell:hover .hero-floating-badge {
  animation-play-state: paused;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 42%),
    rgba(7, 13, 11, 0.95);
  border-color: color-mix(in srgb, var(--badge-accent), transparent 35%);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.34), 0 0 34px color-mix(in srgb, var(--badge-accent), transparent 78%);
}

.hero-graphic-shell:hover .badge-1 {
  transform: translate(16px, -14px);
}

.hero-graphic-shell:hover .badge-2 {
  transform: translate(-16px, 12px);
}

.hero-graphic-shell:hover .badge-3 {
  transform: translate(12px, 18px);
}

/* Animations */
@keyframes rotateClockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes rotateCounter {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

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

@keyframes headerEntrance {
  from {
    opacity: 0;
    transform: translateY(-18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes navItemEntrance {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroTextEntrance {
  from {
    opacity: 0;
    transform: translateY(18px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes heroTitleEntrance {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.98);
    filter: blur(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes heroVisualEntrance {
  from {
    opacity: 0;
    transform: translate3d(26px, 18px, 0) scale(0.94);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}

@keyframes heroAtmosphereIn {
  from {
    opacity: 0;
    transform: scale(0.86);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes heroGridEntrance {
  from {
    opacity: 0;
    transform: translate(18px, -12px) rotate(-10deg) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translate(0, 0) rotate(-10deg) scale(1);
  }
}

@media (max-width: 992px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 4rem;
  }
  
  .hero-content {
    align-items: center;
  }
  
  .hero-slogan {
    justify-content: center;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .hero-graphic {
    order: -1; /* Display logo graphic at the top in mobile */
  }

  .hero-floating-badge.badge-1 {
    right: -2%;
  }

  .hero-floating-badge.badge-2 {
    left: -4%;
  }

  .hero-floating-badge.badge-3 {
    right: 12%;
    bottom: -5%;
  }
}

@media (max-width: 576px) {
  .hero-graphic-shell {
    width: min(320px, 76vw);
  }

  .hero-graphic-shell::before {
    inset: -32px;
  }

  .hero-floating-badge {
    padding: 0.65rem 0.85rem;
    font-size: 0.76rem;
    gap: 0.5rem;
  }

  .hero-floating-badge.badge-1 {
    top: 8%;
    right: -7%;
  }

  .hero-floating-badge.badge-2 {
    left: -8%;
    bottom: 10%;
  }

  .hero-floating-badge.badge-3 {
    right: 5%;
    bottom: -10%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .header,
  .logo,
  .nav-link,
  .nav-actions,
  .hero-glow-1,
  .hero-glow-2,
  .hero-grid,
  .hero-slogan,
  .hero-title,
  .hero-description,
  .hero-actions,
  .hero-graphic,
  .hero-graphic-circle,
  .hero-graphic-core,
  .hero-graphic-shell::before,
  .hero-orbit-ring.ring-inner,
  .hero-floating-badge,
  .story-chapter .story-content-box,
  .story-chapter .story-meta {
    animation: none;
    transition: none;
    opacity: 1;
    transform: none;
    filter: none;
  }
}

/* ==========================================================================
   ABOUT US - STORYTELLING LAYOUT (SOBRE NÓS)
   ========================================================================== */
.about-section {
  position: relative;
  overflow: hidden;
  background-color: var(--bg-secondary);
}

.about-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 5rem;
}

.about-header h2 span {
  display: block;
  font-size: 1.1rem;
  color: var(--brand-mint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* The vertical storytelling timeline */
.storytelling-container {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 0;
}

/* Core glowing neon track */
.storytelling-line {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 100%;
  background: var(--bg-tertiary);
  border-radius: var(--border-radius-full);
  z-index: 1;
}

.storytelling-line-progress {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 0; /* Animated via JS */
  background: var(--gradient-brand);
  border-radius: var(--border-radius-full);
  box-shadow: var(--glow-mint-sm);
  z-index: 2;
  transition: height 0.1s ease-out;
}

/* Individual chapters of the story */
.story-chapter {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  position: relative;
  margin-bottom: 6rem;
  z-index: 3;
}

.story-chapter .story-content-box,
.story-chapter .story-meta {
  opacity: 0;
  filter: blur(5px);
  transition:
    opacity 0.82s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.82s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.82s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform, filter;
}

.story-chapter .story-content-box {
  transform: translateY(24px) scale(0.985);
}

.story-chapter .story-meta {
  transform: translateX(18px);
  transition-delay: 0.08s;
}

.story-chapter:nth-child(even) .story-meta {
  transform: translateX(-18px);
}

.story-chapter.active .story-content-box,
.story-chapter.active .story-meta {
  opacity: 1;
  transform: translate(0, 0) scale(1);
  filter: blur(0);
}

.story-chapter:last-child {
  margin-bottom: 0;
}

.story-content-box {
  padding: 2.25rem;
  border-radius: var(--border-radius-lg);
  background: var(--bg-primary);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition:
    opacity 0.82s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.42s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.82s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.42s ease,
    box-shadow 0.42s ease,
    background 0.42s ease;
}

.story-content-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0%, rgba(85, 203, 150, 0.12) 48%, transparent 58%),
    radial-gradient(circle at 20% 0%, rgba(85, 203, 150, 0.08), transparent 42%);
  opacity: 0;
  transform: translateX(-18%);
  transition: opacity 0.42s ease, transform 0.58s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.story-content-box:hover {
  background:
    linear-gradient(145deg, rgba(85, 203, 150, 0.045), transparent 42%),
    var(--bg-primary);
  border-color: rgba(85, 203, 150, 0.34);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.18),
    0 0 28px rgba(85, 203, 150, 0.1);
}

.story-content-box:hover::before {
  opacity: 1;
  transform: translateX(0);
}

.story-chapter:nth-child(odd) .story-content-box:hover {
  transform: translate3d(6px, -8px, 0) scale(1.012);
}

.story-chapter:nth-child(even) .story-content-box:hover {
  transform: translate3d(-6px, -8px, 0) scale(1.012);
}

.story-content-box:hover .story-title {
  color: var(--brand-mint);
  transform: translateY(-1px);
}

.story-content-box:hover .story-desc,
.story-content-box:hover .value-item {
  transform: translateY(-1px);
}

.story-content-box:hover .value-icon {
  transform: scale(1.08);
  box-shadow: 0 0 18px rgba(85, 203, 150, 0.16);
}

.story-node {
  position: absolute;
  left: 50%;
  top: 30px;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 4px solid var(--brand-deep);
  box-shadow: var(--shadow-sm);
  z-index: 4;
  transition: all var(--transition-normal);
}

.story-chapter.active .story-node {
  border-color: var(--brand-mint);
  box-shadow: var(--glow-mint-sm);
  transform: translate(-50%, -50%) scale(1.25);
}

.story-chapter.active .story-node::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-mint);
}

/* Chapter positioning */
.story-chapter:nth-child(odd) .story-content-box {
  grid-column: 1;
}

.story-chapter:nth-child(odd) .story-meta {
  grid-column: 2;
  padding-left: 2rem;
  display: flex;
  align-items: center;
}

.story-chapter:nth-child(even) .story-content-box {
  grid-column: 2;
}

.story-chapter:nth-child(even) .story-meta {
  grid-column: 1;
  padding-right: 2rem;
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.story-date {
  font-family: var(--font-headings);
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--brand-sage);
  opacity: 0.4;
  transition: all var(--transition-normal);
}

.story-chapter.active .story-date {
  color: var(--brand-mint);
  opacity: 1;
  text-shadow: var(--glow-mint-sm);
}

.story-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  transition: color 0.32s ease, transform 0.32s ease;
}

.story-desc {
  color: var(--text-secondary);
  font-size: 0.98rem;
  transition: transform 0.32s ease;
}

/* Grid of values */
.values-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.value-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  transition: transform 0.32s ease;
}

.value-icon {
  background: rgba(85, 203, 150, 0.1);
  color: var(--brand-mint);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
  margin-top: 0.2rem;
  transition: transform 0.32s ease, box-shadow 0.32s ease;
}

@media (prefers-reduced-motion: reduce) {
  .story-content-box,
  .story-content-box::before,
  .story-title,
  .story-desc,
  .value-item,
  .value-icon {
    transition: none;
  }

  .story-chapter:nth-child(odd) .story-content-box:hover,
  .story-chapter:nth-child(even) .story-content-box:hover,
  .story-content-box:hover .story-title,
  .story-content-box:hover .story-desc,
  .story-content-box:hover .value-item,
  .story-content-box:hover .value-icon {
    transform: none;
  }
}

.value-item h4 {
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.value-item p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Responsive storytelling */
@media (max-width: 768px) {
  .storytelling-line {
    left: 20px;
    transform: none;
  }
  
  .storytelling-line-progress {
    left: 20px;
    transform: none;
  }
  
  .story-node {
    left: 20px;
    transform: translate(-50%, -50%);
  }
  
  .story-chapter.active .story-node {
    transform: translate(-50%, -50%) scale(1.1);
  }
  
  .story-chapter {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 4rem;
    padding-left: 45px;
  }
  
  .story-chapter:nth-child(odd) .story-content-box,
  .story-chapter:nth-child(even) .story-content-box {
    grid-column: 1;
  }
  
  .story-chapter:nth-child(odd) .story-meta,
  .story-chapter:nth-child(even) .story-meta {
    grid-column: 1;
    grid-row: 1;
    padding: 0;
    text-align: left;
    justify-content: flex-start;
  }
  
  .story-date {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }
  
  .values-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   FOOTER (RODAPÉ)
   ========================================================================== */
.footer {
  background: #060908;
  border-top: 1px solid var(--border-glass);
  padding: 80px 0 30px;
  position: relative;
  z-index: 5;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-brand .logo {
  font-size: 1.75rem;
}

.footer-slogan {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 320px;
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: var(--border-radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.social-link:hover {
  background: var(--brand-mint);
  color: #0a0f0d;
  transform: translateY(-3px);
  box-shadow: var(--glow-mint-sm);
  border-color: var(--brand-mint);
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.footer-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--brand-mint);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.contact-icon {
  color: var(--brand-mint);
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.contact-text strong {
  display: block;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-bottom {
  border-top: 1px solid rgba(85, 203, 150, 0.05);
  padding-top: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-legal-links {
  display: flex;
  gap: 2rem;
}

.footer-legal-links a:hover {
  color: var(--text-secondary);
}

@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
  }
  
  .footer-grid > *:last-child {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  
  .footer-grid > *:last-child {
    grid-column: span 1;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
  
  .footer-legal-links {
    justify-content: center;
    gap: 1.5rem;
  }
}

/* ==========================================================================
   TUITION & FAQ SECTION (MENSALIDADES E EXPLICAÇÕES)
   ========================================================================== */
.finance-section {
  background-color: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

.finance-container {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 4rem;
  align-items: start;
}

.finance-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 5rem;
}

.finance-header h2 span {
  display: block;
  font-size: 1.1rem;
  color: var(--brand-mint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* Tuition Table/List Card */
.tuition-card {
  padding: 2.5rem;
  border-radius: var(--border-radius-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.tuition-title {
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tuition-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.tuition-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(85, 203, 150, 0.05);
}

.tuition-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.tuition-item-info h4 {
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.tuition-item-info span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.tuition-price {
  text-align: right;
}

.tuition-value {
  font-family: var(--font-headings);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--brand-mint);
  display: block;
  line-height: 1;
}

.tuition-period {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Scholarship Box */
.scholarship-box {
  background: rgba(85, 203, 150, 0.04);
  border: 1px solid rgba(85, 203, 150, 0.15);
  border-radius: var(--border-radius-md);
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: start;
}

.scholarship-icon {
  color: var(--brand-mint);
  flex-shrink: 0;
}

.scholarship-text h5 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.scholarship-text p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* FAQ Accordion */
.faq-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-title {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.faq-item {
  border-radius: var(--border-radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  overflow: hidden;
  transform-origin: top center;
  transition:
    border-color var(--transition-normal),
    box-shadow var(--transition-normal),
    background var(--transition-normal),
    transform 0.34s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item:hover {
  transform: translateX(3px);
  border-color: rgba(85, 203, 150, 0.18);
}

.faq-trigger {
  width: 100%;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-primary);
  background: transparent;
  border: none;
  outline: none;
  transition: color var(--transition-fast);
}

.faq-trigger:hover {
  color: var(--brand-mint);
}

.faq-icon-arrow {
  color: var(--brand-mint);
  transition: transform var(--transition-normal);
  flex-shrink: 0;
}

.faq-item.active {
  background:
    linear-gradient(180deg, rgba(85, 203, 150, 0.045), transparent 70%),
    var(--bg-secondary);
  border-color: rgba(85, 203, 150, 0.25);
  box-shadow: var(--shadow-sm);
  animation: faqItemSettle 0.36s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.faq-item.active .faq-trigger {
  color: var(--brand-mint);
}

.faq-item.active .faq-icon-arrow {
  animation: faqArrowSettle 0.44s cubic-bezier(0.16, 1, 0.3, 1) both;
  transform: rotate(180deg);
}

.faq-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition:
    max-height 0.52s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.28s ease;
}

.faq-item.active .faq-content {
  opacity: 1;
}

.faq-content-inner {
  min-height: 0;
  overflow: hidden;
  padding: 0 1.5rem;
  transform: translateY(-6px);
  transition:
    padding 0.46s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.46s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item.active .faq-content-inner {
  padding-bottom: 1.5rem;
  transform: translateY(0);
  animation: faqAnswerReveal 0.46s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.faq-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.45rem;
}

@keyframes faqItemSettle {
  0% {
    transform: translateY(-2px) scale(0.992);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes faqArrowSettle {
  0% {
    transform: rotate(0deg) scale(0.86);
  }
  60% {
    transform: rotate(190deg) scale(1.08);
  }
  100% {
    transform: rotate(180deg) scale(1);
  }
}

@keyframes faqAnswerReveal {
  from {
    opacity: 0;
    transform: translateY(-8px);
    filter: blur(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@media (max-width: 992px) {
  .finance-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .faq-item,
  .faq-icon-arrow,
  .faq-content,
  .faq-content-inner {
    animation: none;
    transition: none;
    filter: none;
  }

  .faq-item:hover {
    transform: none;
  }
}
