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

:root {
    --color-text: #0a0a0a;
    --color-text-secondary: #525252;
    --color-text-muted: #a3a3a3;
    --color-bg: #ffffff;
    --color-bg-subtle: #fafafa;
    --color-border: #e5e5e5;
    --color-accent: #0a0a0a;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;
    --space-3xl: 10rem;

    --max-width: 1100px;
    --max-width-narrow: 720px;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3 {
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 400;
}

h2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    margin-bottom: var(--space-lg);
}

h3 {
    font-size: 1.125rem;
    margin-bottom: var(--space-xs);
}

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

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
}

.nav-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--space-sm) var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-weight: 500;
    font-size: 1.125rem;
    color: var(--color-text);
    text-decoration: none;
}

.logo-icon {
    font-size: 1.5rem;
    font-family: 'Times New Roman', Georgia, serif;
    font-weight: 400;
}

.nav-cta {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
    text-decoration: none;
    padding: var(--space-xs) var(--space-sm);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-cta:hover {
    background: var(--color-text);
    color: var(--color-bg);
    border-color: var(--color-text);
}

/* Buttons */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.button.primary {
    background: var(--color-text);
    color: var(--color-bg);
}

.button.primary:hover {
    opacity: 0.85;
}

.button.secondary {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.button.secondary:hover {
    border-color: var(--color-text);
}

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

/* Sections */
section {
    padding: var(--space-2xl) var(--space-md);
}

.section-content {
    max-width: var(--max-width);
    margin: 0 auto;
}

/* Hero */
.hero {
    padding-top: calc(var(--space-3xl) + 60px);
    padding-bottom: var(--space-3xl);
    text-align: center;
}

.hero-content {
    max-width: var(--max-width-narrow);
    margin: 0 auto;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    line-height: 1.7;
    margin-top: var(--space-md);
    color: var(--color-text-secondary);
}

.hero-cta {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    margin-top: var(--space-lg);
    flex-wrap: wrap;
}

/* Philosophy */
.philosophy {
    background: var(--color-bg-subtle);
    text-align: center;
}

.philosophy .section-content {
    max-width: var(--max-width-narrow);
}

.philosophy-text {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    line-height: 1.7;
    color: var(--color-text);
    font-weight: 300;
}

.philosophy-text + .philosophy-text {
    margin-top: var(--space-md);
    font-weight: 500;
}

/* How it works */
.how-it-works {
    border-top: 1px solid var(--color-border);
}

.steps {
    display: grid;
    gap: var(--space-lg);
    margin-top: var(--space-xl);
}

.step {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: 50%;
}

.step-content h3 {
    color: var(--color-text);
}

.step-content p {
    font-size: 1rem;
    margin-top: var(--space-xs);
}

@media (min-width: 768px) {
    .steps {
        grid-template-columns: repeat(3, 1fr);
    }

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

    .step-number {
        margin: 0 auto var(--space-sm);
    }
}

/* Features */
.features {
    background: var(--color-bg-subtle);
}

.feature-grid {
    display: grid;
    gap: var(--space-lg);
    margin-top: var(--space-xl);
}

@media (min-width: 640px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .feature-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature {
    padding: var(--space-md);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
}

.feature-icon {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

.feature h3 {
    font-size: 1rem;
    font-weight: 600;
}

.feature p {
    font-size: 0.9375rem;
    margin-top: var(--space-xs);
    line-height: 1.6;
}

/* Use cases */
.use-cases {
    border-top: 1px solid var(--color-border);
}

.use-case-list {
    display: grid;
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

@media (min-width: 640px) {
    .use-case-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .use-case-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

.use-case {
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--color-border);
}

@media (min-width: 640px) {
    .use-case {
        border-bottom: none;
        padding: 0;
    }
}

.use-case-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xs);
}

.use-case p {
    font-size: 0.9375rem;
}

/* CTA Section */
.cta-section {
    text-align: center;
    background: var(--color-bg-subtle);
    border-top: 1px solid var(--color-border);
}

.cta-section h2 {
    margin-bottom: var(--space-sm);
}

.cta-section > .section-content > p {
    font-size: 1.125rem;
    margin-bottom: var(--space-lg);
}

.cta-note {
    margin-top: var(--space-sm);
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* Footer */
footer {
    border-top: 1px solid var(--color-border);
    padding: var(--space-lg) var(--space-md);
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    text-align: center;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-weight: 500;
}

.footer-links {
    display: flex;
    gap: var(--space-md);
}

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

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

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

/* Smooth scrolling offset for fixed nav */
html {
    scroll-padding-top: 80px;
}

/* Selection */
::selection {
    background: var(--color-text);
    color: var(--color-bg);
}

/* Focus states for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--color-text);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        transition-duration: 0.01ms !important;
    }
}
