@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;1,400;1,500&display=swap');

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

html {
    background-color: #4338CA;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #4338CA;
    background: linear-gradient(135deg,
        #4338CA 0%,
        #8B5CF6 35%,
        #14B8A6 70%,
        #F97316 100%);
    background-size: 200% 200%;
    animation: auroraGradient 15s ease infinite;
    min-height: 100vh;
    padding: 40px 20px;
}

@keyframes auroraGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes cardShift {
    0%, 100% {
        background-color: rgba(25, 15, 75, 0.42);
        border-color: rgba(139, 92, 246, 0.25);
        box-shadow: 0 8px 32px rgba(67, 56, 202, 0.2);
    }
    50% {
        background-color: rgba(10, 40, 38, 0.5);
        border-color: rgba(20, 184, 166, 0.25);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    }
}

@keyframes headingShift {
    0%, 100% {
        text-shadow: 0 2px 10px rgba(67, 56, 202, 0.5);
    }
    50% {
        text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
    }
}

@keyframes subtextShift {
    0%, 100% {
        text-shadow: 0 1px 6px rgba(67, 56, 202, 0.35);
    }
    50% {
        text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
    }
}

@keyframes buttonShift {
    0%, 100% {
        box-shadow: 0 4px 14px rgba(67, 56, 202, 0.18);
    }
    50% {
        box-shadow: 0 4px 14px rgba(0, 50, 40, 0.22);
    }
}

.container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.logo {
    width: 100px;
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

h1 {
    font-size: 36px;
    color: white;
    margin-bottom: 10px;
    animation: headingShift 15s ease infinite;
}

p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 16px;
    animation: subtextShift 15s ease infinite;
}

/* ── Hero Section ── */

.hero {
    margin-bottom: 12px;
}

.hero-text .subtitle {
    font-size: 18px;
    margin-bottom: 20px;
}

.hero-cta {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 28px;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
    animation: buttonShift 15s ease infinite;
}

.cta-button:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    border-color: rgba(255, 255, 255, 0.35);
}

.cta-button svg {
    width: 20px;
    height: 20px;
}


/* ── iPhone 17 Pro Frame ── */

.iphone-frame {
    position: relative;
    width: 220px;
    background: #1a1a1a;
    border-radius: 40px;
    padding: 12px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.08),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.iphone-notch {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 22px;
    background: #1a1a1a;
    border-radius: 0 0 16px 16px;
    z-index: 2;
}

.iphone-screen {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 28px;
}

.iphone-frame-sm {
    width: 160px;
    flex-shrink: 0;
    border-radius: 32px;
    padding: 9px;
    cursor: pointer;
    transition: transform 0.3s;
    position: relative;
    overflow: hidden;
}

.iphone-frame-sm::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 32px;
    backdrop-filter: blur(0.8px);
    -webkit-backdrop-filter: blur(0.8px);
    transition: opacity 0.35s ease;
    pointer-events: none;
    z-index: 3;
}

.iphone-frame-sm:hover::after {
    opacity: 0;
}

.iphone-frame-sm:hover {
    transform: scale(1.25);
    z-index: 10;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.iphone-frame-sm .iphone-notch {
    top: 9px;
    width: 70px;
    height: 17px;
    border-radius: 0 0 12px 12px;
}

.iphone-frame-sm .iphone-screen {
    border-radius: 23px;
}

/* ── Yarn Shops Screenshot ── */

.screenshot-scroll-center {
    justify-content: center;
}

.yarnshops-screenshot {
    max-width: 648px;
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* ── Testimonials ── */

.testimonials {
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    padding: 24px 30px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 28px;
    animation: cardShift 15s ease infinite;
    min-height: 160px;
}

.testimonial-stars {
    color: #FBBF24;
    font-size: 20px;
    letter-spacing: 3px;
    margin-bottom: 12px;
}

.testimonial-carousel {
    position: relative;
    min-height: 80px;
}

.testimonial-quote {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.testimonial-quote.active {
    position: relative;
    opacity: 1;
    pointer-events: auto;
}

.testimonial-quote p {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 16px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.95);
    font-style: italic;
    margin-bottom: 8px;
    animation: none;
}

.testimonial-quote cite {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-style: normal;
    font-weight: 600;
}

.testimonial-source {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ── Screenshot Strip ── */

.screenshot-strip {
    margin-bottom: 28px;
}

/* ── Mode Toggle ── */

.mode-toggle {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 14px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 2px;
    max-width: 220px;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.mode-btn {
    flex: 1;
    padding: 4px 8px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
    white-space: nowrap;
}

.mode-btn.active {
    background: rgba(255, 255, 255, 0.18);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.mode-btn:hover:not(.active) {
    color: rgba(255, 255, 255, 0.85);
}

.screenshot-scroll {
    display: flex;
    gap: 10px;
    padding: 20px 4px 28px;
    justify-content: center;
}


/* ── Feature Highlights ── */

.highlights {
    margin-bottom: 28px;
}

.highlights-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.highlight-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-align: left;
    animation: cardShift 15s ease infinite;
}

.highlight-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.highlight-card h3 {
    font-size: 15px;
    font-weight: 700;
    color: white;
    margin-bottom: 2px;
}

.highlight-desc {
    font-size: 13px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 0;
    animation: none;
}

/* ── About Cards (downloads) ── */

.about-cards {
    margin-bottom: 4px;
}

.downloads {
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    margin-bottom: 24px;
    animation: cardShift 15s ease infinite;
}

h2 {
    font-size: 24px;
    color: white;
    margin-bottom: 20px;
}

.download-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
    margin: 12px 0;
    background: rgba(255, 255, 255, 0.12);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s;
    animation: buttonShift 15s ease infinite;
}

.download-link:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    border-color: rgba(255, 255, 255, 0.3);
}

.download-link svg {
    width: 24px;
    height: 24px;
}

.about-intro {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.93);
    text-align: left;
    margin-bottom: 0;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    margin-bottom: 20px;
    padding: 0;
    background: none;
    border: none;
    transition: color 0.2s;
}

.back-link:hover {
    color: white;
}

.back-link svg {
    opacity: 0.7;
}

.back-link:hover svg {
    opacity: 1;
}

/* ── Breadcrumb ── */

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
}

