/* CastelAI — Shared Stylesheet */
/* Copyright © 2026 Chris Castel. All rights reserved. */

:root {
    --bg-deep: #eaf0f6;
    --bg-mid: #f0f4f8;
    --bg-card: rgba(200, 214, 228, 0.92);
    --bg-card-hover: rgba(190, 206, 222, 0.96);
    --accent-blue: #1a6fa8;
    --accent-cyan: #1a6fa8;
    --accent-electric: #0e5a8a;
    --accent-glow: #1a7fc8;
    --text-primary: #1a2b3c;
    --text-secondary: #4a6a8a;
    --text-muted: #6a8aaa;
    --text-white: #0b1f35;
    --border: rgba(100, 140, 180, 0.3);
    --border-accent: rgba(26, 111, 168, 0.3);
    --success: #2a8a4a;
    --warning: #8a6a20;
    --gradient-hero: linear-gradient(135deg, #eaf0f6 0%, #f0f4f8 50%, #eaf0f6 100%);
    --gradient-accent: linear-gradient(135deg, #1a6fa8, #0e5a8a);
    --gradient-card: linear-gradient(145deg, rgba(200, 214, 228, 0.92), rgba(190, 206, 222, 0.85));
    --shadow-card: 0 4px 24px rgba(26, 111, 168, 0.12);
    --shadow-glow: 0 0 40px rgba(26, 111, 168, 0.10);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-deep);
    background-image: linear-gradient(rgba(26, 111, 168, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(26, 111, 168, 0.03) 1px, transparent 1px);
    background-size: 15px 15px;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(220, 230, 240, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem; height: 68px;
    display: flex; align-items: center; justify-content: space-between;
    transition: all 0.3s ease;
}
nav.scrolled { background: rgba(212, 224, 236, 0.98); box-shadow: 0 2px 20px rgba(26, 111, 168, 0.12); }
.nav-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-logo .brand { font-size: 1.1rem; font-weight: 700; color: var(--text-white); }
.nav-logo .sub { font-size: 0.65rem; font-weight: 500; color: var(--accent-blue); letter-spacing: 0.12em; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 0.25rem; list-style: none; }
.nav-links a { color: var(--text-secondary); text-decoration: none; font-size: 0.875rem; font-weight: 500; padding: 0.5rem 0.875rem; border-radius: 6px; transition: all 0.2s ease; }
.nav-links a:hover { color: var(--text-white); background: rgba(26, 111, 168, 0.08); }
.nav-links a.active { color: var(--accent-blue); }

.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1.25rem; border-radius: 8px; font-size: 0.875rem; font-weight: 600; text-decoration: none; cursor: pointer; transition: all 0.2s ease; border: none; }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text-white); border-color: var(--accent-blue); background: rgba(26, 111, 168, 0.08); }
.btn-primary { background: var(--gradient-accent); color: white; box-shadow: 0 4px 15px rgba(26, 111, 168, 0.3); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(26, 111, 168, 0.45); }
.btn-outline { background: transparent; color: var(--accent-blue); border: 1px solid var(--accent-blue); }
.btn-outline:hover { background: rgba(26, 111, 168, 0.1); transform: translateY(-1px); }
.btn-large { padding: 0.875rem 2rem; font-size: 1rem; border-radius: 10px; }

.mobile-sidebar { position: fixed; top: 0; right: -300px; width: 280px; height: 100vh; background: var(--bg-mid); border-left: 1px solid var(--border); z-index: 1100; transition: right 0.3s ease; display: flex; flex-direction: column; padding: 1rem; box-shadow: -4px 0 20px rgba(26, 111, 168, 0.15); }
.mobile-sidebar.open { right: 0; }
.sidebar-header { display: flex; justify-content: flex-end; margin-bottom: 2rem; }
.sidebar-close { background: none; border: none; color: var(--text-secondary); font-size: 2rem; cursor: pointer; padding: 0.5rem; border-radius: 4px; }
.sidebar-close:hover { color: var(--text-white); background: rgba(26, 111, 168, 0.08); }
.sidebar-links { list-style: none; padding: 0; margin: 0 0 2rem 0; flex: 1; }
.sidebar-links li { margin-bottom: 0.5rem; }
.sidebar-links a { display: block; color: var(--text-secondary); text-decoration: none; font-size: 1rem; font-weight: 500; padding: 0.75rem 1rem; border-radius: 8px; transition: all 0.2s ease; }
.sidebar-links a:hover { background: rgba(26, 111, 168, 0.08); color: var(--text-white); }
.sidebar-cta { display: flex; flex-direction: column; gap: 0.75rem; }
.mobile-toggle { display: none; background: none; border: none; color: var(--text-primary); font-size: 1.5rem; cursor: pointer; padding: 0.5rem; }

