/* ===== RAWAINV — estilos globales ===== */

html { scroll-behavior: smooth; }

/* Tipografía institucional */
.font-display { font-optical-sizing: auto; letter-spacing: -0.015em; }
body { font-feature-settings: "cv05" 1, "ss01" 1; }
[data-count] { font-variant-numeric: tabular-nums; }

/* Kicker editorial — línea fina + etiqueta (lenguaje didáctico de secciones) */
.kicker {
    display: inline-flex; align-items: center; gap: 0.9em;
    font-size: 0.68rem; font-weight: 700;
    letter-spacing: 0.32em; text-transform: uppercase;
    color: #6d28d9;
}
.kicker::before { content: ""; width: 2.4rem; height: 1px; background: currentColor; opacity: 0.55; flex-shrink: 0; }
.kicker-light { color: #b9a4ff; }

/* Rejilla decorativa de fondo (hero oscuros) — versión sobria */
.hero-grid {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 52px 52px;
    mask-image: radial-gradient(ellipse 85% 75% at 50% 0%, black 25%, transparent 72%);
    -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 0%, black 25%, transparent 72%);
}

body { min-height: 100vh; display: flex; flex-direction: column; }
#main { flex: 1 0 auto; }

::selection { background: #8451f3; color: #fff; }

/* Tarjetas institucionales — hairlines, esquinas contenidas, sombra mínima */
.card-inst {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.card-inst:hover {
    border-color: #a78bfa;
    box-shadow: 0 12px 40px -18px rgba(13, 10, 26, 0.18);
    transform: translateY(-3px);
}
.card-inst:hover .card-rule { background: #8451f3; }
.card-rule { display: block; height: 2px; width: 2.2rem; background: #cbd5e1; border-radius: 2px; transition: background 0.3s ease; }

/* Filas de datos didácticas (infraestructura, especificaciones) */
.spec-row {
    display: flex; align-items: center; gap: 1.25rem;
    padding: 1.1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.spec-row:last-child { border-bottom: 0; }
.spec-num {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em;
    color: #b9a4ff; flex-shrink: 0; width: 2rem;
}

/* Navegación y enlaces */
a { text-underline-offset: 3px; }

/* Textura de puntos sutil para secciones claras */
.bg-dots {
    background-image: radial-gradient(rgba(13, 10, 26, 0.05) 1px, transparent 1px);
    background-size: 22px 22px;
}

/* Header al hacer scroll: sombra firme y discreta */
.site-header { transition: box-shadow 0.3s ease, border-color 0.3s ease; }
.site-header.scrolled {
    box-shadow: 0 12px 32px -18px rgba(13, 10, 26, 0.22);
    border-color: #e2e8f0;
}

/* Diagrama orbital del ecosistema (hero) — órbitas con guiones en movimiento lento */
.hero-orbit svg { width: 100%; height: auto; }
.orbit-dash {
    stroke-dasharray: 3 10;
    animation: orbit-flow 26s linear infinite;
}
.orbit-dash-slow { animation-duration: 44s; animation-direction: reverse; }
@keyframes orbit-flow { to { stroke-dashoffset: -400; } }
.orbit-node { transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: reduce) {
    .orbit-dash { animation: none; }
}

/* Animación de entrada por scroll */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
}

/* Dropdown de idioma */
#lang-menu.open { display: block; animation: fadeSlide 0.18s ease; }

/* Menú móvil */
#mobile-menu.open { display: block; animation: fadeSlide 0.2s ease; }

@keyframes fadeSlide {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Icono +/− del acordeón FAQ */
.faq-icon i { transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
details[open] .faq-icon i { transform: rotate(45deg); }
details summary::-webkit-details-marker { display: none; }

/* Barra de progreso de scroll */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: linear-gradient(90deg, #8451f3, #d946ef);
    z-index: 999;
    transition: width 0.1s linear;
}

/* Scrollbar discreta */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #f1f0f7; }
::-webkit-scrollbar-thumb { background: #c4b5fd; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #8451f3; }
