/* ==========================================================================
   ClickFile Website — Styles
   ========================================================================== */

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

:root {
    /* Core palette — deep navy to bright blue accent matching the app icon */
    --bg-dark: #0a0e1a;
    --bg-dark-2: #0f1424;
    --bg-surface: #151b2e;
    --bg-card: #1a2138;
    --bg-light: #f4f5f7;
    --bg-white: #ffffff;

    --blue-primary: #1a5dff;
    --blue-bright: #3b7aff;
    --blue-glow: rgba(26, 93, 255, 0.25);
    --blue-subtle: rgba(26, 93, 255, 0.08);

    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.65);
    --text-muted: rgba(255, 255, 255, 0.4);
    --text-dark: #1a1a2e;
    --text-dark-secondary: #555670;

    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-light: rgba(0, 0, 0, 0.08);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --font-display: 'Outfit', sans-serif;
    --font-body: 'DM Sans', sans-serif;

    --max-width: 1120px;
    --nav-height: 64px;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--blue-bright);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #5a94ff;
}

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

/* --- Navigation --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 100;
    background: rgba(10, 14, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
}

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

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
}

.nav-icon {
    width: 32px;
    height: 32px;
    border-radius: 7px;
}

.nav-logo-text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--blue-primary);
    border-radius: 1px;
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--nav-height) + 0px) 32px 80px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.hero-glow {
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 600px;
    background: radial-gradient(ellipse at center, var(--blue-glow) 0%, transparent 70%);
    pointer-events: none;
    animation: glowPulse 6s ease-in-out infinite alternate;
}

@keyframes glowPulse {
    0% { opacity: 0.6; transform: translateX(-50%) scale(1); }
    100% { opacity: 1; transform: translateX(-50%) scale(1.1); }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 680px;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: none;
    color: var(--blue-bright);
    background: var(--blue-subtle);
    border: 1px solid rgba(59, 122, 255, 0.2);
    border-radius: 100px;
    margin-bottom: 28px;
    position: relative;
    top: -96px;
    animation: fadeInUp 0.8s ease both;
}

/* --- Hero Product Name (icon + "ClickFile - Screenshots") --- */
.hero-product-name {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease 0.05s both;
}

.hero-product-icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(26, 93, 255, 0.25);
}

.hero-product-text {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4.5vw, 3.2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.hero-product-dash {
    color: var(--text-muted);
    font-weight: 400;
    margin: 0 2px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.035em;
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease 0.1s both;
}

.hero-accent {
    background: linear-gradient(135deg, var(--blue-bright) 0%, #6db3f2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto 36px;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-cta {
    animation: fadeInUp 0.8s ease 0.3s both;
    margin-bottom: 16px;
}

.app-store-badge {
    display: inline-block;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.app-store-badge:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.app-store-svg {
    height: 48px;
    width: auto;
}

.app-store-button {
    display: inline-block;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--blue-primary);
    border-radius: var(--radius-xl);
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
    letter-spacing: 0.01em;
}

.app-store-button:hover {
    background: var(--blue-bright);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.hero-price {
    font-size: 0.85rem;
    color: var(--text-muted);
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-visual {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    opacity: 0.06;
    pointer-events: none;
}

.hero-icon {
    width: 400px;
    height: 400px;
}

/* --- Features Section --- */
.features {
    padding: 100px 32px;
    background: var(--bg-dark-2);
    border-top: 1px solid var(--border-subtle);
}

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

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

.section-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

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

.feature-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.feature-card:hover {
    border-color: rgba(59, 122, 255, 0.3);
    transform: translateY(-4px);
}

.feature-number {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 800;
    color: var(--blue-primary);
    line-height: 1;
    margin-bottom: 20px;
    opacity: 0.6;
}

.feature-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.feature-desc {
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text-secondary);
}

/* --- Screenshots Section --- */
.screenshots {
    padding: 100px 0;
    background: var(--bg-dark);
    border-top: 1px solid var(--border-subtle);
    overflow: hidden;
}

.screenshots-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 32px;
}

/* Carousel container */
.screenshots-carousel {
    position: relative;
    margin-top: 48px;
}

.screenshots-track-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 20px;
    scroll-behavior: smooth;
}

.screenshots-track-wrapper::-webkit-scrollbar {
    display: none;
}

.screenshots-track {
    display: flex;
    gap: 24px;
    padding: 0 32px;
    width: max-content;
}

.screenshot-item {
    flex-shrink: 0;
    width: 560px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: var(--bg-surface);
    cursor: pointer;
}

.screenshot-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

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

.screenshot-caption {
    padding: 14px 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
    font-family: var(--font-body);
}

/* Carousel arrow buttons */
.carousel-arrow {
    position: absolute;
    top: calc(50% - 30px);
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    background: rgba(15, 20, 36, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease, opacity 0.3s ease, transform 0.2s ease;
}

.carousel-arrow:hover {
    background: rgba(26, 93, 255, 0.25);
    border-color: rgba(59, 122, 255, 0.4);
    transform: translateY(-50%) scale(1.08);
}

.carousel-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-arrow.hidden {
    opacity: 0;
    pointer-events: none;
}

.carousel-arrow-left {
    left: -8px;
}

.carousel-arrow-right {
    right: -8px;
}

/* Carousel dot indicators */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: var(--text-muted);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    padding: 0;
}

.carousel-dot:hover {
    background: var(--text-secondary);
    transform: scale(1.3);
}

.carousel-dot.active {
    background: var(--blue-bright);
    transform: scale(1.2);
}

/* --- Lightbox --- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 1010;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
}

.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: lightboxIn 0.3s ease;
}

@keyframes lightboxIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox-img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    margin-top: 20px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
    font-family: var(--font-body);
}

.lightbox-counter {
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-body);
}

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1010;
    width: 56px;
    height: 56px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.lightbox-arrow:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.08);
}

.lightbox-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.lightbox-arrow-left {
    left: 24px;
}

.lightbox-arrow-right {
    right: 24px;
}

/* Prevent body scroll when lightbox is open */
body.lightbox-open {
    overflow: hidden;
}

/* --- Details Section --- */
.details {
    padding: 100px 32px;
    background: var(--bg-dark-2);
    border-top: 1px solid var(--border-subtle);
}

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

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.detail-item {
    padding: 36px 32px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    transition: border-color 0.3s ease;
}

.detail-item:hover {
    border-color: rgba(59, 122, 255, 0.2);
}

.detail-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--blue-subtle);
    border-radius: var(--radius-sm);
    color: var(--blue-bright);
    margin-bottom: 20px;
}

