@font-face {
    font-family: 'BTOFont';
    src: url('/static/fonts/BTOFONT-Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'BTOFont';
    src: url('/static/fonts/BTOFONT-Bold.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}

:root {
    --hub-yellow: #EDB700;
    --hub-blue: #0052FF;
    --hub-cyan: #00D9FF;
    --hub-black: #000000;
    --hub-dark: #050510;
    --hub-white: #FFFFFF;
    --hub-gray: #9b9b9b;
    --hub-border: rgba(237, 183, 0, 0.25);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    font-family: 'BTOFont', 'Inter', system-ui, -apple-system, sans-serif;
    background: radial-gradient(ellipse at top, #060613 0%, var(--hub-black) 55%);
    color: var(--hub-white);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}

/* Grid overlay */
.grid-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image: 
        linear-gradient(rgba(0, 82, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 82, 255, 0.06) 1px, transparent 1px);
    background-size: 80px 80px;
    opacity: 0.25;
    mix-blend-mode: screen;
}

.noise-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Header */
.hub-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.8) 100%);
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    border-bottom: 1px solid rgba(237, 183, 0, 0.3);
}

.hub-nav {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0.875rem 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.hub-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--hub-white);
}

.hub-logo-wrap {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.hub-logo {
    height: 44px;
    width: auto;
    object-fit: contain;
}

.hub-sep {
    width: 1px;
    height: 36px;
    background: linear-gradient(to bottom, transparent, rgba(237, 183, 0, 0.6), transparent);
}

.hub-brand-text {
    font-family: 'BTOFont', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hub-menu {
    display: flex;
    align-items: center;
    gap: 2.75rem;
}

.hub-link {
    color: var(--hub-white);
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    position: relative;
    transition: color 0.3s ease;
}

.hub-link:hover {
    color: var(--hub-yellow);
}

.hub-link::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--hub-yellow), transparent);
    transition: width 0.4s ease;
}

.hub-link:hover::after {
    width: 100%;
}

.hub-actions {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.hub-btn {
    padding: 0.625rem 1.875rem;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 1px solid transparent;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.hub-btn-ghost {
    color: var(--hub-white);
    background: transparent;
    border-color: rgba(255, 255, 255, 0.3);
}

.hub-btn-ghost:hover {
    border-color: var(--hub-yellow);
    color: var(--hub-yellow);
}

.hub-btn-primary {
    background: linear-gradient(135deg, var(--hub-yellow) 0%, #ffcb00 100%);
    color: var(--hub-black);
    box-shadow: 0 10px 40px rgba(237, 183, 0, 0.25);
}

.hub-btn-primary:hover {
    box-shadow: 0 15px 60px rgba(237, 183, 0, 0.4);
    transform: translateY(-2px);
}

/* Hero */
.hub-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 160px 3rem 120px;
    overflow: hidden;
}

.hub-hero-bg {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 70% 30%, rgba(0, 82, 255, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse at 20% 80%, rgba(237, 183, 0, 0.12) 0%, transparent 55%),
        url('/static/img/bg/hero-bg.webp') center/cover no-repeat;
    opacity: 0.4;
    z-index: 0;
}

.hub-hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.98) 0%, rgba(0, 0, 0, 0.85) 40%, rgba(0, 0, 0, 0.7) 70%, transparent 100%);
    z-index: 1;
}

.hub-hero-content {
    position: relative;
    z-index: 2;
    max-width: 1500px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 5rem;
    align-items: center;
}

.hub-hero-text-block {
    animation: fadeUp 1.2s ease-out;
}

.hub-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    color: var(--hub-yellow);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 2rem;
}

.hub-hero-eyebrow::before {
    content: '';
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, var(--hub-yellow), transparent);
}

.hub-hero-title {
    font-family: 'BTOFont', sans-serif;
    font-size: clamp(3.5rem, 8vw, 6.5rem);
    font-weight: 700;
    line-height: 0.95;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin-bottom: 1.75rem;
}

.hub-hero-title-line {
    display: block;
}

