/* Modern Design System - Zinc-based Dark Mode */
:root {
    /* Color Palette (Zinc-ish) */
    --bg-main: #09090b;
    --bg-card: #0e0e11;
    /* Slightly lighter than main for cards */
    --bg-hover: #27272a;

    --zinc-50: #fafafa;
    --zinc-100: #f4f4f5;
    --zinc-200: #e4e4e7;
    --zinc-300: #d4d4d8;
    --zinc-400: #a1a1aa;
    --zinc-500: #71717a;
    --zinc-600: #52525b;
    --zinc-700: #3f3f46;
    --zinc-800: #27272a;
    --zinc-900: #18181b;

    --primary-glow: rgba(16, 185, 129, 0.5);
    /* Emerald glow */
    --emerald-400: #34d399;
    --emerald-500: #10b981;

    /* Semantic mapping */
    --text-primary: var(--zinc-100);
    --text-secondary: var(--zinc-400);
    --border-subtle: rgba(255, 255, 255, 0.08);

    /* Layout */
    --max-width: 1280px;
    --header-height: 64px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Utilities */
.text-zinc-300 {
    color: var(--zinc-300);
}

.text-zinc-400 {
    color: var(--zinc-400);
}

.text-zinc-500 {
    color: var(--zinc-500);
}

.bg-zinc-900 {
    background-color: var(--zinc-900);
}

/* Navigation */
nav {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(9, 9, 11, 0.8);
    backdrop-filter: blur(12px);
    height: var(--header-height);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.logo-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background-color: var(--zinc-900);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.logo-group:hover .logo-icon {
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.nav-links {
    display: none;
    gap: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--zinc-500);
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-primary {
    height: 2.25rem;
    padding: 0 1rem;
    border-radius: 0.375rem;
    background-color: white;
    color: black;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
}

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

/* Background Effects */
.ambient-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.grid-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(128, 128, 128, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(128, 128, 128, 0.05) 1px, transparent 1px);
    background-size: 24px 24px;
    mask-image: radial-gradient(ellipse 60% 50% at 50% 0%, #000 70%, transparent 100%);
}

.glow-spot {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 400px;
    background: rgba(39, 39, 42, 0.2);
    filter: blur(120px);
    border-radius: 50%;
    mix-blend-mode: screen;
}

/* Hero Section */
.hero-main {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 6rem;
    padding-bottom: 5rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

.badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    margin-bottom: 2rem;
    transition: background 0.2s;
    cursor: default;
}

.badge:hover {
    background: rgba(255, 255, 255, 0.1);
}

.ping-wrapper {
    position: relative;
    display: flex;
    height: 0.5rem;
    width: 0.5rem;
}

.ping-dot {
    position: absolute;
    display: inline-flex;
    height: 100%;
    width: 100%;
    border-radius: 50%;
    background: var(--emerald-400);
    opacity: 0.75;
    animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.ping-static {
    position: relative;
    display: inline-flex;
    border-radius: 50%;
    height: 0.5rem;
    width: 0.5rem;
    background: var(--emerald-500);
}

@keyframes ping {

    75%,
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.badge-text {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--zinc-400);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero-title {
    text-align: center;
    font-size: 3rem;
    line-height: 1.1;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: transparent;
    background-image: linear-gradient(to bottom, white, white, var(--zinc-500));
    -webkit-background-clip: text;
    background-clip: text;
    margin-bottom: 1.5rem;
    max-width: 900px;
}

@media(min-width: 768px) {
    .hero-title {
        font-size: 4.5rem;
    }
}

.hero-sub {
    text-align: center;
    font-size: 1.125rem;
    color: var(--zinc-500);
    font-weight: 300;
    max-width: 42rem;
    line-height: 1.6;
    margin-bottom: 3rem;
}

/* Chat Interface Card (The "Matte" Look) */
.interface-wrapper {
    width: 100%;
    max-width: 48rem;
    position: relative;
    margin-bottom: 5rem;
    group: hover;
}

.glow-backdrop {
    position: absolute;
    inset: -2px;
    background: linear-gradient(to right, var(--zinc-700), var(--zinc-800));
    border-radius: 1rem;
    opacity: 0.2;
    filter: blur(8px);
    transition: opacity 0.5s;
}

.interface-wrapper:hover .glow-backdrop {
    opacity: 0.4;
    filter: blur(12px);
}

.interface-card {
    position: relative;
    background: #0e0e11;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.window-controls {
    height: 2.5rem;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    gap: 0.5rem;
}

.dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background: var(--zinc-800);
}

.branch-indicator {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--zinc-600);
}

.chat-area {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-height: 300px;
}

.input-line {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: monospace;
    font-size: 1.125rem;
    color: var(--zinc-300);
}

.prompt-symbol {
    color: var(--emerald-500);
}

.caret {
    display: inline-block;
    width: 0.625rem;
    height: 1.25rem;
    background: var(--zinc-500);
    margin-left: 0.25rem;
    vertical-align: middle;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.ai-response {
    border-left: 2px solid var(--zinc-800);
    padding-left: 1rem;
    padding-top: 0.5rem;
    opacity: 0;
    transform: translateY(1rem);
    transition: all 1s ease-out;
}

.ai-response.visible {
    opacity: 1;
    transform: translateY(0);
}

.ai-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--zinc-500);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.response-text {
    font-size: 0.95rem;
    /* slightly larger for readability */
    color: var(--zinc-400);
    line-height: 1.6;
}

.code-snippet {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    color: var(--zinc-300);
    font-family: monospace;
    font-size: 0.85em;
}

.highlight {
    color: rgba(52, 211, 153, 0.8);
}

.action-bar {
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid var(--border-subtle);
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.shortcuts {
    display: flex;
    gap: 1rem;
}

.shortcut-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--zinc-500);
}

.key {
    border: 1px solid var(--zinc-700);
    padding: 0 0.25rem;
    border-radius: 0.25rem;
    font-size: 0.625rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.5);
    animation: pulse 2s infinite;
}

.status-text {
    font-size: 0.75rem;
    color: var(--zinc-500);
}

@keyframes pulse {
    50% {
        opacity: 0.5;
    }
}

/* Features Grid */
.features-section {
    border-top: 1px solid var(--border-subtle);
    background: #0a0a0c;
    padding: 6rem 1rem;
}

.features-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

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

.feature-card {
    background: rgba(24, 24, 27, 0.3);
    border: 1px solid var(--border-subtle);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s;
}

.feature-card:hover {
    background: rgba(24, 24, 27, 0.5);
    border-color: rgba(255, 255, 255, 0.1);
}

.feature-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: var(--zinc-900);
    border: 1px solid var(--border-subtle);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--zinc-400);
    transition: color 0.3s;
}

.feature-card:hover .feature-icon {
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
}

.feature-title {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--zinc-200);
    margin-bottom: 0.5rem;
}

.feature-desc {
    font-size: 0.875rem;
    color: var(--zinc-500);
    line-height: 1.6;
}