/* CSS Variables & Theme */
:root {
  --bg-gradient: linear-gradient(
    116.565deg,
    #1a5f3f 0%,
    #2d8659 50%,
    #1f4d36 100%
  );
  --cta-gradient: linear-gradient(90deg, #4ade80, #22c55e);
  --primary: #22c55e;
  --secondary: #ff6b35;
  --text-main: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.8);
  --text-dark: #06402b;
  --card-bg: rgba(255, 255, 255, 0.1);
  --card-border: rgba(255, 255, 255, 0.2);
  --header-bg: #154d33;
  --footer-bg: #0c301f;
  --font-heading: "Poppins", sans-serif;
  --font-body: "Inter", sans-serif;
  --transition: all 0.3s ease;
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Prevent pure white/gray by ensuring body bg covers everything */
#main-content {
  flex: 1;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

a {
  color: var(--text-main);
  text-decoration: none;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.text-center {
  text-align: center;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: var(--text-dark);
  padding: 8px;
  z-index: 1000;
}
.skip-link:focus {
  top: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  padding: 0 32px;
  border-radius: 16px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-align: center;
}

.btn-primary {
  background: var(--cta-gradient);
  color: var(--text-dark);
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-large {
  padding: 0 48px;
  font-size: 1.125rem;
}

/* Glassmorphism Card (Simulated without blur) */
.glass-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  transition: var(--transition);
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

/* Device Mockup */
.device-mockup {
  border: 8px solid rgba(255, 255, 255, 0.15);
  border-radius: 36px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  position: relative;
  aspect-ratio: 0.5 / 1;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}

.device-mockup img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Header */
.site-header {
  background: var(--header-bg);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--text-main);
}

/* Navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 24px;
}

.nav-link {
  color: var(--text-muted);
  font-weight: 500;
  padding: 8px 0;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-main);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 101;
}

.hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-main);
  position: absolute;
  transition: var(--transition);
}

.hamburger-line:nth-child(1) {
  top: 0;
}
.hamburger-line:nth-child(2) {
  top: 11px;
}
.hamburger-line:nth-child(3) {
  top: 22px;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg);
  top: 11px;
}
.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}
.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg);
  top: 11px;
}

/* Page Transitions & Layout */
.page {
  display: none;
  animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Rule: First section hugs header, inner container padded */
.page > section:first-child {
  margin-top: 0;
  padding-top: 0;
}

.page > section:first-child .inner-pad,
.hero-section {
  padding-top: 60px;
  padding-bottom: 80px;
}

section {
  padding: 80px 0;
}

.section-header {
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 2.5rem;
  color: var(--primary);
}

.section-header p {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Hero Section */
.hero-container {
  display: flex;
  align-items: center;
  gap: 60px;
}

.hero-content {
  flex: 1;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 24px;
  font-size: 0.875rem;
  font-weight: 500;
}

.badge-logo {
  width: 20px;
  height: 20px;
  border-radius: 4px;
}

.hero-title {
  font-size: 3.5rem;
  margin-bottom: 24px;
}

.hero-desc {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 500px;
}

.hero-visual {
  flex: 1;
  position: relative;
  display: flex;
  justify-content: center;
}

.floating-card {
  position: absolute;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 16px 24px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  animation: float 6s ease-in-out infinite;
}

.card-1 {
  top: 10%;
  left: -10%;
  animation-delay: 0s;
}

.card-2 {
  bottom: 20%;
  right: -10%;
  animation-delay: 3s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}

/* App Experience Carousel */
.app-experience-section {
  background: rgba(0, 0, 0, 0.15);
}

.carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
}

.carousel-track-container {
  overflow: hidden;
  width: 100%;
}

.carousel-track {
  display: flex;
  gap: 32px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 20px 0;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-slide {
  flex: 0 0 calc(33.333% - 22px);
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.slide-title {
  font-size: 1.25rem;
  color: var(--primary);
  text-align: center;
}

.carousel-btn {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.carousel-btn:hover {
  background: var(--primary);
  color: var(--text-dark);
}

/* How it Works */
.steps-grid {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  gap: 24px;
}

.step-card {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 2;
}

.step-number {
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: var(--text-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  margin: 0 auto 24px;
}

.step-visual {
  border: 8px solid rgba(255, 255, 255, 0.15);
  border-radius: 36px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  position: relative;
  aspect-ratio: 0.5 / 1;
  width: 100%;
  max-width: 200px;
  margin: 0 auto 20px auto;
}

.step-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.step-title {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.step-desc {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.step-connector {
  flex: 0 0 40px;
  height: 2px;
  background: dashed 2px var(--card-border);
  margin-top: 20px;
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: var(--primary);
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* Profile Section */
.profile-container {
  display: flex;
  align-items: center;
  gap: 60px;
}

.profile-visual {
  flex: 1;
}

.profile-content {
  flex: 1;
}

.profile-content h2 {
  font-size: 2.5rem;
  margin-bottom: 24px;
}

.profile-content p {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.benefit-list {
  list-style: none;
}

.benefit-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 1.0625rem;
}

.benefit-list li::before {
  content: "✓";
  color: var(--primary);
  font-weight: bold;
}

/* Security Section */
.security-banner {
  background: linear-gradient(
    135deg,
    rgba(34, 197, 94, 0.1) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
  border-left: 4px solid var(--primary);
  text-align: center;
}

.security-content h2 {
  font-size: 2rem;
  margin-bottom: 16px;
}

.security-content p {
  color: var(--text-muted);
  max-width: 800px;
  margin: 0 auto 32px;
  font-size: 1.125rem;
}

.security-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

.sec-tag {
  background: rgba(0, 0, 0, 0.2);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.875rem;
  color: var(--primary);
}

/* FAQ */
.faq-accordion {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  padding: 0;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 24px;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-icon {
  color: var(--primary);
  font-size: 1.5rem;
  transition: var(--transition);
}

.faq-answer {
  padding: 0 24px;
  max-height: 0;
  opacity: 0;
  transition: all 0.3s ease;
}

.faq-answer p {
  color: var(--text-muted);
  padding-bottom: 24px;
}

.faq-item.active .faq-answer {
  max-height: 200px;
  opacity: 1;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

/* CTA Section */
.cta-section {
  padding-bottom: 120px;
}

.cta-section h2 {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.cta-section p {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 40px;
}

/* Sobre Nosotros Page */
.about-hero {
  background: rgba(0, 0, 0, 0.1);
}

.about-logo {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  margin: 0 auto 24px;
}

.about-hero h1 {
  font-size: 3.5rem;
  margin-bottom: 24px;
}

.about-lead {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 800px;
  margin: 0 auto;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.about-card h3 {
  color: var(--primary);
  font-size: 1.5rem;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 12px;
}

.about-list {
  list-style: none;
}

.about-list li {
  margin-bottom: 16px;
  color: var(--text-muted);
}

.about-list strong {
  color: var(--text-main);
}

.tech-split {
  display: flex;
  align-items: center;
  gap: 60px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 32px;
  padding: 48px;
}

.tech-text {
  flex: 1;
}

.tech-text h2 {
  font-size: 2.5rem;
  margin-bottom: 24px;
}

.tech-text p {
  font-size: 1.125rem;
  color: var(--text-muted);
}

.tech-visuals {
  flex: 1;
  display: flex;
  gap: 24px;
  justify-content: center;
}

.mini-mockup {
  max-width: 200px;
  border-width: 4px;
  border-radius: 24px;
}

.offset-mockup {
  margin-top: 40px;
}

/* Legal Pages */
.legal-wrapper {
  min-height: 60vh;
}

.legal-card {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px;
}

#legal-privacy,
#legal-terms {
  color: var(--text-muted);
}

#legal-privacy h2,
#legal-terms h2,
#legal-privacy h3,
#legal-terms h3 {
  color: var(--text-main);
  font-family: var(--font-heading);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

#legal-privacy p,
#legal-terms p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

#legal-privacy ul,
#legal-terms ul {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

#legal-privacy li,
#legal-terms li {
  margin-bottom: 0.5rem;
}

/* Footer */
.site-footer {
  background: var(--footer-bg);
  padding-top: 80px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 60px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.footer-name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-desc {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.footer-links-group h4 {
  color: var(--text-main);
  margin-bottom: 24px;
  font-size: 1.125rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 24px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .hero-container,
  .profile-container,
  .tech-split {
    flex-direction: column;
    text-align: center;
  }

  .hero-desc,
  .profile-content p,
  .tech-text p {
    margin-left: auto;
    margin-right: auto;
  }

  .floating-card {
    display: none;
  }

  .benefit-list li {
    justify-content: center;
  }

  .steps-grid {
    flex-direction: column;
    align-items: center;
  }

  .step-connector {
    width: 2px;
    height: 40px;
    margin: 10px 0;
  }

  .footer-container {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }

  .main-nav {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    height: calc(100vh - 80px);
    background: var(--header-bg);
    flex-direction: column;
    padding: 40px 24px;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
  }

  .main-nav.active {
    transform: translateX(0);
  }

  .nav-list {
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 32px;
    margin-bottom: 40px;
  }

  .nav-link {
    font-size: 1.25rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .about-hero h1 {
    font-size: 2.5rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .carousel-slide {
    flex: 0 0 calc(100% - 48px);
  }

  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand {
    align-items: center;
  }

  .tech-visuals {
    flex-direction: column;
    align-items: center;
  }

  .offset-mockup {
    margin-top: 0;
  }
}
