/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0c1244;
    --bg-card: rgba(16, 22, 78, 0.85);
    --accent: #e87a1e;
    --accent-hover: #f59432;
    --text-white: #ffffff;
    --border-gold: #d4881d;
    --font-heading: 'Bebas Neue', 'Impact', sans-serif;
    --font-body: 'DM Sans', 'Segoe UI', sans-serif;
    --card-radius: 18px;
    --ease-out-expo: cubic-bezier(.16, 1, .3, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-white);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* ===== BACKGROUND ATMOSPHERE ===== */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        radial-gradient(circle at 10% 80%, rgba(232, 122, 30, .12) 0%, transparent 50%),
        radial-gradient(circle at 85% 20%, rgba(232, 122, 30, .08) 0%, transparent 45%),
        radial-gradient(ellipse at 50% 0%, rgba(12, 18, 68, 1) 0%, transparent 60%);
}

/* Noise grain overlay */
.noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: .035;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* Industrial grid lines */
.grid-lines {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: .06;
    background-image:
        linear-gradient(rgba(212, 136, 29, .5) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212, 136, 29, .5) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* Spotlight effect */
.spotlight {
    position: fixed;
    top: -20%;
    left: 50%;
    width: 80vw;
    height: 60vh;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(ellipse at center, rgba(232, 122, 30, .07) 0%, transparent 70%);
    animation: spotlightPulse 6s ease-in-out infinite alternate;
}

@keyframes spotlightPulse {
    0% {
        opacity: .6;
        transform: translateX(-50%) scale(1);
    }

    100% {
        opacity: 1;
        transform: translateX(-50%) scale(1.15);
    }
}

/* Animated floating dots */
.dot {
    position: fixed;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0;
    pointer-events: none;
    z-index: 0;
    animation: floatDot 10s ease-in-out infinite;
}

.dot:nth-child(3) {
    width: 5px;
    height: 5px;
    left: 5%;
    top: 70%;
    animation-delay: 0s;
}

.dot:nth-child(4) {
    width: 7px;
    height: 7px;
    left: 15%;
    top: 40%;
    animation-delay: 2s;
}

.dot:nth-child(5) {
    width: 4px;
    height: 4px;
    left: 88%;
    top: 55%;
    animation-delay: 4s;
}

.dot:nth-child(6) {
    width: 6px;
    height: 6px;
    left: 75%;
    top: 80%;
    animation-delay: 1.5s;
}

.dot:nth-child(7) {
    width: 3px;
    height: 3px;
    left: 50%;
    top: 20%;
    animation-delay: 3.5s;
}

.dot:nth-child(8) {
    width: 5px;
    height: 5px;
    left: 30%;
    top: 85%;
    animation-delay: 5.5s;
}

@keyframes floatDot {

    0%,
    100% {
        opacity: 0;
        transform: translateY(0) scale(.7);
    }

    50% {
        opacity: .45;
        transform: translateY(-40px) scale(1);
    }
}

/* ===== HEADER ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 32px;
    background: rgba(18, 24, 80, .35);
    backdrop-filter: saturate(180%) blur(32px);
    -webkit-backdrop-filter: saturate(180%) blur(32px);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    animation: headerSlide .7s var(--ease-out-expo) both;
}

@keyframes headerSlide {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header__left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.header__tag {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: .7;
}

.header__title {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: .7;
}

.header__logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
}

.header__logo img {
    height: 38px;
    width: auto;
    filter: brightness(1.1);
}

.header__right {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
}

.header__systems {
    display: flex;
    align-items: center;
    gap: 6px;
}

.header__systems-label {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: .7;
}

.header__systems-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #f59432 0%, var(--accent) 50%, #d4681a 100%);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 8px;
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 1px;
    color: var(--text-white);
    text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
    box-shadow:
        0 4px 16px rgba(232, 122, 30, .35),
        0 0 20px rgba(232, 122, 30, .15),
        inset 0 1px 0 rgba(255, 255, 255, .2);
    transition: transform .3s ease, box-shadow .3s ease;
    animation: badgePulse 3s ease-in-out infinite;
}

.header__systems-count:hover {
    transform: scale(1.1);
    box-shadow:
        0 6px 24px rgba(232, 122, 30, .5),
        0 0 30px rgba(232, 122, 30, .25),
        inset 0 1px 0 rgba(255, 255, 255, .2);
}

@keyframes badgePulse {

    0%,
    100% {
        box-shadow: 0 4px 16px rgba(232, 122, 30, .35), 0 0 20px rgba(232, 122, 30, .15), inset 0 1px 0 rgba(255, 255, 255, .2);
    }

    50% {
        box-shadow: 0 4px 20px rgba(232, 122, 30, .5), 0 0 28px rgba(232, 122, 30, .25), inset 0 1px 0 rgba(255, 255, 255, .2);
    }
}

/* ===== MAIN GRID ===== */
.main {
    position: relative;
    z-index: 5;
    max-width: 1320px;
    margin: 0 auto;
    padding: 56px 40px 48px;
    flex: 1;
    width: 100%;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

/* ===== DIVIDER ===== */
.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 40px auto;
    max-width: 300px;
    opacity: 0;
    animation: fadeIn .6s var(--ease-out-expo) .55s forwards;
}

.divider__line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(212, 136, 29, .35) 50%, transparent 100%);
}