.hub-hero-title-accent {
    background: linear-gradient(90deg, var(--hub-yellow) 0%, #ffcb00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hub-hero-lead {
    font-size: 1.35rem;
    color: var(--hub-white);
    margin-bottom: 1rem;
    max-width: 640px;
}

.hub-hero-desc {
    font-size: 1.05rem;
    color: var(--hub-gray);
    margin-bottom: 3rem;
    max-width: 600px;
    line-height: 1.9;
}

.hub-hero-ctas {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hub-hero-visual {
    position: relative;
    animation: fadeUp 1.2s ease-out 0.2s backwards;
}

.hub-hero-frame {
    position: relative;
    border: 1px solid rgba(237, 183, 0, 0.4);
    padding: 3rem;
    background: linear-gradient(135deg, rgba(10, 10, 20, 0.9) 0%, rgba(0, 0, 0, 0.95) 100%);
    overflow: hidden;
}

.hub-hero-frame::before,
.hub-hero-frame::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    border: 1px solid var(--hub-yellow);
    opacity: 0.5;
}

.hub-hero-frame::before {
    top: -1px;
    left: -1px;
    border-right: none;
    border-bottom: none;
}

.hub-hero-frame::after {
    bottom: -1px;
    right: -1px;
    border-left: none;
    border-top: none;
}

.hub-hero-frame-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hub-hero-frame-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.hub-hero-frame-logo {
    height: 70px;
    width: auto;
    object-fit: contain;
}

.hub-hero-frame-x {
    color: var(--hub-yellow);
    font-size: 2rem;
    font-weight: 700;
}

.hub-hero-frame-title {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 1rem;
    line-height: 1.8;
}

.hub-hero-frame-text {
    color: var(--hub-gray);
    line-height: 1.8;
}

/* Experience */
.hub-experience {
    position: relative;
    z-index: 1;
    padding: 120px 3rem 100px;
}

.hub-section-header {
    max-width: 1500px;
    margin: 0 auto 4rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
}

.hub-section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    color: var(--hub-yellow);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 1rem;
}

.hub-section-eyebrow::before {
    content: '';
    width: 40px;
    height: 1px;
    background: var(--hub-yellow);
}

.hub-section-title {
    font-family: 'BTOFont', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    text-transform: uppercase;
    font-weight: 700;
    line-height: 1.05;
}

.hub-section-subtitle {
    color: var(--hub-gray);
    max-width: 500px;
    font-size: 1.05rem;
}

.hub-carousel {
    max-width: 1700px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(237, 183, 0, 0.3);
}

.hub-carousel-track {
    display: flex;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hub-carousel-slide {
    min-width: 100%;
    position: relative;
    height: 75vh;
    min-height: 520px;
    max-height: 720px;
}

.hub-carousel-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hub-carousel-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.6) 40%, transparent 80%);
}

.hub-carousel-content {
    position: absolute;
    left: 8%;
    top: 50%;
    transform: translateY(-50%);
    max-width: 580px;
    z-index: 2;
}

.hub-carousel-kicker {
    display: inline-block;
    color: var(--hub-yellow);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 1.25rem;
}

.hub-carousel-title {
    font-family: 'BTOFont', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.05;
}

.hub-carousel-text {
    color: #d0d0d0;
    font-size: 1.05rem;
    line-height: 1.9;
}

.hub-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 64px;
    height: 64px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(237, 183, 0, 0.5);
    color: var(--hub-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.hub-carousel-nav:hover {
    background: var(--hub-yellow);
    color: var(--hub-black);
    border-color: var(--hub-yellow);
}

.hub-carousel-prev {
    left: 2rem;
}

.hub-carousel-next {
    right: 2rem;
}

.hub-carousel-dots {
    position: absolute;
    bottom: 2.5rem;
    left: 8%;
    display: flex;
    gap: 0.625rem;
    z-index: 10;
}

.hub-carousel-dot {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hub-carousel-dot.active {
    background: var(--hub-yellow);
    width: 36px;
}

/* Footer */
.hub-footer {
    position: relative;
    z-index: 1;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.98) 100%);
    border-top: 1px solid rgba(237, 183, 0, 0.3);
    padding: 70px 3rem 40px;
}

.hub-footer-content {
    max-width: 1500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.hub-footer-logos {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.hub-footer-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.hub-footer-sep {
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, transparent, rgba(237, 183, 0, 0.5), transparent);
}

.hub-footer-text {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.9rem;
}

.hub-footer-addr {
    color: var(--hub-gray);
    font-size: 0.9rem;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 1200px) {
    .hub-hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .hub-menu {
        display: none;
    }
}

@media (max-width: 968px) {
    .hub-nav {
        padding: 0.75rem 1.5rem;
    }
    .hub-hero {
        padding: 140px 1.5rem 100px;
    }
    .hub-experience {
        padding: 100px 1.5rem 80px;
    }
    .hub-section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .hub-carousel-slide {
        height: 65vh;
    }
    .hub-carousel-content {
        left: 5%;
        right: 5%;
        max-width: 90%;
    }
    .hub-carousel-nav {
        display: none;
    }
    .hub-carousel-dots {
        left: 5%;
    }
}

@media (max-width: 640px) {
    .hub-nav {
        padding: 0.625rem 1rem;
    }
    .hub-logo {
        height: 36px;
    }
    .hub-brand-text {
        font-size: 1rem;
    }
    .hub-hero {
        padding: 120px 1rem 80px;
    }
    .hub-hero-frame {
        padding: 2rem 1.5rem;
    }
    .hub-hero-frame-logo {
        height: 55px;
    }
    .hub-hero-ctas {
        flex-direction: column;
        width: 100%;
    }
    .hub-hero-ctas .hub-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
    .hub-experience {
        padding: 80px 1rem 70px;
    }
    .hub-carousel-slide {
        height: 58vh;
        min-height: 420px;
    }
    .hub-carousel-content {
        top: auto;
        bottom: 12%;
        transform: none;
    }
    .hub-footer {
        padding: 60px 1rem 30px;
    }
    .hub-footer-logo {
        height: 50px;
    }
    body {
        overflow-x: hidden;
    }
}

/* ===== Header móvil y escena Spline (ajustes de integración) ===== */

.hub-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    background: transparent;
    border: 1px solid rgba(237, 183, 0, 0.5);
    cursor: pointer;
    position: relative;
    color: var(--hub-white);
}

