/* ═══════════════════════════════════════════
   RimBomBang · Design System v3
   Tema claro · Cyan/Teal del logo
   Minimalista, profesional, exquisito
═══════════════════════════════════════════ */

/* ── Reset ── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Variables ── */
:root {
    /* Fondos */
    --bg-primary: #FAFBFC;
    --bg-secondary: #F0F4F8;
    --bg-dark: #0D1B2A;
    --bg-darker: #091520;
    --bg-card: #FFFFFF;
    --bg-card-hover: #F8FCFF;

    /* Colores de marca (del logo) */
    --brand-cyan: #00ABDF;
    --brand-teal: #0891B2;
    --brand-dark: #0D1B2A;
    --brand-light: #E0F7FA;
    --brand-lighter: #F0FBFF;

    /* Degradados */
    --gradient-brand: linear-gradient(135deg, #00ABDF, #0891B2);
    --gradient-brand-r: linear-gradient(135deg, #0891B2, #00ABDF);
    --gradient-subtle: linear-gradient(135deg, #E0F7FA, #F0F4F8);
    --gradient-text: linear-gradient(120deg, #00ABDF, #0891B2);
    --gradient-dark: linear-gradient(135deg, #0D1B2A, #1B3A4B);

    /* Texto */
    --text-primary: #0D1B2A;
    --text-secondary: #4A5568;
    --text-muted: #A0AEC0;
    --text-on-dark: #F4F4F4;
    --text-on-dark-2: #A0B4C8;

    /* Bordes */
    --border-light: rgba(0, 171, 223, 0.08);
    --border-medium: rgba(0, 171, 223, 0.18);
    --border-subtle: rgba(13, 27, 42, 0.06);
    --border-card: rgba(13, 27, 42, 0.08);

    /* Sombras */
    --shadow-xs: 0 1px 2px rgba(13, 27, 42, 0.04);
    --shadow-sm: 0 1px 3px rgba(13, 27, 42, 0.06), 0 1px 2px rgba(13, 27, 42, 0.04);
    --shadow-md: 0 4px 20px rgba(13, 27, 42, 0.08);
    --shadow-lg: 0 12px 40px rgba(13, 27, 42, 0.12);
    --shadow-xl: 0 20px 60px rgba(13, 27, 42, 0.15);
    --shadow-cyan: 0 4px 24px rgba(0, 171, 223, 0.15);
    --shadow-cyan-lg: 0 8px 40px rgba(0, 171, 223, 0.2);

    /* Tipografía */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-head: 'Space Grotesk', sans-serif;

    /* Forma */
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 24px;
    --radius-pill: 999px;

    /* Layout */
    --nav-h: 72px;
    --px: clamp(1.25rem, 5vw, 5rem);
    --max-w: 1200px;
    --max-w-narrow: 800px;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ── Tipografía ── */
h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-head);
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Textura de fondo sutil ── */
.bg-dots {
    background-image: radial-gradient(rgba(0, 171, 223, 0.04) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* ── Decorativos ── */
.deco-arc {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid var(--border-medium);
    pointer-events: none;
    opacity: 0.5;
}

.deco-line {
    position: absolute;
    height: 1px;
    background: var(--gradient-brand);
    pointer-events: none;
    opacity: 0.15;
}

.deco-dot-grid {
    position: absolute;
    background-image: radial-gradient(var(--brand-cyan) 1px, transparent 1px);
    background-size: 16px 16px;
    opacity: 0.06;
    pointer-events: none;
}

/* ════ BOTONES ════ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.6rem;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    line-height: 1;
    position: relative;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--gradient-brand);
    color: #fff;
    box-shadow: var(--shadow-cyan);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-cyan-lg);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1.5px solid var(--border-card);
}

.btn-ghost:hover {
    border-color: var(--brand-cyan);
    color: var(--brand-cyan);
    background: var(--brand-lighter);
}

.btn-nav {
    background: rgba(0, 171, 223, 0.15);
    border: 1.5px solid rgba(0, 171, 223, 0.35);
    color: var(--brand-cyan);
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
}

.btn-nav:hover {
    background: rgba(0, 171, 223, 0.25);
    box-shadow: 0 0 20px rgba(0, 171, 223, 0.2);
}

.btn-service {
    background: transparent;
    border: 1.5px solid var(--border-card);
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 0.65rem 1.25rem;
    margin-top: 1.25rem;
    width: 100%;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all 0.3s;
}

.btn-service:hover {
    border-color: var(--brand-cyan);
    color: var(--brand-cyan);
    background: var(--brand-lighter);
}

.btn-xl {
    padding: 1rem 2.5rem;
    font-size: 1.05rem;
}

/* ════ NAVEGACIÓN ════ */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--nav-h);
    background: rgba(13, 27, 42, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

#navbar.scrolled {
    background: rgba(13, 27, 42, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
}

.nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--px);
    height: 100%;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.brand-logo {
    height: 34px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.25rem;
    list-style: none;
    margin-left: auto;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-brand);
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: left;
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    transform: scaleX(1);
}

.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    margin-left: auto;
}

.burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 2px;
    transition: all 0.3s;
}

/* ════ SECCIONES COMUNES ════ */
section {
    padding: 7rem var(--px);
    max-width: var(--max-w);
    margin: 0 auto;
}

.section-full {
    max-width: none;
}

.section-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--brand-cyan);
    background: var(--brand-lighter);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-pill);
    padding: 0.3rem 0.9rem;
    margin-bottom: 1rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

.section-sub {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin: 0 auto;
    line-height: 1.75;
}

/* ── Dark section variant ── */
.section-dark {
    background: var(--bg-dark);
    color: var(--text-on-dark);
}

.section-dark .section-tag {
    background: rgba(0, 171, 223, 0.12);
    border-color: rgba(0, 171, 223, 0.25);
}

.section-dark .section-title,
.section-dark h2,
.section-dark h3,
.section-dark h4 {
    color: var(--text-on-dark);
}

.section-dark .section-sub,
.section-dark p {
    color: var(--text-on-dark-2);
}

/* ════ FOOTER ════ */
footer {
    background: var(--bg-dark);
    color: var(--text-on-dark);
    padding: 4rem var(--px) 0;
}

.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 3rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-brand p {
    color: var(--text-on-dark-2);
    font-size: 0.9rem;
    line-height: 1.6;
}

.brand-logo-footer {
    height: 40px;
    /* Invert logo for dark bg */
    filter: brightness(1.1);
}

.footer-socials {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.footer-socials a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-on-dark-2);
    transition: all 0.3s;
}