.divider__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px rgba(232, 122, 30, .5);
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* ===== CARD ===== */
.card {
    position: relative;
    border-radius: var(--card-radius);
    overflow: hidden;
    border: 1px solid rgba(212, 136, 29, .2);
    background: var(--bg-card);
    cursor: pointer;
    transition:
        transform .45s var(--ease-out-expo),
        box-shadow .45s ease,
        border-color .45s ease;
    /* entrance animation */
    opacity: 0;
    transform: translateY(40px) scale(.97);
    animation: cardIn .7s var(--ease-out-expo) forwards;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 24px 60px rgba(232, 122, 30, .15),
        0 0 0 1px rgba(232, 122, 30, .25),
        inset 0 1px 0 rgba(255, 255, 255, .05);
    border-color: var(--accent);
}

/* Staggered entrance delays */
.card:nth-child(1) {
    animation-delay: .08s;
}

.card:nth-child(2) {
    animation-delay: .18s;
}

.card:nth-child(3) {
    animation-delay: .28s;
}

.cards-row-2 .card:nth-child(1) {
    animation-delay: .42s;
}

.cards-row-2 .card:nth-child(2) {
    animation-delay: .52s;
}

@keyframes cardIn {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Corner glow */
.card::before {
    content: '';
    position: absolute;
    top: -1px;
    right: -1px;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle at 100% 0%, var(--accent) 0%, transparent 70%);
    opacity: 0;
    transition: opacity .45s ease;
    z-index: 3;
    border-radius: 0 var(--card-radius) 0 0;
}

.card:hover::before {
    opacity: .5;
}

/* Bottom accent line */
.card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity .45s ease, left .45s ease, right .45s ease;
    z-index: 3;
}

.card:hover::after {
    opacity: .7;
    left: 5%;
    right: 5%;
}

/* Card image */
.card__image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 62%;
    overflow: hidden;
}

.card__image-wrapper img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .7s var(--ease-out-expo), filter .5s ease;
    filter: brightness(.9) saturate(1.05);
}

.card:hover .card__image-wrapper img {
    transform: scale(1.08);
    filter: brightness(1) saturate(1.1);
}

/* Cinematic overlay gradient */
.card__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, transparent 20%, rgba(12, 18, 68, .4) 50%, rgba(12, 18, 68, .92) 100%),
        linear-gradient(135deg, rgba(232, 122, 30, .05) 0%, transparent 50%);
    pointer-events: none;
    transition: background .5s ease;
}

/* Card content */
.card__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 24px 22px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

/* Category tag */
.card__tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    background: rgba(232, 122, 30, .15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(232, 122, 30, .25);
    border-radius: 20px;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--accent-hover);
    transition: background .3s ease, border-color .3s ease;
}

.card:hover .card__tag {
    background: rgba(232, 122, 30, .25);
    border-color: rgba(232, 122, 30, .4);
}