.hub-menu-toggle:focus-visible,
.hub-drawer-link:focus-visible,
.hub-btn:focus-visible,
.hub-link:focus-visible {
    outline: 2px solid var(--hub-yellow);
    outline-offset: 3px;
}

.hub-menu-toggle-bars,
.hub-menu-toggle-bars::before,
.hub-menu-toggle-bars::after {
    display: block;
    position: absolute;
    left: 50%;
    width: 18px;
    height: 2px;
    margin-left: -9px;
    background: currentColor;
    transition: transform 0.3s ease, background 0.3s ease;
    content: '';
}

.hub-menu-toggle-bars { top: 50%; margin-top: -1px; }
.hub-menu-toggle-bars::before { top: -6px; left: 0; margin: 0; }
.hub-menu-toggle-bars::after { top: 6px; left: 0; margin: 0; }

.hub-menu-toggle[aria-expanded="true"] .hub-menu-toggle-bars { background: transparent; }
.hub-menu-toggle[aria-expanded="true"] .hub-menu-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.hub-menu-toggle[aria-expanded="true"] .hub-menu-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

.hub-drawer {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 0.5rem 1.25rem 1.5rem;
    background: rgba(0, 0, 0, 0.97);
    border-bottom: 1px solid rgba(237, 183, 0, 0.3);
}

.hub-drawer[hidden] { display: none; }

.hub-drawer-link {
    display: flex;
    align-items: center;
    min-height: 48px;
    color: var(--hub-white);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hub-drawer-link:hover { color: var(--hub-yellow); }

.hub-drawer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.hub-drawer-actions .hub-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    text-align: center;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
}

.hub-hero-content > * { min-width: 0; }

.hub-hero-visual {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.hub-visual-title {
    font-family: 'BTOFont', sans-serif;
    font-size: clamp(1.9rem, 3.4vw, 2.9rem);
    font-weight: 700;
    line-height: 1.05;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    padding-bottom: 1rem;
    position: relative;
}

.hub-visual-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 64px;
    height: 3px;
    background: var(--hub-yellow);
}

.hub-spline {
    position: relative;
    width: 100%;
    height: clamp(340px, 52vh, 560px);
    border: 1px solid rgba(237, 183, 0, 0.3);
    background: radial-gradient(circle at 50% 40%, rgba(0, 82, 255, 0.18) 0%, #05050d 70%);
    overflow: hidden;
    isolation: isolate;
}

.hub-spline spline-viewer {
    display: block;
    width: 100%;
    height: 100%;
    background: transparent;
}

/* Tablets y móviles: menú hamburguesa, sin desbordamiento */
@media (max-width: 1200px) {
    .hub-actions { display: none; }
    .hub-menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .hub-menu { display: none; }
}

@media (max-width: 968px) {
    .hub-hero-content { gap: 2.5rem; }
    .hub-spline { height: clamp(300px, 46vh, 440px); }
}

@media (max-width: 640px) {
    .hub-nav { gap: 0.75rem; padding: 0.625rem 1rem; }
    .hub-brand { min-width: 0; gap: 0.625rem; }
    .hub-sep { height: 26px; }
    .hub-brand-text {
        font-size: 0.8rem;
        letter-spacing: 0.06em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .hub-logo { height: 30px; }
    .hub-hero { padding: 110px 1rem 70px; }
    .hub-visual-title { font-size: clamp(1.6rem, 8vw, 2.1rem); }
    .hub-spline { height: clamp(300px, 56vh, 420px); }
}

@media (max-width: 359px) {
    .hub-brand-text { display: none; }
    .hub-sep { display: none; }
}

/* Pie: logos que se ajustan en pantallas estrechas */
.hub-footer-logos { flex-wrap: wrap; justify-content: center; max-width: 100%; }

@media (max-width: 420px) {
    .hub-footer-logos { gap: 0.875rem; }
    .hub-footer-logo { height: 40px; max-width: 30vw; }
    .hub-footer-sep { height: 32px; }
}
