/**
 * XVaultPro Portal - Gateway Page Styles
 * Modern glassmorphism design with tier selection
 */

/* ==================================================
   CONTAINER & LAYOUT
================================================== */

.gateway-container {
    min-height: 100vh;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    position: relative;
    overflow: hidden;
}

/* Ambient background gradient */
.gateway-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.gateway-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ==================================================
   HEADER
================================================== */

.gateway-header {
    text-align: center;
    margin-bottom: 48px;
}

.gateway-logo {
    margin-bottom: 24px;
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.gateway-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px 0;
    letter-spacing: -0.5px;
}

.gateway-title span {
    color: var(--vault-emerald);
    font-weight: 300;
}

.gateway-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0;
    max-width: 400px;
}

/* ==================================================
   TIER CARDS GRID
================================================== */

.tier-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    width: 100%;
    max-width: 900px;
}

@media (max-width: 900px) {
    .tier-cards-grid {
        grid-template-columns: 1fr 1fr;
    }

    .tier-card:last-child {
        grid-column: span 2;
        max-width: 320px;
        margin: 0 auto;
    }
}

@media (max-width: 600px) {
    .tier-cards-grid {
        grid-template-columns: 1fr;
    }

    .tier-card:last-child {
        grid-column: span 1;
        max-width: none;
    }
}

/* ==================================================
   TIER CARD
================================================== */

.tier-card {
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 32px 28px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    animation: cardEntrance 0.6s ease-out forwards;
}

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

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

.tier-card:hover {
    transform: translateY(-8px);
}

/* Card glow background on hover */
.tier-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
    z-index: 0;
}

.tier-card:hover::before {
    opacity: 1;
}

/* Tier-specific colors */
.tier-card.tier-free {
    border-color: var(--tier-free-border);
}

.tier-card.tier-free:hover {
    border-color: rgba(107, 114, 128, 0.5);
    box-shadow: var(--glow-free);
}

.tier-card.tier-free::before {
    background: radial-gradient(circle at center, rgba(107, 114, 128, 0.08) 0%, transparent 50%);
}

.tier-card.tier-pro {
    border-color: var(--tier-pro-border);
}

.tier-card.tier-pro:hover {
    border-color: rgba(16, 185, 129, 0.6);
    box-shadow: var(--glow-pro);
}

.tier-card.tier-pro::before {
    background: radial-gradient(circle at center, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
}

.tier-card.tier-enterprise {
    border-color: var(--tier-enterprise-border);
}

.tier-card.tier-enterprise:hover {
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: var(--glow-enterprise);
}

.tier-card.tier-enterprise::before {
    background: radial-gradient(circle at center, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
}

/* Featured/Recommended card */
.tier-card.featured {
    border-width: 2px;
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.08) 0%, var(--glass-bg) 100%);
}

/* ==================================================
   CARD BADGE
================================================== */

.tier-badge {
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 16px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 0 0 12px 12px;
    white-space: nowrap;
}

.tier-badge.recommended {
    background: linear-gradient(135deg, var(--vault-dark), var(--vault-emerald));
    color: #000;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

/* ==================================================
   CARD ICON
================================================== */

.tier-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.tier-icon svg {
    width: 32px;
    height: 32px;
}

.tier-card.tier-free .tier-icon {
    background: var(--tier-free-bg);
    color: var(--tier-free);
}

.tier-card.tier-pro .tier-icon {
    background: var(--tier-pro-bg);
    color: var(--tier-pro);
}

.tier-card.tier-enterprise .tier-icon {
    background: var(--tier-enterprise-bg);
    color: var(--tier-enterprise);
}

/* ==================================================
   CARD CONTENT
================================================== */

.tier-card-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.tier-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.tier-devices {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 16px 0;
}

/* ==================================================
   FEATURES LIST
================================================== */

.tier-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
    text-align: left;
    width: 100%;
}

.tier-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    padding-left: 4px;
}

.tier-features li svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.tier-card.tier-free .tier-features li svg {
    color: var(--tier-free);
}

.tier-card.tier-pro .tier-features li svg {
    color: var(--tier-pro);
}

.tier-card.tier-enterprise .tier-features li svg {
    color: var(--tier-enterprise);
}

/* ==================================================
   CARD ACTION
================================================== */

.tier-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: gap 0.3s;
    margin-top: auto;
}

.tier-action svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s;
}

.tier-card:hover .tier-action svg {
    transform: translateX(4px);
}

.tier-card.tier-free .tier-action {
    color: var(--tier-free-light);
}

.tier-card.tier-pro .tier-action {
    color: var(--tier-pro);
}

.tier-card.tier-enterprise .tier-action {
    color: var(--tier-enterprise-light);
}

/* ==================================================
   FOOTER
================================================== */

.gateway-footer {
    margin-top: 48px;
    text-align: center;
}

.gateway-footer p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 20px 0;
}

.gateway-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.gateway-links a {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.gateway-links a:hover {
    color: var(--vault-emerald);
}

/* ==================================================
   RESPONSIVE
================================================== */

@media (max-width: 600px) {
    .gateway-container {
        padding: 40px 16px;
    }

    .gateway-title {
        font-size: 26px;
    }

    .tier-card {
        padding: 28px 24px;
    }

    .tier-icon {
        width: 56px;
        height: 56px;
    }

    .tier-icon svg {
        width: 28px;
        height: 28px;
    }

    .tier-name {
        font-size: 20px;
    }

    .gateway-links {
        flex-direction: column;
        gap: 16px;
    }
}
