* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --phone-video-height: clamp(360px, 60vh, 620px);
}

body {
    font-family: 'Lora', ui-serif, Georgia, 'Times New Roman', Times, serif;
    line-height: 1.6;
    color: #333;
}

h1, h2, h3 {
    font-weight: 600;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    padding: 1rem 0;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1;
}

/* App Store-ish icon treatment */
.brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 22%;
    display: block;
    box-shadow:
        0 2px 2px rgba(0, 0, 0, 0.12),
        0 2px 2px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: #fff;
}

nav h1 {
    font-size: 1.5rem;
    color: #2c3e50;
}

.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6rem 0;
    text-align: center;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.appstore-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.appstore-badge {
    height: 54px;
    width: auto;
    display: block;
}

.appstore-link:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.75);
    outline-offset: 6px;
    border-radius: 12px;
}

.screenshots {
    padding: 2rem 0;
    background: #f8f9fa;
}

.examples {
    padding: 2rem 0;
    background: #ffffff;
}

.examples h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.example-carousel {
    position: relative;
    overflow: hidden;
    padding: 0.5rem 0;
}

.example-track {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    width: max-content;
    padding: 0 20px;
}

.example-item {
    flex: 0 0 auto;
}

.example-frame {
    height: var(--phone-video-height);
    aspect-ratio: 9 / 19.5;
    border-radius: 28px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 10px 22px rgba(0,0,0,0.12);
}

.example-frame video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.example-item.is-active .example-frame {
    box-shadow: 0 16px 34px rgba(0,0,0,0.16);
}

.videos {
    padding: 2rem 0;
    background: #ffffff;
}

.videos h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c3e50;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.video-card {
    background: transparent;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    transition: none;
}

.video-card:hover {
    transform: none;
}

/* iPhone mockup */
.iphone-mockup {
    position: relative;
    width: min(320px, 100%);
    aspect-ratio: 9 / 19.5;
    margin: 0 2rem;
    padding: 14px;
    border-radius: 44px;
    background: linear-gradient(180deg, #1e1e1f 0%, #0b0b0c 100%);
    box-shadow:
        0 4px 4px rgba(0, 0, 0, 0.25),
        0 8px 14px rgba(0, 0, 0, 0.18);
}

.iphone-screen {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 32px;
    overflow: hidden;
    background: #000;
}

.iphone-screen video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    background: #000;
}

.video-card .caption {
    padding: 0.75rem 0 0;
    text-align: center;
    color: #666;
}

.screenshots h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c3e50;
}

/* Infinite scrolling carousel */
.screenshot-carousel {
    position: relative;
    overflow: hidden;
    padding: 0.25rem 0;
}

.screenshot-track {
    --carousel-duration: 40s;
    display: flex;
    align-items: stretch;
    gap: 2rem;
    width: max-content;
    animation: screenshot-scroll var(--carousel-duration) linear infinite;
    will-change: transform;
}

.screenshot-carousel:hover .screenshot-track {
    animation-play-state: paused;
}

@keyframes screenshot-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.screenshot-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    flex: 0 0 auto;
    width: clamp(240px, 28vw, 340px);
}

.screenshot-card:hover {
    transform: translateY(-5px);
}

.screenshot-card img {
    width: 100%;
    height: auto;
    display: block;
}

.screenshot-card .caption {
    padding: 1rem;
    text-align: center;
    color: #666;
}

footer {
    background: #2c3e50;
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer-links {
    margin-bottom: 1rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    margin: 0 0.5rem;
}

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

.footer-links span {
    margin: 0 0.5rem;
}

.content-page {
    padding: 2rem 0;
    min-height: 60vh;
}

.content-page h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.content-page h2 {
    font-size: 1.75rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #34495e;
}

.content-page p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.content-page ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.content-page li {
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .screenshot-card {
        width: clamp(240px, 70vw, 340px);
    }

    .video-grid {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .video-card {
        display: flex;
        justify-content: center;
    }

    .videos {
        padding-bottom: 3rem;
    }

    .videos .container {
        padding: 0 8px;
    }

    .iphone-mockup {
        width: min(460px, 100%);
    }
}

@media (min-width: 769px) {
    .video-grid {
        gap: 1.25rem;
        justify-items: stretch;
    }

    .video-card {
        display: flex;
        justify-content: flex-end;
    }

    .video-card:nth-child(even) {
        justify-content: flex-start;
    }

    .iphone-mockup {
        margin: 0 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .screenshot-track {
        animation: none;
        transform: none;
    }

    .screenshot-carousel {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}
