/* =====================================
   VARIABILI E COLORI
   ===================================== */
:root {
    --hub-bg: #090b10;
    --hub-bg-soft: #111723;
    --hub-card: #0f1621;
    --hub-line: #243247;
    --hub-text: #ecf1ff;
    --hub-muted: #9fb0cf;
    --hub-accent: #4fd1c5;
    --hub-accent-2: #f6c667;
    --hub-accent-3: #6ee7de;
    --hub-radius: 20px;
}

/* =====================================
   RESET E BASE
   ===================================== */
* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    color: var(--hub-text);
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 12% -10%, rgba(79, 209, 197, 0.15), transparent 40%),
        radial-gradient(circle at 100% 0%, rgba(246, 198, 103, 0.12), transparent 35%),
        linear-gradient(180deg, #080a0f 0%, #0b1119 44%, #0a0d14 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* =====================================
   HEADER / NAVBAR
   ===================================== */
.navbar-custom {
    border-bottom: 1px solid var(--hub-line);
    background: rgba(9, 11, 16, 0.7);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand-section {
    display: flex;
    align-items: center;
}

.brand-section a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.03em;
    transition: opacity 240ms ease;
}

.brand-section a:hover {
    opacity: 0.82;
}

.dot-accent {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    background: linear-gradient(140deg, var(--hub-accent), var(--hub-accent-2));
    box-shadow: 0 0 0 5px rgba(79, 209, 197, 0.13);
    display: inline-block;
}

.brand-text {
    color: var(--hub-text);
    display: inline;
}

.badge-custom {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--hub-line);
    color: var(--hub-muted);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    backdrop-filter: blur(6px);
}

/* =====================================
   HERO SECTION
   ===================================== */
.hero-section {
    padding: 2rem 1rem;
}

.hero-content {
    background:
        linear-gradient(155deg, rgba(79, 209, 197, 0.08), rgba(79, 209, 197, 0) 32%),
        linear-gradient(160deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0) 72%),
        var(--hub-bg-soft);
    border: 1px solid var(--hub-line);
    border-radius: var(--hub-radius);
    padding: clamp(1.5rem, 3vw, 3rem);
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.35);
}

.eyebrow {
    margin: 0 0 1rem;
    text-transform: uppercase;
    letter-spacing: 0.17em;
    font-size: 0.75rem;
    color: var(--hub-muted);
    font-weight: 500;
}

.hero-title {
    margin: 0 0 1.2rem;
    font-size: clamp(1.8rem, 5vw, 3rem);
    line-height: 1.1;
    font-weight: 700;
    color: var(--hub-text);
}

.hero-subtitle {
    margin: 0;
    color: var(--hub-muted);
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 65ch;
}

/* =====================================
   CARDS SECTION
   ===================================== */
.cards-section {
    padding: 2rem 1rem;
    position: relative;
}

.cards-section::before {
    content: "";
    position: absolute;
    left: 4%;
    right: 4%;
    top: 0;
    height: 220px;
    background:
        radial-gradient(circle at 20% 50%, rgba(79, 209, 197, 0.12), transparent 52%),
        radial-gradient(circle at 80% 20%, rgba(246, 198, 103, 0.1), transparent 50%);
    pointer-events: none;
    filter: blur(14px);
    opacity: 0.8;
}

.card-link {
    text-decoration: none;
    display: block;
    height: 100%;
    perspective: 1200px;
}

