/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Base Colors */
    --bg-primary: #0a0a0a;
    --bg-secondary: #151515;
    --bg-card: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;

    /* Accent Colors (from app icon) */
    --accent-primary: #6ee7b7;      /* Mint green */
    --accent-secondary: #a78bfa;    /* Purple */
    --accent-pink: #f9a8d4;         /* Pink */
    --accent-yellow: #fde68a;       /* Yellow */
    --accent-cyan: #5eead4;         /* Cyan */

    /* UI Elements */
    --border-color: #2a2a2a;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);

    /* Ambient Glow Colors */
    --glow-green: rgba(110, 231, 183, 0.15);
    --glow-purple: rgba(167, 139, 250, 0.15);
    --glow-pink: rgba(249, 168, 212, 0.1);

    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #f9a8d4 0%, #fde68a 25%, #6ee7b7 50%, #5eead4 75%, #a78bfa 100%);
    --gradient-ambient-1: radial-gradient(ellipse at 10% 20%, rgba(167, 139, 250, 0.15) 0%, transparent 50%);
    --gradient-ambient-2: radial-gradient(ellipse at 90% 30%, rgba(110, 231, 183, 0.15) 0%, transparent 50%);
    --gradient-ambient-3: radial-gradient(ellipse at 20% 60%, rgba(249, 168, 212, 0.1) 0%, transparent 50%);
    --gradient-ambient-4: radial-gradient(ellipse at 80% 70%, rgba(110, 231, 183, 0.15) 0%, transparent 50%);
    --gradient-ambient-5: radial-gradient(ellipse at 50% 90%, rgba(167, 139, 250, 0.15) 0%, transparent 50%);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    position: relative;
}

/* Removed gradient background for clean near-black look */

body > * {
    position: relative;
    z-index: 1;
}

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

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: transparent;
    backdrop-filter: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.header.scrolled {
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.logo-text {
    color: var(--text-primary);
}

.logo-image {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

.nav {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

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

.mobile-menu-toggle {
    display: none;
}

/* Hero Section */
.hero {
    padding: 200px 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero .container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-content {
    max-width: 100%;
    text-align: center;
}

.hero-title {
    font-size: 72px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 22px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.6;
}

.hero-ctas {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary {
    background: var(--accent-primary);
    color: #000000;
    font-weight: 600;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(110, 231, 183, 0.3);
    background: #7eedc4;
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--accent-primary);
    color: var(--accent-primary);
}

.btn-secondary:hover {
    background: rgba(59, 130, 246, 0.1);
}

.btn-disabled {
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Phone Mockup */
.hero-visual {
    display: flex;
    justify-content: center;
}

.phone-mockup {
    width: 280px;
    height: 560px;
    background: var(--bg-card);
    border-radius: 40px;
    padding: 12px;
    box-shadow: var(--shadow-lg);
    border: 8px solid #2a2a2a;
}

.mockup-screen {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 30%, var(--glow-purple), transparent 60%),
                radial-gradient(circle at 70% 70%, var(--glow-green), transparent 60%),
                var(--bg-secondary);
    border-radius: 32px;
    backdrop-filter: blur(10px);
}

/* Section Styles */
section {
    padding: 100px 0;
    background: transparent;
}

.section-title {
    font-size: 52px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
}

/* Features Section */
.features {
    background: transparent;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.feature-card {
    background: rgba(26, 26, 26, 0.5);
    backdrop-filter: blur(10px);
    padding: 32px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, var(--glow-green), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 30px rgba(110, 231, 183, 0.2);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.feature-card h3 {
    font-size: 24px;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* How It Works Section */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 48px;
}

.step {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step-screenshot {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.step-number {
    width: 64px;
    height: 64px;
    background: var(--accent-primary);
    color: #000000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    margin: 0 auto 24px;
}

.step h3 {
    font-size: 24px;
    margin-bottom: 12px;
}

.step p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Comparison Section */
.comparison {
    background: transparent;
}

.comparison-intro {
    max-width: 900px;
    margin: 0 auto 60px;
    text-align: center;
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 48px;
    max-width: 1000px;
    margin: 0 auto 48px;
}

.comparison-column {
    background: rgba(26, 26, 26, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px 32px;
}

.comparison-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 32px;
    text-align: center;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
}

.comparison-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comparison-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.comparison-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.comparison-item.traditional .comparison-icon {
    color: #ef4444;
}

.comparison-item.visualkey .comparison-icon {
    color: var(--accent-primary);
}

.comparison-item p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.comparison-note {
    max-width: 800px;
    margin: 0 auto;
    padding: 32px;
    background: rgba(26, 26, 26, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    text-align: center;
}

.comparison-note p {
    margin: 12px 0;
    color: var(--text-secondary);
    line-height: 1.8;
}

.comparison-note strong {
    color: var(--text-primary);
}

/* Screenshots Gallery Section */
.screenshots {
    background: transparent;
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    max-width: 1400px;
    margin: 0 auto;
}

.screenshot-card {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    aspect-ratio: 9/16;
}

.screenshot-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-primary);
    box-shadow: 0 20px 40px rgba(110, 231, 183, 0.2);
}

.screenshot-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
    display: block;
    background: var(--bg-secondary);
    border-radius: 12px 12px 0 0;
}

.screenshot-caption {
    padding: 16px;
    text-align: center;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
    background: var(--bg-card);
}

/* Legacy placeholders */
.screenshot-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: radial-gradient(circle at center, var(--glow-green), transparent 70%),
                var(--bg-secondary);
}

.screenshot-placeholder span {
    font-size: 64px;
    opacity: 0.5;
}

.screenshot-placeholder p {
    color: var(--text-secondary);
    font-weight: 600;
}

/* Security Section */
.security {
    background: transparent;
}

.security-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    justify-content: center;
}

.security-item {
    padding: 24px;
    text-align: center;
    flex: 1 1 280px;
    max-width: 400px;
}

.security-item h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--accent-primary);
}

.security-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Download Section */
.download {
    text-align: center;
    padding: 80px 0;
}

.download-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    margin: 16px 0 32px 0;
}

.download-cta {
    display: flex;
    justify-content: center;
}

.btn-large {
    padding: 16px 48px;
    font-size: 18px;
}

.nav .btn {
    padding: 10px 20px;
    font-size: 14px;
    margin-left: 16px;
}

.nav .btn-primary {
    color: #000000;
}

/* FAQ Section */
.faq {
    background: transparent;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-card);
    border-radius: 12px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s;
}

