/* Landing page — uses color tokens from /public/assets/css/theme.css */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
}

body {
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    background: var(--stock-bg);
    color: var(--stock-text);
    overflow-x: hidden;
}

body.swal2-height-auto,
body.swal2-shown {
    height: 100% !important;
    padding-right: 0 !important;
}

html.swal2-shown,
html.swal2-height-auto {
    height: 100% !important;
}

a {
    text-decoration: none !important;
}

/* Loader */
.loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--stock-bg);
    transition: opacity 0.4s ease;
}

.loader-inner {
    text-align: center;
}

.loader-ring {
    width: 48px;
    height: 48px;
    border: 3px solid var(--stock-border);
    border-top-color: var(--stock-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
}

.loader-text {
    font-size: 0.85rem;
    color: var(--stock-muted);
    letter-spacing: 0.05em;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Background */
.page-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 70% 50% at 10% 0%, rgba(13, 122, 92, 0.07), transparent),
        radial-gradient(ellipse 50% 40% at 95% 100%, rgba(16, 51, 107, 0.06), transparent),
        linear-gradient(180deg, #ffffff 0%, var(--stock-bg) 100%);
}

.page-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 30%, black, transparent);
}

/* Layout */
.landing {
    position: relative;
    z-index: 1;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.landing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    min-height: 96px;
    background: var(--stock-surface);
    border-bottom: 1px solid var(--stock-border);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    line-height: 1.2;
    text-decoration: none;
}

.brand-logo-icon {
    height: 80px;
    width: auto;
    max-width: 280px;
    object-fit: contain;
    object-position: left center;
    flex-shrink: 0;
}
.header-pill {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--stock-muted);
    padding: 0.45rem 1rem;
    border: 1px solid var(--stock-border);
    border-radius: 999px;
    background: var(--stock-bg);
}

.header-pill i {
    color: var(--stock-primary);
    margin-right: 0.25rem;
}

.landing-main {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 400px;
    grid-template-areas:
        "hero login"
        "features login";
    gap: 2rem 3rem;
    align-items: start;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2.5rem 2rem 3rem;
}

.hero-content {
    grid-area: hero;
}

.features-section {
    grid-area: features;
}

/* Hero */
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--stock-accent);
    margin-bottom: 1rem;
}

.hero-eyebrow::before {
    content: '';
    width: 24px;
    height: 2px;
    background: var(--stock-accent);
    border-radius: 2px;
}

.hero-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.4rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin: 0 0 1rem;
    color: var(--stock-text);
}

.hero-title span {
    color: var(--stock-accent);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--stock-muted);
    line-height: 1.65;
    max-width: 520px;
    margin: 0 0 2rem;
}

.hero-subtitle strong {
    color: var(--stock-text);
    font-weight: 600;
}

/* Feature cards */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.feature-card {
    padding: 1.25rem;
    background: var(--stock-surface);
    border: 1px solid var(--stock-border);
    border-radius: 16px;
    box-shadow: var(--stock-shadow);
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    border-color: rgba(13, 122, 92, 0.3);
    transform: translateY(-2px);
    box-shadow: var(--stock-shadow-lg);
}

.feature-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--stock-accent-soft);
    color: var(--stock-accent);
    border-radius: 12px;
    font-size: 1.2rem;
    margin-bottom: 0.85rem;
}

.feature-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
    color: var(--stock-text);
}

.feature-card p {
    font-size: 0.82rem;
    color: var(--stock-muted);
    line-height: 1.5;
    margin: 0;
}

/* Login panel */
.login-panel {
    grid-area: login;
    align-self: center;
    background: var(--stock-surface);
    border: 1px solid var(--stock-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--stock-shadow-lg);
}

.login-panel-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.login-panel-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--stock-primary), var(--stock-primary-light));
    border-radius: 18px;
    font-size: 1.75rem;
    color: #fff;
    box-shadow: 0 8px 20px rgba(16, 51, 107, 0.25);
}

.login-panel h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.4rem;
    color: var(--stock-text);
}

.login-panel-desc {
    font-size: 0.9rem;
    color: var(--stock-muted);
    margin: 0;
    line-height: 1.5;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--stock-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--stock-border);
}

.btn-mcka-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.95rem 1.5rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--stock-accent), var(--stock-accent-hover));
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(13, 122, 92, 0.3);
}

.btn-mcka-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(13, 122, 92, 0.35);
    color: #fff;
}

.btn-mcka-login:active {
    transform: translateY(0);
}

.login-note {
    margin-top: 1.25rem;
    padding: 0.85rem 1rem;
    background: var(--stock-accent-soft);
    border: 1px solid rgba(13, 122, 92, 0.15);
    border-radius: 12px;
    font-size: 0.8rem;
    color: var(--stock-muted);
    line-height: 1.5;
    text-align: center;
}

.login-note i {
    color: var(--stock-accent);
    margin-right: 0.35rem;
}

.login-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--stock-border);
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--stock-primary);
}

.stat-label {
    font-size: 0.68rem;
    color: var(--stock-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 0.15rem;
}

/* Footer */
.landing-footer {
    padding: 1.25rem 2rem;
    text-align: center;
    font-size: 0.82rem;
    color: var(--stock-muted);
    background: var(--stock-surface);
    border-top: 1px solid var(--stock-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
}

.landing-footer-version {
    font-weight: 600;
    color: var(--theme-text);
}

.landing-footer-copy {
    color: var(--stock-muted);
}

.landing-footer-copy a {
    color: var(--theme-accent);
    text-decoration: none;
    font-weight: 500;
}

.landing-footer-copy a:hover {
    text-decoration: underline;
}

.landing-footer-sep {
    color: var(--theme-border-strong);
    font-weight: 700;
    line-height: 1;
}

.landing-footer-link {
    color: var(--theme-accent);
    text-decoration: none !important;
    font-weight: 600;
}

.landing-footer-link:hover {
    text-decoration: underline !important;
}

/* Responsive */
@media (max-width: 991px) {
    .landing-main {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        padding: 1.5rem 1.25rem 2.5rem;
    }

    .hero-content {
        order: 1;
        text-align: center;
    }

    .login-panel {
        order: 2;
        max-width: 440px;
        margin: 0 auto;
        width: 100%;
        align-self: center;
    }

    .features-section {
        order: 3;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .hero-eyebrow {
        justify-content: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 0;
    }

    .login-stats {
        display: none;
    }
}

@media (max-width: 575px) {
    .landing-header {
        padding: 1rem 1.25rem;
        flex-direction: column;
        gap: 0.75rem;
    }

    .brand-logo-icon {
        height: 60px;
        max-width: 220px;
    }

    .header-pill {
        font-size: 0.72rem;
    }
}
