/* ===== Home / Immersive Hero Page ===== */

/* --- Full-page container --- */
.home-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 60px);
    padding: 48px 32px 32px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a0d03 30%, #03101c 70%, #0a0a0f 100%);
    -webkit-user-select: none;
    user-select: none;
}

/* Remove focus ring that Blazor puts on elements after navigation */
.home-greeting:focus,
.home-greeting:focus-visible,
.home-brand-tagline:focus,
.home-brand-tagline:focus-visible,
.home-hero-brand:focus,
.home-hero-brand:focus-visible,
.home-hero-glass:focus,
.home-hero-glass:focus-visible {
    outline: none;
    box-shadow: none;
}

/* ===== Immersive Background ===== */
.home-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* Mesh gradient overlay */
.home-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(240, 116, 0, 0.12), transparent),
        radial-gradient(ellipse 60% 80% at 80% 20%, rgba(0, 180, 255, 0.1), transparent),
        radial-gradient(ellipse 50% 60% at 50% 80%, rgba(240, 116, 0, 0.06), transparent);
    animation: pulse-glow 8s ease-in-out infinite;
}

/* Grid pattern overlay */
.home-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 30%, transparent 70%);
}

/* Floating shapes - home-specific positioning (reuse base .shape from login.css) */
.home-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.home-shapes .shape-1 {
    width: 400px;
    height: 400px;
    top: -120px;
    left: -80px;
}

.home-shapes .shape-2 {
    width: 320px;
    height: 320px;
    bottom: 8%;
    right: -60px;
}

.home-shapes .shape-3 {
    width: 180px;
    height: 180px;
    top: 40%;
    left: 10%;
}

.home-shapes .shape-4 {
    width: 120px;
    height: 120px;
    top: 12%;
    right: 20%;
}

.home-shapes .shape-5 {
    width: 240px;
    height: 240px;
    bottom: 20%;
    left: 55%;
}

/* Orbit container - larger for full-page context */
.home-orbit-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    z-index: 1;
}

.home-orbit-container .orbit-dot-1 {
    --orbit-radius: 260px;
}

.home-orbit-container .orbit-dot-2 {
    --orbit-radius: 190px;
}

.home-orbit-container .orbit-dot-3 {
    --orbit-radius: 300px;
}

/* ===== Hero Section ===== */
.home-hero {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: slideUp 0.6s ease-out both;
}

/* Greeting — outside the card */
.home-greeting {
    font-size: 28px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 16px;
    letter-spacing: -0.3px;
    line-height: 1.2;
    text-align: center;
}

/* Client logo pill — outside the card, below greeting */
.home-client-pill {
    background: rgba(255, 255, 255, 0.95);
    padding: 14px 22px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    margin-bottom: 24px;
}

.home-client-logo {
    display: block;
    max-width: 140px;
    max-height: 60px;
    object-fit: contain;
}

/* Glass card */
.home-hero-glass {
    background: transparent;
    border: none;
    border-radius: 24px;
    padding: 40px 44px;
    position: relative;
    overflow: hidden;
    width: 100%;
    text-align: center;
}

/* Gradient top edge */
.home-hero-glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #F07400, #00b4ff, transparent);
}

/* Inner glow removed — card is now transparent */
.home-hero-glass::after {
    display: none;
}

/* Subtitle — centered inside card */
.home-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.7;
    max-width: 620px;
    margin: 0 auto 28px;
}

/* Brand section: centered logo + tagline */
.home-hero-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
    padding-top: 4px;
}

.home-brand-logo {
    width: 200px;
    filter: drop-shadow(0 4px 20px rgba(240, 116, 0, 0.25));
    animation: float 6s ease-in-out infinite;
    transition: filter 0.3s ease;
}

.home-brand-tagline {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.35);
}

/* ===== Divider ===== */
.home-divider {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 900px;
    margin: 40px 0 36px;
    position: relative;
    z-index: 2;
    animation: slideUp 0.6s ease-out 0.1s both;
}

.home-divider-line {
    flex: 1;
    height: 1px;
}

.home-divider-line:first-child {
    background: linear-gradient(90deg, transparent, #F07400);
}

.home-divider-line:last-child {
    background: linear-gradient(90deg, #00b4ff, transparent);
}

.home-divider-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.35);
    white-space: nowrap;
}

/* ===== Platform Section ===== */
.home-platforms-section {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 900px;
    animation: slideUp 0.6s ease-out 0.15s both;
}

.home-platforms {
    display: flex;
    gap: 28px;
    justify-content: center;
    flex-wrap: nowrap;
}