.detail-item h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.detail-item p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* --- Brand Section --- */
.brand-section {
    padding: 100px 32px;
    text-align: center;
    background: var(--bg-dark);
    border-top: 1px solid var(--border-subtle);
}

.brand-inner {
    max-width: 560px;
    margin: 0 auto;
}

.brand-icon {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    margin: 0 auto 24px;
    box-shadow: 0 8px 32px rgba(26, 93, 255, 0.2);
}

.brand-tagline {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.brand-sub {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* --- Footer --- */
.footer {
    padding: 32px;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-dark);
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* --- Page Content (Privacy, Support) --- */
.page-content {
    padding: calc(var(--nav-height) + 60px) 32px 80px;
    min-height: 100vh;
}

.page-inner {
    max-width: 720px;
    margin: 0 auto;
}

.page-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.page-date {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 48px;
}

/* Prose styles for Privacy Policy */
.prose h2 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.prose p {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.prose ul, .prose ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.prose li {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.prose strong {
    color: var(--text-primary);
    font-weight: 600;
}

.prose a {
    color: var(--blue-bright);
}

/* --- Setup Section --- */
.setup-section {
    margin-bottom: 48px;
    padding: 32px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
}

.setup-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.setup-steps {
    list-style: decimal;
    padding-left: 24px;
    margin: 0;
}

.setup-steps li {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 12px;
    padding-left: 8px;
}

.setup-steps li:last-child {
    margin-bottom: 0;
}

.setup-steps li strong {
    color: var(--text-primary);
}

.faq-heading {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
}

/* --- FAQ Styles --- */
.faq-list {
    margin-bottom: 64px;
}

.faq-item {
    border-bottom: 1px solid var(--border-subtle);
}

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

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    list-style: none;
    transition: color 0.2s ease;
}

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

.faq-question:hover {
    color: var(--blue-bright);
}

.faq-chevron {
    flex-shrink: 0;
    transition: transform 0.3s ease;
    color: var(--text-muted);
}

details[open] .faq-chevron {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 0 24px;
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--text-secondary);
}

.faq-answer p {
    margin-bottom: 12px;
}

.faq-answer ul, .faq-answer ol {
    padding-left: 24px;
    margin-bottom: 12px;
}

.faq-answer li {
    margin-bottom: 6px;
}

.faq-answer strong {
    color: var(--text-primary);
}

.faq-answer code {
    background: var(--bg-card);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--blue-bright);
}

/* Shortcut table */
.shortcut-table {
    width: 100%;
    margin: 12px 0;
    border-collapse: collapse;
}

.shortcut-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.9rem;
}

.shortcut-table td:first-child {
    width: 100px;
}

kbd {
    display: inline-block;
    padding: 3px 8px;
    font-family: var(--font-body);
    font-size: 0.8rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 5px;
    color: var(--text-primary);
}

/* Support contact */
.support-contact {
    text-align: center;
    padding: 48px 0;
}

.support-contact h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.support-contact p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.contact-button {
    display: inline-block;
    padding: 14px 32px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--blue-primary);
    border-radius: var(--radius-xl);
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.contact-button:hover {
    background: var(--blue-bright);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .details-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .screenshot-item {
        width: 320px;
    }

    .hero {
        padding-top: calc(var(--nav-height) + 20px);
        min-height: auto;
        padding-bottom: 60px;
    }

    .hero-icon {
        width: 240px;
        height: 240px;
    }

    .hero-product-icon {
        width: 40px;
        height: 40px;
        border-radius: 9px;
    }

    .hero-product-name {
        gap: 10px;
    }

    .nav-inner {
        padding: 0 20px;
    }

    .nav-links {
        gap: 20px;
    }

    .footer-inner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .screenshots-track {
        padding: 0 20px;
    }

    .carousel-arrow {
        width: 40px;
        height: 40px;
    }

    .carousel-arrow-left {
        left: -4px;
    }

    .carousel-arrow-right {
        right: -4px;
    }

    .lightbox-arrow {
        width: 44px;
        height: 44px;
    }

    .lightbox-arrow-left {
        left: 12px;
    }

    .lightbox-arrow-right {
        right: 12px;
    }

    .lightbox-close {
        top: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .nav-links {
        gap: 16px;
    }

    .nav-link {
        font-size: 0.8rem;
    }

    .screenshot-item {
        width: 280px;
    }

    .carousel-arrow {
        display: none;
    }
}
