/* -------------------------------------------------------------
   Base Typography & Layout
-------------------------------------------------------------- */

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    line-height: 1.6;
    background-color: #f3f4f7;      /* soft neutral background */
    color: #333;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 90%;
    max-width: 900px;
    margin: 0 auto;
}

main {
    padding: 1.5rem 0 3rem;
}

/* -------------------------------------------------------------
   Header & Navigation (compact & elevated)
-------------------------------------------------------------- */

.site-header {
    text-align: center;
    padding: 0.6rem 1rem 0.1rem;
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    position: relative;
    z-index: 10;
}

.site-header-logo {
    max-width: 160px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.site-nav {
    background-color: #ffffff;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #efefef;
    padding: 0.35rem 1rem 0.6rem;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
    position: relative;
    z-index: 9;
}

.nav-inner {
    display: flex;
    justify-content: center;
    gap: 2.25rem;
}

.nav-link {
    color: #555;
    text-decoration: none;
    font-weight: 500;
    padding-bottom: 0.25rem;
}

.nav-link:hover {
    color: #0070ff;
}

.nav-link.active {
    color: #0070ff;
    border-bottom: 2px solid #0070ff;
}

/* -------------------------------------------------------------
   Standard Section Card Layout
-------------------------------------------------------------- */

.hero,
.section,
.section-alt {
    background-color: #ffffff;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    margin-top: 2rem;
    padding: 2.25rem 2rem;
}

.section-alt {
    background-color: #ffffff; /* unified */
}

/* Hero text layout */

.hero-inner {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.hero-text h1 {
    margin-top: 0;
}

.hero-tagline {
    font-size: 1.2rem;
    font-weight: 500;
    color: #555;
}

/* -------------------------------------------------------------
   Project Cards (Home Page)
-------------------------------------------------------------- */

.project-card {
    background: #fdfdfd;
    border: 1px solid #e9e9e9;
    padding: 1.5rem 1.75rem;
    border-radius: 10px;
    margin-top: 1.5rem;
}

.project-card h3 {
    margin-top: 0;
}

.project-tagline {
    font-weight: 600;
    color: #444;
}

.project-image-link {
    display: block;
    margin-bottom: 1rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
    transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
}

.project-image-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.18);
}

.project-image {
    display: block;
    width: 100%;
    height: auto;
}

.inline-link {
    color: #0070ff;
    text-decoration: none;
    font-weight: 500;
}

.inline-link:hover {
    text-decoration: underline;
}

/* -------------------------------------------------------------
   Featured App Card (Home Page)
-------------------------------------------------------------- */

.featured-app-card {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 1.75rem 1.75rem;
    margin-top: 1.75rem;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.12);
}

.featured-app-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: inherit;
}

.featured-app-link:hover .featured-app-title {
    color: #0054c7;
}

.featured-app-icon {
    width: 120px;
    height: 120px;
    border-radius: 26px;
    box-shadow: 0 10px 20px rgba(15,23,42,0.15);
}

.featured-app-info {
    flex: 1;
}

.featured-app-title {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
}

.featured-app-subtitle {
    margin-top: 0.25rem;
    font-size: 1rem;
    color: #555;
}

.featured-app-button {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.5rem 1.2rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #0070ff, #0054c7);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.35);
    transition: transform 0.12s ease-out, box-shadow 0.12s ease-out;
}

.featured-app-link:hover .featured-app-button {
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(37, 99, 235, 0.45);
}

/* -------------------------------------------------------------
   Future / Placeholder Card
-------------------------------------------------------------- */

.future-app-card {
    opacity: 0.85;
}

.placeholder-app-icon {
    width: 120px;
    height: 120px;
    border-radius: 26px;
    background: #e5e7eb;
    color: #6b7280;
    font-size: 3rem;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.08);
    user-select: none;
}

.future-app-button {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
    box-shadow: 0 10px 20px rgba(107,114,128,0.30);
    cursor: default;
}

.future-app-card:hover .future-app-button {
    transform: none;
    box-shadow: 0 10px 20px rgba(107,114,128,0.30);
}

/* -------------------------------------------------------------
   App Store Hero Block (MathCrash Page)
-------------------------------------------------------------- */

.app-hero {
    background-color: #ffffff;
    padding: 2rem 0;
    margin-top: 2rem;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.app-hero-inner {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.app-icon {
    width: 140px;
    height: 140px;
    border-radius: 28px;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.12);
}

.app-title {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
}

.app-subtitle {
    margin-top: 0.25rem;
    color: #666;
    font-size: 1.1rem;
    font-weight: 500;
}

/* -------------------------------------------------------------
   App Store Button
-------------------------------------------------------------- */

.app-store-button {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.65rem 1.4rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #0070ff, #0054c7);
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.35);
    transition: transform 0.12s ease-out, box-shadow 0.12s ease-out;
}

.app-store-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(37, 99, 235, 0.45);
}

/* -------------------------------------------------------------
   App Store: Screenshot Gallery (Crisp Layout)
-------------------------------------------------------------- */

.screenshot-gallery {
    margin-top: 1.5rem;
}

.screenshot-large {
    width: 100%;
    max-width: 600px;
    display: block;
    margin: 0 auto 2rem;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.screenshot-row {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
}

.screenshot-small {
    width: 300px;
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* -------------------------------------------------------------
   Features List
-------------------------------------------------------------- */

.feature-list {
    margin-top: 1rem;
    padding-left: 1.2rem;
    line-height: 1.7;
}

.feature-list li {
    margin-bottom: 0.5rem;
}

/* -------------------------------------------------------------
   Footer
-------------------------------------------------------------- */

.site-footer {
    background-color: transparent;
    padding: 2rem 0 1.5rem;
    text-align: center;
    margin-top: 2.5rem;
    color: #666;
}

.footer-inner p {
    margin: 0.25rem 0;
}

.footer-inner a {
    color: #0070ff;
    text-decoration: none;
}

.footer-inner a:hover {
    text-decoration: underline;
}

/* -------------------------------------------------------------
   Mobile Tweaks
-------------------------------------------------------------- */

@media (max-width: 600px) {

    .nav-inner {
        gap: 1.5rem;
    }

    .site-header-logo {
        max-width: 135px;
    }

    .hero,
    .section,
    .section-alt {
        padding: 1.75rem 1.25rem;
        margin-top: 1.5rem;
    }

    .project-card {
        padding: 1.25rem 1.25rem;
    }

    .app-hero-inner {
        flex-direction: column;
        text-align: center;
    }

    .app-icon {
        width: 120px;
        height: 120px;
    }

    .screenshot-row {
        flex-direction: column;
        align-items: center;
    }

    .screenshot-small {
        width: 90%;
    }

    .featured-app-link {
        flex-direction: column;
        text-align: center;
    }

    .featured-app-icon {
        width: 100px;
        height: 100px;
    }

    .placeholder-app-icon {
        width: 100px;
        height: 100px;
        font-size: 2.4rem;
    }
}
