/* Home page — product sections */

main > section {
    position: relative;
    margin-bottom: 5rem;
    padding-bottom: 0.5rem;
}

section .header {
    margin-bottom: 1.75rem;
    padding-right: 0;
}

section h1 {
    margin: 0;
    font-size: clamp(2rem, 8vw, 3.125rem);
    font-weight: 400;
    line-height: 1.1;
    color: #a9a9a9;
}

section h1 .highlight {
    color: #1c1c1c;
    margin-left: 0.15em;
}

section .short-description {
    margin-top: 0.35em;
    font-size: clamp(1rem, 4vw, 1.75rem);
    line-height: 1.3;
}

section .description {
    max-width: 42rem;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.45;
    color: var(--color-text);
}

section .freeware-notice {
    margin-bottom: 0.5rem;
    font-size: 14px;
    color: #7a7a7a;
}

section .visual {
    margin-top: 2.5rem;
    text-align: left;
}

section .visual img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Multiple screenshots (e.g. HashPhotos) — horizontal scroll, no wrap */
section .visual--gallery {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 1rem;
    margin-top: 2.5rem;
    margin-left: calc(-1 * var(--space-page-x));
    margin-right: calc(-1 * var(--space-page-x));
    padding: 0.5rem var(--space-page-x) 0.75rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

section .visual--gallery img {
    flex: 0 0 auto;
    width: 200px;
    max-width: none;
    scroll-snap-align: start;
}

section .download {
    position: absolute;
    top: 0;
    right: 0;
    width: min(180px, 40%);
    text-align: center;
}

section .download img {
    display: inline-block;
}

section .download .guide {
    margin-top: 1.25rem;
    font-size: 13px;
}

section .download .guide a {
    display: inline-block;
    padding: 4px 8px;
    border: 1px solid var(--color-accent);
    border-radius: 4px;
    text-decoration: none;
}

section .download .guide a:hover {
    text-decoration: none;
    background-color: rgba(16, 108, 248, 0.08);
}

.button-download {
    display: inline-block;
    min-width: 140px;
    padding: 0 1.5rem;
    height: 50px;
    line-height: 50px;
    border-radius: 25px;
    border: none;
    background-color: var(--color-accent);
    color: #fff;
    font-size: 1.125rem;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.button-download:hover {
    background-color: #095cd8;
    text-decoration: none;
    color: #fff;
}

.ver {
    margin-top: 0.5rem;
    font-size: 14px;
}

.download-sub {
    margin-top: 0.625rem;
    font-size: 11px;
    line-height: 1.5;
    color: #aaa;
}

.download-sub a {
    color: #888;
    text-decoration: none;
}

.download-sub a:hover {
    color: #666;
    text-decoration: underline;
}

.update-date {
    font-size: 11px;
}

/* NexusVault — pre-launch App Store badge */
.download--prelaunch .app-store-coming-soon {
    display: inline-block;
    text-align: center;
}

.download--prelaunch .app-store-badge-wrap {
    display: inline-block;
    opacity: 0.2;
    filter: grayscale(0.15);
    pointer-events: none;
    user-select: none;
}

.download--prelaunch .coming-soon-label {
    margin-top: 0.5rem;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

@media (prefers-color-scheme: dark) {
    .download--prelaunch .coming-soon-label {
        color: #aaa;
    }
}

@media (prefers-color-scheme: dark) {
    section h1 {
        color: #666;
    }

    section h1 .highlight {
        color: #eee;
    }

    section .freeware-notice {
        color: #9a9a9a;
    }

    .download-sub {
        color: #888;
    }

    .download-sub a {
        color: #aaa;
    }

    .download-sub a:hover {
        color: #ccc;
    }
}

/* Stack download block when sidebar would crowd content */
@media (max-width: 900px) {
    section .header {
        padding-right: 0;
    }

    section .download {
        position: static;
        width: auto;
        margin: 1.5rem 0 0;
        text-align: left;
    }

    section .visual:not(.visual--gallery) {
        text-align: center;
    }
}

@media (max-width: 600px) {
    main > section {
        margin-bottom: 3.5rem;
    }

    section .description {
        font-size: 0.9375rem;
    }

    section .visual {
        margin-top: 1.75rem;
    }

    section .visual--gallery img {
        width: min(180px, 78vw);
    }

    section .download {
        text-align: center;
    }

    .button-download {
        min-width: 120px;
        height: 44px;
        line-height: 44px;
        font-size: 1rem;
    }
}
