/* =========================================================
   LandingPage: Modern Desmos Math Tools Portal Styles
   ========================================================= */

.landing-page-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    z-index: 1200;
    background: #ffffff;
    overflow-y: auto;
    overflow-x: hidden !important;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1e293b;
    display: flex;
    flex-direction: column;
}

.landing-page-view.hidden-landing {
    display: none !important;
}

/* Landing Navigation Header */
.landing-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 40px;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 50;
}

.landing-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.03em;
    cursor: pointer;
}

.landing-logo span {
    color: #2563eb;
}

.landing-nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-landing-nav-link {
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.15s;
}

.btn-landing-nav-link:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.btn-landing-primary {
    background: #2563eb;
    color: #ffffff;
    border: none;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
    transition: all 0.2s;
}

.btn-landing-primary:hover {
    background: #1d4ed8;
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}

.btn-landing-secondary {
    background: #ffffff;
    color: #2563eb;
    border: 1.5px solid #2563eb;
    font-size: 14px;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-landing-secondary:hover {
    background: #eff6ff;
}

/* Landing Hero Section */
.landing-hero {
    max-width: 1180px;
    margin: 32px auto 20px;
    padding: 0 24px;
    text-align: center;
}

.landing-giu-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.25);
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 999px;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.landing-hero h1 {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #0f172a;
    margin-bottom: 14px;
}

.landing-hero p {
    font-size: 18px;
    color: #64748b;
    max-width: 680px;
    margin: 0 auto 28px;
    line-height: 1.5;
}

.landing-hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 48px;
}

.landing-hero-actions .btn-landing-primary {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: 10px;
}

.landing-hero-actions .btn-landing-secondary {
    padding: 13px 26px;
    font-size: 16px;
    border-radius: 10px;
}

/* Desmos Tools Suite Grid (Image 4 & 6 Authenticity) */
.tools-showcase-section {
    max-width: 1180px;
    margin: 0 auto 60px;
    padding: 0 24px;
}

.tools-showcase-title {
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 32px;
}

.tools-suite-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
}

.tool-suite-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 130px;
    cursor: pointer;
    padding: 14px 8px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.tool-suite-card:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
}

