/* ============================================
   QaskMe – Landing Page Styles
   ============================================ */

/* ---- Auth Overlay + Panel ---- */
.auth-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999;
    animation: fadeIn 0.2s ease;
}

.auth-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 92%;
    max-width: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem 1.75rem 1.75rem;
    z-index: 1000;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    animation: authPanelIn 0.3s ease;
}

@keyframes authPanelIn {
    from { opacity: 0; transform: translate(-50%, -48%) scale(0.96); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

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

.auth-close {
    position: absolute;
    top: 0.75rem;
    right: 0.85rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
    transition: color var(--transition);
}

.auth-close:hover {
    color: var(--text-primary);
}

.auth-panel-header {
    text-align: center;
    margin-bottom: 1.25rem;
}

.auth-logo {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.4rem;
}

.auth-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0;
}

/* ---- Auth Tabs ---- */
.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.auth-tab {
    flex: 1;
    padding: 0.65rem 1rem;
    font-family: var(--font);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
}

.auth-tab.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.auth-tab:hover:not(.active) {
    color: var(--text-primary);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

/* ---- Input with icon ---- */
.input-icon-wrap {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.input-with-icon {
    padding-left: 2.75rem !important;
}

.auth-form .input {
    font-size: 0.92rem;
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius-md);
}

.btn-auth {
    margin-top: 0.35rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
}

/* ---- Nav user state ---- */
.nav-user {
    align-items: center;
    gap: 0.75rem;
}

.nav-user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

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

/* ---- Hero (Join Event) ---- */
.hero {
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(37, 99, 235, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 70%, rgba(6, 182, 212, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 1.5rem 5rem;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(1.8rem, 5vw, 2.75rem);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 450px;
    margin-bottom: 2rem;
}

/* ---- Join code input (XL) ---- */
.join-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    max-width: 380px;
}

.join-code-xl {
    width: 100%;
    text-align: center;
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 10px;
    padding: 1.1rem 1.5rem;
    text-transform: uppercase;
    border-radius: var(--radius-lg);
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    font-family: var(--font);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.join-code-xl:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.join-code-xl::placeholder {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--text-muted);
}

.btn-join-xl {
    width: 100%;
    padding: 0.9rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: var(--radius-lg);
}

/* ---- Section ---- */
.section {
    padding: 4.5rem 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.section-alt {
    background: var(--bg-secondary);
    max-width: 100%;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.section-alt > * {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1rem;
}

.section-desc {
    text-align: center;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    font-size: 1rem;
    line-height: 1.7;
}

/* ---- Steps ---- */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
}

.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
    transition: all var(--transition);
}

.step-card:hover {
    border-color: var(--border-active);
    transform: translateY(-2px);
}

.step-number {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 28px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    color: white;
}

.step-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.step-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.step-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

/* ---- Features ---- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    transition: all var(--transition);
}

.feature-card:hover {
    border-color: var(--border-active);
    transform: translateY(-2px);
}

.feature-icon {
    font-size: 1.6rem;
    margin-bottom: 0.6rem;
}

.feature-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.feature-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ---- Organizers ---- */
.organizer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.organizer-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all var(--transition);
}

.organizer-item:hover {
    border-color: var(--border-active);
}

.organizer-item h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.organizer-item p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ---- CTA ---- */
.cta-section {
    text-align: center;
    padding: 5rem 1.5rem;
}

.cta-section .section-title {
    margin-bottom: 0.5rem;
}

.cta-actions {
    margin-top: 1.5rem;
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
    .hero-content {
        padding: 3rem 1rem 3.5rem;
    }
    .hero-title {
        font-size: 1.6rem;
    }
    .hero-subtitle {
        font-size: 0.95rem;
    }
    .join-code-xl {
        font-size: 1.5rem;
        letter-spacing: 6px;
        padding: 0.9rem 1rem;
    }
    .join-code-xl::placeholder {
        font-size: 0.9rem;
        letter-spacing: 3px;
    }
    .section-title {
        font-size: 1.4rem;
    }
    .section-desc {
        font-size: 0.9rem;
    }
    .features-grid,
    .organizer-grid {
        grid-template-columns: 1fr;
    }
    .login-form {
        flex-direction: column;
    }
}

/* ---- Light mode adjustments for landing ---- */
[data-theme="light"] .hero::before {
    background: radial-gradient(circle at 30% 30%, rgba(37, 99, 235, 0.06) 0%, transparent 50%),
                radial-gradient(circle at 70% 70%, rgba(6, 182, 212, 0.04) 0%, transparent 50%);
}

[data-theme="light"] .section-alt {
    background: var(--bg-secondary);
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme]) .hero::before {
        background: radial-gradient(circle at 30% 30%, rgba(37, 99, 235, 0.06) 0%, transparent 50%),
                    radial-gradient(circle at 70% 70%, rgba(6, 182, 212, 0.04) 0%, transparent 50%);
    }
}
