/* ==========================================================================
   -- Base & Estructura General -------------------------------------------- 
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background-color: #FAF8F5;
  color: #1C1917;
  font-family: 'DM Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* -- Textura de grano sutil (Mantiene el acabado editorial sofisticado) -- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: .45;
}

/* ==========================================================================
   -- Tipografía y Enlaces ------------------------------------------------- 
   ========================================================================== */
.font-display { font-family: 'Cormorant Garamond', serif; }

.underline-anim {
  position: relative;
  text-decoration: none;
}
.underline-anim::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: currentColor;
  transition: width .35s ease;
}
.underline-anim:hover::after { width: 100%; }

/* ==========================================================================
   -- Componentes de Interfaz de Usuario (SaaS UI) ------------------------ 
   ========================================================================== */
nav {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(250,248,245,.85);
  border-bottom: 1px solid rgba(191,176,168,.2);
}

/* -- Hero & Fondos Dinámicos -- */
.hero-bg {
  background: linear-gradient(135deg, #FAF8F5 0%, #E7F7DC 45%, #EDE8DF 100%);
}
.hero-blob {
  position: absolute;
  border-radius: 60% 40% 70% 30% / 50% 60% 40% 50%;
  filter: blur(72px);
  opacity: .35;
  animation: morphBlob 12s ease-in-out infinite alternate;
}
@keyframes morphBlob {
  0%   { border-radius: 60% 40% 70% 30% / 50% 60% 40% 50%; }
  50%  { border-radius: 40% 60% 30% 70% / 60% 40% 60% 40%; }
  100% { border-radius: 70% 30% 50% 50% / 40% 70% 30% 60%; }
}

/* -- Tarjetas de Módulos del Software -- */
.service-card {
  background: #fff;
  border: 1px solid rgba(191,176,168,.28);
  border-radius: 1.5rem;
  box-shadow: 0 2px 24px rgba(191,176,168,.18), 0 1px 4px rgba(191,176,168,.1);
  transition: transform .3s ease, box-shadow .3s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(191,176,168,.28), 0 2px 8px rgba(191,176,168,.15);
}

/* -- Elementos Flotantes de la Aplicación -- */
.floating-badge {
  animation: floatBadge 4s ease-in-out infinite;
}
@keyframes floatBadge {
  0%, 100% { transform: translateY(0); }
  50%        { transform: translateY(-10px); }
}

/* ==========================================================================
   -- Botones y Acciones (CTA) --------------------------------------------- 
   ========================================================================== */
.btn-primary {
  background: #1C1917;
  color: #FAF8F5;
  border-radius: 9999px;
  padding: .85rem 2.2rem;
  font-family: 'DM Sans', sans-serif;
  font-size: .875rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: background .25s ease, transform .2s ease, box-shadow .25s ease;
  display: inline-block;
  cursor: pointer;
  border: none;
  text-decoration: none;
}
.btn-primary:hover {
  background: #3B3330;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(28,25,23,.22);
}

.btn-outline {
  border: 1.5px solid #1C1917;
  color: #1C1917;
  border-radius: 9999px;
  padding: .8rem 2rem;
  font-family: 'DM Sans', sans-serif;
  font-size: .875rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: all .25s ease;
  display: inline-block;
  cursor: pointer;
  background: transparent;
  text-decoration: none;
}
.btn-outline:hover {
  background: #1C1917;
  color: #FAF8F5;
  transform: translateY(-2px);
}

/* ==========================================================================
   -- Secciones Especiales (Marquee & Contenedores) ------------------------ 
   ========================================================================== */
.section-label {
  font-family: 'DM Sans', sans-serif;
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #BFB0A8;
}

/* Animación del banner infinito de funcionalidades */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Contenedor del simulador de la aplicación en el Hero */
.booking-container {
  background: linear-gradient(135deg, #fff 0%, #FAF8F5 100%);
  border: 1px solid rgba(191,176,168,.35);
  border-radius: 2rem;
  box-shadow: 0 4px 48px rgba(191,176,168,.2);
}

/* ==========================================================================
   -- Acordeón e Historial de Pasos (Onboarding / FAQ) ---------------------- 
   ========================================================================== */
.faq-card-container {
    width: 100%;
    max-width: 600px;
    margin: 40px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.faq-accordion {
    background-color: #FFFFFF;
    border: 1px solid rgba(28, 25, 23, 0.08);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    width: 100%;
}

.accordion-header {
    background-color: #FAF8F5; /* Tono crema uniforme con la marca */
    color: #1C1917;
    cursor: pointer;
    padding: 20px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-family: 'Cormorant Garamond', serif;
    font-size: 20px;
    font-weight: 500;
    letter-spacing: -0.01em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.accordion-header:hover {
    background-color: #EDE8DF; /* Cambio sutil al tono arena */
}

.accordion-icon {
    width: 16px;
    height: 16px;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%231C1917" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 10l5 5 5-5z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 10px;
}

.accordion-header.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease-in-out;
    background-color: #FFFFFF;
}

.faq-content {
    padding: 24px 20px 24px 44px;
}

.faq-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.faq-list li {
    margin-bottom: 20px;
    line-height: 1.6;
    position: relative;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: rgba(28, 25, 23, 0.85);
}

.faq-list li:last-child {
    margin-bottom: 0;
}

/* Línea de tiempo interactiva que muestra cómo funciona el SaaS */
.faq-list li::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 6px;
    width: 10px;
    height: 10px;
    background-color: #A5D68C; /* Uso del verde lima de acento tecnológico */
    border-radius: 50%;
    z-index: 2;
}

.faq-list li:not(:last-child)::after {
    content: '';
    position: absolute;
    left: -20px;
    top: 16px;
    width: 1px;
    height: calc(100% + 10px);
    background-color: rgba(28, 25, 23, 0.1);
    z-index: 1;
}

.faq-title {
    color: #1C1917;
    font-weight: 700;
    margin-right: 4px;
    display: inline;
}

/* ==========================================================================
   -- Adaptabilidad y Media Queries (Responsivo) --------------------------- 
   ========================================================================== */
@media (max-width: 767px) {
  .services-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: .5rem;
  }
  .services-scroll::-webkit-scrollbar { display: none; }
}

@media (max-width: 480px) {
    .accordion-header {
        font-size: 18px;
        padding: 16px;
    }
    .faq-content {
        padding: 20px 16px 20px 36px;
    }
}