@font-face {
  font-family: Inter;
  src: url(/static/fonts/Inter.woff2);
}

:root {
    --bg-color: #0a0a0a;
    --text-color: #e0e0e0;
    /* --- CORRECCIÓN DE ACCESIBILIDAD --- */
    /* El púrpura anterior (#9f54ff) no pasaba el test de contraste. */
    /* Este nuevo púrpura (#A855F7) tiene mejor ratio y mantiene la estética. */
    --primary-color: #A855F7; /* Púrpura más vibrante y accesible */
    --primary-hover: #C084FC; /* Versión más clara para el hover */
    --card-bg: #1a1a1a;
    --font-huge: clamp(3rem, 12vw, 10rem);
    --font-body: 1.1rem;
    --font-family: 'Inter', sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    overflow-x: hidden;
}

/* --- Header --- */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 8%; /* Aumentado el padding para más espacio */
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.8) 0%, rgba(10, 10, 10, 0) 100%);
}

.logo {
    font-weight: 900;
    font-size: 1.5rem;
    text-decoration:none;
    color: var(--text-color);
}

.main-header nav a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 700;
    transition: color 0.3s ease;
}

nav a.cta-nav{
color: var(--bg-color);
}

.main-header nav a:hover {
    color: var(--primary-color);
}

.cta-nav {
    background-color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    color: var(--bg-color); /* Texto oscuro para mejor contraste sobre el púrpura */
    font-weight: 900;
}

.cta-nav:hover {
    background-color: var(--primary-hover);
    color: var(--bg-color);
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 4%;
    position: relative;
    overflow: hidden;
}

/* --- ESTILO PARA EL CANVAS --- */
#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-content {
    margin-top:4rem;
    max-width: 800px;
    z-index: 2; /* Asegura que el contenido esté sobre el canvas */
}

.huge-font {
    font-size: var(--font-huge);
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -4px;
}

.punch-line {
    color: var(--primary-color);
}

.hero-content p {
    max-width: 500px;
    margin: 2rem 0;
    font-size: var(--font-body);
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--bg-color); /* Texto oscuro para mejor contraste */
    font-weight: 900;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 50px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.cta-button:hover {
    background-color: var(--primary-hover);
    transform: scale(1.05);
}

/* --- Services Section --- */
.services-section {
    padding: 6rem 4%;
    text-align: center;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    margin-bottom: 4rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    text-align: left;
}

.service-card {
    background-color: var(--card-bg);
    padding: 2.5rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
}

.service-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* --- About Section --- */
.about-section {
    padding: 8rem 4%;
    text-align: center;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-content p {
    font-size: 1.3rem;
    margin-top: 2rem;
    line-height: 1.8;
}

/* --- CTA Section --- */
.cta-section {
    padding: 8rem 4%;
    text-align: center;
    background-color: var(--card-bg);
}

.cta-content p {
    font-size: var(--font-body);
    margin: 2rem 0;
}

.cta-button-final {
    display: inline-block;
    color: var(--primary-color);
    font-size: clamp(1.5rem, 5vw, 3rem);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.3s ease;
}

.cta-button-final:hover {
    color: var(--primary-hover);
}

/* --- Footer --- */
.main-footer {
    padding: 2rem 4%;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-color);
}

.is-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* --- Media Queries for Responsiveness --- */
@media (max-width: 850px) {
    .huge-font {
        letter-spacing: -2px;
    }
  .faq-question {
        font-size: 1.1em;
        padding: 1.2em 1.5em;
    }

    .faq-question::after {
        font-size: 1.5em;
    }

    .faq-answer {
        font-size: 0.95em;
        padding: 0 1.5em 1em 1.5em;
    }
.main-header {
        flex-direction: row; /* Cambio de columna a fila para alinear el logo y el ícono. */
        padding: 1rem 5%; /* Ajuste de padding para móviles. */
    }

    .main-header nav {
        margin-top: 0;
        display: none; /* Se oculta por defecto en móviles. */
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 0;
        left: 0;
        background-color: var(--card-bg);
        text-align: center;
        padding-top: 6rem;
        height: 100vh;
        transform: translateX(100%);
        transition: transform 0.5s ease-in-out;
    }
    .main-header nav a {
        margin: 1rem 0; /* Espaciado vertical entre los links del menú. */
    }
}

