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

body {
  background-color: var(--bg-primary);
  overflow-x: hidden;
}

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

ul {
  list-style: none;
}

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

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 6rem 0;
}

.grid {
  display: grid;
  gap: 2rem;
}

/* Flex Utilities */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-1 {
  gap: 0.5rem;
}

.gap-2 {
  gap: 1rem;
}

.gap-3 {
  gap: 1.5rem;
}

.gap-4 {
  gap: 2rem;
}

.gap-6 {
  gap: 3rem;
}

.gap-8 {
  gap: 4rem;
}

/* Spacing Utilities */
.mb-0 {
  margin-bottom: 0;
}

.mb-2 {
  margin-bottom: 1rem;
}

.mb-4 {
  margin-bottom: 2rem;
}

.mb-6 {
  margin-bottom: 3rem;
}

.mb-8 {
  margin-bottom: 4rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mt-4 {
  margin-top: 2rem;
}

.mt-6 {
  margin-top: 3rem;
}

.mt-8 {
  margin-top: 4rem;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.w-100 {
  width: 100%;
}

.block {
  display: block;
}

.text-center {
  text-align: center;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem 2.5rem;
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  border-radius: 50px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-accent);
  color: var(--text-primary);
  box-shadow: 0 0 20px var(--accent-glow);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--accent-secondary) 0%, var(--accent-primary) 100%);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px var(--accent-glow);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  position: relative;
  padding-top: 6rem;
  padding-bottom: 2.5rem;
  background:
    linear-gradient(to top, rgba(10, 10, 10, 0.95) 0%, rgba(10, 10, 10, 0.5) 35%, transparent 65%),
    url('../images/hero_bg.png') center top / cover no-repeat;
  overflow: hidden;
}

.hero-content {
  max-width: 700px;
  text-align: center;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* App Mockups in Hero Background */
.bg-app-mockups {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.mockup-panel {
  position: absolute;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 1.5rem;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.panel-tl {
  top: 15%;
  left: -2%;
  width: 320px;
  opacity: 0.3;
  transform: rotate(-2deg);
}

.panel-bl {
  top: 55%;
  left: 3%;
  width: 300px;
  opacity: 0.25;
  transform: rotate(1deg);
}

.panel-r {
  top: 20%;
  right: -2%;
  width: 320px;
  height: 60%;
  opacity: 0.35;
  transform: rotate(2deg);
}

/* Internal mockup elements */
.mockup-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
}

.mockup-item,
.mockup-select {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mockup-option {
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.01);
}

.mockup-option.active {
  background: rgba(0, 123, 255, 0.05);
  border-color: rgba(0, 123, 255, 0.2);
}

.mockup-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  font-size: 0.9rem;
}

.block {
  display: block;
}

/* Utilitário extra se necessário */

@media (max-width: 1400px) {
  .panel-tl {
    left: -5%;
  }

  .panel-r {
    right: -5%;
  }
}

@media (max-width: 1024px) {
  .bg-app-mockups {
    display: none;
  }
}

.hero-content {
  max-width: 850px;
  margin: 0 auto;
  text-align: center;
  z-index: 2;
}

/* Cards & Glassmorphism */
.glass-card {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 2.5rem;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.glass-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-highlight);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

/* Animated Top Border Glow Effect */
.glass-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-secondary), var(--accent-primary), transparent);
  transition: left 0.6s ease;
}

.glass-card:hover::before {
  left: 100%;
}

/* Modules Grid & Full Image Cards */
.modules-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.module-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  /* Removed aspect-ratio to let image dictate height natively */
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  min-height: 350px;
  /* Fix for missing images */
}

.module-image-full {
  display: block;
  width: 100%;
  height: auto;
  min-height: 100%;
  object-fit: cover;
  z-index: 1;
  transition: transform 0.6s ease;
}

.module-card:hover .module-image-full {
  transform: scale(1.05);
}

.module-glass-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  background: rgba(10, 10, 10, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: background 0.3s ease;
}

