/* ============================================
   HostUp Starter Template — Styles
   Modern, responsive, dark-mode ready
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --bg-card: #ffffff;
    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-light: #eef2ff;
    --gradient-1: #6366f1;
    --gradient-2: #a855f7;
    --gradient-3: #ec4899;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    --max-width: 1200px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f172a;
        --bg-alt: #1e293b;
        --bg-card: #1e293b;
        --text: #f1f5f9;
        --text-secondary: #94a3b8;
        --text-muted: #64748b;
        --border: #334155;
        --accent-light: #1e1b4b;
        --shadow: 0 1px 3px rgba(0,0,0,0.3);
        --shadow-md: 0 4px 6px rgba(0,0,0,0.3);
        --shadow-lg: 0 10px 25px rgba(0,0,0,0.4);
    }
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
code { font-family: var(--font-mono); font-size: 0.875em; background: var(--bg-alt); padding: 0.125em 0.375em; border-radius: 4px; }

/* --- Container --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Navigation --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow 0.3s;
}

@media (prefers-color-scheme: dark) {
    .nav { background: rgba(15,23,42,0.85); }
}

.nav.scrolled { box-shadow: var(--shadow-md); }

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--text);
}

.nav-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    color: white;
    border-radius: 8px;
    font-size: 1rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); }

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    color: white;
    box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(99,102,241,0.4);
    color: white;
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-alt);
    color: var(--text);
}

.btn-lg { padding: 1rem 2rem; font-size: 1.0625rem; }

/* --- Hero --- */
.hero {
    padding: 10rem 0 6rem;
    text-align: center;
    background: radial-gradient(ellipse at 50% 0%, var(--accent-light) 0%, transparent 60%);
}

.hero-inner { max-width: 720px; margin: 0 auto; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2), var(--gradient-3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3.5rem;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.125rem;
}

/* --- Features --- */
.features {
    padding: 6rem 0;
    background: var(--bg-alt);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.0625rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* --- About --- */
.about {
    padding: 6rem 0;
}

.about-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.about-content > p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.about-list {
    list-style: none;
    margin-bottom: 1.5rem;
}

.about-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.about-list li:last-child { border-bottom: none; }
.about-list li strong { color: var(--text); font-family: var(--font-mono); font-size: 0.875rem; }

.about-tip {
    padding: 1rem 1.25rem;
    background: var(--accent-light);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.about-tip strong { color: var(--text); }

/* Code Window */
.code-window {
    background: #1e293b;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.875rem 1.25rem;
    background: #0f172a;
}

.code-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-dot.red { background: #ef4444; }
.code-dot.yellow { background: #eab308; }
.code-dot.green { background: #22c55e; }

.code-title {
    margin-left: 0.75rem;
    font-size: 0.8125rem;
    color: #94a3b8;
    font-family: var(--font-mono);
}

.code-body {
    padding: 1.5rem;
    overflow-x: auto;
}

.code-body code {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.7;
    color: #e2e8f0;
    background: none;
    padding: 0;
}

/* --- CTA --- */
.cta {
    padding: 6rem 0;
    text-align: center;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
}

.cta-inner {
    max-width: 600px;
    margin: 0 auto;
}

.cta h2 {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.75rem;
}

.cta p {
    color: rgba(255,255,255,0.85);
    font-size: 1.0625rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.cta .btn-primary {
    background: white;
    color: var(--gradient-1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.cta .btn-primary:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    color: var(--gradient-1);
}

/* --- Footer --- */
.footer {
    padding: 2rem 0;
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--text);
}

.footer-text {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-text a { color: var(--accent); }

/* --- Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero { padding: 7rem 0 4rem; }
    .hero-stats { gap: 1.5rem; }

    .about-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .nav-links { display: none; }

    .footer-inner {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
}