/* ===== Platform Card ===== */
.platform-card {
    position: relative;
    border-radius: 20px;
    padding: 2px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideUp 0.6s ease-out both;
}

.platform-card:nth-child(1) { animation-delay: 0.2s; }
.platform-card:nth-child(2) { animation-delay: 0.3s; }
.platform-card:nth-child(3) { animation-delay: 0.4s; }

/* Border-only effect via mask (hollow ring) */
.platform-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: linear-gradient(135deg, #F07400, #ff9a3c, #00b4ff, #F07400);
    background-size: 200% 200%;
    animation: border-dance 3s linear infinite;
    padding: 2px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    z-index: 0;
}

.platform-card-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 18px;
    padding: 28px 44px;
    transition: all 0.4s ease;
    overflow: hidden;
}

/* Shimmer on hover */
.platform-card-inner::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent);
    transition: none;
}

.platform-card-img {
    width: 190px;
    height: auto;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: invert(1) hue-rotate(180deg) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

/* ===== Custom Tooltip (disabled cards only) ===== */
.platform-card-tooltip {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: linear-gradient(135deg, #F07400, #00b4ff);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 7px 18px;
    border-radius: 10px;
    white-space: nowrap;
    letter-spacing: 0.3px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    box-shadow: 0 4px 20px rgba(240, 116, 0, 0.3);
}

/* Small arrow pointing up */
.platform-card-tooltip::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: #F07400;
    border-radius: 2px;
}

.platform-disabled:hover .platform-card-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===== Enabled State ===== */
.platform-enabled:hover {
    transform: translateY(-8px);
}

.platform-enabled:hover::before {
    opacity: 1;
}

.platform-enabled:hover .platform-card-img {
    transform: scale(1.06);
    filter: invert(1) hue-rotate(180deg) drop-shadow(0 8px 24px rgba(240, 116, 0, 0.25));
}

.platform-enabled:active {
    transform: translateY(-4px) scale(0.98);
}

/* ===== Disabled State ===== */
.platform-disabled {
    cursor: not-allowed;
}

.platform-disabled .platform-card-inner {
    opacity: 0.35;
}

.platform-disabled .platform-card-img {
    filter: invert(1) hue-rotate(180deg) grayscale(0.8) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

.platform-card-overlay {
    position: absolute;
    inset: 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(4px);
    border-radius: 18px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 2;
}

.platform-disabled:hover .platform-card-overlay {
    opacity: 1;
}

.platform-card-overlay svg {
    opacity: 0.6;
}

/* ===== Footer ===== */
.home-footer {
    position: relative;
    z-index: 2;
    margin-top: auto;
    padding-top: 48px;
    animation: slideUp 0.6s ease-out 0.2s both;
}

.home-footer span {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: 0.5px;
}

/* ============================================================
   LIGHT MODE — full gradient background (light palette)
   ============================================================ */
.light-mode .home-page {
    background: linear-gradient(135deg, #f0f0f5 0%, #f5ece0 30%, #e0ecf5 70%, #f0f0f5 100%);
}

/* Mesh overlay — warmer tints for light bg */
.light-mode .home-bg::before {
    background:
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(240, 116, 0, 0.08), transparent),
        radial-gradient(ellipse 60% 80% at 80% 20%, rgba(0, 180, 255, 0.07), transparent),
        radial-gradient(ellipse 50% 60% at 50% 80%, rgba(240, 116, 0, 0.05), transparent);
}

/* Grid lines darker for light bg */
.light-mode .home-bg::after {
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
}

/* Shapes — use darker tints */
.light-mode .home-shapes .shape-1 {
    background: radial-gradient(circle, rgba(240, 116, 0, 0.1), transparent 70%);
}

.light-mode .home-shapes .shape-2 {
    background: radial-gradient(circle, rgba(0, 180, 255, 0.08), transparent 70%);
}

.light-mode .home-shapes .shape-3 {
    background: radial-gradient(circle, rgba(240, 116, 0, 0.07), transparent 70%);
}

.light-mode .home-shapes .shape-4 {
    background: radial-gradient(circle, rgba(0, 180, 255, 0.05), transparent 70%);
}

.light-mode .home-shapes .shape-5 {
    background: radial-gradient(circle, rgba(255, 154, 60, 0.06), transparent 70%);
}

/* Hero card — transparent in light mode too */
.light-mode .home-hero-glass {
    background: transparent;
}

/* Text — dark for light bg */
.light-mode .home-greeting {
    color: #1a1a2e;
}

.light-mode .home-subtitle {
    color: #555570;
}

/* Client logo pill — transparent on light bg */
.light-mode .home-client-pill {
    background: transparent;
    box-shadow: none;
}

/* Brand logo — original color in light mode (already dark) */
.light-mode .home-brand-logo {
    filter: drop-shadow(0 4px 20px rgba(240, 116, 0, 0.15));
}

.light-mode .home-brand-tagline {
    color: rgba(26, 26, 46, 0.35);
}

/* Divider — gradient is brand colors, works on both modes */

.light-mode .home-divider-label {
    color: rgba(26, 26, 46, 0.4);
}

/* Platform cards — light glass bg, no invert on images */
.light-mode .platform-card::before {
    background: transparent;
    /* mask inherited from base rule */
}

.light-mode .platform-card-inner {
    background: transparent;
}

.light-mode .platform-card-img {
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

.light-mode .platform-enabled:hover::before {
    opacity: 1;
}

.light-mode .platform-enabled:hover .platform-card-img {
    transform: scale(1.06);
    filter: drop-shadow(0 8px 24px rgba(240, 116, 0, 0.2));
}

.light-mode .platform-disabled .platform-card-img {
    filter: grayscale(0.8) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.08));
}

.light-mode .platform-card-overlay {
    background: rgba(255, 255, 255, 0.85);
    color: #1a1a2e;
}

.light-mode .platform-card-overlay svg {
    opacity: 0.5;
}

/* Orbit dots — slightly less glow on light bg */
.light-mode .home-orbit-container .orbit-dot-1 {
    box-shadow: 0 0 10px 3px rgba(240, 116, 0, 0.4), 0 0 30px 6px rgba(240, 116, 0, 0.12);
}

.light-mode .home-orbit-container .orbit-dot-2 {
    box-shadow: 0 0 8px 3px rgba(0, 180, 255, 0.35), 0 0 25px 5px rgba(0, 180, 255, 0.1);
}

.light-mode .home-orbit-container .orbit-dot-3 {
    box-shadow: 0 0 8px 2px rgba(255, 154, 60, 0.35), 0 0 22px 4px rgba(255, 154, 60, 0.1);
}

/* Footer */
.light-mode .home-footer span {
    color: rgba(26, 26, 46, 0.25);
}

/* ===== Responsive: Tablet ===== */
@media (max-width: 960px) {
    .home-page {
        padding: 36px 24px 24px;
    }

    .home-hero-glass {
        padding: 32px 28px;
    }

    .home-greeting {
        font-size: 24px;
    }

    .home-orbit-container {
        width: 400px;
        height: 400px;
    }

    .home-orbit-container .orbit-dot-1 { --orbit-radius: 170px; }
    .home-orbit-container .orbit-dot-2 { --orbit-radius: 120px; }
    .home-orbit-container .orbit-dot-3 { --orbit-radius: 195px; }

    .platform-card-inner {
        padding: 26px 36px 20px;
    }

    .platform-card-img {
        width: 160px;
    }

    .home-divider {
        margin: 32px 0 28px;
    }
}

/* ===== Responsive: Mobile ===== */
@media (max-width: 600px) {
    .home-page {
        padding: 28px 16px 20px;
    }

    .home-hero-glass {
        padding: 28px 20px;
    }

    .home-greeting {
        font-size: 22px;
    }

    .home-subtitle {
        font-size: 13px;
    }

    .home-brand-logo {
        width: 120px;
    }

    .home-brand-tagline {
        font-size: 10px;
        letter-spacing: 2px;
    }

    .home-platforms {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .platform-card-inner {
        padding: 24px 32px 20px;
    }

    .platform-card-img {
        width: 150px;
    }

    .home-orbit-container {
        display: none;
    }

    .home-shapes .shape-4,
    .home-shapes .shape-5 {
        display: none;
    }

    .home-divider {
        margin: 28px 0 24px;
        gap: 14px;
    }

    .home-divider-label {
        font-size: 10px;
        letter-spacing: 2px;
    }
}

/* ===== Responsive: Small Mobile ===== */
@media (max-width: 480px) {
    .home-page {
        padding: 20px 12px 16px;
    }

    .home-hero-glass {
        padding: 24px 16px;
        border-radius: 18px;
    }

    .home-greeting {
        font-size: 20px;
    }

    .home-client-pill {
        padding: 10px 16px;
    }

    .home-client-logo {
        max-width: 110px;
        max-height: 48px;
    }

    .home-brand-logo {
        width: 100px;
    }

    .platform-card-img {
        width: 130px;
    }

    .platform-card-inner {
        padding: 20px 24px 16px;
    }

    .home-shapes .shape-3 {
        display: none;
    }
}
