/* ============================================
   Cyréna - Custom Styles (Bootstrap 5 Base)
   ============================================ */

/* ============================================
   CSS Custom Properties
   ============================================ */
:root {
    --color-primary: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-accent: #60a5fa;
    --color-bg-dark: #0f172a;
    --color-bg-darker: #0a0f1c;
    --color-text-light: #e2e8f0;
    --color-text-muted: #94a3b8;
    --color-border-glass: rgba(255, 255, 255, 0.15);
    --color-badge-bg: rgba(255, 255, 255, 0.1);
    --color-partner-badge: rgba(255, 255, 255, 0.08);

    --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #2563eb 100%);
    --gradient-hero-alt: linear-gradient(160deg, #0a1628 0%, #1a365d 40%, #1d4ed8 100%);

    --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
}

/* ============================================
   Base Overrides
   ============================================ */
body {
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: 56px; /* Account for fixed navbar */
}

/* ============================================
   Utility Classes
   ============================================ */
.py-6 {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.mb-6 {
    margin-bottom: 4rem;
}

.min-vh-75 {
    min-height: 75vh;
}

.ls-2 {
    letter-spacing: 0.125em;
}

.text-white-75 {
    color: rgba(255, 255, 255, 0.75) !important;
}

.text-white-50 {
    color: rgba(255, 255, 255, 0.5) !important;
}

.text-white-25 {
    color: rgba(255, 255, 255, 0.25) !important;
}

.bg-accent {
    background-color: var(--color-accent) !important;
}

.text-accent {
    color: var(--color-accent) !important;
}

.border-accent {
    border-color: var(--color-accent) !important;
}

/* ============================================
   Navbar
   ============================================ */
.navbar {
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border-glass);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.navbar-brand {
    color: #ffffff !important;
    transition: opacity var(--transition-fast);
}

.navbar-brand:hover {
    opacity: 0.85;
}

.navbar-brand img {
    object-fit: cover;
}

.navbar-toggler {
    border-color: var(--color-border-glass);
    padding: 0.375rem 0.5rem;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-nav {
    gap: 0.25rem;
}

.nav-link {
    color: var(--color-text-muted) !important;
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 0.5rem 0.875rem !important;
    border-radius: 0.375rem;
    transition: all var(--transition-fast);
}

.nav-link:hover,
.nav-link:focus {
    color: var(--color-text-light) !important;
    background-color: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: #ffffff !important;
    background-color: rgba(37, 99, 235, 0.25);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    background: var(--gradient-hero-alt);
    padding-top: 5rem;
    padding-bottom: 0;
    min-height: calc(100vh - 56px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 40%, rgba(37, 99, 235, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse 60% 80% at 80% 60%, rgba(96, 165, 250, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
}

/* Hero Badges */
.hero-badge {
    display: flex;
    justify-content: center;
}

.hero-badge .badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.8125rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

/* Hero Typography */
.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

/* Tech Stack Badges */
.tech-stack {
    gap: 0.75rem;
}

.tech-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: var(--color-partner-badge);
    border: 1px solid var(--color-border-glass);
    border-radius: 2rem;
    color: var(--color-text-muted);
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.tech-badge:hover {
    background-color: rgba(255, 255, 255, 0.12);
    color: var(--color-text-light);
    border-color: rgba(255, 255, 255, 0.25);
}

.tech-badge i {
    font-size: 0.875rem;
    opacity: 0.7;
}

/* Hero Buttons */
.hero-buttons .btn {
    transition: all var(--transition-base);
}

.hero-buttons .btn-light {
    background-color: #ffffff;
    color: var(--color-bg-dark);
    border: none;
    font-weight: 600;
}

.hero-buttons .btn-light:hover {
    background-color: var(--color-text-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.hero-buttons .btn-outline-light {
    border-color: var(--color-border-glass);
    color: var(--color-text-light);
    background-color: transparent;
}

.hero-buttons .btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    transform: translateY(-2px);
}

/* Wave Divider */
.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    line-height: 0;
}

.hero-wave svg {
    display: block;
    width: 100%;
    height: auto;
}

/* ============================================
   Origin Story Section
   ============================================ */
.origin-story-section {
    background-color: #f8f9fa;
}

.origin-story-card {
    border-radius: 1rem;
}

.origin-quote {
    padding: 1.5rem;
}

.origin-quote p {
    font-size: 1rem;
    line-height: 1.6;
}

/* ============================================
   Video Section
   ============================================ */
.video-wrapper {
    background-color: #1a1a2e;
}

.video-wrapper video {
    display: block;
}

/* ============================================
   Trait Cards
   ============================================ */
.trait-card {
    border-radius: 0.75rem;
    transition: all var(--transition-base);
}

.trait-card:hover {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
}

/* ============================================
   Model Cards
   ============================================ */
.model-card {
    border-radius: 0.75rem;
    transition: all var(--transition-base);
}

.model-card:hover {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
}

.ollama-card {
    border-left: 4px solid #198754;
}

.openai-card {
    border-left: 4px solid #0dcaf0;
}

.switch-visual {
    padding: 1rem;
}

.switch-circle {
    transition: all var(--transition-base);
}

.switch-visual:hover .switch-circle {
    transform: scale(1.05);
    background-color: rgba(37, 99, 235, 0.15) !important;
}

/* ============================================
   New Feature Cards
   ============================================ */
.new-feature-card {
    border-radius: 0.75rem;
    transition: all var(--transition-base);
}

.new-feature-card:hover {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
}

.feature-image-wrapper {
    background-color: #f1f5f9;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-image {
    object-fit: cover;
    max-height: 160px;
}

/* ============================================
   Capability Cards
   ============================================ */
.capability-card {
    border-radius: 0.75rem;
    transition: all var(--transition-base);
    cursor: default;
}

.capability-card:hover {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
}

a .capability-card {
    cursor: pointer;
}

a .capability-card:hover {
    border-color: var(--color-primary) !important;
}

/* ============================================
   Domain Cards
   ============================================ */
.domain-card {
    border-radius: 0.75rem;
    transition: all var(--transition-base);
}

.domain-card:hover {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
}

/* ============================================
   Memory Section
   ============================================ */
.memory-card {
    border-radius: 0.75rem;
    transition: all var(--transition-base);
    background-color: #ffffff;
}

.memory-card:hover {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
}

.sticky-note-card {
    border-top: 4px solid #ffc107;
}

.api-ref-card {
    border-top: 4px solid var(--color-accent);
}

.folder-card {
    border-top: 4px solid #198754;
}

.folder-tree {
    background-color: #1e293b;
    font-family: var(--bs-font-monospace);
}

.folder-item {
    padding: 0.25rem 0;
    line-height: 1.5;
}

.folder-item.indent-1 {
    padding-left: 1.5rem;
}

.folder-item.indent-2 {
    padding-left: 3rem;
}

.memory-callout {
    border-radius: 0.75rem;
    background-color: #ffffff;
}

/* ============================================
   Not Cards
   ============================================ */
.not-card {
    border-radius: 0.75rem;
    transition: all var(--transition-base);
}

.not-card:hover {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
}

.not-icon {
    transition: all var(--transition-fast);
}

.not-card:hover .not-icon {
    background-color: rgba(220, 53, 69, 0.2) !important;
}

/* ============================================
   Platform Visual
   ============================================ */
.platform-visual {
    background-color: rgba(37, 99, 235, 0.05);
}

.platform-layer {
    transition: all var(--transition-base);
}

.platform-layer:hover {
    transform: translateX(8px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* ============================================
   Open Source Section
   ============================================ */
.bg-primary .badge {
    backdrop-filter: blur(4px);
}

/* ============================================
   Icon Wrapper
   ============================================ */
.icon-wrapper {
    transition: all var(--transition-fast);
}

.card:hover .icon-wrapper {
    transform: scale(1.05);
}

.icon-wrapper-sm {
    transition: all var(--transition-fast);
}

.domain-card:hover .icon-wrapper-sm {
    transform: scale(1.05);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background-color: #0f172a;
    color: #94a3b8;
}

.footer a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 150ms ease;
}

.footer a:hover {
    color: #e2e8f0;
}

.footer-brand {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.25rem;
}

.footer-tagline {
    color: #64748b;
    font-size: 0.9375rem;
    line-height: 1.6;
    max-width: 320px;
}

.footer-heading {
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: 1rem;
}

.footer-link {
    display: block;
    color: #94a3b8;
    font-size: 0.9375rem;
    padding: 0.25rem 0;
    text-decoration: none;
    transition: color 150ms ease;
}

.footer-link:hover {
    color: #e2e8f0;
}

.footer-github-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.5rem;
    color: #94a3b8;
    text-decoration: none;
    transition: all 150ms ease;
}

.footer-github-btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.2);
}

.footer-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin: 2rem 0;
}

.footer-bottom {
    font-size: 0.875rem;
    color: #64748b;
}

.footer-bottom a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 150ms ease;
}

.footer-bottom a:hover {
    color: #e2e8f0;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: rgba(15, 23, 42, 0.98);
        border-radius: 0.5rem;
        margin-top: 0.5rem;
        padding: 0.5rem;
    }

    .navbar-nav {
        gap: 0.125rem;
    }

    .nav-link {
        padding: 0.625rem 1rem !important;
    }

    .hero {
        padding-top: 3rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .tech-badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }

    .switch-visual {
        padding: 2rem 0;
    }

    .platform-visual {
        padding: 2rem !important;
    }
}

@media (max-width: 575.98px) {
    .hero-title {
        font-size: 2.25rem;
    }

    .hero-badge .badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }

    .tech-stack {
        gap: 0.5rem !important;
    }

    .py-6 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .mb-6 {
        margin-bottom: 3rem;
    }

    .model-card .card-body {
        padding: 1.5rem !important;
    }

    .origin-story-card .card-body {
        padding: 1.5rem !important;
    }
}

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   Focus Visible
   ============================================ */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
    box-shadow: none !important;
}