.tool-suite-card.active {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.tool-card-icon {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    margin-bottom: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    position: relative;
    transition: transform 0.2s;
}

.tool-suite-card:hover .tool-card-icon {
    transform: scale(1.05);
}

.tool-card-icon.icon-graphing { background: #16a34a; }
.tool-card-icon.icon-scientific { background: #0d9488; }
.tool-card-icon.icon-four-function { background: #0284c7; }
.tool-card-icon.icon-notebook { background: #2563eb; }
.tool-card-icon.icon-matrix { background: #4f46e5; }
.tool-card-icon.icon-geometry { background: #9333ea; }
.tool-card-icon.icon-3d { background: #c026d3; }
.tool-card-icon.icon-calculus { background: linear-gradient(135deg, #14b8a6 0%, #0f766e 100%); }
.tool-card-icon.icon-mathematica { background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%); }
.tool-card-icon.icon-matlab { background: linear-gradient(135deg, #f97316 0%, #c2410c 100%); }

.badge-beta-card {
    position: absolute;
    top: -8px;
    background: #dbeafe;
    color: #1e40af;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 6px;
    border: 1px solid #93c5fd;
    letter-spacing: 0.05em;
}

.tool-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    text-align: center;
}

/* Notebook Feature Spotlight Box (Image 4 & 6 Replica) */
.notebook-spotlight-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 32px;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 36px;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.notebook-spotlight-preview {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.notebook-spotlight-info h3 {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
}

.notebook-spotlight-info p {
    font-size: 15px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 24px;
}

.notebook-spotlight-actions {
    display: flex;
    gap: 12px;
}

/* Feature Highlights Grid */
.landing-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1180px;
    margin: 40px auto 60px;
    padding: 0 24px;
}

.landing-feat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 28px;
    transition: all 0.2s;
}

.landing-feat-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
}

.feat-icon-bubble {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
}

.landing-feat-card h4 {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.landing-feat-card p {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
}

/* Landing Footer */
.landing-footer {
    margin-top: auto;
    border-top: 1px solid #e2e8f0;
    padding: 32px 24px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
    background: #f8fafc;
}

@media (max-width: 768px) {
    /* 1. Mobile Navigation Header */
    .landing-nav {
        height: 52px;
        padding: 0 12px;
        box-sizing: border-box;
    }

    .landing-logo {
        font-size: 17px;
        gap: 6px;
    }

    .landing-nav-right {
        gap: 6px;
    }

    .btn-landing-nav-link {
        display: none !important; /* Hide extra text link on mobile */
    }

    .btn-landing-secondary {
        padding: 6px 10px;
        font-size: 12px;
        border-radius: 6px;
        white-space: nowrap;
    }

    .btn-landing-primary {
        padding: 6px 12px;
        font-size: 12px;
        border-radius: 6px;
        white-space: nowrap;
    }

    /* 2. Hero Section */
    .landing-hero {
        margin: 20px auto 14px;
        padding: 0 14px;
        box-sizing: border-box;
    }

    .landing-giu-badge {
        font-size: 11.5px;
        padding: 4px 12px;
        margin-bottom: 12px;
    }

    .landing-hero h1 {
        font-size: clamp(22px, 6.5vw, 30px);
        line-height: 1.25;
        margin-bottom: 10px;
        word-break: break-word;
    }

    .landing-hero p {
        font-size: 13.5px;
        line-height: 1.5;
        margin: 0 auto 20px;
        padding: 0 4px;
    }

    .landing-hero-actions {
        flex-direction: column;
        width: 100%;
        max-width: 320px;
        margin: 0 auto 30px;
        gap: 10px;
    }

    .landing-hero-actions .btn-landing-primary,
    .landing-hero-actions .btn-landing-secondary {
        width: 100%;
        padding: 12px 16px;
        font-size: 14px;
        text-align: center;
        box-sizing: border-box;
    }

    /* 3. Tools Showcase Section */
    .tools-showcase-section {
        padding: 0 12px;
        margin: 0 auto 36px;
        box-sizing: border-box;
    }

    .tools-showcase-title {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .tools-suite-row {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 10px 4px;
        justify-items: center;
        margin-bottom: 24px;
        width: 100%;
        box-sizing: border-box;
    }

    .tool-suite-card {
        width: 100%;
        max-width: 78px;
        padding: 6px 2px;
        border-radius: 10px;
    }

    .tool-card-icon {
        width: 48px;
        height: 48px;
        border-radius: 12px;
        margin-bottom: 5px;
    }

    .tool-card-icon svg {
        width: 24px;
        height: 24px;
    }

    .tool-card-icon.icon-scientific span,
    .tool-card-icon.icon-four-function span {
        font-size: 15px !important;
    }

    .tool-card-title {
        font-size: 11px;
        line-height: 1.15;
    }

    .badge-beta-card {
        top: -6px;
        font-size: 8px;
        padding: 1px 4px;
    }

    /* 4. Notebook Spotlight Box */
    .notebook-spotlight-box {
        grid-template-columns: 1fr;
        padding: 16px;
        gap: 16px;
        border-radius: 12px;
        box-sizing: border-box;
    }

    .notebook-spotlight-preview {
        padding: 10px 6px;
        border-radius: 8px;
    }

    .notebook-spotlight-info h3 {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .notebook-spotlight-info p {
        font-size: 13px;
        line-height: 1.5;
        margin-bottom: 16px;
    }

    .notebook-spotlight-actions {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }

    .notebook-spotlight-actions .btn-landing-primary,
    .notebook-spotlight-actions .btn-landing-secondary {
        width: 100%;
        padding: 10px;
        font-size: 13px;
        text-align: center;
        box-sizing: border-box;
    }

    /* 5. Features Grid */
    .landing-features-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 0 12px;
        margin: 20px auto 32px;
        box-sizing: border-box;
    }

    .landing-feat-card {
        padding: 16px;
        border-radius: 10px;
    }

    .landing-feat-card h4 {
        font-size: 15px;
        margin-bottom: 6px;
    }

    .landing-feat-card p {
        font-size: 12.5px;
        line-height: 1.45;
    }

    /* 6. Footer */
    .landing-footer {
        padding: 20px 14px;
        font-size: 11.5px;
        line-height: 1.5;
    }
}

@media (max-width: 360px) {
    .tools-suite-row {
        grid-template-columns: repeat(3, 1fr);
    }
}
