@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700&display=swap');

:root {
    /* Material 3 Blue Palette (Light Mode) */
    /* Brand Colors extracted from logo */
    --brand-blue-dark: #0071BC;
    --brand-blue-light: #29ABE2;
    --brand-yellow: #FBB03B;

    --md-sys-color-primary: var(--brand-blue-dark);
    --md-sys-color-on-primary: #FFFFFF;
    --md-sys-color-primary-container: #E1F5FE;
    --md-sys-color-on-primary-container: #001D36;
    --md-sys-color-secondary: var(--brand-yellow);
    --md-sys-color-on-secondary: #000000;
    --md-sys-color-tertiary: var(--brand-blue-light);
    --md-sys-color-surface: #FDFCFF;
    --md-sys-color-on-surface: #1A1C1E;
    --md-sys-color-surface-variant: #DFE2EB;
    --md-sys-color-on-surface-variant: #43474E;
    --md-sys-color-outline: #73777F;
    --md-sys-color-error: #BA1A1A;

    /* Elevations */
    --elevation-1: 0px 1px 3px 1px rgba(0, 0, 0, 0.15), 0px 1px 2px 0px rgba(0, 0, 0, 0.30);
    --elevation-2: 0px 2px 6px 2px rgba(0, 0, 0, 0.15), 0px 1px 2px 0px rgba(0, 0, 0, 0.30);
    --elevation-3: 0px 4px 8px 3px rgba(0, 0, 0, 0.15), 0px 1px 3px 0px rgba(0, 0, 0, 0.30);

    /* Spacing & Borders */
    --radius-s: 8px;
    --radius-m: 12px;
    --radius-l: 24px;
    --radius-xl: 28px;
    --container-max-width: 1200px;
}

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

html,
body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding-top: 64px;
}

h1,
h2,
h3,
h4,
.brand-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

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

/* --- Layout Components --- */

.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
}

