:root {
    --primary: #2196F3;
    --primary-hover: #0eeaf2;
    --text-main: #1f2937;
    --email-btn: #1f2937;
    --text-muted: #6b7280;
    --bg: #ffffff;
    --bg-offset: #f9fafb;
    --border: #e5e7eb;
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --input-bg: #ffffff;
}

[data-theme='dark'] {
    --text-main: #f3f4f6;
    --email-btn: #9ca3af;
    --text-muted: #9ca3af;
    --bg: #0f172a;
    --bg-offset: #1e293b;
    --border: #334155;
    --input-bg: #1e293b;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme='light']) {
        --text-main: #f3f4f6;
        --text-muted: #9ca3af;
        --bg: #0f172a;
        --bg-offset: #1e293b;
        --border: #334155;
        --input-bg: #1e293b;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-main);
    color: var(--text-main);
    background-color: var(--bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 837px;
    margin: 0 auto;
    padding: 2rem 2rem;
}

header {
    margin-bottom: 3rem;
}

.brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-icon {
    color: var(--primary);
}

main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin: 0 0 1.5rem 0;
    line-height: 1.2;
}

.hero p {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0;
}

.demo {
    background: var(--bg-offset);
    border: 1px solid var(--border);
    border-radius: 12px;
    /* aspect-ratio: 16 / 9; */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    width: 682px;
    height: 407px;
    margin-top: 27px;
}

.demo-placeholder {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    text-align: center;
    padding: 2rem;
}

.demo img,
.demo video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.demo video {
    width: 723px;
    max-width: none;
}

.cta-section {
    background: var(--bg-offset);
    border: 1px solid var(--border);
    padding: 2.5rem;
    border-radius: 12px;
    max-width: 500px;
}

.cta-section h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.cta-section p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0 0 1.5rem 0;
}

.email-form {
    display: flex;
    gap: 0.5rem;
}

.email-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: var(--font-main);
    font-size: 0.875rem;
    background-color: var(--input-bg);
    color: var(--text-main);
    outline: none;
    transition: border-color 0.2s;
}

.email-form input:focus {
    border-color: var(--primary);
}

.email-form button {
    background-color: var(--email-btn);
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.email-form button:hover {
    background-color: #000;
}

.email-form button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.success-msg {
    display: none;
    color: #059669;
    font-size: 0.875rem;
    margin-top: 1rem;
    font-weight: 500;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.theme-toggle:hover {
    background: var(--bg-offset);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

[data-theme='dark'] .sun-icon {
    display: block;
}

[data-theme='dark'] .moon-icon {
    display: none;
}

:not([data-theme='dark']) .sun-icon {
    display: none;
}

:not([data-theme='dark']) .moon-icon {
    display: block;
}

/* System preference handling */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme='light']) .sun-icon {
        display: block;
    }

    :root:not([data-theme='light']) .moon-icon {
        display: none;
    }
}

footer {
    margin-top: 6rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.badge {
    display: inline-block;
    background: #f3f4f6;
    color: #4b5563;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.faq-item {
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-offset);
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.faq-item:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.faq-pill {
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
    /* remove default arrow */
}

.faq-pill::-webkit-details-marker {
    display: none;
    /* remove default arrow in Safari */
}

.faq-pill::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary);
    transition: transform 0.3s;
}

details[open] .faq-pill::after {
    transform: rotate(45deg);
}

.faq-content {
    padding: 0 1.5rem 1.25rem 1.5rem;
    color: var(--text-muted);
    line-height: 1.6;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.demo-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--primary);
    color: white;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(33, 150, 243, 0.2), 0 2px 4px -1px rgba(33, 150, 243, 0.1);
}

.demo-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(33, 150, 243, 0.3), 0 4px 6px -2px rgba(33, 150, 243, 0.15);
}

.demo-btn svg {
    transition: transform 0.2s ease;
}

.demo-btn:hover svg {
    transform: translateX(4px);
}

@media (max-width: 640px) {
    .container {
        padding: 2rem 1.5rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .email-form {
        flex-direction: column;
    }
}