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

:root {
    --color-primary: #828fe3;
    --color-primary-dark: #6b7ad4;
    --color-dark: #1a1a2e;
    --color-text: #333;
    --color-text-light: #666;
    --color-bg: #ffffff;
    --color-bg-alt: #f8f9fc;
    --color-border: #e5e7eb;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --container-max: 1200px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 5rem;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-dark);
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: var(--spacing-sm);
}

h3 {
    font-size: 1.25rem;
}

p {
    color: var(--color-text-light);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
}

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

.btn-secondary:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--color-border);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo img {
    height: 32px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    list-style: none;
}

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

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

.nav-links a.btn-primary,
.nav-links a.btn-primary:hover {
    color: white;
}

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

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-dark);
    transition: all 0.3s;
}

/* Hero Section */
.hero {
    padding: calc(72px + var(--spacing-2xl)) 0 var(--spacing-2xl);
    background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

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

.hero-art-canvas {
    width: 100%;
    max-width: 360px;
    aspect-ratio: 1 / 1;
    display: block;
    opacity: 0;
    transition: opacity 1.6s ease-out;
}

.hero-art-canvas.loaded {
    opacity: 1;
}

.hero-content h1 {
    margin-bottom: var(--spacing-md);
}

.hero-content {
    text-align: left;
}

.hero-content p {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-lg);
    max-width: 400px;
}

.hero-content p.hero-tagline {
    color: var(--color-text-light);
    font-size: 1rem;
    margin-bottom: 0;
}

.hero-tagline a {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
}

.hero-tagline a:hover {
    text-decoration: underline;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.hero-video {
    display: flex;
    justify-content: center;
}

.hero-aside {
    padding-left: var(--spacing-lg);
    border-left: 2px solid var(--color-border);
}

.aside-eyebrow {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--spacing-sm);
}

.aside-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.aside-list li {
    font-size: 1.0625rem;
    color: var(--color-text);
    line-height: 1.5;
}

.candidate-card {
    width: 100%;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.card-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--color-border);
}

.card-logo {
    height: 22px;
}

.card-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-body {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.card-info {
    flex: 1;
    min-width: 0;
}

.card-info h4 {
    font-size: 1.0625rem;
    margin-bottom: 0.125rem;
}

.card-info p {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.fit-score {
    background: var(--color-primary);
    color: white;
    font-weight: 700;
    padding: 0.5rem 0.875rem;
    border-radius: 999px;
    font-size: 0.9375rem;
    flex-shrink: 0;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: var(--color-bg-alt);
    color: var(--color-text);
    padding: 0.375rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 500;
}

/* Features Section */
.features {
    padding: var(--spacing-2xl) 0;
    background: var(--color-bg);
}

.features h2,
.product h2,
.cta h2 {
    text-align: center;
}

.section-subtitle {
    text-align: center;
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto var(--spacing-xl);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
}

.feature-card {
    padding: var(--spacing-lg);
    background: var(--color-bg-alt);
    border-radius: var(--radius-lg);
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--color-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.feature-card h3 {
    margin-bottom: var(--spacing-xs);
}

/* Product Section */
.product {
    padding: var(--spacing-2xl) 0;
    background: var(--color-bg-alt);
}

.product-showcase {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
    margin-bottom: var(--spacing-2xl);
}

.product-showcase.reverse {
    grid-template-columns: 1fr 1.2fr;
}

.product-showcase.reverse .product-image {
    order: 2;
}

.product-showcase.reverse .product-description {
    order: 1;
}

.product-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.product-description h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

.product-description p {
    margin-bottom: var(--spacing-md);
}

.feature-list {
    list-style: none;
}

.feature-list li {
    position: relative;
    padding-left: var(--spacing-md);
    margin-bottom: var(--spacing-xs);
    color: var(--color-text-light);
}

.feature-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
}

/* About Section */
.about {
    padding: var(--spacing-2xl) 0;
    background: #2d2d4a;
    color: white;
}

.about-content {
    text-align: center;
}

.about h2 {
    color: white;
    margin-bottom: var(--spacing-md);
}

.about p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.125rem;
    max-width: calc(500% / 9 - 70px);
    margin: 0 auto;
}

/* CTA Section */
.cta {
    padding: var(--spacing-2xl) 0;
    background: var(--color-bg);
    text-align: center;
}

.cta p {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-lg);
}

/* Legal pages */
.legal {
    padding: calc(72px + var(--spacing-2xl)) 0 var(--spacing-2xl);
    background: var(--color-bg);
}

.legal-content {
    max-width: 720px;
}

.legal-content h1 {
    margin-bottom: var(--spacing-xs);
}

.legal-updated {
    color: var(--color-text-light);
    font-size: 0.9375rem;
    margin-bottom: var(--spacing-lg);
}

.legal-content h2 {
    font-size: 1.375rem;
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
}

.legal-content p {
    margin-bottom: var(--spacing-sm);
    color: var(--color-text);
}

.legal-content a {
    color: var(--color-primary);
    text-decoration: none;
}

.legal-content a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background: var(--color-dark);
    color: white;
    padding: var(--spacing-xl) 0 var(--spacing-lg);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand img {
    height: 28px;
    margin-bottom: var(--spacing-sm);
    filter: brightness(0) invert(1);
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.6);
}

.footer-links {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-lg);
}

.footer-column h4 {
    color: white;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--spacing-sm);
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: var(--spacing-xs);
}

.footer-column a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-column a:hover {
    color: white;
}

.footer-bottom {
    padding-top: var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.footer-quip {
    color: rgba(255, 255, 255, 0.5);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-showcase,
    .product-showcase.reverse {
        grid-template-columns: 1fr;
    }

    .product-showcase.reverse .product-image,
    .product-showcase.reverse .product-description {
        order: unset;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        bottom: 0;
        background: white;
        flex-direction: column;
        justify-content: flex-start;
        padding: var(--spacing-lg);
        gap: var(--spacing-md);
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .mobile-menu-btn {
        display: flex;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-links {
        justify-content: flex-start;
    }

    .about p {
        max-width: none;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .btn-large {
        padding: 0.875rem 1.5rem;
    }
}
