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

:root {
    --bg: #0a0a0a;
    --bg-surface: #111111;
    --bg-surface-hover: #1a1a1a;
    --border: #222222;
    --border-accent: #333333;
    --text-primary: #f0f0f0;
    --text-secondary: #999999;
    --text-muted: #666666;
    --accent: #ff6b35;
    --accent-hover: #ff8555;
    --accent-glow: rgba(255, 107, 53, 0.15);
    --gradient-start: #ff6b35;
    --gradient-end: #e63946;
    --code-green: #4ec9b0;
    --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: "JetBrains Mono", "Fira Code", "SF Mono", "Consolas", monospace;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

/* === Layout === */
.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (min-width: 768px) {
    .container {
        padding: 0 48px;
    }
}

/* === Nav === */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    height: 56px;
}

.nav-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

@media (min-width: 768px) {
    .nav-inner {
        padding: 0 48px;
    }
}

.nav-brand {
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: -0.01em;
}

.accent-dot {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-links a {
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: color 0.15s;
    display: flex;
    align-items: center;
    gap: 4px;
}

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

/* === Hero === */
.hero {
    padding: 120px 0 80px;
}

.hero h1 {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    max-width: 720px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-sub {
    margin-top: 24px;
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 540px;
}

.hero-actions {
    margin-top: 40px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-meta {
    margin-top: 24px;
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.hero-pulse {
    margin-top: 56px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), var(--gradient-end), transparent);
    background-size: 200% 100%;
    animation: pulse-slide 3s ease-in-out infinite;
}

@keyframes pulse-slide {
    0%, 100% { background-position: -100% 0; }
    50% { background-position: 100% 0; }
}

/* === Buttons === */
.btn {
    display: inline-block;
    padding: 12px 28px;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: var(--font-body);
    border: none;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s, border-color 0.15s;
    border-radius: 0;
}

.btn-primary {
    background: var(--accent);
    color: #0a0a0a;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--accent-glow);
}

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

.btn-secondary:hover {
    border-color: var(--text-muted);
    transform: translateY(-1px);
}

/* === Sections === */
.section {
    padding: 80px 0;
}

.section-compact {
    padding: 40px 0;
}

@media (max-width: 767px) {
    .section {
        padding: 56px 0;
    }
}

.section h2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 40px;
}

.section-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    margin-bottom: 16px;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1.0625rem;
    margin-top: -24px;
    margin-bottom: 32px;
    max-width: 540px;
}

/* === Architecture Diagram === */
.arch-diagram {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    padding: 24px 28px;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    line-height: 1.7;
    color: var(--text-secondary);
    border-radius: 0;
}

.arch-arrow {
    color: var(--accent);
}

/* === Feature Grid === */
.feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1px;
    background: var(--border);
}

@media (min-width: 768px) {
    .feature-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.feature-card {
    background: var(--bg);
    padding: 32px;
    position: relative;
    transition: background 0.2s;
}

.feature-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    background: var(--bg-surface);
}

.feature-card:hover::before {
    transform: scaleY(1);
}

.feature-icon {
    color: var(--accent);
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* === Install === */
.install-block {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    padding: 20px 24px;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    overflow-x: auto;
    border-radius: 0;
}

.install-block code {
    white-space: nowrap;
    color: var(--text-primary);
}

.code-prompt {
    color: var(--code-green);
    margin-right: 8px;
    user-select: none;
}

.copy-btn {
    background: var(--border-accent);
    color: var(--text-secondary);
    border: none;
    padding: 6px 14px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s, background 0.15s;
    flex-shrink: 0;
    border-radius: 0;
}

.copy-btn:hover {
    background: var(--text-muted);
    color: var(--text-primary);
}

.install-req {
    margin-top: 16px;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* === Security === */
.security-list {
    list-style: none;
    border-left: 1px solid var(--border);
    padding-left: 0;
}

.security-list li {
    padding: 12px 0 12px 32px;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.security-list li.visible {
    opacity: 1;
    transform: translateY(0);
}

.security-num {
    position: absolute;
    left: -9px;
    top: 14px;
    width: 18px;
    height: 18px;
    background: var(--bg);
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 0.6875rem;
    font-weight: 700;
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
}

.security-list strong {
    color: var(--text-primary);
}

/* === Memory === */
.memory-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1px;
    background: var(--border);
}

@media (min-width: 768px) {
    .memory-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.memory-tier {
    background: var(--bg);
    padding: 32px;
}

.tier-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
    font-family: var(--font-mono);
}

.memory-tier h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.memory-tier p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.memory-tagline {
    margin-top: 32px;
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.9375rem;
}

/* === Tech Stack === */
.tech-stack {
    text-align: center;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 2;
}

.tech-stack a {
    transition: color 0.15s;
}

.tech-stack a:hover {
    color: var(--text-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.tech-dot {
    margin: 0 8px;
    color: var(--text-muted);
}

/* === Footer === */
.footer {
    border-top: 1px solid var(--border);
    padding: 32px 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

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

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    font-size: 0.8125rem;
    color: var(--text-muted);
    transition: color 0.15s;
}

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

/* === Selection === */
::selection {
    background: var(--accent-glow);
    color: var(--text-primary);
}
