/* Index page styles — frameworks-inspired layout & typography */

/* Reset for this page */
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background-color: #fff;
}

.index-container {
    width: 70%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 0;
}

/* Hero Section */
.index-hero {
    margin-bottom: 24px;
}

.index-hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.index-hero-subtitle {
    font-size: 1.25rem;
    font-weight: 500;
    color: #888;
    margin-top: 0;
    margin-bottom: 0;
}

.index-hero .intro {
    font-size: 0.95rem;
    color: #1a1a1a;
    margin-bottom: 12px;
    width: 60%;
    line-height: 1.6;
}

/* Download Links (SVG icons preserved) */
.index-hero #downloadLinks {
    margin-top: 16px;
}

/* Sticky Header / Nav */
.index-container .fauxHeader {
    height: 1px;
}

.index-container .header {
    position: sticky;
    top: 8px;
    display: block;
    width: auto;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 22px;
    margin-left: auto;
    margin-right: auto;
    padding: 15px 15px;
    z-index: 1000;
    box-shadow: none;
    transition: box-shadow 0.25s ease-out, backdrop-filter 0.25s ease-out;
}

@media screen and (min-width: 590px) {
    .index-container .header {
        display: inline-flex;
        justify-content: center;
        align-items: center;
        left: 50%;
        transform: translateX(-50%);
    }
}

.index-container .header.stuck {
    backdrop-filter: blur(42px);
    -webkit-backdrop-filter: blur(42px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* Sections */
.index-section {
    margin-bottom: 50px;
    scroll-margin-top: 72px;
}

.index-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
}

.index-section h2.subsection-title {
    margin-top: 32px;
}

.index-section h2 + .subsection-header {
    margin-top: -16px;
}

/* Grid Layout */
.index-grid {
    display: grid;
    row-gap: 40px;
    column-gap: 16px;
    margin-bottom: 40px;
}

.index-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.index-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.index-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.index-grid-6 {
    grid-template-columns: repeat(6, 1fr);
}

/* Cards */
.index-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.index-card:visited {
    color: inherit;
}

.index-card img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    display: block;
}

.index-caption-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-top: 10px;
    padding-left: 4px;
}

.index-caption {
    font-size: 0.875rem;
    color: #666;
    font-weight: 600;
    margin: 0;
}

.index-card-subtitle {
    font-size: 0.8rem;
    color: #888;
    padding-left: 4px;
    margin-top: 2px;
}

.index-card-awards {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    padding-left: 4px;
}

.index-card-awards img {
    height: 50px;
    width: auto;
    border-radius: 0;
}

.index-card .index-video-link {
    font-size: 0.8rem;
    color: #888;
    text-decoration: none;
    flex-shrink: 0;
}

.index-card .index-video-link:hover {
    color: #555;
    text-decoration: underline;
}

/* Recognition press logos */
.index-press-logo {
    border-radius: 0 !important;
}

.index-section .light {
    display: block;
    visibility: visible;
}

.index-section .dark {
    display: none;
    visibility: hidden;
}

/* Footer (interactionDesign style) */
.index-footer {
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
}

.index-footer .footerText {
    font-size: 0.875rem;
    color: #888;
    padding: 0;
    text-align: left;
    width: auto;
}

/* Responsive */
@media all and (max-width: 1500px) and (min-width: 950px) {
    .index-container {
        width: 80%;
    }
}

@media (max-width: 950px) {
    .index-container {
        width: 90%;
        padding: 40px 0;
    }

    .index-hero h1 {
        font-size: 2.5rem;
    }

    .index-hero .intro {
        width: 100%;
    }

    .index-container .header {
        width: 100%;
        left: auto;
        transform: none;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .index-container .navGroup {
        width: 80%;
    }

    .index-grid-6 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 590px) {
    .index-container {
        width: 95%;
    }

    .index-container .header {
        width: 100%;
        left: auto;
        transform: none;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .index-container .navGroup {
        width: 90%;
    }

    .index-hero h1 {
        font-size: 2rem;
    }

    .index-grid-2 {
        grid-template-columns: 1fr;
    }

    .index-grid-3 {
        grid-template-columns: 1fr;
    }

    .index-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .index-grid-6 {
        grid-template-columns: repeat(2, 1fr);
    }

    .index-caption-row {
        flex-direction: column;
    }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    .index-hero-subtitle {
        color: #999;
    }

    .index-hero .intro {
        color: #ccc;
    }

    .index-caption {
        color: #aaa;
    }

    .index-card-subtitle {
        color: #777;
    }

    .index-card .index-video-link {
        color: #777;
    }

    .index-card:visited,
    .index-card {
        color: #fff;
    }

    .index-section .light {
        display: none;
        visibility: hidden;
    }

    .index-section .dark {
        display: block;
        visibility: visible;
    }

    .index-footer {
        border-top-color: #333;
    }

    .index-footer .footerText {
        color: #666;
    }
}
