/* ========================================================================
   Consorcios.AI — Landing Page Design System + Styles
   Brand: Brand_Book.md | Copy: landing.md
   ======================================================================== */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600&family=Inter:wght@300;400;500;600;700&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Brand colours */
  --blue-core: #03449a;
  --blue-core-dark: #022d6b;
  --mint-accent: #8ef2b2;
  --mint-whisper: rgba(142, 242, 178, 0.08);
  --mint-whisper-solid: #f4fdf7;
  --slate-gray: #4a5568;
  --white: #ffffff;
  --gray-50: #f7fafc;
  --gray-100: #edf2f7;
  --gray-200: #e2e8f0;

  /* Typography */
  --font-heading: 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-logo: 'Fredoka', sans-serif;

  /* Spacing scale (rem) */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  /* Layout */
  --max-width: 1200px;
  --nav-height: 72px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.35s ease;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(3, 68, 154, 0.08);
  --shadow-md: 0 4px 12px rgba(3, 68, 154, 0.1);
  --shadow-lg: 0 8px 32px rgba(3, 68, 154, 0.12);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--slate-gray);
  background: var(--white);
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

/* ---------- Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-2xl) 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--blue-core);
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

h3 {
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 600;
}

p {
  max-width: 65ch;
}

.subtitle {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  color: var(--slate-gray);
  line-height: 1.7;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border: none;
  border-radius: 12px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--mint-accent);
  color: var(--blue-core);
  box-shadow: 0 4px 16px rgba(142, 242, 178, 0.35);
}

.btn-primary:hover {
  background: #7ae0a2;
  box-shadow: 0 6px 24px rgba(142, 242, 178, 0.45);
}

.btn-secondary {
  background: transparent;
  color: var(--blue-core);
  border: 2px solid var(--blue-core);
}

.btn-secondary:hover {
  background: rgba(3, 68, 154, 0.05);
}

.btn-large {
  padding: 1.125rem 2.75rem;
  font-size: 1.125rem;
  border-radius: 14px;
}

/* ========================================================================
   SECTION 1: Nav Bar
   ======================================================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: background var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.97);
  border-bottom-color: var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.nav__logo {
  height: 32px;
  width: auto;
}

.nav__links {
  display: flex;
  gap: var(--space-lg);
}

.nav__link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--slate-gray);
  transition: color var(--transition-fast);
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--mint-accent);
  transition: width var(--transition-normal);
  border-radius: 1px;
}

.nav__link:hover {
  color: var(--blue-core);
}

.nav__link:hover::after {
  width: 100%;
}

.nav__cta {
  padding: 0.625rem 1.5rem;
  font-size: 0.875rem;
  border-radius: 10px;
}

.nav__cta-mobile {
  display: none;
}

/* Mobile nav toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--blue-core);
  border-radius: 2px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

/* ========================================================================
   SECTION 2: Hero
   ======================================================================== */
.hero {
  padding-top: calc(var(--nav-height) + var(--space-xl));
  padding-bottom: var(--space-2xl);
  min-height: 85vh;
  display: flex;
  align-items: center;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.hero__badge {
  display: inline-block;
  padding: 0.375rem 1rem;
  background: var(--mint-whisper-solid);
  border: 1px solid rgba(142, 242, 178, 0.3);
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--blue-core);
  margin-bottom: var(--space-md);
  letter-spacing: 0.02em;
}

.hero__title {
  margin-bottom: var(--space-md);
}

.hero__subtitle {
  margin-bottom: var(--space-lg);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

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

.hero__mockup img {
  max-height: 560px;
  width: auto;
  border-radius: 24px;
  filter: drop-shadow(0 20px 40px rgba(3, 68, 154, 0.15));
  animation: float 6s ease-in-out infinite;
}

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

/* ========================================================================
   SECTION 3: Problem Agitation
   ======================================================================== */
.problem {
  background: var(--blue-core);
  color: var(--white);
}

.problem__header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--space-xl);
}

.problem__header h2 {
  color: var(--white);
}

.problem__header p {
  max-width: 100%;
  color: rgba(255, 255, 255, 0.9);
}

.problem__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.problem__card {
  background: var(--white);
  border-radius: 16px;
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  text-align: center;
}

.problem__card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.problem__card-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-md);
  color: var(--blue-core);
}

.problem__card h3 {
  margin-bottom: var(--space-xs);
}

.problem__card p {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--slate-gray);
  margin: 0 auto;
}

/* ========================================================================
   SECTION 4: Features (Z-layout)
   ======================================================================== */
.features__header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
  margin-bottom: var(--space-xl);
}

.feature:nth-child(even) {
  direction: rtl;
}

.feature:nth-child(even) > * {
  direction: ltr;
}

.feature:last-child {
  margin-bottom: 0;
}

.feature__content h3 {
  margin-bottom: var(--space-sm);
}

.feature__content p {
  font-size: 1.0625rem;
  line-height: 1.7;
}

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

.feature__img {
  width: 100%;
  max-width: 480px;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
}

/* ========================================================================
   SECTION 5: Stepper (How it works)
   ======================================================================== */
.stepper {
  background: var(--white);
}

.stepper__header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.stepper__subtitle {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  font-weight: 700;
  color: var(--slate-gray);
  margin-top: 0.25rem;
}