/* Card title */
.card__title {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 24px;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .6);
    line-height: 1.15;
}

/* Button */
.card__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 26px;
    background: var(--accent);
    color: var(--text-white);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: .5px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: background .3s ease, transform .3s ease, box-shadow .3s ease;
    box-shadow: 0 4px 18px rgba(232, 122, 30, .3);
}

/* Shimmer effect */
.card__btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, .2) 50%,
            transparent 100%);
    transition: none;
}

.card__btn:hover::before {
    animation: btnShimmer .6s ease forwards;
}

@keyframes btnShimmer {
    to {
        left: 100%;
    }
}

.card__btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(232, 122, 30, .45);
}

.card__btn svg {
    width: 15px;
    height: 15px;
    transition: transform .3s var(--ease-out-expo);
}

.card__btn:hover svg {
    transform: translateX(4px);
}

/* ===== SECOND ROW ===== */
.cards-row-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    max-width: 870px;
    margin: 0 auto;
}

/* ===== FOOTER ===== */
.footer {
    position: relative;
    z-index: 10;
    text-align: center;
    background-color: black;
    border-top: 1px solid rgba(212, 136, 29, .1);
    animation: fadeIn .8s var(--ease-out-expo) .7s both;
}

.footer__text {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .cards-row-2 {
        grid-template-columns: repeat(2, 1fr);
        max-width: 100%;
    }

    .main {
        padding: 40px 24px 40px;
    }
}

@media (max-width: 680px) {
    .header {
        padding: 14px 20px;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }

    .header__logo {
        position: static;
        transform: none;
        order: -1;
        width: 100%;
        justify-content: center;
    }

    .header__left {
        display: none;
    }

    .header__right {
        display: none;
    }

    .header__title {
        font-size: 18px;
    }

    .header__tag,
    .header__systems-label {
        font-size: 9px;
    }

    .header__logo img {
        height: 32px;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .cards-row-2 {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .main {
        padding: 24px 16px 32px;
    }

    .card__title {
        font-size: 20px;
    }

    .divider {
        margin: 28px auto;
    }
}

@media (max-width: 420px) {
    .header__left {
        flex-direction: column;
        align-items: center;
        gap: 2px;
    }

    .header__title {
        font-size: 20px;
    }

    .card__content {
        padding: 12px 16px 18px;
    }

    .card__btn {
        padding: 8px 20px;
        font-size: 12px;
    }

    .card__title {
        font-size: 18px;
        letter-spacing: 1px;
    }
}

/* ===== LAUNCH MODAL ===== */
.launch-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(8, 11, 38, 0.75);
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s var(--ease-out-expo);
}

.launch-modal.active {
    opacity: 1;
    pointer-events: all;
}

.launch-modal__content {
    position: relative;
    background: rgba(20, 26, 80, 0.4);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 48px 40px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    transform: translateY(20px) scale(0.98);
    transition: transform 0.6s var(--ease-out-expo), opacity 0.6s ease;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    opacity: 0;
}

.launch-modal.active .launch-modal__content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.launch-modal__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--text-white);
    margin-bottom: 4px;
    opacity: 0.9;
}

.launch-modal__tag {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

.launch-modal__title {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 28px;
    letter-spacing: -0.5px;
    color: var(--text-white);
    line-height: 1.2;
    margin-bottom: 0px;
}

.launch-modal__date {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    color: var(--accent);
    background: rgba(232, 122, 30, 0.1);
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid rgba(232, 122, 30, 0.2);
    margin-bottom: 12px;
}

.launch-modal__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 24px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-white);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.launch-modal__btn:hover {
    background: rgba(255, 255, 255, 1);
    color: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.15);
}

/* Modifier for disabled card */
.card--unavailable .card__image-wrapper img {
    filter: grayscale(0.8) brightness(0.7);
}

.card--unavailable:hover .card__image-wrapper img {
    filter: grayscale(0.6) brightness(0.8);
}

.card__btn--disabled {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: none;
    cursor: pointer;
}

.card__btn--disabled:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

.card__btn--disabled::before {
    display: none;
}