/* ── Reset & Base ── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-bg: #ffffff;
    --color-bg-alt: #f5f5f7;
    --color-text: #1d1d1f;
    --color-text-secondary: #6e6e73;
    --color-accent: #30d158;
    --color-accent-dark: #28a745;
    --color-border: #d2d2d7;
    --color-card-bg: #ffffff;
    --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --max-width: 980px;
    --transition: 0.3s ease;
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-bg: #000000;
        --color-bg-alt: #1c1c1e;
        --color-text: #f5f5f7;
        --color-text-secondary: #a1a1a6;
        --color-border: #38383a;
        --color-card-bg: #1c1c1e;
    }
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.5;
}

a {
    color: var(--color-accent-dark);
    text-decoration: none;
    transition: color var(--transition);
}

@media (prefers-color-scheme: dark) {
    a {
        color: var(--color-accent);
    }
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* ── Navigation ── */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--color-border);
}

@media (prefers-color-scheme: dark) {
    .site-nav {
        background-color: rgba(0, 0, 0, 0.8);
    }
}

.site-nav .nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
}

.site-nav .nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--color-text);
    text-decoration: none;
}

.site-nav .nav-brand img {
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

.site-nav .nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.site-nav .nav-links a {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color var(--transition);
}

.site-nav .nav-links a:hover,
.site-nav .nav-links a[aria-current="page"] {
    color: var(--color-text);
}

/* ── Hero Section ── */
.hero {
    text-align: center;
    padding: 5rem 1.5rem 3rem;
    background-color: var(--color-bg);
}

.hero .app-icon {
    width: 120px;
    height: 120px;
    border-radius: 26px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

@media (prefers-color-scheme: dark) {
    .hero .app-icon {
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    }
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 0.75rem;
}

.hero .subtitle {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.4;
}

.hero .app-store-badge {
    display: inline-block;
    transition: opacity var(--transition);
}

.hero .app-store-badge:hover {
    opacity: 0.8;
}

.hero .app-store-badge img {
    height: 54px;
    width: auto;
}

/* ── Screenshots Carousel ── */
.screenshots {
    padding: 3rem 0 4rem;
    background-color: var(--color-bg-alt);
}

.screenshots h2 {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2rem;
    letter-spacing: -0.01em;
    padding: 0 1.5rem;
}

.carousel {
    position: relative;
    max-width: 980px;
    margin: 0 auto;
}

.carousel-track {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem 2rem 1rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

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

.carousel-slide {
    flex: 0 0 auto;
    scroll-snap-align: start;
    text-align: center;
}

.carousel-slide img {
    height: 620px;
    width: auto;
    border-radius: 8px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

@media (prefers-color-scheme: dark) {
    .carousel-slide img {
        box-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
    }
}

.carousel-caption {
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    letter-spacing: 0.01em;
}

/* Hide fades at scroll boundaries */
.carousel.carousel-at-start::before {
    opacity: 0;
}

.carousel.carousel-at-end::after {
    opacity: 0;
}

/* Scroll hint: soft gradient fades on edges */
.carousel::before,
.carousel::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 6rem;
    z-index: 2;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.carousel::before {
    left: 0;
    background: linear-gradient(to right, var(--color-bg-alt) 0%, rgba(245, 245, 247, 0) 100%);
}

.carousel::after {
    right: 0;
    background: linear-gradient(to left, var(--color-bg-alt) 0%, rgba(245, 245, 247, 0) 100%);
}

@media (prefers-color-scheme: dark) {
    .carousel::before {
        background: linear-gradient(to right, var(--color-bg-alt) 0%, rgba(28, 28, 30, 0) 100%);
    }

    .carousel::after {
        background: linear-gradient(to left, var(--color-bg-alt) 0%, rgba(28, 28, 30, 0) 100%);
    }
}

/* Tablet: ~2 screenshots visible, scroll for more */
@media (max-width: 768px) {
    .carousel-track {
        gap: 1rem;
        padding: 0.5rem 1.5rem 1rem;
    }

    .carousel-slide img {
        height: 420px;
    }
}

/* Mobile: ~1 screenshot visible, snap to each */
@media (max-width: 480px) {
    .carousel-track {
        gap: 0.75rem;
        padding: 0.5rem 1rem 1rem;
        scroll-snap-type: x mandatory;
    }

    .carousel-slide {
        scroll-snap-align: center;
    }

    .carousel-slide img {
        height: 360px;
    }

    .carousel-caption {
        font-size: 0.75rem;
    }
}

/* ── Features Section ── */
.features {
    padding: 4rem 1.5rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.features h2 {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    letter-spacing: -0.01em;
}

.features .feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 768px) {
    .features .feature-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.features .feature-card {
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: 16px;
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    transition: transform var(--transition), box-shadow var(--transition);
}

.features .feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

@media (prefers-color-scheme: dark) {
    .features .feature-card:hover {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    }
}

.features .feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.features .feature-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.features .feature-card p {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

/* ── Data Types Section ── */
.data-types {
    padding: 3rem 1.5rem 4rem;
    background-color: var(--color-bg-alt);
}

.data-types h2 {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2rem;
    letter-spacing: -0.01em;
}

.data-types .data-type-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

@media (max-width: 900px) {
    .data-types .data-type-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .data-types .data-type-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 400px) {
    .data-types .data-type-grid {
        grid-template-columns: 1fr;
    }
}

.data-types .data-type-group {
    padding: 1.5rem;
    border-radius: 16px;
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
}

.data-types .data-type-group h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--color-accent-dark);
}

@media (prefers-color-scheme: dark) {
    .data-types .data-type-group h3 {
        color: var(--color-accent);
    }
}

.data-types .data-type-group ul {
    list-style: none;
    padding: 0;
}

.data-types .data-type-group li {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    padding: 0.25rem 0;
    line-height: 1.5;
}

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

.page-content h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.page-content .page-description {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    margin-bottom: 2.5rem;
}

.page-content h2 {
    font-size: 1.375rem;
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.page-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.page-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
}

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

.page-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
}

.page-content strong {
    color: var(--color-text);
}

.page-content hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 2rem 0;
}

/* ── FAQ Section ── */
.faq-list {
    margin-top: 1.5rem;
}

.faq-item {
    border-bottom: 1px solid var(--color-border);
    padding: 1.25rem 0;
}

.faq-item:first-child {
    border-top: 1px solid var(--color-border);
}

.faq-item summary {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--color-text-secondary);
    transition: transform var(--transition);
}

.faq-item[open] summary::after {
    content: "\2212";
}

.faq-item .faq-answer {
    margin-top: 0.75rem;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
}

/* ── Contact Box ── */
.contact-box {
    margin-top: 2.5rem;
    padding: 2rem;
    border-radius: 16px;
    background-color: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    text-align: center;
}

.contact-box h2 {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.contact-box p {
    color: var(--color-text-secondary);
    margin-bottom: 1.25rem;
}

.contact-box .btn-email {
    display: inline-block;
    padding: 0.75rem 2rem;
    background-color: var(--color-accent);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: 980px;
    text-decoration: none;
    transition: background-color var(--transition), transform var(--transition);
}

.contact-box .btn-email:hover {
    background-color: var(--color-accent-dark);
    transform: scale(1.02);
    text-decoration: none;
}

/* ── Footer ── */
.site-footer {
    border-top: 1px solid var(--color-border);
    padding: 1.5rem;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
}

.site-footer .footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

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

.site-footer .footer-links a {
    color: var(--color-text-secondary);
    margin: 0 0.75rem;
}

.site-footer .footer-links a:hover {
    color: var(--color-text);
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .hero h1 {
        font-size: 1.75rem;
    }

    .hero .subtitle {
        font-size: 1.0625rem;
    }

    .screenshots h2,
    .features h2 {
        font-size: 1.375rem;
    }
}
