/* ============================================================
   Landing page - Greenhouse theme
   Reuses the app-wide --pm-* design tokens (app.css) instead of
   its own palette, so it automatically follows dark mode and
   stays in sync if the brand tokens ever change. Sections that
   sit on the dark forest-green gradient (navbar, hero, testimonials,
   CTA, footer) are intentionally dark in both themes, matching how
   the app sidebar behaves - only the light "paper" sections below
   respond to the light/dark toggle.
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Scoped to .landing-page (not bare `body`) so this doesn't leak its
   colors onto every other page in the app - this stylesheet is
   loaded globally, not just on the landing page. */
.landing-page {
    font-family: var(--app-font-family);
    color: var(--pm-text);
    background-color: var(--pm-bg);
}

.landing-page h1,
.landing-page h2,
.landing-page h3,
.landing-page h4 {
    font-family: var(--app-font-display);
}

/* Hide Blazor error UI on landing page */
.landing-page #blazor-error-ui {
    display: none !important;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--pm-primary);
    color: var(--pm-primary-contrast);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: var(--pm-shadow-md);
    transition: var(--pm-transition);
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: var(--pm-primary-dark);
    transform: translateY(-4px);
}

.scroll-to-top:active {
    transform: translateY(-2px);
}

/* Navigation Bar */
.landing-navbar {
    background: linear-gradient(135deg, var(--pm-sidebar-grad-top) 0%, var(--pm-sidebar-grad-bottom) 100%);
    padding: 0.5rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-brand {
    color: var(--pm-sidebar-text);
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--app-font-display);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-brand:hover {
    color: #ffffff;
}

.nav-logo {
    height: 56px;
    width: 56px;
    max-width: 56px;
    object-fit: contain;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.8) 60%, rgba(255, 255, 255, 0.35) 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.12);
    padding: 8px;
}

.nav-title {
    display: none;
    font-size: 1.2rem;
    font-weight: 700;
    margin-left: 0.5rem;
    white-space: nowrap;
}

.navbar-hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--pm-sidebar-text);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
    z-index: 1001;
}

.navbar-hamburger:hover {
    color: #ffffff;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--pm-sidebar-text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: #ffffff;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--pm-primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.login-btn {
    background-color: var(--pm-primary);
    color: #ffffff !important;
    padding: 0.7rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--pm-transition);
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.login-btn::after {
    display: none !important;
}

.login-btn:hover {
    background-color: var(--pm-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(31, 122, 69, 0.4);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--pm-sidebar-grad-top) 0%, var(--pm-sidebar-grad-bottom) 100%);
    color: #ffffff;
    padding: 120px 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -12%;
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(67, 183, 118, 0.18) 0%, transparent 70%);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -35%;
    left: -10%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(67, 183, 118, 0.12) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    max-width: 780px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(2.1rem, 5vw, 3.4rem);
    font-weight: 800;
    margin-bottom: 1.1rem;
    line-height: 1.2;
    text-wrap: balance;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2.25rem;
    color: var(--pm-sidebar-text);
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.lp-btn {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--pm-transition);
    text-decoration: none;
    display: inline-block;
}

/* Primary/secondary buttons sit on the dark hero/CTA gradient, so
   primary is a solid light pill for contrast and secondary is an
   outline - inverted from how buttons work on the app's light pages. */
.lp-btn-primary {
    background-color: #ffffff;
    color: var(--pm-primary-dark);
}

.lp-btn-primary:hover {
    background-color: var(--pm-sidebar-text);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.lp-btn-secondary {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.6);
}

.lp-btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: #ffffff;
}

/* Features Section */
.features {
    padding: 88px 2rem;
    background-color: var(--pm-bg);
}

.section-title {
    text-align: center;
    font-size: 2.3rem;
    font-weight: 800;
    margin-bottom: 3rem;
    color: var(--pm-text);
    text-wrap: balance;
}

.features-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.75rem;
}

.feature-card {
    background: var(--pm-surface);
    border: 1px solid var(--pm-border);
    padding: 2rem;
    border-radius: var(--pm-radius-lg);
    text-align: center;
    box-shadow: var(--pm-shadow-sm);
    transition: var(--pm-transition);
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--pm-shadow-md);
    border-color: var(--pm-primary);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.25rem;
    border-radius: 16px;
    background: var(--pm-primary-tint);
    color: var(--pm-primary);
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--pm-text);
}

.feature-card p {
    color: var(--pm-text-muted);
    line-height: 1.6;
}

/* Benefits Section */
.benefits {
    padding: 88px 2rem;
    background-color: var(--pm-surface);
}

.benefits-container {
    max-width: 1200px;
    margin: 0 auto;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.benefit-item {
    display: flex;
    gap: 1.25rem;
}

.benefit-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 12px;
    background: var(--pm-success-tint);
    color: var(--pm-success);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.benefit-content h4 {
    margin-bottom: 0.4rem;
    font-weight: 700;
    color: var(--pm-text);
}

.benefit-content p {
    color: var(--pm-text-muted);
    line-height: 1.6;
}

/* How It Works Section */
.how-it-works {
    padding: 88px 2rem;
    background-color: var(--pm-bg);
}

.steps-container {
    max-width: 1200px;
    margin: 0 auto;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.step-card {
    text-align: center;
    position: relative;
}

.step-number {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--pm-primary), var(--pm-primary-dark));
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--app-font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
    box-shadow: 0 6px 16px rgba(31, 122, 69, 0.3);
}