.comparison-section {
    padding: 6rem 4%;
    background-color: var(--bg-color);
}

.comparison-section .section-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.section-intro {
    max-width: 800px;
    margin: 0 auto 4rem auto;
    font-size: var(--font-body);
    color: var(--text-color);
    opacity: 0.9;
    line-height: 1.8;
}

.table-container {
    width: 100%;
    overflow-x: auto; /* Permite scroll horizontal en pantallas pequeñas */
    -webkit-overflow-scrolling: touch; /* Scroll suave en iOS */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    background-color: var(--card-bg);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 1rem;
}

th, td {
    padding: 1.25rem 1.5rem; /* Ajuste de padding */
    vertical-align: top;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

thead {
    background-color: rgba(26, 26, 26, 0.5); /* Un poco más oscuro que el fondo de la tarjeta */
}

th {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-color);
}

tbody tr {
    transition: background-color 0.3s ease;
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

td:first-child {
    font-weight: 700;
    color: var(--text-color);
    min-width: 180px; /* Ancho mínimo para la primera columna */
}

sup {
    font-size: 0.75em;
    vertical-align: super;
    margin-left: 2px;
    color: var(--primary-hover);
}

/* Destaca sutilmente la columna de GSO, que es el producto principal */
td:nth-child(3) {
    background-color: rgba(168, 85, 247, 0.05);
}

th:nth-child(3) {
    color: var(--primary-hover); /* Un tono ligeramente más brillante para el encabezado GSO */
}
/* Contenedor principal para cada animación */
.service-animation-container {
    width: 60px;
    height: 60px;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.service-animation {
    position: relative;
}

/* 1. Animación para GSO */
/* Un núcleo central (IA) que atrae información (partículas) */
.anim-gso {
    width: 20px;
    height: 20px;
    background-color: var(--primary-color);
    border-radius: 50%;
    animation: pulse-core 2s infinite ease-in-out;
}
.anim-gso::before, .anim-gso::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background-color: var(--text-color);
    border-radius: 50%;
    animation: orbit 2s infinite linear;
}
.anim-gso::before {
    top: -15px; left: 0;
}
.anim-gso::after {
    top: 0; left: 25px;
    animation-delay: -1s; /* Desfase de la animación */
}
@keyframes pulse-core {
    0%, 100% { transform: scale(1); box-shadow: 0 0 10px var(--primary-color); }
    50% { transform: scale(1.2); box-shadow: 0 0 20px var(--primary-hover); }
}
@keyframes orbit {
    from { transform: rotate(0deg) translateX(25px) rotate(0deg); }
    to   { transform: rotate(360deg) translateX(25px) rotate(-360deg); }
}

/* 2. Animación para SEO Semántico */
/* Una red de nodos interconectados que representa un grafo de conocimiento */
.anim-semantic {
    width: 100%; height: 100%;
}
.anim-semantic .node {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--text-color);
    border-radius: 50%;
    animation: node-fade 3s infinite ease-in-out;
}
.anim-semantic .node:nth-child(1) { top: 0; left: 25%; }
.anim-semantic .node:nth-child(2) { top: 75%; left: 0; animation-delay: -0.75s; }
.anim-semantic .node:nth-child(3) { top: 75%; left: 75%; animation-delay: -1.5s; }
.anim-semantic .node:nth-child(4) { top: 25%; left: 90%; animation-delay: -2.25s; }
.anim-semantic::before { /* Líneas de conexión */
    content: '';
    position: absolute;
    top: 15%; left: 32%;
    width: 65%; height: 65%;
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    opacity: 0.5;
    transform: rotate(45deg);
}
@keyframes node-fade {
    0%, 100% { background-color: var(--text-color); }
    50% { background-color: var(--primary-color); }
}