.faq-item:hover {
    border-color: var(--accent-primary);
}

.faq-item summary {
    padding: 32px;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    user-select: none;
}

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

.faq-item summary h3 {
    font-size: 20px;
    margin: 0;
    color: var(--text-primary);
    flex: 1;
}

.faq-icon {
    font-size: 24px;
    color: var(--accent-primary);
    transition: transform 0.3s;
    flex-shrink: 0;
}

.faq-item[open] .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 32px 32px 32px;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.faq-answer p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.faq-answer ul {
    margin: 16px 0;
    padding-left: 32px;
}

.faq-answer li {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 12px;
}

.faq-answer li:last-child {
    margin-bottom: 0;
}

/* Contact Section */
.contact-links {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.contact-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    transition: color 0.2s;
}

.contact-links a:hover {
    color: var(--accent-primary);
}

/* Footer */
.footer {
    background: transparent;
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer p {
    color: var(--text-secondary);
}

.footer a {
    color: var(--text-secondary);
    text-decoration: underline;
    transition: color 0.2s;
}

.footer a:hover {
    color: var(--accent-primary);
}

/* Privacy Policy Page */
.privacy-policy {
    padding: 120px 0 80px 0;
    min-height: 100vh;
}

.page-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.last-updated {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 48px;
}

.privacy-content {
    max-width: 800px;
    margin: 0 auto;
}

.privacy-section {
    margin-bottom: 48px;
}

.privacy-section h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.privacy-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 16px;
}

.privacy-section ul {
    margin: 16px 0;
    padding-left: 32px;
}

.privacy-section li {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 12px;
}

.privacy-section a {
    color: var(--accent-primary);
    text-decoration: underline;
    transition: color 0.2s;
}

.privacy-section a:hover {
    color: var(--accent-secondary);
}

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

/* Responsive Design */

/* Mobile carousel for How It Works section */
@media (max-width: 768px) {
    /* Carousel for How It Works section */
    .steps {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        gap: 0;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }

    .steps::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }

    .step {
        flex: 0 0 100%;
        scroll-snap-align: center;
        padding: 0 24px;
    }

    .step-screenshot {
        max-width: 240px;
        margin-bottom: 40px !important;
        margin-top: 0 !important;
        object-fit: cover;
        object-position: center bottom;
        max-height: 400px;
    }

    .step-content .step-number {
        margin-bottom: 16px;
    }

    .step-content h3 {
        margin-bottom: 12px;
    }

    .step-content p {
        margin-bottom: 0;
    }

    .how-it-works .container {
        padding: 0;
    }

    /* Dot indicators */
    .carousel-dots {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-top: 24px;
        padding: 0 24px;
    }

    .carousel-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--border-color);
        transition: all 0.3s ease;
    }

    .carousel-dot.active {
        background: var(--accent-primary);
        width: 24px;
        border-radius: 4px;
    }
}