.hero {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    text-align: center; padding: 8rem 2rem 6rem;
    position: relative; overflow: hidden;
    background: var(--gradient-hero);
}
.hero-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.12; }
.hero-orb-1 { width: 500px; height: 500px; background: #1a6fa8; top: -10%; left: -5%; animation: orb-drift 20s ease-in-out infinite; }
.hero-orb-2 { width: 400px; height: 400px; background: #0e5a8a; bottom: -10%; right: -5%; animation: orb-drift 25s ease-in-out infinite reverse; }
.hero-orb-3 { width: 300px; height: 300px; background: #1a7fc8; top: 50%; left: 50%; transform: translate(-50%, -50%); animation: orb-pulse 15s ease-in-out infinite; }
.hero-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(26, 111, 168, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(26, 111, 168, 0.04) 1px, transparent 1px); background-size: 15px 15px; }
@keyframes orb-drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(40px, -30px); } }
@keyframes orb-pulse { 0%, 100% { opacity: 0.12; transform: translate(-50%, -50%) scale(1); } 50% { opacity: 0.18; transform: translate(-50%, -50%) scale(1.1); } }

.hero-content { position: relative; z-index: 1; max-width: 900px; }
.hero-badge { display: inline-flex; align-items: center; gap: 0.5rem; background: rgba(26, 111, 168, 0.08); border: 1px solid rgba(26, 111, 168, 0.2); border-radius: 20px; padding: 0.4rem 1rem; font-size: 0.8rem; color: var(--accent-blue); font-weight: 600; margin-bottom: 1.5rem; }
.hero-badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-blue); animation: pulse-dot 2s ease-in-out infinite; }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.hero-title { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 800; color: var(--text-white); letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 0.5rem; }
.hero-title span { background: var(--gradient-accent); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-orbit { font-size: 1rem; color: var(--accent-blue); font-weight: 600; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.hero-tagline { font-size: 1.3rem; color: var(--text-secondary); margin-bottom: 1rem; }
.hero-description { font-size: 1.05rem; color: var(--text-secondary); max-width: 650px; margin: 0 auto 2rem; line-height: 1.8; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 3rem; }
.hero-stats { display: flex; justify-content: center; gap: 3rem; flex-wrap: wrap; }
.hero-stat-number { font-size: 2rem; font-weight: 800; color: var(--accent-blue); font-family: 'Rajdhani', sans-serif; }
.hero-stat-label { font-size: 0.8rem; color: var(--text-muted); }

section { padding: 6rem 2rem; }
.container { max-width: 1200px; margin: 0 auto; }
.section-label { display: inline-block; font-size: 0.75rem; font-weight: 700; color: var(--accent-blue); text-transform: uppercase; letter-spacing: 0.15em; margin-bottom: 0.75rem; }
.section-title { font-size: clamp(1.8rem, 4vw, 2.75rem); font-weight: 800; color: var(--text-white); letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 1rem; }
.section-title span { color: var(--accent-blue); }
.section-subtitle { font-size: 1.05rem; color: var(--text-secondary); max-width: 600px; line-height: 1.8; }
.section-header { margin-bottom: 3.5rem; }

.ecosystem-diagram { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 2rem; text-align: center; box-shadow: var(--shadow-card); }
.diagram-center { width: 80px; height: 80px; background: var(--gradient-accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem; font-weight: 800; color: white; font-family: 'Rajdhani', sans-serif; font-size: 0.75rem; box-shadow: 0 0 30px rgba(26, 111, 168, 0.3); }
.diagram-rings { display: flex; flex-direction: column; gap: 0.75rem; }
.diagram-ring { display: flex; align-items: center; gap: 0.75rem; background: rgba(26, 111, 168, 0.04); border: 1px solid var(--border-accent); border-radius: 8px; padding: 0.6rem 1rem; font-size: 0.8rem; color: var(--text-secondary); }
.ring-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-orbit { background: #1a6fa8; box-shadow: 0 0 8px #1a6fa8; }
.dot-core { background: #0e5a8a; box-shadow: 0 0 8px #0e5a8a; }
.dot-lens { background: #1a7fc8; box-shadow: 0 0 8px #1a7fc8; }
.dot-hive { background: #2a8a4a; box-shadow: 0 0 8px #2a8a4a; }
.dot-aura { background: #8a6a20; box-shadow: 0 0 8px #8a6a20; }

.features { background: var(--bg-deep); }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.feature-card { background: var(--gradient-card); border: 1px solid var(--border); border-radius: 12px; padding: 1.75rem; transition: all 0.3s ease; position: relative; overflow: hidden; }
.feature-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--gradient-accent); opacity: 0; transition: opacity 0.3s ease; }
.feature-card:hover { border-color: var(--border-accent); transform: translateY(-4px); box-shadow: var(--shadow-glow); }
.feature-card:hover::before { opacity: 1; }
.feature-icon { width: 48px; height: 48px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: 1rem; }
.feature-title { font-size: 1rem; font-weight: 700; color: var(--text-white); margin-bottom: 0.5rem; }
.feature-desc { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.7; }

.pillars { background: var(--bg-mid); }
.pillar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.pillar-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 2rem; transition: all 0.3s ease; cursor: default; }
.pillar-card:hover { border-color: var(--accent-blue); transform: translateY(-4px); box-shadow: 0 8px 30px rgba(26, 111, 168, 0.12); }
.pillar-icon { font-size: 2rem; margin-bottom: 1rem; display: block; }
.pillar-name { font-size: 1.1rem; font-weight: 700; color: var(--text-white); margin-bottom: 0.5rem; }
.pillar-acro { font-size: 0.75rem; color: var(--accent-blue); font-weight: 600; margin-bottom: 0.75rem; }
.pillar-desc { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.7; }
.pillar-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 1rem; }
.pillar-tag { font-size: 0.7rem; padding: 0.2rem 0.6rem; border-radius: 4px; font-weight: 600; background: rgba(26, 111, 168, 0.08); color: var(--accent-blue); border: 1px solid rgba(26, 111, 168, 0.15); }

.cta-banner { background: linear-gradient(135deg, #eaf0f6 0%, #f0f4f8 50%, #eaf0f6 100%); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 5rem 2rem; text-align: center; position: relative; overflow: hidden; }
.cta-banner::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(26, 111, 168, 0.06) 0%, transparent 70%); }
.cta-banner-content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.cta-banner h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 800; color: var(--text-white); margin-bottom: 1rem; letter-spacing: -0.02em; }
.cta-banner p { font-size: 1.05rem; color: var(--text-secondary); margin-bottom: 2rem; line-height: 1.8; }
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

footer { background: var(--bg-mid); border-top: 1px solid var(--border); padding: 4rem 2rem 2rem; }
.footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer-brand .brand-name { font-size: 1rem; font-weight: 700; color: var(--text-white); margin-bottom: 0.25rem; font-family: 'Rajdhani', sans-serif; }
.footer-brand p { font-size: 0.875rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 1rem; }
.footer-col h4 { font-size: 0.8rem; font-weight: 700; color: var(--text-white); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col ul a { font-size: 0.875rem; color: var(--text-muted); text-decoration: none; transition: color 0.2s ease; }
.footer-col ul a:hover { color: var(--accent-blue); }
.footer-bottom { max-width: 1200px; margin: 0 auto; padding-top: 2rem; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer-bottom p { font-size: 0.8rem; color: var(--text-muted); }
.footer-bottom a { color: var(--accent-blue); text-decoration: none; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
    .features-grid, .pillar-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .hero-orb-1 { width: 350px; height: 350px; }
    .hero-orb-2 { width: 280px; height: 280px; }
    /* Collapse 4-col and 3-col inline grids to 2-col on tablet */
    section div[style*="grid-template-columns:repeat(4,1fr)"] { grid-template-columns: repeat(2, 1fr) !important; }
    section div[style*="grid-template-columns:repeat(3,1fr)"] { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 768px) {
    nav { padding: 0 1rem; }
    .nav-links { display: none; }
    .mobile-toggle { display: block; }
    section { padding: 4rem 1.25rem; }
    .hero { min-height: auto; padding: 7rem 1.25rem 4rem; }
    .hero-title { font-size: clamp(2rem, 8vw, 3rem); }
    .hero-tagline { font-size: 1.1rem; }
    .hero-description { font-size: 0.95rem; padding: 0 0.5rem; }
    .hero-actions { flex-direction: column; align-items: center; }
    .hero-actions .btn { width: 100%; max-width: 320px; justify-content: center; }
    .hero-orb-1 { width: 250px; height: 250px; }
    .hero-orb-2 { width: 200px; height: 200px; }
    .hero-orb-3 { width: 180px; height: 180px; }
    .features-grid, .pillar-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .cta-banner { padding: 3rem 1.25rem; }
    .cta-actions { flex-direction: column; align-items: center; }
    .cta-actions .btn { width: 100%; max-width: 320px; justify-content: center; }
    .ecosystem-diagram { padding: 1.25rem; }
    .diagram-ring { font-size: 0.75rem; padding: 0.5rem 0.75rem; }
    .section-header { margin-bottom: 2rem; }
    .section-subtitle { font-size: 0.95rem; }

    /* Force ALL inline grid layouts to single column on mobile */
    section div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
    section div[style*="display:grid"] {
        gap: 1rem !important;
    }
    /* Fix HIVE spotlight text alignment on mobile */
    section div[style*="1fr 1fr"] > div:last-child {
        text-align: center;
    }
}
