/* ===========================
   CSS Reset & Base Styles
   Mobile-First (320px+)
   =========================== */

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

/* Root variables */
:root {
    /* Colors */
    --color-primary: #2563eb;
    --color-primary-dark: #1e40af;
    --color-secondary: #64748b;
    --color-text: #1e293b;
    --color-text-light: #64748b;
    --color-bg: #ffffff;
    --color-bg-alt: #f8fafc;
    --color-border: #e2e8f0;

    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;

    /* Breakpoints (for reference) */
    /* Mobile: 320px - 767px */
    /* Tablet: 768px - 1023px */
    /* Desktop: 1024px - 1439px */
    /* Wide: 1440px+ */
}

/* Base typography */
html {
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background-color: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography scale */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

h1 {
    font-size: 2rem;
    /* 32px on mobile */
}

h2 {
    font-size: 1.5rem;
    /* 24px */
}

h3 {
    font-size: 1.25rem;
    /* 20px */
}

p {
    margin-bottom: var(--space-sm);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

/* Main layout */
main {
    flex: 1;
}

/* Container utility */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-sm);
}

/* Button base styles */
.btn {
    display: inline-block;
    padding: var(--space-sm) var(--space-lg);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
    /* WCAG touch target size */
    min-width: 44px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.btn:active {
    transform: translateY(0);
}

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

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

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

.btn-secondary:hover {
    background-color: #475569;
    color: white;
}

/* Section spacing */
section {
    padding: var(--space-xl) 0;
}

/* Lists */
ul, ol {
    margin-bottom: var(--space-sm);
    padding-left: var(--space-lg);
}

li {
    margin-bottom: var(--space-xs);
}

/* Code blocks */
code {
    font-family: var(--font-mono);
    background-color: var(--color-bg-alt);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
}

pre {
    background-color: var(--color-bg-alt);
    padding: var(--space-sm);
    border-radius: 0.5rem;
    overflow-x: auto;
    margin-bottom: var(--space-sm);
}

pre code {
    background-color: transparent;
    padding: 0;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Navigation Header */
.nav-header {
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-sm) 0;
    position: sticky;
    top: 0;
    z-index: 50;
}

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

.nav-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: var(--space-md);
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    padding: var(--space-xs);
}

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

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: var(--space-2xl) 0;
    text-align: center;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.hero h1 {
    color: white;
    margin-bottom: var(--space-md);
    font-size: 2rem;
}

.hero .tagline {
    font-size: 1.125rem;
    margin-bottom: var(--space-lg);
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
}

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

.features h2 {
    margin-bottom: var(--space-xl);
}

.feature-grid {
    display: grid;
    gap: var(--space-lg);
    grid-template-columns: 1fr;
}

.feature-card {
    background-color: var(--color-bg);
    padding: var(--space-lg);
    border-radius: 0.75rem;
    border: 1px solid var(--color-border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: var(--space-sm);
}

.feature-card h3 {
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
}

.feature-card p {
    color: var(--color-text-light);
    margin-bottom: 0;
}

/* Demo Section */
.demo {
    background-color: var(--color-bg);
}

.demo-content {
    display: grid;
    gap: var(--space-xl);
    grid-template-columns: 1fr;
}

.demo-text ul {
    margin-bottom: var(--space-md);
}

.demo-cta {
    margin-top: var(--space-md);
}

.demo-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.demo-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: var(--space-2xl);
    border-radius: 1rem;
    text-align: center;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.demo-placeholder p:first-child {
    font-size: 3rem;
    margin-bottom: var(--space-sm);
}

.demo-url {
    font-family: var(--font-mono);
    font-size: 1.125rem;
    opacity: 0.9;
}

/* GitHub Section */
.github {
    background-color: var(--color-bg-alt);
}

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

.github-features {
    display: grid;
    gap: var(--space-lg);
    grid-template-columns: 1fr;
    margin: var(--space-xl) 0;
}

.github-feature {
    text-align: center;
    padding: var(--space-md);
}

.github-feature strong {
    display: block;
    font-size: 1.25rem;
    margin-bottom: var(--space-xs);
    color: var(--color-primary);
}

.github-cta {
    margin-top: var(--space-lg);
}

/* Getting Started Section */
.getting-started {
    background-color: var(--color-bg);
}

.install-steps {
    max-width: 800px;
    margin: 0 auto;
}

.install-steps h3 {
    margin-top: var(--space-xl);
    margin-bottom: var(--space-sm);
    color: var(--color-primary);
}

.install-steps h3:first-child {
    margin-top: 0;
}

.install-steps pre {
    background-color: #1e293b;
    color: #e2e8f0;
    padding: var(--space-md);
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: var(--space-sm) 0 var(--space-md);
}

.install-steps code {
    background-color: transparent;
    color: inherit;
    font-size: 0.875rem;
}

.docs-link {
    margin-top: var(--space-xl);
    text-align: center;
}

.docs-link a {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-primary);
}

/* Footer */
footer {
    background-color: var(--color-text);
    color: white;
    padding: var(--space-xl) 0;
    margin-top: auto;
}

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

.footer-links {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

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

.footer-copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

/* Utility classes */
.text-center {
    text-align: center;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