.module-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  font-family: inherit;
}

.module-toggle-btn:focus {
  outline: none;
}

.module-content-collapsible {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  opacity: 0;
}

.module-card.is-open .module-content-collapsible {
  max-height: 400px;
  opacity: 1;
  transition: max-height 0.4s ease, opacity 0.4s ease;
}

.module-card.is-open .toggle-icon {
  transform: rotate(180deg);
}

.toggle-icon {
  transition: transform 0.3s ease;
  font-size: 0.9rem;
}

/* Darken image slightly when open for better text contrast */
.module-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 100%);
  z-index: 2;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.module-card.is-open::after {
  opacity: 1;
}

.module-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(0, 123, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-secondary);
  font-size: 1.5rem;
}

.module-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.module-list li::before {
  content: '✓';
  color: var(--accent-secondary);
  font-weight: bold;
}

/* Profile Section */
.profile-section {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.profile-grid {
  grid-template-columns: 1fr 1.5fr;
  align-items: center;
}

.profile-img-wrapper {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  transform: rotate(-2deg);
  transition: transform 0.4s ease;
}

.profile-img-wrapper:hover {
  transform: rotate(0deg);
}

.profile-img-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  box-shadow: inset 0 0 0 2px var(--border-highlight);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.profile-img-wrapper:hover::after {
  opacity: 1;
}

.profile-img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top center;
  background: var(--bg-tertiary);
  transition: transform 0.4s ease;
}

.profile-img-wrapper:hover .profile-img {
  transform: scale(1.05);
}

/* FAQ Section */
.faq-container {
  display: flex;
  flex-direction: column;
}

.faq-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem 0;
  transition: border-color 0.3s ease;
  background: transparent;
  border-radius: 0;
  opacity: 1 !important;
  transform: none !important;
}

.faq-item:first-child {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.faq-item:hover {
  background: transparent;
}

.faq-item.active {
  border-color: rgba(255, 255, 255, 0.2);
  background: transparent;
}


.faq-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.faq-btn .text-left {
  text-align: left;
  line-height: 1.4;
  color: var(--text-primary);
  font-size: 1.15rem;
  font-weight: 500;
  transition: color 0.3s ease;
  flex: 1;
  padding-right: 1rem;
}

.faq-btn:hover .text-left {
  color: var(--accent-primary);
}

.faq-item.active .faq-btn .text-left {
  color: var(--accent-primary);
}

.faq-icon {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  color: var(--accent-primary);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

.faq-item.active .faq-content {
  max-height: 150px;
  opacity: 1;
  transition: max-height 0.4s ease, opacity 0.4s ease;
}

/* Animations - Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.5, 0, 0, 1), transform 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Media Queries (Responsive) */
@media (max-width: 992px) {
  .profile-grid {
    grid-template-columns: 1fr;
    max-width: 600px;
    margin: 0 auto;
  }

  .profile-img-wrapper {
    transform: rotate(0);
    margin-bottom: 2rem;
    aspect-ratio: 4/3;
  }

  .profile-img {
    aspect-ratio: 4/3;
  }
}

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

  .hero {
    padding-top: 6rem;
    min-height: 100vh;
    padding-bottom: 2.5rem;
    background:
      linear-gradient(to top, rgba(10, 10, 10, 1) 0%, rgba(10, 10, 10, 0.9) 50%, rgba(10, 10, 10, 0.3) 80%, transparent 100%),
      url('../images/hero_bg_mobile.png') center center / 300% auto no-repeat;
    background-color: #0a0a0a;
  }

  .bg-app-mockups {
    display: none;
  }

  .btn {
    width: 100%;
    padding: 1.1rem 1.25rem;
    font-size: 0.85rem;
    white-space: normal;
    line-height: 1.2;
    min-width: 0 !important;
  }

  .modules-grid {
    grid-template-columns: 1fr;
  }

  .stats {
    flex-direction: column;
    gap: 1.5rem;
  }
}