.breadcrumb a {
    display: inline-block;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    transition: all 0.2s;
}

.breadcrumb a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.28);
}

.breadcrumb-sep {
    display: none;
}

.breadcrumb-current {
    display: inline-block;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    margin: 10px 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-align: left;
}

.feature-item svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    margin-top: 2px;
}

.feature-item h3 {
    font-size: 15px;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.feature-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-left: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

.feature-item .feature-desc {
    font-size: 13px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.timeline {
    text-align: left;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.timeline-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.timeline-item:first-child {
    padding-top: 0;
}

.timeline-year {
    font-size: 14px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    flex-shrink: 0;
    width: 44px;
    padding-top: 2px;
}

.timeline-item h3 {
    font-size: 15px;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.timeline-item .feature-desc {
    font-size: 13px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.status-link {
    display: inline-block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    margin-top: 12px;
    transition: color 0.2s;
}

.status-link:hover {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
}

.footer-chips {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 24px;
    margin-bottom: 8px;
}

.footer-chip {
    display: inline-block;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    transition: all 0.2s;
    cursor: pointer;
}

.footer-chip:hover {
    color: white;
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.28);
}

.footer-chip.active {
    color: white;
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.3);
    cursor: default;
}

.footer-chip.current-section {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.22);
    border-style: dashed;
}

footer {
    margin-top: 6px;
    color: white;
    text-align: center;
}

footer p {
    font-size: 11px;
    margin-bottom: 2px;
    opacity: 0.7;
}

footer .legal {
    font-size: 10px;
    opacity: 0.55;
}

.feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

/* ── Desktop (768px+) ── */

@media (min-width: 768px) {
    .container {
        max-width: 900px;
    }

    .hero-cta {
        justify-content: center;
    }

    .iphone-frame {
        width: 260px;
        border-radius: 44px;
        padding: 14px;
    }

    .iphone-notch {
        top: 14px;
        width: 100px;
        height: 24px;
    }

    .iphone-screen {
        border-radius: 30px;
    }


    .feature-grid {
        grid-template-columns: 1fr 1fr;
    }

    .feature-item {
        margin: 0;
    }

    .iphone-frame-sm {
        border-radius: 36px;
        padding: 10px;
    }

    .iphone-frame-sm .iphone-notch {
        top: 10px;
        width: 80px;
        height: 19px;
        border-radius: 0 0 14px 14px;
    }

    .iphone-frame-sm .iphone-screen {
        border-radius: 26px;
    }
}

@media (max-width: 600px) {
    h1 {
        font-size: 28px;
    }

    .downloads {
        padding: 20px;
    }

    .hero-cta {
        flex-wrap: wrap;
    }

    .iphone-frame {
        width: 180px;
        border-radius: 34px;
        padding: 10px;
    }

    .iphone-notch {
        top: 10px;
        width: 75px;
        height: 18px;
        border-radius: 0 0 12px 12px;
    }

    .iphone-screen {
        border-radius: 24px;
    }

    .iphone-frame-sm {
        width: 107px;
        border-radius: 22px;
        padding: 6px;
    }

    .iphone-frame-sm::after {
        display: none;
    }

    .iphone-frame-sm:hover {
        transform: none;
        z-index: auto;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4),
            0 0 0 1px rgba(255, 255, 255, 0.08),
            inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    }

    .iphone-frame-sm .iphone-notch {
        top: 6px;
        width: 48px;
        height: 12px;
        border-radius: 0 0 8px 8px;
    }

    .iphone-frame-sm .iphone-screen {
        border-radius: 16px;
    }

    .screenshot-strip {
        margin-left: -20px;
        margin-right: -20px;
    }

    .screenshot-scroll {
        justify-content: center;
        padding: 12px 20px 20px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .container {
        max-width: 100%;
    }

}

/* ── Screenshot Lightbox ── */

.lightbox-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    cursor: pointer;
}
.lightbox-overlay.visible { opacity: 1; }

.lightbox-content {
    position: relative;
    cursor: default;
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 85vh;
    display: block;
    border-radius: 12px;
    box-shadow: 0 12px 60px rgba(0,0,0,0.6);
}

.lightbox-close {
    position: absolute;
    top: -14px; right: -14px;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.3); }

/* ── Focus states ── */

.download-link:focus-visible,
.feature-item:focus-visible,
.cta-button:focus-visible {
    outline: 2px solid white;
    outline-offset: 2px;
    background: rgba(255, 255, 255, 0.22);
}

.back-link:focus-visible,
.status-link:focus-visible {
    outline: 2px solid white;
    outline-offset: 2px;
}

.version-header:focus-visible {
    outline: 2px solid white;
    outline-offset: -2px;
}

/* ── Reduced motion ── */

@media (prefers-reduced-motion: reduce) {
    body,
    .downloads,
    .download-link,
    .feature-item,
    .stat-card,
    .highlight-card,
    .testimonials,
    .cta-button,
    h1, p {
        animation: none !important;
    }

    .status-dot.ok,
    .status-dot.down,
    .status-dot.error {
        animation: none !important;
    }

    .download-link,
    .cta-button,
    .iphone-frame-sm {
        transition: none;
    }

    .testimonial-quote {
        transition: none;
    }
}