/* Header / Navigation */
header {
    padding: 0.75rem 0;
    align-items: center;
    background-color: var(--md-sys-color-surface);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid var(--md-sys-color-surface-variant);
    box-shadow: var(--elevation-1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background-color: var(--md-sys-color-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.brand-name {
    font-size: 1.5rem;
    color: var(--md-sys-color-primary);
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: var(--md-sys-color-primary);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.nav-link {
    font-weight: 500;
    color: var(--md-sys-color-on-surface-variant);
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link:hover {
    color: var(--md-sys-color-primary);
}

.nav-link.active {
    color: var(--md-sys-color-primary);
    font-weight: 700;
}

.hero-wrapper {
    background-color: #000;
    width: 100%;
    color: white;
    position: relative;
    overflow: hidden;
}

/* Hero Section (Featured Product) */
.hero {
    padding: 6rem 0;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    grid-template-rows: auto 1fr;
    gap: 1rem 3rem;
    align-items: center;
    animation: fadeIn 0.8s ease-out;
}

.hero-title {
    grid-column: 1;
    grid-row: 1;
}

.hero-title h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    color: #FFFFFF;
}

.hero-bottom {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
}

.hero-bottom p {
    font-size: 1.25rem;
    color: #D1E4FF;
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-visual {
    grid-column: 2;
    grid-row: 1 / 3;
}

.badge-featured {
    display: inline-block;
    padding: 6px 16px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #D1E4FF;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* (Styles moved up to .hero-wrapper section) */

.hero-actions {
    display: flex;
    gap: 1rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    border-radius: 100px;
    font-weight: 600;
    font-size: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: var(--elevation-1);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--elevation-2);
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
}

.phone-mockup {
    width: 280px;
    max-width: 100%;
    height: 580px;
    background: #111;
    border-radius: 36px;
    border: 8px solid #222;
    overflow: hidden;
    box-shadow: var(--elevation-3);
}

.phone-screen {
    width: 100%;
    height: 100%;
    background-color: #fff;
    position: relative;
}

/* App Grid */
.section-title {
    margin-bottom: 2rem;
    font-size: 2rem;
    text-align: center;
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
    justify-content: center;
    max-width: 100%;
}

.app-card {
	min-width: 0%;
    background-color: var(--md-sys-color-surface);
    border: 1px solid var(--md-sys-color-surface-variant);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.app-card:hover {
    border-color: var(--md-sys-color-primary);
    box-shadow: 0 8px 24px rgba(0, 113, 188, 0.12);
    transform: translateY(-4px);
}

.app-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background-color: var(--md-sys-color-primary);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    overflow: hidden;
}

.app-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.app-card-header .app-icon {
    margin-bottom: 0;
    flex-shrink: 0;
}

.app-card-info {
    flex-grow: 1;
    min-width: 0;
}

.app-card-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-card-category {
    font-size: 0.8rem;
    color: var(--md-sys-color-on-surface-variant);
    font-weight: 500;
}

.app-card-rating {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    white-space: nowrap;
    background: var(--md-sys-color-primary-container);
    padding: 4px 10px;
    border-radius: 100px;
    flex-shrink: 0;
}

.app-card p {
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1.25rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.app-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--md-sys-color-surface-variant);
}

.app-card-downloads {
    font-size: 0.8rem;
    color: var(--md-sys-color-on-surface-variant);
    font-weight: 500;
}

.app-card-detail-btn {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--md-sys-color-primary);
    padding: 6px 16px;
    border-radius: 100px;
    border: 1px solid var(--md-sys-color-primary);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.app-card:hover .app-card-detail-btn {
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
}

/* Footer */
footer {
    background-color: var(--md-sys-color-surface-variant);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand .brand-name {
    margin-bottom: 1rem;
    display: block;
}

.footer-links h4 {
    margin-bottom: 1.25rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-bottom {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--md-sys-color-on-surface-variant);
}

/* Detail Page */
.product-hero-wrapper {
    width: 100%;
    padding: 2rem 0;
    transition: all 0.3s ease;
}

.product-hero-wrapper.has-bg {
    color: white;
    padding: 3rem 0 2rem;
}

.product-hero-wrapper.has-bg .detail-info h1 {
    color: white;
}

.product-hero-wrapper.has-bg .detail-meta {
    color: rgba(255, 255, 255, 0.7);
}

.product-hero-wrapper.has-bg .detail-icon {
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.product-hero-wrapper.has-bg .detail-description h2 {
    color: white;
}

.product-hero-wrapper.has-bg .detail-description p {
    color: rgba(255, 255, 255, 0.8);
}

.product-detail-hero {
    padding: 0;
}

.detail-header {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .detail-header {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .detail-meta {
        justify-content: center;
        flex-wrap: wrap;
    }

    .header-actions {
        justify-content: center;
        width: 100%;
    }
}

.detail-info {
    flex-grow: 1;
}

.detail-icon {
    width: 120px;
    height: 120px;
    border-radius: 28px;
    background-color: var(--md-sys-color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    overflow: hidden;
}

.detail-info h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.detail-meta {
    display: flex;
    gap: 1.5rem;
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: 1.5rem;
}

.share-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    border: 1px solid var(--md-sys-color-outline);
    color: var(--md-sys-color-primary);
}

.share-button:hover {
    background: var(--md-sys-color-primary-container);
}

.has-bg .share-button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.has-bg .share-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.product-content-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 4rem;
    padding: 3rem 0;
    width: 100%;
}

.main-content {
    min-width: 0;
    /* Prevents gallery from pushing sidebar */
}

@media (max-width: 992px) {
    .product-content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.side-app-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.side-app-item {
    display: flex;
    gap: 1rem;
    align-items: center;
    text-decoration: none;
    color: inherit;
    padding: 1rem;
    border-radius: var(--radius-m);
    transition: background 0.2s;
    border: 1px solid var(--md-sys-color-surface-variant);
}

.side-app-item:hover {
    background-color: var(--md-sys-color-primary-container);
    border-color: transparent;
}

.side-app-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--md-sys-color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    overflow: hidden;
}

.app-icon img,
.detail-icon img,
.side-app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.side-app-info h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.side-app-info span {
    font-size: 0.75rem;
    color: var(--md-sys-color-on-surface-variant);
}

.screenshot-carousel {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 0;
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling for iOS */
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.screenshot-carousel::-webkit-scrollbar {
    display: none;
}

.carousel-container {
    position: relative;
    width: 100%;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    border: none;
    box-shadow: var(--elevation-2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    color: var(--md-sys-color-primary);
}

.carousel-nav:hover {
    background: var(--md-sys-color-primary-container);
    box-shadow: var(--elevation-3);
}

.carousel-nav.prev {
    left: -24px;
}

.carousel-nav.next {
    right: -24px;
}

/* Hide nav buttons on mobile */
@media (max-width: 768px) {
    .carousel-nav {
        display: none;
    }
}

.screenshot-item {
    min-width: 240px;
    height: 480px;
    scroll-snap-align: start;
    background-color: var(--md-sys-color-surface-variant);
    border-radius: 24px;
    flex-shrink: 0;
    overflow: hidden;
}

/* Content Page (Privacy, Contact) */
.page-content {
    max-width: 800px;
    margin: 4rem auto;
    padding: 0 1.5rem;
}

.page-content h1 {
    margin-bottom: 2rem;
}

.page-content p {
    margin-bottom: 1.5rem;
    color: var(--md-sys-color-on-surface-variant);
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--md-sys-color-outline);
    background: transparent;
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--md-sys-color-primary);
    border-width: 2px;
}

/* --- Responsive --- */

@media (max-width: 992px) {
    .hero {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        text-align: center;
        gap: 2rem;
        padding: 4rem 0;
    }

    .hero-title {
        grid-column: 1;
        grid-row: 1;
        order: 1;
    }

    .hero-visual {
        grid-column: 1;
        grid-row: 2;
        order: 2;
    }

    .hero-bottom {
        grid-column: 1;
        grid-row: 3;
        order: 3;
    }

    .hero-bottom p {
        margin: 0 auto 2.5rem;
    }

    .hero-title h1 {
        font-size: 3rem;
    }

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

@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Hidden by default on mobile */
        position: absolute;
        top: calc(100% + 1rem);
        /* 100% height of nav + bottom padding of header */
        left: 0;
        width: 100%;
        background-color: var(--md-sys-color-surface);
        flex-direction: column;
        padding: 1.5rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--md-sys-color-surface-variant);
        box-shadow: var(--elevation-2);
        z-index: 99;
    }

    .nav-links.active {
        display: flex;
        /* Shown when active class is added */
    }

    .menu-toggle {
        display: flex;
    }

    .app-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .app-card {
        padding: 1.25rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 600px) {

    .detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    /* Show Bottom Navigation on mobile */
    .bottom-nav {
        display: flex;
    }

    main {
        padding-bottom: 80px;
        /* Space for bottom nav */
    }
}

/* Bottom Navigation (Android Style) */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background-color: var(--md-sys-color-surface);
    border-top: 1px solid var(--md-sys-color-surface-variant);
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding: 0 1rem;
}

.bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.75rem;
    font-weight: 500;
    flex: 1;
    transition: color 0.2s;
}

.bottom-nav-link i {
    font-size: 1.5rem;
}

.bottom-nav-link.active {
    color: var(--md-sys-color-primary);
}

.bottom-nav-icon {
    width: 64px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    transition: background-color 0.2s;
}

.bottom-nav-link.active .bottom-nav-icon {
    background-color: var(--md-sys-color-primary-container);
}

@media (max-width: 480px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero-title h1 {
        font-size: 2.25rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
}

/* Page Content Typography (Privacy Policy, dll) */
.page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 1rem;
    color: var(--md-sys-color-on-surface);
    line-height: 1.6;
}

.page-content h1,
.page-content h2,
.page-content h3 {
    color: var(--md-sys-color-primary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.page-content h1 {
    font-size: 2.5rem;
    margin-top: 1rem;
}

.page-content p {
    margin-bottom: 1.25rem;
    color: var(--md-sys-color-on-surface-variant);
}

.page-content ul,
.page-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.page-content li {
    margin-bottom: 0.5rem;
    color: var(--md-sys-color-on-surface-variant);
}

.page-content a:not(.cta-button) {
    color: var(--brand-blue-light);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.page-content a:not(.cta-button):hover {
    color: var(--brand-blue-dark);
}