.stepper__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}

/* Connector line */
.stepper__grid::before {
  content: '';
  position: absolute;
  top: 28px;
  left: calc(12.5% + 28px);
  right: calc(12.5% + 28px);
  height: 3px;
  background: var(--gray-200);
  border-radius: 2px;
  z-index: 0;
}

.stepper__step {
  text-align: center;
  padding: 0 var(--space-sm);
  position: relative;
  z-index: 1;
}

.stepper__number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--blue-core);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 auto var(--space-md);
  transition: background var(--transition-normal), box-shadow var(--transition-normal);
}

.stepper__step.active .stepper__number {
  background: var(--mint-accent);
  color: var(--blue-core);
  box-shadow: 0 0 0 6px rgba(142, 242, 178, 0.25);
}

.stepper__title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--blue-core);
  margin-bottom: var(--space-xs);
}

.stepper__desc {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--slate-gray);
}

/* ========================================================================
   SECTION 6: Impact / Metrics
   ======================================================================== */
.impact {
  background: var(--blue-core);
  color: var(--white);
}

.impact__header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.impact__header h2 {
  color: var(--white);
}

.impact__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.impact__metric {
  text-align: center;
  padding: var(--space-lg);
}

.impact__number {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.impact__label {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
}

.impact__callout {
  border: none;
  border-radius: 16px;
  padding: var(--space-lg);
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.impact__callout strong {
  color: var(--blue-core);
}

.impact__callout p {
  max-width: 100%;
  color: var(--slate-gray);
  font-size: 1.0625rem;
  line-height: 1.7;
}

/* ========================================================================
   SECTION 7: FAQs
   ======================================================================== */
.faqs {
  background: var(--white);
}

.faqs__header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.faqs__list {
  max-width: 800px;
  margin: 0 auto;
}

.faq {
  border-bottom: 1px solid var(--gray-200);
}

.faq:first-child {
  border-top: 1px solid var(--gray-200);
}

.faq__question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--blue-core);
  text-align: left;
  gap: var(--space-sm);
  transition: color var(--transition-fast);
}

.faq__question:hover {
  color: var(--blue-core-dark);
}

.faq__icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  position: relative;
  transition: transform var(--transition-normal);
}

.faq__icon::before,
.faq__icon::after {
  content: '';
  position: absolute;
  background: var(--blue-core);
  border-radius: 2px;
  transition: transform var(--transition-normal);
}

.faq__icon::before {
  top: 50%;
  left: 4px;
  width: 16px;
  height: 2px;
  transform: translateY(-50%);
}

.faq__icon::after {
  top: 4px;
  left: 50%;
  width: 2px;
  height: 16px;
  transform: translateX(-50%);
}

.faq[aria-expanded="true"] .faq__icon::after {
  transform: translateX(-50%) rotate(90deg);
  opacity: 0;
}

.faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal), padding var(--transition-normal);
}

.faq__answer p {
  padding-bottom: var(--space-md);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--slate-gray);
  max-width: 100%;
}

/* ========================================================================
   SECTION 8: Footer CTA
   ======================================================================== */
.footer {
  background: var(--blue-core);
  color: var(--white);
  text-align: center;
  padding: var(--space-2xl) 0 var(--space-lg);
}

.footer__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-md);
}

.footer__icon svg path {
  fill: var(--white);
}

.footer__icon svg circle {
  fill: var(--mint-accent);
}

.footer h2 {
  color: var(--white);
  margin-bottom: var(--space-sm);
}

.footer .subtitle {
  color: rgba(255, 255, 255, 0.85);
  max-width: 600px;
  margin: 0 auto var(--space-lg);
}

.footer__cta {
  margin-bottom: var(--space-2xl);
}

.footer__links {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer__links a:hover {
  color: var(--mint-accent);
}

.footer__tagline {
  font-style: italic;
  color: rgba(255, 255, 255, 0.4);
}

/* ========================================================================
   Scroll Animations
   ======================================================================== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================================================
   Responsive
   ======================================================================== */
@media (max-width: 1024px) {
  .hero__grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

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

  .hero__actions {
    justify-content: center;
  }

  .hero__mockup img {
    max-height: 420px;
  }

  .problem__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .feature:nth-child(even) {
    direction: ltr;
  }

  .feature__content {
    text-align: center;
  }

  .feature__content p {
    margin: 0 auto;
  }

  .stepper__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }

  .stepper__grid::before {
    display: none;
  }
}

@media (max-width: 768px) {
  .nav__links {
    display: none;
  }

  .nav__cta {
    display: none;
  }

  .nav__toggle {
    display: flex;
  }

  /* Mobile menu */
  .nav__links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--white);
    padding: var(--space-md);
    gap: var(--space-sm);
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md);
  }

  /* Show CTA inside mobile menu */
  .nav__links.open .nav__cta-mobile {
    display: inline-flex;
    width: 100%;
    justify-content: center;
    margin-top: var(--space-xs);
  }

  .hero {
    min-height: auto;
    padding-top: calc(var(--nav-height) + var(--space-lg));
    padding-bottom: var(--space-xl);
  }

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

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

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

  .footer__links {
    flex-direction: column;
    align-items: center;
  }
}
