/* ==========================================================
   TheForgeJA — Gateway Landing Page
   Premium dark aesthetic with glassmorphism + animations
   ========================================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
    --gw-bg: #020617;
    --gw-bg-secondary: #0F172A;
    --gw-text: #F8FAFC;
    --gw-text-muted: #94A3B8;
    --gw-gold: #FBBF24;
    --gw-gold-glow: rgba(251, 191, 36, 0.3);
    --gw-green: #22C55E;
    --gw-green-glow: rgba(34, 197, 94, 0.3);
    --gw-glass-bg: rgba(15, 23, 42, 0.6);
    --gw-glass-border: rgba(255, 255, 255, 0.08);
    --gw-blue: #3B82F6;
    --gw-blue-glow: rgba(59, 130, 246, 0.3);
    --gw-card-radius: 24px;
}

:root[data-theme="light"] {
    --gw-bg: #0F172A;
    --gw-bg-secondary: #1E293B;
    --gw-text: #F8FAFC;
    --gw-text-muted: #94A3B8;
    --gw-glass-bg: rgba(30, 41, 59, 0.6);
    --gw-glass-border: rgba(255, 255, 255, 0.12);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--gw-bg);
    color: var(--gw-text);
    min-height: 100vh;
    position: relative;
    display: block;
}

/* ---------- Animated Background ---------- */
.gateway-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.grid-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridDrift 20s linear infinite;
}

@keyframes gridDrift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

.floating-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: var(--gw-gold);
    opacity: 0;
    animation: floatParticle 8s ease-in-out infinite;
}

.particle:nth-child(even) {
    background: var(--gw-green);
}

@keyframes floatParticle {
    0%, 100% {
        opacity: 0;
        transform: translateY(0) scale(0.5);
    }
    50% {
        opacity: 0.6;
        transform: translateY(-80px) scale(1);
    }
}

/* ---------- Main Content ---------- */
.gateway-main {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 4rem 1.5rem;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
}

/* ---------- Brand ---------- */
.gateway-brand {
    margin-bottom: 3rem;
}

.gateway-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 20px var(--gw-gold-glow));
    animation: logoGlow 3s ease-in-out infinite alternate;
}

@keyframes logoGlow {
    from { filter: drop-shadow(0 0 15px var(--gw-gold-glow)); }
    to { filter: drop-shadow(0 0 30px var(--gw-gold-glow)); }
}

.gateway-title {
    font-size: clamp(2.5rem, 7vw, 4rem);
    font-weight: 800;
    background: linear-gradient(135deg, #FFFFFF 0%, var(--gw-gold) 50%, var(--gw-green) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.gateway-subtitle {
    font-size: clamp(1rem, 3vw, 1.25rem);
    color: var(--gw-text-muted);
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ---------- Portal Cards ---------- */
.portal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.portal-card {
    position: relative;
    background: var(--gw-glass-bg);
    border: 1px solid var(--gw-glass-border);
    border-radius: var(--gw-card-radius);
    padding: 2.5rem 2rem;
    text-decoration: none;
    color: var(--gw-text);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.portal-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.2);
}

.portal-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.tech-glow {
    background: radial-gradient(circle, var(--gw-green-glow) 0%, transparent 70%);
}

.trading-glow {
    background: radial-gradient(circle, var(--gw-gold-glow) 0%, transparent 70%);
}

.business-glow {
    background: radial-gradient(circle, var(--gw-blue-glow) 0%, transparent 70%);
}

.portal-card:hover .portal-glow {
    opacity: 1;
}

.tech-portal:hover {
    border-color: rgba(34, 197, 94, 0.3);
    box-shadow: 0 20px 60px rgba(34, 197, 94, 0.15), 0 0 0 1px rgba(34, 197, 94, 0.1);
}

.trading-portal:hover {
    border-color: rgba(251, 191, 36, 0.3);
    box-shadow: 0 20px 60px rgba(251, 191, 36, 0.15), 0 0 0 1px rgba(251, 191, 36, 0.1);
}

.business-portal:hover {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 20px 60px rgba(59, 130, 246, 0.15), 0 0 0 1px rgba(59, 130, 246, 0.1);
}

/* Portal Icon */
.portal-icon {
    position: relative;
    margin-bottom: 1.5rem;
}

.icon-main {
    font-size: 3.5rem;
    display: block;
    position: relative;
    z-index: 1;
}

.icon-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
    animation: ringPulse 3s ease-in-out infinite;
}

.tech-portal .icon-ring {
    border-color: rgba(34, 197, 94, 0.2);
}

.trading-portal .icon-ring {
    border-color: rgba(251, 191, 36, 0.2);
}

.business-portal .icon-ring {
    border-color: rgba(59, 130, 246, 0.2);
}

@keyframes ringPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.3); opacity: 0; }
}