/* Narrow phone optimization (regular iPhones) */
@media (max-width: 430px) {
    .step-screenshot {
        max-width: 200px;
    }

    .nav-wrapper {
        display: flex;
        justify-content: space-between;
        align-items: stretch;
        gap: 12px;
        padding: 12px 0;
    }

    .logo {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        align-self: center;
    }

    .logo a {
        display: flex;
        align-items: center;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        cursor: pointer;
        padding: 8px;
        margin: 0;
        order: 3;
        align-self: center;
        color: var(--text-primary);
    }

    .mobile-menu-toggle svg {
        display: block;
        width: 24px;
        height: 24px;
    }

    .nav {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        order: 2;
        margin-left: auto;
        align-self: center;
    }

    .nav .btn-primary {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        position: static;
        padding: 8px 16px;
        font-size: 14px;
        vertical-align: middle;
    }

    /* Hide Contact, FAQ, Privacy links - show in dropdown */
    .nav a:not(.btn-primary) {
        display: none;
    }

    /* Dropdown menu container */
    .nav.active::before {
        content: '';
        position: fixed;
        top: 75px;
        right: 12px;
        width: 200px;
        height: 159px;
        background: rgba(26, 26, 26, 0.85);
        border: 1px solid rgba(110, 231, 183, 0.2);
        border-radius: 16px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 1px rgba(110, 231, 183, 0.3);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        z-index: 98;
    }

    .nav.active a:not(.btn-primary) {
        display: block;
        position: fixed;
        right: 12px;
        width: 200px;
        padding: 16px 20px;
        color: var(--text-primary);
        background: transparent;
        border-bottom: 1px solid rgba(42, 42, 42, 0.5);
        z-index: 99;
        transition: background 0.2s, color 0.2s;
        font-weight: 500;
        text-align: left;
    }

    .nav.active a:not(.btn-primary):hover {
        background: rgba(110, 231, 183, 0.15);
        color: var(--accent-primary);
    }

    .nav.active a:not(.btn-primary):last-of-type {
        border-bottom: none;
    }

    /* Stack the dropdown links */
    .nav.active a:nth-child(1):not(.btn-primary) {
        top: 75px;
        border-radius: 16px 16px 0 0;
    }

    .nav.active a:nth-child(2):not(.btn-primary) {
        top: calc(75px + 53px);
    }

    .nav.active a:nth-child(3):not(.btn-primary) {
        top: calc(75px + 106px);
        border-radius: 0 0 16px 16px;
    }
}

@media (max-width: 768px) {
    .hero .container {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        order: -1;
    }

    .phone-mockup {
        width: 200px;
        height: 400px;
    }

    .hero {
        padding: 80px 0;
        min-height: 80vh;
    }

    .hero-title {
        font-size: 36px;
        margin-bottom: 16px;
    }

    .hero-subtitle {
        font-size: 16px;
        margin-bottom: 32px;
    }

    .section-title {
        font-size: 32px;
        margin-bottom: 40px;
    }

    section {
        padding: 60px 0;
    }

    .how-it-works {
        padding-top: 120px;
    }

    .feature-card h3 {
        font-size: 20px;
    }

    .feature-card p {
        font-size: 14px;
    }

    .step {
        flex-direction: column-reverse;
    }

    .step-screenshot {
        margin-bottom: 0;
        margin-top: 24px;
    }

    .step h3 {
        font-size: 20px;
    }

    .step p {
        font-size: 14px;
    }

    .hero-ctas {
        flex-direction: row;
        gap: 12px;
    }

    .btn {
        flex: 1;
        padding: 12px 16px;
    }

    .faq-item summary {
        padding: 20px;
    }

    .faq-item summary h3 {
        font-size: 16px;
    }

    .faq-answer {
        padding: 0 20px 20px 20px;
        font-size: 14px;
    }

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

    .faq-answer p:last-child {
        margin-bottom: 0;
    }

    .faq-answer ul {
        padding-left: 24px;
        margin-left: 4px;
    }

    .faq-icon {
        font-size: 20px;
    }

    /* Privacy page mobile styles */
    .page-title {
        font-size: 32px;
    }

    .privacy-policy {
        padding: 80px 0 60px 0;
    }

    .privacy-section h2 {
        font-size: 24px;
    }

    .privacy-section ul {
        padding-left: 24px;
        margin-left: 4px;
    }

    /* Better mobile touch interactions */
    .btn:active {
        transform: scale(0.97);
        opacity: 0.9;
        transition: transform 0.05s, opacity 0.05s;
    }

    .feature-card:active {
        transform: scale(0.98);
    }

    .screenshot-card:active {
        transform: scale(0.98);
    }

    .faq-item:active {
        transform: scale(0.99);
        background: rgba(110, 231, 183, 0.05);
    }

    /* Remove hover effects on touch devices */
    @media (hover: none) {
        .feature-card:hover,
        .screenshot-card:hover {
            transform: none;
            box-shadow: none;
        }

        .feature-card:hover::before {
            opacity: 0;
        }
    }

    .logo {
        font-size: 16px;
        gap: 6px;
    }

    .logo-image {
        width: 28px;
        height: 28px;
    }

    .logo-text {
        font-size: 16px;
    }

    .nav {
        display: flex !important;
        position: static;
        flex-direction: row;
        align-items: center;
        gap: 12px;
        font-size: 13px;
        background: none;
        padding: 0;
        border: none;
        min-width: auto;
    }

    .nav a {
        width: auto;
        display: flex;
        align-items: center;
    }

    .nav .btn {
        padding: 6px 12px;
        font-size: 13px;
        background: var(--accent-primary);
    }

    .nav-wrapper {
        position: relative;
    }

    .mobile-menu-toggle {
        display: none;
    }

    /* Show hamburger on narrow phones */
    @media (max-width: 430px) {
        .mobile-menu-toggle {
            display: block;
        }
    }

    .hero-ctas {
        flex-direction: column;
    }

    .btn {
        text-align: center;
    }
}