.footer-socials a:hover {
    border-color: var(--brand-cyan);
    color: var(--brand-cyan);
    background: rgba(0, 171, 223, 0.1);
}

.footer-col h5 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-on-dark);
    margin-bottom: 1.25rem;
    font-weight: 700;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.footer-col a {
    font-size: 0.88rem;
    color: var(--text-on-dark-2);
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--brand-cyan);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.5rem 0;
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--text-on-dark-2);
}

/* ════ WHATSAPP FLOTANTE ════ */
.wa-float {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 90;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.35);
    transition: all 0.3s;
    color: #fff;
}

.wa-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(37, 211, 102, 0.45);
}

.wa-tooltip {
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: var(--shadow-md);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.wa-float:hover .wa-tooltip {
    opacity: 1;
}

/* ════ REVEAL ANIMATIONS ════ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible,
.reveal-right.visible {
    opacity: 1;
    transform: translate(0);
}

/* ════ PAGE HERO (sub-pages) ════ */
.page-hero {
    padding: calc(var(--nav-h) + 4rem) var(--px) 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero .section-title {
    font-size: clamp(2.25rem, 4vw, 3.25rem);
}

.page-hero .section-sub {
    max-width: 600px;
}

/* ════ RESPONSIVE ════ */
@media (max-width: 900px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    :root {
        --nav-h: 64px;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: var(--nav-h);
        left: 0;
        right: 0;
        bottom: 0;
        background: #0d1b2a;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2.5rem;
        z-index: 9999;
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links li {
        list-style: none;
        text-align: center;
    }

    .nav-links a {
        font-size: 1.3rem;
        color: #ffffff !important;
        font-weight: 500;
        text-decoration: none;
    }

    .nav-links a:hover,
    .nav-links a.active {
        color: var(--accent) !important;
    }

    .burger {
        display: flex;
    }

    .btn-nav {
        display: none;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand {
        align-items: center;
    }

    .footer-socials {
        justify-content: center;
    }

    .footer-col ul {
        align-items: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    section {
        padding: 4rem var(--px);
    }
}