/*
 Spirit Vault marketing page styles, adapted from the Kickstart-generated site.
 Everything is scoped under .spirit-vault so it can't affect other pages.
*/

.spirit-vault {
    /* Matches the content offset MainLayout uses below the fixed site navbar. */
    --site-nav-offset: 75px;

    --primary-color: #171d55;
    --primary-hover: color-mix(in srgb, var(--primary-color) 84%, black);
    --primary-rgb: 23, 29, 85;

    --text-dark: #0a0a0a;
    --text-primary: #1a1a1a;
    --text-muted: #525252;

    --bg-page: #ffffff;
    --bg-light: #f8fafc;
    --section-surface-a: var(--bg-page);
    --section-surface-b: #f8f9fb;

    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);

    color: var(--text-primary);
    background-color: var(--bg-page);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

[data-bs-theme="dark"] .spirit-vault {
    --text-dark: #fafafa;
    --text-primary: #e5e5e5;
    --text-muted: #a1a1aa;

    --bg-page: #0a0a0a;
    --bg-light: #18181b;
    --section-surface-a: var(--bg-page);
    --section-surface-b: #111114;

    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.spirit-vault img {
    display: block;
    max-width: 100%;
}

.spirit-vault .sv-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media (min-width: 768px) {
    .spirit-vault .sv-container {
        padding: 0 2.5rem;
    }
}

.spirit-vault .surface-a {
    --section-surface: var(--section-surface-a);
}

.spirit-vault .surface-b {
    --section-surface: var(--section-surface-b);
}

/* Hero */
/* The top padding also clears the fixed site navbar, so the gradient runs up under it. */
.spirit-vault .hero {
    padding: calc(5rem + var(--site-nav-offset)) 0 4rem;
    background: linear-gradient(180deg, var(--bg-light) 0%, var(--bg-page) 100%);
    text-align: center;
}

@media (min-width: 768px) {
    .spirit-vault .hero {
        padding: calc(7rem + var(--site-nav-offset)) 0 5rem;
    }
}

/* Keeps in-page anchor targets from landing under the fixed navbar. */
.spirit-vault [id] {
    scroll-margin-top: var(--site-nav-offset);
}

.spirit-vault .hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.spirit-vault .hero-app-icon {
    display: block;
    width: 120px;
    height: 120px;
    border-radius: 24px;
    margin: 0 auto 1.5rem;
    object-fit: cover;
    box-shadow: var(--shadow-md);
}

.spirit-vault .hero-title {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    font-weight: 800;
}

.spirit-vault .hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.spirit-vault .hero-cta {
    margin-bottom: 2.5rem;
}

/* Section headers */
.spirit-vault .section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
}

.spirit-vault .section-header h2 {
    color: var(--text-dark);
}

.spirit-vault .section-description {
    color: var(--text-muted);
    font-size: 1.0625rem;
}

/* Screenshots */
.spirit-vault .screenshots-section {
    padding: 5rem 0;
    background: var(--section-surface, var(--bg-page));
}

.spirit-vault .screenshots-container {
    margin-bottom: 2rem;
}

.spirit-vault .screenshots-scroll {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 1rem 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.spirit-vault .screenshot-card {
    flex: 0 0 auto;
    scroll-snap-align: start;
}

.spirit-vault .screenshot-image {
    width: 280px;
    height: auto;
    filter: drop-shadow(0 1.25rem 2rem rgba(0, 0, 0, 0.22));
}

.spirit-vault .screenshot-image.screenshot-landscape-image {
    width: 630px;
    max-width: calc(100vw - 3rem);
}

.spirit-vault .screenshot-lightbox-image {
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    filter: drop-shadow(0 1.25rem 2rem rgba(0, 0, 0, 0.22));
}

.spirit-vault .screenshot-lightbox-image.screenshot-landscape-image {
    width: auto;
    max-height: 75vh;
}

/* Features */
.spirit-vault .features-section {
    padding: 5rem 0;
    background: var(--section-surface, var(--bg-page));
}

.spirit-vault .features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 56rem) {
    .spirit-vault .features-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.spirit-vault .feature-card {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
}

.spirit-vault .feature-icon {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}

.spirit-vault .feature-icon-image {
    font-size: 1.5rem;
    color: #fff;
}

.spirit-vault .feature-title {
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.spirit-vault .feature-description {
    color: var(--text-muted);
    margin: 0;
}

/* Download */
.spirit-vault .download-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    text-align: center;
}

.spirit-vault .download-section h2 {
    color: #fff;
    margin-bottom: 1rem;
}

.spirit-vault .download-description {
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto 2rem;
    font-size: 1.125rem;
}

/* Store badges */
.spirit-vault .store-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin: 1.5rem 0;
}

.spirit-vault .store-badge-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.spirit-vault .store-badge-link:hover {
    transform: translateY(-2px);
    filter: brightness(1.04);
}

.spirit-vault .store-badge {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.18));
}

.spirit-vault .store-badge-dark-mode {
    display: none;
}

[data-bs-theme="dark"] .spirit-vault .store-badge-light-mode {
    display: none;
}

[data-bs-theme="dark"] .spirit-vault .store-badge-dark-mode {
    display: inline-block;
}

/* Page links */
.spirit-vault .page-links {
    padding: 3rem 0 0;
    text-align: center;
}

@media (max-width: 768px) {
    .spirit-vault .hero-app-icon {
        width: 80px;
        height: 80px;
        border-radius: 18px;
    }

    .spirit-vault .store-badges {
        flex-direction: column;
        align-items: center;
    }

    .spirit-vault .store-badge {
        height: 45px;
    }
}

@media (max-width: 767px) {
    .spirit-vault .screenshot-image {
        width: 240px;
    }

    .spirit-vault .screenshot-image.screenshot-landscape-image {
        width: 480px;
    }
}
