/* Base & Reset */
:root {
    --color-bg-white: #ffffff;
    --color-bg-light: #f5f5f7;
    --color-text-main: #1d1d1f;
    --color-text-muted: #86868b;
    --color-black: #000000;
    --color-white: #ffffff;
    --color-border: #d2d2d7;
    --font-system: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-system);
    background-color: var(--color-bg-white);
    color: var(--color-text-main);
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
header {
    background-color: var(--color-bg-white);
    padding: 24px 0;
}

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

.logo {
    display: inline-block;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: var(--color-text-main);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.logo-link:hover {
    opacity: 0.8;
}

.logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: contain;
}

.main-nav {
    display: flex;
    gap: 16px;
}

.main-nav a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-muted);
    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: var(--color-text-main);
}

/* Apps Section */
.hero {
    padding: 60px 0 80px;
    background-color: var(--color-bg-white);
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 40px;
}

.apps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.app-card {
    background-color: var(--color-bg-light);
    border-radius: 24px;
    padding: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-card-link {
    display: flex;
    align-items: center;
    gap: 24px;
    text-decoration: none;
    color: inherit;
}

.app-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

.app-icon {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    object-fit: contain;
    background-color: var(--color-white);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.app-info h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.app-info p {
    font-size: 1rem;
    color: var(--color-text-muted);
}

/* Features */
.features {
    padding: 60px 0;
    background-color: var(--color-bg-white);
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.icon-container {
    width: 52px;
    height: 52px;
    background-color: var(--color-bg-light);
    color: var(--color-text-main);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.icon-container svg {
    width: 28px;
    height: 28px;
}

.feature-item h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.feature-item p {
    font-size: 1rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* Coming Soon Section */
.coming-soon {
    padding: 80px 0;
    background-color: var(--color-bg-light);
}

.coming-soon h2 {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    letter-spacing: -0.5px;
    margin-bottom: 48px;
}

.coming-soon-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.soon-card {
    background-color: var(--color-white);
    padding: 40px 24px;
    border-radius: 20px;
    text-align: center;
    opacity: 0.6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.soon-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text-main);
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.soon-badge {
    background-color: var(--color-bg-light);
    color: var(--color-text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 20px;
}

/* Footer */
footer {
    background-color: var(--color-bg-white);
    padding: 40px 0;
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}

.footer-links a {
    font-size: 0.85rem;
    color: var(--color-text-main);
    font-weight: 500;
}

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

.footer-copy {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-align: center;
}

/* Responsive Media Queries (Mobile First approach naturally expands to Desktop) */
@media (min-width: 768px) {
    .container {
        padding: 0 40px;
    }
    
    .main-nav {
        gap: 32px;
    }

    .apps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }

    .features {
        padding: 80px 0;
    }

    .features-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 40px;
    }

    .coming-soon-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-container {
        flex-direction: row-reverse;
        justify-content: space-between;
    }
    
    .footer-links {
        justify-content: flex-end;
    }
}

@media (min-width: 1024px) {
    .hero {
        padding: 80px 0 100px;
    }

    .section-title {
        font-size: 3rem;
    }
}

/* App Detail Page */
.app-detail-hero {
    padding: 60px 0 80px;
    background-color: var(--color-bg-white);
}

.app-detail-container {
    max-width: 800px;
    margin: 0 auto;
}

.app-detail-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 60px;
}

.app-detail-icon {
    width: 120px;
    height: 120px;
    border-radius: 26px;
    object-fit: contain;
    background-color: var(--color-white);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    flex-shrink: 0;
}

.app-detail-title-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.app-detail-name {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1.1;
}

.app-detail-tagline {
    font-size: 1.05rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin: 0;
}

.app-store-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--color-text-main);
    color: var(--color-white);
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 8px;
    width: fit-content;
}

.app-store-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    color: var(--color-white);
}

.app-store-btn svg {
    flex-shrink: 0;
}

.app-detail-description {
    text-align: center;
    margin-bottom: 48px;
}

.app-detail-description h2 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
}

.app-detail-description p {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* iPhone Showcase */
.app-detail-showcase {
    display: flex;
    justify-content: center;
    padding: 20px 0 40px;
}

.iphone-frame {
    width: 300px;
    aspect-ratio: 9 / 19.5;
    background-color: #000000;
    border: 10px solid #000000;
    border-radius: 46px;
    position: relative;
    box-shadow: 0 24px 48px rgba(0,0,0,0.12);
}

.dynamic-island {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 95px;
    height: 28px;
    background-color: #000000;
    border-radius: 20px;
    z-index: 20;
}

.carousel-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 36px;
    background-color: var(--color-bg-white);
    position: relative;
    z-index: 10;
}

.carousel-track {
    display: flex;
    width: 400%;
    height: 100%;
    animation: carouselSlide 12s infinite cubic-bezier(0.77, 0, 0.17, 1);
}

.carousel-track img {
    width: 25%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@keyframes carouselSlide {
    0%, 20% { transform: translateX(0); }
    25%, 45% { transform: translateX(-25%); }
    50%, 70% { transform: translateX(-50%); }
    75%, 95% { transform: translateX(-75%); }
    100% { transform: translateX(0); }
}

/* Responsive: App Detail */
@media (max-width: 600px) {
    .app-detail-header {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .app-detail-title-group {
        align-items: center;
    }

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

    .app-detail-name {
        font-size: 1.75rem;
    }

    .iphone-frame {
        width: 240px;
    }
}