.cards-section .row > [class*="col-"] {
    animation: cardEnter 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cards-section .row > [class*="col-"]:nth-child(2) {
    animation-delay: 50ms;
}

.cards-section .row > [class*="col-"]:nth-child(3) {
    animation-delay: 100ms;
}

.cards-section .row > [class*="col-"]:nth-child(4) {
    animation-delay: 150ms;
}

.cards-section .row > [class*="col-"]:nth-child(5) {
    animation-delay: 200ms;
}

.cards-section .row > [class*="col-"]:nth-child(6) {
    animation-delay: 250ms;
}

.cards-section .row > [class*="col-"]:nth-child(7) {
    animation-delay: 300ms;
}

.cards-section .row > [class*="col-"]:nth-child(8) {
    animation-delay: 350ms;
}

.cards-section .row > [class*="col-"]:nth-child(9) {
    animation-delay: 400ms;
}

@keyframes cardEnter {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.card-custom {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem;
    border-radius: 16px;
    border: 1px solid var(--hub-line);
    background:
        linear-gradient(170deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0) 60%),
        var(--hub-card);
    transition:
        transform 440ms cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 440ms cubic-bezier(0.22, 1, 0.36, 1),
        border-color 320ms ease,
        background 450ms ease,
        filter 360ms ease;
    height: 100%;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    will-change: transform, box-shadow;
}

.card-custom::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(79, 209, 197, 0.1) 0%,
        rgba(246, 198, 103, 0.05) 100%);
    opacity: 0;
    transition: opacity 420ms ease;
    pointer-events: none;
    z-index: 0;
}

.card-custom::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: conic-gradient(
        from 220deg,
        rgba(79, 209, 197, 0.15),
        rgba(246, 198, 103, 0.18),
        rgba(79, 209, 197, 0.1),
        rgba(79, 209, 197, 0.15)
    );
    opacity: 0;
    transition: opacity 460ms ease;
    pointer-events: none;
    z-index: -1;
}

.card-custom > * {
    position: relative;
    z-index: 1;
}

.card-link:hover .card-custom {
    transform: translate3d(0, -10px, 0) rotateX(2deg) scale(1.01);
    border-color: rgba(110, 231, 222, 0.65);
    box-shadow:
        0 24px 48px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(79, 209, 197, 0.22),
        0 0 28px rgba(79, 209, 197, 0.18);
    filter: saturate(1.1);
}

.card-link:hover .card-custom::before {
    opacity: 1;
}

.card-link:hover .card-custom::after {
    opacity: 1;
}

.chip,
.card-title,
.card-description {
    transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1), color 300ms ease;
}

.card-link:hover .chip,
.card-link:focus-visible .chip {
    transform: translateY(-1px);
    color: #d8e5ff;
    border-color: rgba(110, 231, 222, 0.45);
}

.card-link:hover .card-title,
.card-link:focus-visible .card-title {
    transform: translateY(-1px);
    color: #f8fbff;
}

.card-link:hover .card-description,
.card-link:focus-visible .card-description {
    transform: translateY(-1px);
    color: #b5c5e4;
}

.card-link:focus-visible {
    outline: none;
}

.card-link:focus-visible .card-custom {
    transform: translate3d(0, -8px, 0);
    border-color: rgba(79, 209, 197, 0.75);
    box-shadow:
        0 0 0 2px rgba(79, 209, 197, 0.55),
        0 22px 45px rgba(0, 0, 0, 0.42);
}

.chip {
    width: fit-content;
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--hub-line);
    border-radius: 999px;
    color: var(--hub-muted);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(4px);
}

.chip.live {
    color: var(--hub-accent);
    border-color: rgba(79, 209, 197, 0.4);
    background: rgba(79, 209, 197, 0.08);
}

.card-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--hub-text);
    line-height: 1.3;
}

.card-description {
    margin: 0;
    color: var(--hub-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* =====================================
   FOOTER
   ===================================== */
.footer-section {
    border-top: 1px solid var(--hub-line);
    background: rgba(9, 11, 16, 0.5);
    backdrop-filter: blur(10px);
    margin-top: 3rem;
}

.footer-text {
    margin: 0;
    color: var(--hub-muted);
    font-size: 0.95rem;
}

/* =====================================
   RESPONSIVO
   ===================================== */
@media (max-width: 576px) {
    .hero-section {
        padding: 1.5rem 1rem;
    }

    .hero-content {
        padding: 1.5rem;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .cards-section {
        padding: 1.5rem 1rem;
    }

    .card-custom {
        padding: 1rem;
        transition-duration: 340ms;
    }

    .card-title {
        font-size: 1rem;
    }

    .card-description {
        font-size: 0.9rem;
    }
}

/* =====================================
   ANIMAZIONI AGGIUNTIVE
   ===================================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .cards-section .row > [class*="col-"] {
        animation: none !important;
    }
}