.step-card h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--pm-text);
}

.step-card p {
    color: var(--pm-text-muted);
    line-height: 1.6;
}

/* Testimonials Section */
.testimonials {
    padding: 88px 2rem;
    background: linear-gradient(135deg, var(--pm-sidebar-grad-top) 0%, var(--pm-sidebar-grad-bottom) 100%);
    color: #ffffff;
}

.testimonials-container {
    max-width: 1200px;
    margin: 0 auto;
}

.testimonials .section-title {
    color: #ffffff;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.75rem;
    margin-top: 3rem;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.06);
    padding: 2rem;
    border-radius: var(--pm-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

.testimonial-quote {
    margin-bottom: 1.5rem;
    font-style: italic;
    line-height: 1.8;
    color: var(--pm-sidebar-text);
}

.testimonial-quote::before {
    content: '\201C';
    font-family: var(--app-font-display);
    font-size: 2rem;
    color: var(--pm-primary);
    display: block;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.testimonial-author {
    font-weight: 700;
    color: #ffffff;
}

.testimonial-role {
    font-size: 0.875rem;
    color: var(--pm-sidebar-text-muted);
}

/* CTA Section */
.cta-section {
    padding: 88px 2rem;
    background: linear-gradient(135deg, var(--pm-primary-dark) 0%, var(--pm-sidebar-grad-bottom) 100%);
    color: #ffffff;
    text-align: center;
}

.cta-content {
    max-width: 760px;
    margin: 0 auto;
}

.cta-section h2 {
    font-size: 2.3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-wrap: balance;
}

.cta-section p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--pm-sidebar-text);
}

/* Footer */
.footer {
    background-color: var(--pm-sidebar-grad-bottom);
    color: var(--pm-sidebar-text-muted);
    padding: 2.5rem 2rem;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-bottom p {
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-title {
        display: block;
        font-size: 1.1rem;
    }

    .nav-logo {
        height: 44px;
        width: 44px;
        max-width: 44px;
    }

    .navbar-hamburger {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        padding: 0;
        background: rgba(255, 255, 255, 0.12);
        border: 2px solid rgba(255, 255, 255, 0.25);
        border-radius: 8px;
        transition: var(--pm-transition);
        font-size: 1.1rem;
        flex-shrink: 0;
        z-index: 1001;
    }

    .navbar-hamburger:hover {
        background: rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.4);
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, var(--pm-sidebar-grad-top) 0%, var(--pm-sidebar-grad-bottom) 100%);
        flex-direction: column;
        gap: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
        margin-top: 0;
        list-style: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
        z-index: 999;
    }

    .nav-links.active {
        max-height: 350px;
        padding: 1rem 0;
    }

    .nav-links li {
        padding: 0;
        margin: 0;
    }

    .nav-links a {
        display: block;
        padding: 1rem 2rem;
        font-size: 0.95rem;
        transition: background 0.2s ease;
    }

    .nav-links a:hover {
        background: rgba(255, 255, 255, 0.08);
    }

    .nav-links a::after {
        display: none;
    }

    .login-btn {
        padding: 0.75rem 1.5rem;
        margin: 0.5rem 2rem 0;
        display: block;
        text-align: center;
    }

    .hero {
        padding: 64px 1.5rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .lp-btn {
        width: 100%;
        max-width: 300px;
    }

    .section-title {
        font-size: 1.9rem;
    }

    .cta-section h2 {
        font-size: 1.75rem;
    }
}

@media (min-width: 769px) {
    .nav-title {
        display: inline;
    }
}

@media (max-width: 480px) {
    .landing-navbar {
        padding: 0.75rem 1rem;
    }

    .nav-container {
        justify-content: space-between;
        position: relative;
        display: flex;
        align-items: center;
    }

    .nav-brand {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        flex: 1;
    }

    .nav-logo {
        height: 38px;
        width: 38px;
        max-width: 38px;
    }

    .nav-title {
        display: block;
        font-size: 1rem;
        font-weight: 700;
        white-space: nowrap;
    }

    .navbar-hamburger {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        padding: 0;
        background: rgba(255, 255, 255, 0.12);
        border: 2px solid rgba(255, 255, 255, 0.25);
        border-radius: 8px;
        transition: var(--pm-transition);
        font-size: 1rem;
        flex-shrink: 0;
    }

    .navbar-hamburger:active {
        background: rgba(255, 255, 255, 0.18);
        transform: scale(0.95);
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, var(--pm-sidebar-grad-top) 0%, var(--pm-sidebar-grad-bottom) 100%);
        flex-direction: column;
        gap: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
        margin: 0;
        list-style: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
        z-index: 999;
    }

    .nav-links.active {
        max-height: 300px;
        padding: 1rem 0;
    }

    .nav-links li {
        padding: 0;
        margin: 0;
    }

    .nav-links a {
        display: block;
        padding: 1rem 1.5rem;
        font-size: 0.95rem;
        transition: background 0.2s ease;
    }

    .nav-links a:hover {
        background: rgba(255, 255, 255, 0.08);
    }

    .nav-links a::after {
        display: none;
    }

    .login-btn {
        padding: 0.75rem 1.5rem;
        margin: 0.5rem 1.5rem;
        display: block;
        text-align: center;
    }

    .hero {
        padding: 48px 1rem;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .features, .benefits, .how-it-works, .testimonials, .cta-section {
        padding: 48px 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }
}
