/* Kinetic Fracture Overrides */

:root {
    --bg: #000000;
    --surface: rgba(8, 7, 3, 0.95);
    --surface-hover: rgba(20, 18, 8, 0.95);
    --border: rgba(255, 193, 7, 0.3);
    --border-strong: rgba(255, 193, 7, 0.5);
    --text: #FFF2D9;
    --text-muted: #8b949e;
    --heading: #FFC107;
    --accent: #FFC107;
    --accent-light: #FFDB70;
}

body {
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Shards */
.background-shards {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.shard {
    position: absolute;
    width: 32px;
    height: 32px;
    background-color: #FFC107;
    mask-image: url('shards.svg');
    -webkit-mask-image: url('shards.svg');
    mask-size: 64px 64px;
    -webkit-mask-size: 64px 64px;
    opacity: 0;
    animation: fall linear infinite;
}

.shard:nth-child(4n+1) { background-position: 0 0; }
.shard:nth-child(4n+2) { background-position: -32px 0; }
.shard:nth-child(4n+3) { background-position: 0 -32px; }
.shard:nth-child(4n+4) { background-position: -32px -32px; }

@keyframes fall {
    0% {
        transform: translateY(-50px) rotate(0deg) scale(var(--shard-scale, 1));
        opacity: 0;
    }
    10% {
        opacity: 0.15;
    }
    90% {
        opacity: 0.15;
    }
    100% {
        transform: translateY(110vh) rotate(360deg) scale(var(--shard-scale, 1));
        opacity: 0;
    }
}

.container {
    max-width: 860px;
    width: 100%;
    background: var(--surface);
    padding: 3.5rem 4rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    margin: 2rem auto;
}

@media (min-width: 1400px) {
    .container {
        max-width: 960px;
        padding: 4rem 5rem;
        margin: 3rem auto;
    }
}

h1 {
    color: var(--accent);
    margin: 0;
    font-size: 2.75rem;
    font-weight: 600;
    text-align: center;
    letter-spacing: 3px;
    text-transform: uppercase;
    white-space: nowrap;
}

.sharded-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    margin-top: 0;
    margin-bottom: 2.5rem;
    border-bottom: 1.5px solid var(--border);
    padding-bottom: 1rem;
}

.header-shards {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    user-select: none;
    pointer-events: none;
}

.header-shards.right {
    transform: scaleX(-1);
}

.header-shard {
    width: 24px;
    height: 24px;
    background-color: #FFC107;
    mask-image: url('shards.svg');
    -webkit-mask-image: url('shards.svg');
    mask-size: 48px 48px;
    -webkit-mask-size: 48px 48px;
}

.header-shard:nth-child(5) { background-position: 0 0; opacity: 0.5; transform: scale(1) translateY(1px) rotate(-5deg); }
.header-shard:nth-child(4) { background-position: -24px 0; opacity: 0.45; transform: scale(0.85) translateY(-2px) rotate(15deg); }
.header-shard:nth-child(3) { background-position: 0 -24px; opacity: 0.35; transform: scale(0.7) translateY(3px) rotate(-20deg); }
.header-shard:nth-child(2) { background-position: -24px -24px; opacity: 0.3; transform: scale(0.6) translateY(-4px) rotate(30deg); }
.header-shard:nth-child(1) { background-position: 0 0; opacity: 0.25; transform: scale(0.5) translateY(2px) rotate(-10deg); }

@media (max-width: 1150px) {
    .header-shards {
        display: none;
    }
    h1 {
        font-size: 2.25rem;
    }
}

@media (max-width: 800px) {
    h1 {
        font-size: 2rem;
    }
}

h2 {
    color: var(--accent);
    margin-top: 1.5rem;
    font-weight: 600;
    font-size: 1.4rem;
    border-bottom: 1px solid var(--border);
    display: inline-block;
}

.description {
    font-size: 1.15rem;
    line-height: 1.75;
    margin: 1.75rem auto 0;
    max-width: 620px;
    text-align: center;
    opacity: 0.95;
}

/* Screenshot Grid */
.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin: 3rem 0;
}

.screenshot-placeholder {
    aspect-ratio: 430 / 932;
    background: #000;
    border: 1px solid var(--border);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 24px rgba(0,0,0,0.4);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.screenshot-placeholder:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 16px 36px rgba(0,0,0,0.55);
    border-color: var(--border-strong);
}

.screenshot-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}

.screenshot-placeholder:hover img {
    transform: scale(1.03);
}

/* App Store Button */
.cta-container {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0 2rem;
}

.app-store-badge {
    height: 52px;
    width: auto;
    display: block;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.app-store-button:hover .app-store-badge {
    opacity: 0.9;
    transform: scale(1.03);
}

/* FAQ */
.faq-container {
    margin-top: 3rem;
    max-width: 100%;
    margin-left: initial;
    margin-right: initial;
    text-align: left;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border);
}

.faq-container h2 {
    display: block;
    border-bottom: none;
    margin-top: 0;
    margin-bottom: 2.25rem;
    font-size: 1.5rem;
}

.faq-item {
    margin-bottom: 2rem;
}

.faq-item:last-child {
    margin-bottom: 0;
}

/* Footer on KF page */
.site-footer {
    width: 100%;
    max-width: 860px;
}

@media (min-width: 1400px) {
    .site-footer {
        max-width: 960px;
    }
}

/* Large desktop: show all 5 screenshots */
@media (min-width: 1200px) {
    .screenshot-grid {
        gap: 1.25rem;
    }
    h1 {
        font-size: 3rem;
    }
    .description {
        font-size: 1.2rem;
        max-width: 680px;
    }
}

/* Medium screens: 3 columns */
@media (max-width: 900px) {
    .screenshot-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.85rem;
    }
    .screenshot-placeholder:nth-child(4),
    .screenshot-placeholder:nth-child(5) {
        display: none;
    }
    .container {
        max-width: 720px;
        padding: 3rem;
    }
}

/* Mobile: horizontal scroll for screenshots */
@media (max-width: 600px) {
    .screenshot-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 0.85rem;
        margin: 2.5rem -1.5rem;
        padding: 0 1.5rem 1rem;
        max-width: none;
        width: calc(100% + 3rem);
        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
    }
    .screenshot-grid::-webkit-scrollbar {
        display: none;
    }
    .screenshot-placeholder {
        flex: 0 0 58%;
        scroll-snap-align: center;
        pointer-events: none;
    }
    .screenshot-placeholder:nth-child(4),
    .screenshot-placeholder:nth-child(5) {
        display: flex;
    }
    .screenshot-placeholder:hover {
        transform: none;
        box-shadow: 0 10px 24px rgba(0,0,0,0.4);
    }
    .screenshot-placeholder:hover img {
        transform: none;
    }
    .container {
        padding: 2rem 1.5rem;
        margin: 1rem auto;
        border-radius: 16px;
    }
    h1 {
        font-size: clamp(1.3rem, 7.5vw, 2rem);
        letter-spacing: 1px;
    }
    .sharded-header {
        margin-bottom: 1.75rem;
        padding-bottom: 0.75rem;
    }
    .description {
        font-size: 1rem;
        margin-top: 1.25rem;
    }
    .faq-container {
        margin-top: 2rem;
        padding-top: 2rem;
    }
    .faq-container h2 {
        font-size: 1.3rem;
        margin-bottom: 1.75rem;
    }
    .app-store-badge {
        height: 46px;
    }
}

/* Tablet tweaks */
@media (min-width: 601px) and (max-width: 800px) {
    .container {
        padding: 2.5rem 2rem;
    }
    h1 {
        font-size: 2.25rem;
    }
}
