/* iKeyMapper Landing Page */

:root {
    --bg: #0f0f12;
    --bg-elevated: #18181c;
    --bg-card: #1e1e24;
    --text: #e8e8ed;
    --text-muted: #9a9aa5;
    --accent: #22c55e;
    --accent-hover: #16a34a;
    --border: #2a2a32;
    --radius: 12px;
    --radius-lg: 16px;
    --font-sans: 'DM Sans', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

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

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

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: rgba(15, 15, 18, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
    font-weight: 600;
    font-size: 1.25rem;
}

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

.logo-icon {
    font-size: 1.5rem;
}

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

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

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

.nav-cta {
    color: var(--accent) !important;
}

.nav-cta:hover {
    color: var(--accent-hover) !important;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem 4rem;
}

.hero-content {
    max-width: 640px;
    text-align: center;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 1.5rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin: 0 0 2rem;
    line-height: 1.7;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.75rem;
    background: var(--accent);
    color: #0f0f12;
    font-family: inherit;
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.cta-button:hover {
    background: var(--accent-hover);
    color: #0f0f12;
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(1rem);
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.95rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 1000;
}

.toast.toast-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.cta-icon {
    font-size: 1.5rem;
}

.hero-note {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* How it works */
.how-it-works {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.how-it-works h2 {
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 4rem;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 5rem;
}

.step {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.step:nth-child(even) {
    direction: rtl;
}

.step:nth-child(even) > * {
    direction: ltr;
}

.step-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
}

.step-image img {
    display: block;
    width: 100%;
    height: auto;
}

.step-content {
    padding: 0 1rem;
}

.step-number {
    display: inline-block;
    width: 2.5rem;
    height: 2.5rem;
    line-height: 2.5rem;
    text-align: center;
    background: var(--accent);
    color: #0f0f12;
    font-weight: 700;
    font-family: var(--font-mono);
    font-size: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.step h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
}

.step p {
    color: var(--text-muted);
    margin: 0;
    font-size: 1.05rem;
}

/* Features */
.features {
    padding: 6rem 2rem;
    background: var(--bg-elevated);
}

.features h2 {
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 4rem;
}

.features-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.features-grid li {
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

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

.features-grid strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.features-grid p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Download */
.download {
    padding: 6rem 2rem;
    text-align: center;
}

.download-content h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.download-content p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.cta-large {
    padding: 1.25rem 2rem;
    font-size: 1.1rem;
}

.download-note {
    margin-top: 1.5rem !important;
    font-size: 0.85rem !important;
    opacity: 0.7;
}

/* Footer */
.footer {
    padding: 3rem 2rem;
    border-top: 1px solid var(--border);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

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

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

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

/* Privacy & Terms pages */
.legal-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 8rem 2rem 4rem;
}

.legal-page h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.legal-page .meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.legal-page h2 {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.legal-page p, .legal-page li {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.legal-page ul {
    padding-left: 1.5rem;
}

.legal-page a {
    color: var(--accent);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.back-link:hover {
    color: var(--text);
}

/* Responsive */
@media (max-width: 768px) {
    .nav {
        display: none;
    }

    .nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        padding: 1rem 2rem;
        background: var(--bg-elevated);
        border-bottom: 1px solid var(--border);
    }

    .menu-toggle {
        display: flex;
    }

    .step {
        grid-template-columns: 1fr;
        gap: 2rem;
        direction: ltr !important;
    }

    .step:nth-child(even) {
        direction: ltr !important;
    }

    .step:nth-child(even) > * {
        direction: ltr;
    }

    .step-image {
        order: 1;
    }

    .step-content {
        order: 2;
    }
}
