@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;800;900&family=Open+Sans:wght@400;600;700&display=swap');

:root {
  --background: 248 244 237;
  --foreground: 33 40 66;
  --card: 235 232 226;
  --card-foreground: 33 40 66;
  --primary: 33 40 66;
  --primary-foreground: 248 244 237;
  --success: 16 185 129;
  --error: 239 68 68;
  --warning: 245 158 11;
  --muted: 226 221 213;
  --muted-foreground: 75 83 115;
}

.dark {
  --background: 33 40 66;
  --foreground: 248 244 237;
  --card: 42 51 84;
  --card-foreground: 248 244 237;
  --primary: 248 244 237;
  --primary-foreground: 33 40 66;
  --muted: 47 57 90;
  --muted-foreground: 226 221 213;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: rgb(var(--background));
  color: rgb(var(--foreground));
  font-family: 'Open Sans', sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.font-heading {
  font-family: 'Montserrat', sans-serif;
}

.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;
}

/* Scroll Animations */
.fade-in-section {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  will-change: opacity, transform;
}

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

/* Glassmorphism utilities */
.glass {
  background: rgba(var(--background) / 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(var(--foreground) / 0.05);
}

.dark .glass {
  background: rgba(var(--background) / 0.75);
  border-bottom: 1px solid rgba(var(--foreground) / 0.05);
}

/* Progress bar animation */
@keyframes progressAnim {
  0% {
    width: 0;
  }

  100% {
    width: 35%;
  }
}

.animate-progress {
  animation: progressAnim 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Float animation for the card */
@keyframes floatSlow {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-12px);
  }

  100% {
    transform: translateY(0px);
  }
}

.float-slow {
  animation: floatSlow 6s ease-in-out infinite;
  will-change: transform;
}

/* Staggered hero reveal */
@keyframes heroReveal {
  from {
    opacity: 0;
    transform: translateY(30px);
    filter: blur(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.hero-reveal>* {
  opacity: 0;
  animation: heroReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-reveal>*:nth-child(1) {
  animation-delay: 0.1s;
}

.hero-reveal>*:nth-child(2) {
  animation-delay: 0.25s;
}

.hero-reveal>*:nth-child(3) {
  animation-delay: 0.4s;
}

.hero-reveal>*:nth-child(4) {
  animation-delay: 0.55s;
}

/* Timeline gigantic subtle numbers */
.timeline-giant-num {
  position: absolute;
  font-size: 280px;
  font-weight: 800;
  line-height: 1;
  font-family: 'Montserrat', sans-serif;
  color: rgb(var(--foreground));
  opacity: 0.035;
  z-index: 0;
  pointer-events: none;
  top: -80px;
  right: -20px;
  user-select: none;
}

.dark .timeline-giant-num {
  opacity: 0.025;
}

/* Subtle hovering features */
.hover-lift {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

.dark .hover-lift:hover {
  box-shadow: 0 1px 2px rgba(255, 255, 255, 0.06), 0 12px 30px rgba(0, 0, 0, 0.4);
}

.founder-signature-block {
  display: flex;
  flex-direction: row;
  align-items: flex-end; /* Alinha o bloco de texto pela base da circunferência */
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(var(--foreground) / 0.08);
  text-align: left;
}

.founder-portrait-frame {
  position: relative;
  width: 11.5rem; /* Dobro do diâmetro original de 5.75rem */
  height: 11.5rem;
  flex: 0 0 auto;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(var(--primary) / 0.12);
  background:
    radial-gradient(circle at 30% 25%, rgba(var(--warning) / 0.16), transparent 42%),
    linear-gradient(160deg, rgba(var(--card) / 0.94), rgba(var(--background) / 0.96));
  box-shadow: 0 18px 40px -26px rgba(0, 0, 0, 0.28);
}
.founder-portrait {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.02);
  transform-origin: 15% 8%; /* Ajusta sutilmente a origem do zoom para cima e para a esquerda */
  transform: scale(1.2); /* Zoom out proporcional de ~15% (reduzido de 1.4 para 1.2) */
  transition: filter 0.55s cubic-bezier(0.16, 1, 0.3, 1), transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.founder-portrait-frame:hover .founder-portrait,
.founder-portrait-frame:focus .founder-portrait,
.founder-portrait-frame:active .founder-portrait {
  filter: grayscale(0) contrast(1.04) saturate(1.03);
  transform: scale(1.25); /* Zoom interativo correspondente (reduzido de 1.45 para 1.25) */
}

.founder-portrait-frame:focus-visible {
  outline: 3px solid rgb(var(--primary));
  outline-offset: 4px;
}

.founder-portrait-frame:focus {
  outline: none;
}

@media (min-width: 1025px) {
  .founder-signature-block {
    margin-top: 2.25rem;
    padding-top: 1.75rem;
  }
}

/* FAQ Item smooth slide down */
details[open] summary ~ * {
  animation: slideDownFade 0.4s ease-in-out;
}

@keyframes slideDownFade {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

code {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.92em;
}

:where(main, section)[id] {
  scroll-margin-top: 6.5rem;
}

@media (max-width: 1024px) {
  .timeline-giant-num {
    font-size: 180px;
    top: -40px;
    right: 0;
  }
}

@media (max-width: 640px) {
  .timeline-giant-num {
    font-size: 120px;
    top: -16px;
    right: 8px;
  }

  .float-slow {
    animation-duration: 7.5s;
  }

  .founder-signature-block {
    max-width: 100%;
    gap: 1.25rem;
  }

  .founder-portrait-frame {
    width: 9rem;
    height: 9rem;
  }
}

@media (max-width: 480px) {
  .founder-signature-block {
    gap: 1rem;
  }

  .founder-portrait-frame {
    width: 7.5rem;
    height: 7.5rem;
  }
}

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

  .fade-in-section,
  .hero-reveal > *,
  .animate-progress,
  .float-slow,
  details[open] summary ~ *,
  .founder-portrait {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
  }
}