/* 3. Animación para Estrategia de Contenido */
/* Líneas de texto/datos fluyendo hacia un punto central (siendo procesadas) */
.anim-content {
    width: 40px;
    height: 40px;
    border-right: 2px solid var(--primary-color);
}
.anim-content .line {
    width: 100%;
    height: 4px;
    background-color: var(--text-color);
    margin-bottom: 8px;
    opacity: 0;
    animation: flow-in 2.5s infinite ease-out;
}
.anim-content .line:nth-child(2) { animation-delay: 0.3s; }
.anim-content .line:nth-child(3) { animation-delay: 0.6s; }
@keyframes flow-in {
    0% { transform: translateX(-100%); opacity: 0; }
    50% { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(0); opacity: 0; }
}

/* 4. Animación para Arquitectura de Información */
/* Capas de datos (BBDD) con un flujo de información subiendo (API/RAG) */
.anim-architecture {
    width: 40px; height: 40px;
}
.anim-architecture .layer {
    width: 100%;
    height: 5px;
    background-color: var(--text-color);
    border-radius: 2px;
    margin-bottom: 8px;
    opacity: 0.7;
}
.anim-architecture::after { /* Flujo de datos */
    content: '';
    position: absolute;
    bottom: 5px; left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 2px;
    animation: data-flow 2s infinite cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
@keyframes data-flow {
    0% { transform: translate(-50%, 0); height: 8px; }
    50% { transform: translate(-50%, -35px); height: 12px; }
    90%, 100% { transform: translate(-50%, -35px); height: 0; opacity: 0; }
}
/* FAQ Section (New Styles) */
.faq-section {
    padding: 80px 5%;
    background-color: var(--bg-color);
    text-align: center;
}

.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-heading {
    font-size: 2.5em;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1em;
}

.faq-intro {
    font-size: 1.1em;
    color: #555;
    margin-bottom: 3em;
}

.faq-item {
    background-color: #f9f9f9;
    border-radius: 12px;
    margin-bottom: 1.5em;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden; /* Important for details tag to hide overflow */
}

.faq-question {
    font-size: 1.3em;
    font-weight: 600;
    color: #1a1a1a;
    padding: 1.5em 2em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.3s ease;
    position: relative;
    user-select: none; /* Prevent text selection on click */
}

.faq-question:hover {
    background-color: #f0f0f0;
}

/* Styling the custom plus/minus icon */
.faq-question::after {
    content: '+';
    font-size: 2em; /* Large plus sign */
    font-weight: 300;
    color: #ff4500;
    transition: transform 0.3s ease;
    margin-left: 1em;
}

details[open] .faq-question::after {
    content: '−'; /* Minus sign when open */
    transform: rotate(180deg);
}

.faq-answer {
    padding: 1em 2em 1.5em 2em;
    text-align: left;
    color: #666;
    font-size: 1.05em;
    line-height: 1.7;
    animation: fadeIn 0.3s ease-out; /* Smooth fade in */
}
/* Contenedor del selector */
.lang{
  position:relative; margin-left:auto; /* empuja a la derecha */
}
.lang[open] > .lang-menu{ display:block; }

/* Botón (summary) */
.lang-toggle{
  list-style:none; /* Safari */
  display:flex; align-items:center; gap:.4rem;
  border:1px solid currentColor; background:transparent;
  padding:.4rem .6rem; border-radius:.5rem; cursor:pointer;
  user-select:none;
}
.lang-toggle::-webkit-details-marker{ display:none; } /* oculta triángulo default */
.caret{ line-height:1; }

/* Menú desplegable */
.lang-menu{
  display:none; /* oculto por defecto, se muestra con [open] arriba */
  position:absolute; right:0; top:calc(100% + .4rem);
  list-style:none; margin:0; padding:.25rem; min-width:12rem;
  border:1px solid #ddd; border-radius:.6rem; background:var(--bg-color);
  box-shadow:0 8px 24px rgba(0,0,0,.08); z-index:1000;
}
.lang-menu li a{
  display:block; padding:.55rem .75rem; text-decoration:none; color:inherit;
}
.lang-menu li a:hover, .lang-menu li a:focus{
 background:var(--text-color);color:var(--bg-color);outline:none;
}