/* Portal Content */
.portal-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.tech-portal .portal-title {
    background: linear-gradient(135deg, #FFFFFF, var(--gw-green));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.trading-portal .portal-title {
    background: linear-gradient(135deg, #FFFFFF, var(--gw-gold));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.business-portal .portal-title {
    background: linear-gradient(135deg, #FFFFFF, var(--gw-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.portal-desc {
    color: var(--gw-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 320px;
}

/* Feature Tags */
.portal-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.feature-tag {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--gw-text-muted);
    transition: all 0.3s ease;
}

.tech-portal:hover .feature-tag {
    border-color: rgba(34, 197, 94, 0.2);
    color: var(--gw-green);
}

.trading-portal:hover .feature-tag {
    border-color: rgba(251, 191, 36, 0.2);
    color: var(--gw-gold);
}

.business-portal:hover .feature-tag {
    border-color: rgba(59, 130, 246, 0.2);
    color: var(--gw-blue);
}

/* CTA Button */
.portal-cta {
    font-weight: 700;
    font-size: 1rem;
    padding: 0.75rem 2rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    margin-top: auto;
}

.tech-portal .portal-cta {
    background: linear-gradient(135deg, var(--gw-green), #16A34A);
    color: #FFFFFF;
}

.trading-portal .portal-cta {
    background: linear-gradient(135deg, var(--gw-gold), #F59E0B);
    color: #000000;
}

.business-portal .portal-cta {
    background: linear-gradient(135deg, var(--gw-blue), #2563EB);
    color: #FFFFFF;
}

.portal-card:hover .portal-cta {
    transform: translateX(4px);
}

.arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}

.portal-card:hover .arrow {
    transform: translateX(6px);
}

/* ---------- Auth Links ---------- */
.gateway-auth {
    margin-top: 2rem;
    margin-bottom: 4rem;
}

.auth-greeting {
    color: var(--gw-gold);
    font-weight: 600;
    font-size: 1.1rem;
}

.auth-link {
    color: var(--gw-text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.auth-link:hover {
    color: var(--gw-gold);
    background: rgba(251, 191, 36, 0.1);
}

.auth-register {
    color: var(--gw-gold);
    font-weight: 700;
}

.auth-divider {
    color: var(--gw-text-muted);
    opacity: 0.3;
    margin: 0 0.25rem;
}

/* ---------- Footer ---------- */
.gateway-footer {
    margin-top: 4rem;
    padding-bottom: 2rem;
    color: var(--gw-text-muted);
    font-size: 0.85rem;
    opacity: 0.6;
}

.footer-icon {
    width: 1.2em;
    height: 1.2em;
    vertical-align: middle;
    margin-right: 0.3em;
}

/* ---------- Animations ---------- */
.animate-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

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

/* ---------- Responsive ---------- */
/* ---------- Contact Section ---------- */
.gateway-contact {
    margin-top: 4rem;
    margin-bottom: 3rem;
}

.contact-glass {
    background: var(--gw-glass-bg);
    border: 1px solid var(--gw-glass-border);
    border-radius: var(--gw-card-radius);
    padding: 3rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.contact-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.contact-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #FFFFFF, var(--gw-gold));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.contact-header p {
    color: var(--gw-text-muted);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gw-text-muted);
    margin-bottom: 0.5rem;
    margin-left: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--gw-text);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.interest-chips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
    width: 100%;
}

.interest-chip {
    position: relative;
    cursor: pointer;
    display: block;
}

.interest-chip input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.interest-chip .chip-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--gw-text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.interest-chip:hover .chip-content {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--gw-text);
    transform: translateY(-2px);
}

.interest-chip input[type="radio"]:checked + .chip-content {
    background: rgba(34, 197, 94, 0.15);
    border-color: var(--gw-green);
    color: var(--gw-green);
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.2);
}

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

.form-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--gw-gold);
    box-shadow: 0 0 20px var(--gw-gold-glow);
}

.contact-submit {
    width: 100%;
    margin-top: 2rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--gw-gold), #F59E0B);
    border: none;
    border-radius: 12px;
    color: #000;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--gw-gold-glow);
}

.field-error {
    color: #EF4444;
    font-size: 0.8rem;
    margin-top: 0.4rem;
    display: block;
}

/* Success Message Area */
.success-message {
    text-align: center;
    padding: 2rem 0;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    animation: successBounce 1s ease infinite alternate;
}

@keyframes successBounce {
    from { transform: translateY(0); }
    to { transform: translateY(-10px); }
}

.btn-refresh {
    display: inline-block;
    margin-top: 2rem;
    color: var(--gw-gold);
    text-decoration: none;
    font-weight: 600;
    border: 1px solid var(--gw-gold);
    padding: 0.75rem 2.5rem;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.btn-refresh:hover {
    background: var(--gw-gold);
    color: #000;
}

@media (max-width: 1024px) {
    .portal-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .portal-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .portal-card {
        padding: 2rem 1.5rem;
    }

    .gateway-logo {
        width: 64px;
        height: 64px;
    }

    .gateway-main {
        padding: 1.5rem 1rem;
    }

    .icon-main {
        font-size: 2.5rem;
    }

    .portal-title {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .portal-desc {
        font-size: 0.85rem;
    }

    .feature-tag {
        font-size: 0.75rem;
        padding: 0.2rem 0.5rem;
    }
}

@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .form-group.full-width {
        grid-column: span 1;
    }
    .contact-glass {
        padding: 2rem 1.5rem;
    }
}


