/* ===================================================================
   HELIX Landing — Gate Fermé
   =================================================================== */

/* -- Layout -------------------------------------------------------- */
.landing-page {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* -- Background overlays ------------------------------------------ */
.landing-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    /* Dot pattern */
    background-image:
        radial-gradient(circle at 1px 1px, rgba(167, 139, 250, 0.06) 1px, transparent 0);
    background-size: 40px 40px;
}

.landing-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    /* Grid lines */
    background-image:
        linear-gradient(rgba(45, 212, 191, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(45, 212, 191, 0.015) 1px, transparent 1px);
    background-size: 80px 80px;
}

#particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* -- Gate container ------------------------------------------------ */
.landing-gate {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px;
}

/* -- Logo --------------------------------------------------------- */
.gate-logo {
    font-size: 48px;
    line-height: 1;
    text-shadow: 0 0 24px rgba(167, 139, 250, 0.5), 0 0 48px rgba(167, 139, 250, 0.2);
    animation: gatePulse 3s ease-in-out infinite, gateEntryFade 0.6s ease-out both;
}

/* -- Title -------------------------------------------------------- */
.gate-title {
    font-size: 52px;
    font-weight: 800;
    letter-spacing: 6px;
    background: linear-gradient(135deg, var(--violet), var(--teal));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gateEntryFade 0.6s ease-out 0.1s both;
}

/* -- Subtitle ----------------------------------------------------- */
.gate-subtitle {
    font-family: var(--mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--text-muted);
    animation: gateEntryFade 0.6s ease-out 0.2s both;
}

/* -- Form --------------------------------------------------------- */
.gate-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
    animation: gateEntryFade 0.6s ease-out 0.3s both;
}

/* -- Input wrapper (gradient border) ------------------------------ */
.gate-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    padding: 1px;
    border-radius: var(--radius);
    background: linear-gradient(var(--angle, 135deg), var(--violet), var(--teal));
    animation: gradientRotate 6s linear infinite;
    width: 320px;
}

@supports (background: paint(something)) {
    @property --angle {
        syntax: '<angle>';
        initial-value: 135deg;
        inherits: false;
    }
}

.gate-input-wrapper > .gate-prompt,
.gate-input-wrapper > input {
    /* Inner dark background */
    background: var(--bg);
}

.gate-input-wrapper > .gate-prompt {
    padding: 12px 0 12px 16px;
    border-radius: var(--radius) 0 0 var(--radius);
    font-family: var(--mono);
    font-size: 14px;
    color: var(--teal);
    user-select: none;
}

.gate-input-wrapper > input {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 16px 12px 4px;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-family: var(--mono);
    font-size: 14px;
    color: var(--teal);
    caret-color: var(--teal);
}

.gate-input-wrapper > input::placeholder {
    color: var(--text-muted);
    opacity: 0.5;
}

.gate-input-wrapper > input:focus {
    outline: none;
}

/* Focus visible on wrapper */
.gate-input-wrapper:focus-within {
    box-shadow: 0 0 16px rgba(45, 212, 191, 0.15);
}

/* -- Submit button ------------------------------------------------ */
.gate-btn {
    font-family: var(--mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-dim);
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 10px 32px;
    cursor: pointer;
    transition: var(--transition);
}

.gate-btn:hover {
    color: var(--teal);
    border-color: var(--teal);
    box-shadow: 0 0 16px rgba(45, 212, 191, 0.2);
}

/* -- Error message ------------------------------------------------ */
.gate-error {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--rose);
    animation: fadeIn 0.3s ease-out;
}

/* -- Footer ------------------------------------------------------- */
.gate-footer {
    position: absolute;
    bottom: 24px;
    left: 0;
    right: 0;
    text-align: center;
    font-family: var(--mono);
    font-size: 10px;
    color: var(--text-muted);
    opacity: 0.4;
    letter-spacing: 1px;
    z-index: 1;
}

/* -- Animations --------------------------------------------------- */
@keyframes gatePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.85; }
}

@keyframes gateEntryFade {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes gradientRotate {
    to { --angle: 495deg; }
}

@keyframes gateShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.gate-shake {
    animation: gateShake 0.4s ease-out;
}

/* -- Reduced motion ----------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .gate-logo,
    .gate-title,
    .gate-subtitle,
    .gate-form {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    .gate-input-wrapper {
        animation: none !important;
    }
    #particles {
        display: none;
    }
}

/* -- Responsive --------------------------------------------------- */
@media (max-width: 480px) {
    .gate-logo { font-size: 36px; }
    .gate-title { font-size: 36px; letter-spacing: 4px; }
    .gate-subtitle { font-size: 10px; letter-spacing: 3px; }
    .gate-input-wrapper { width: 280px; }
    .landing-gate { padding: 24px 16px; }
}
