/* Levenson Wellness Design System - Aligned with levenson.ai */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Space+Grotesk:wght@500;600;700&family=Outfit:wght@400;600;700&display=swap');

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --accent-blue: #2453b8;
    --accent-orange: #c56033;
    --accent-gold: #d1b287;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(15, 23, 42, 0.08);
    --font-header: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Fira Code', monospace;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Background Gradients & Glows */
.glow-bg {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(36, 83, 184, 0.06) 0%, rgba(255, 255, 255, 0) 70%);
    top: -200px;
    right: -100px;
    z-index: -1;
    pointer-events: none;
}

.glow-bg-secondary {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(197, 96, 51, 0.04) 0%, rgba(255, 255, 255, 0) 70%);
    bottom: 100px;
    left: -200px;
    z-index: -1;
    pointer-events: none;
}

/* Header & Navigation */
.app-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-header);
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    text-decoration: none;
}

.logo-img {
    width: 38px;
    height: 38px;
}

.logo-text .accent-text {
    background: linear-gradient(120deg, var(--accent-blue) 0%, var(--accent-orange) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    position: relative;
    padding: 0.25rem 0;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent-blue);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-orange));
    border-radius: 2px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.15);
    padding: 0.4rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #059669;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    position: relative;
}

.pulse-dot::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #10b981;
    border-radius: 50%;
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(2.8);
        opacity: 0;
    }
}

/* App Main Container */
.app-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem 6rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px - 220px);
}

/* Hero Section */
.hero-section {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.hero-emblem {
    width: 180px;
    height: 180px;
    margin-bottom: 1.5rem;
    animation: float 6s ease-in-out infinite;
}

.hero-emblem img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
    100% { transform: translateY(0px); }
}

.badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(36, 83, 184, 0.06);
    border: 1px solid rgba(36, 83, 184, 0.12);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-blue);
}

.badge-icon {
    width: 16px;
    height: 16px;
    color: var(--accent-orange);
}

.hero-section h1 {
    font-family: var(--font-header);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-orange) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin-bottom: 1rem;
    text-wrap: balance;
}

.action-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 2.2rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-orange) 100%);
    color: white;
    box-shadow: 0 10px 24px -8px rgba(36, 83, 184, 0.45);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px -10px rgba(197, 96, 51, 0.5);
    background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-blue) 100%);
}

.btn-secondary {
    background: #ffffff;
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.15);
    transform: translateY(-2px);
}

.btn-icon {
    width: 18px;
    height: 18px;
}

/* Glassmorphism Panel Base */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.2rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.03);
    transition: var(--transition);
}

.glass-panel:hover {
    border-color: rgba(15, 23, 42, 0.15);
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.06);
}

/* Stats Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent-orange), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.stat-card:hover::before {
    transform: translateX(100%);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.stat-title {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.stat-icon {
    width: 20px;
    height: 20px;
}

.uptime-icon { color: #10b981; }
.latency-icon { color: var(--accent-blue); }
.throughput-icon { color: var(--accent-orange); }
.security-icon { color: var(--accent-blue); }

.stat-value {
    font-family: var(--font-header);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.stat-footer {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.text-success { color: #059669; }
.text-neutral { color: var(--text-secondary); }
.text-glow {
    color: var(--accent-blue);
    font-weight: 600;
}

/* Features Section */
.section-title {
    font-family: var(--font-header);
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2.5rem;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--accent-blue) 10%, var(--accent-orange) 90%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: flex-start;
    text-align: left;
}

.feature-icon-wrapper {
    background: rgba(36, 83, 184, 0.08);
    border: 1px solid rgba(36, 83, 184, 0.15);
    padding: 0.85rem;
    border-radius: 12px;
    color: var(--accent-blue);
    display: flex;
    justify-content: center;
    align-items: center;
}

.feature-icon {
    width: 22px;
    height: 22px;
}

.feature-card h3 {
    font-family: var(--font-header);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
}

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

/* Console Section (Kept Dark for Contrast and Realism) */
.console-section {
    width: 100%;
}

.console-wrapper {
    padding: 0;
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    border-color: rgba(15, 23, 42, 0.08);
}

.console-header {
    background: rgba(15, 23, 42, 0.96);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.console-controls {
    display: flex;
    gap: 0.45rem;
}

.console-controls .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.dot.red { background-color: #ef4444; }
.dot.yellow { background-color: #f59e0b; }
.dot.green { background-color: #10b981; }

.console-title {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #94a3b8;
}

.console-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: var(--font-body);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.console-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.console-body {
    background: rgba(9, 13, 26, 0.98);
    padding: 1.5rem;
    height: 280px;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.console-line {
    word-break: break-all;
    color: #f1f5f9;
}

.console-prompt {
    color: #38bdf8;
    user-select: none;
}

.console-prompt-indicator {
    color: var(--accent-orange);
    user-select: none;
    font-weight: bold;
    font-family: var(--font-mono);
}

.text-comment {
    color: #64748b;
    font-style: italic;
}

.text-system {
    color: #818cf8;
}

.text-success {
    color: #34d399;
}

.text-error {
    color: #f87171;
}

.console-input-wrapper {
    background: rgba(9, 13, 26, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#console-input {
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    width: 100%;
}

#console-input::placeholder {
    color: #4b5563;
}

/* Footer Styling - Aligned with levenson.ai */
.app-footer {
    border-top: 1px solid var(--glass-border);
    background: var(--bg-secondary);
    padding: 4.5rem 2rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.footer-logo img {
    width: 45px;
    height: 45px;
}

.footer-logo .logo-text {
    font-family: var(--font-header);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-primary);
}

.footer-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.copyright {
    margin-top: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .main-nav {
        gap: 1.25rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero-section h1 {
        font-size: 2.2rem;
    }
    
    .app-main {
        padding: 2rem 1rem;
        gap: 3.5rem;
    }
    
    .hero-emblem {
        width: 130px;
        height: 130px;
    }
}

/* Interactive Tabs Layout */
.tabs-wrapper {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 2.5rem;
    width: 100%;
    align-items: start;
    margin-top: 1rem;
}

.tab-nav {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.tab-btn {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: left;
    font-family: var(--font-header);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.02);
    width: 100%;
}

.tab-btn:hover {
    border-color: rgba(15, 23, 42, 0.15);
    background: rgba(255, 255, 255, 0.95);
    transform: translateX(6px);
    color: var(--text-primary);
}

.tab-btn.active {
    background: linear-gradient(135deg, rgba(36, 83, 184, 0.08) 0%, rgba(197, 96, 51, 0.08) 100%);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    box-shadow: 0 8px 24px rgba(36, 83, 184, 0.08);
}

.tab-btn-icon {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    transition: var(--transition);
    flex-shrink: 0;
}

.tab-btn.active .tab-btn-icon {
    color: var(--accent-blue);
}

.tab-panes {
    position: relative;
    width: 100%;
}

.tab-pane {
    display: none;
    flex-direction: column;
    gap: 1.5rem;
    animation: tabFadeIn 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.tab-pane.active {
    display: flex;
}

.tab-pane h3 {
    font-size: 1.6rem;
    line-height: 1.3;
}

@keyframes tabFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjust for mobile */
@media (max-width: 900px) {
    .tabs-wrapper {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .tab-nav {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 0.75rem;
        -webkit-overflow-scrolling: touch;
        gap: 0.75rem;
    }
    
    .tab-btn {
        flex-shrink: 0;
        width: auto;
        padding: 0.85rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .tab-btn:hover {
        transform: none;
    }
}

/* Colorful tab button icons (Default / Idle state) */
.tab-btn .tab-btn-icon.icon-stillmotion {
    color: #ffffff;
}
.tab-btn .tab-btn-icon.icon-provenance {
    color: #10b981; /* Emerald/Teal */
}
.tab-btn .tab-btn-icon.icon-biomarker {
    color: #3b82f6; /* Blue */
}
.tab-btn .tab-btn-icon.icon-emotional {
    color: #3b82f6; /* Blue */
}
.tab-btn .tab-btn-icon.icon-aging {
    color: #f59e0b; /* Amber */
}
.tab-btn .tab-btn-icon.icon-continuity {
    color: #8b5cf6; /* Violet */
}

/* Tab button active state customization */
.tab-btn.active[data-tab="tab-1"] {
    background: linear-gradient(135deg, rgba(197, 96, 51, 0.05) 0%, rgba(255, 255, 255, 0.9) 100%);
    border-color: #0b64d8;
    color: #a94b2b;
    box-shadow: 0 8px 24px rgba(11, 100, 216, 0.08);
}
.tab-btn.active[data-tab="tab-2"] {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.06) 0%, rgba(255, 255, 255, 0.8) 100%);
    border-color: #10b981;
    color: #059669;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.08);
}
.tab-btn.active[data-tab="tab-3"] {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.06) 0%, rgba(255, 255, 255, 0.8) 100%);
    border-color: #3b82f6;
    color: #2563eb;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.08);
}
.tab-btn.active[data-tab="tab-4"] {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.06) 0%, rgba(255, 255, 255, 0.8) 100%);
    border-color: #3b82f6;
    color: #2563eb;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.08);
}
.tab-btn.active[data-tab="tab-5"] {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.06) 0%, rgba(255, 255, 255, 0.8) 100%);
    border-color: #f59e0b;
    color: #d97706;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.08);
}
.tab-btn.active[data-tab="tab-6"] {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.06) 0%, rgba(255, 255, 255, 0.8) 100%);
    border-color: #8b5cf6;
    color: #7c3aed;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.08);
}

/* Hover effect on tab button icons */
.tab-btn .tab-btn-icon {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s ease, filter 0.3s ease;
}

.tab-btn:hover .tab-btn-icon {
    transform: scale(1.15);
}

.tab-btn:hover .tab-btn-icon.icon-stillmotion,
.tab-btn.active .tab-btn-icon.icon-stillmotion {
    color: #ffffff;
    filter: drop-shadow(0 0 6px rgba(197, 96, 51, 0.4));
}
.tab-btn:hover .tab-btn-icon.icon-provenance,
.tab-btn.active .tab-btn-icon.icon-provenance {
    color: #059669;
    filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.4));
}
.tab-btn:hover .tab-btn-icon.icon-biomarker,
.tab-btn.active .tab-btn-icon.icon-biomarker {
    color: #2563eb;
    filter: drop-shadow(0 0 6px rgba(59, 130, 246, 0.4));
}
.tab-btn:hover .tab-btn-icon.icon-emotional,
.tab-btn.active .tab-btn-icon.icon-emotional {
    color: #2563eb;
    filter: drop-shadow(0 0 6px rgba(59, 130, 246, 0.4));
}
.tab-btn:hover .tab-btn-icon.icon-aging,
.tab-btn.active .tab-btn-icon.icon-aging {
    color: #d97706;
    filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.4));
}
.tab-btn:hover .tab-btn-icon.icon-continuity,
.tab-btn.active .tab-btn-icon.icon-continuity {
    color: #7c3aed;
    filter: drop-shadow(0 0 6px rgba(139, 92, 246, 0.4));
}

/* Theme-specific styles for Right-side Content Panels */
/* Theme: StillMotion Reflect Archive */
.theme-stillmotion.feature-card {
    border-left: 4px solid #c56033;
}
.theme-stillmotion .feature-icon-wrapper {
    background: rgba(197, 96, 51, 0.08) !important;
    border-color: rgba(197, 96, 51, 0.2) !important;
    color: #c56033 !important;
    box-shadow: 0 0 20px rgba(197, 96, 51, 0.1);
}

.stillmotion-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stillmotion-summary-card,
.stillmotion-flow > div {
    border: 1px solid rgba(197, 96, 51, 0.14);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(197, 96, 51, 0.05), rgba(209, 178, 135, 0.05));
    padding: 1rem;
}

.stillmotion-summary-card h4,
.stillmotion-flow h4 {
    font-family: var(--font-header);
    font-size: 0.95rem;
    margin-bottom: 0.45rem;
    color: var(--text-primary);
}

.stillmotion-summary-card p,
.stillmotion-flow p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.stillmotion-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    background: rgba(197, 96, 51, 0.12);
    color: #a14925;
    font-family: var(--font-header);
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.stillmotion-frameworks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1rem;
}

.stillmotion-frameworks span {
    border: 1px solid rgba(197, 96, 51, 0.16);
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.72);
    color: #a14925;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.45rem 0.7rem;
}

.stillmotion-flow {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stillmotion-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.stillmotion-gallery figure {
    overflow: hidden;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.stillmotion-gallery img {
    display: block;
    width: 100%;
    height: auto;
}

.stillmotion-gallery figcaption {
    padding: 0.75rem 0.9rem;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
}

.stillmotion-idea {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
}

.stillmotion-document {
    gap: 1.35rem;
}

.stillmotion-brand-lockup {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.2rem;
}

.stillmotion-symbol-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    border-radius: 9999px;
    background:
        radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.18), transparent 34%),
        linear-gradient(135deg, #475a91 0%, #a45c4b 100%);
    color: #ffffff;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 2.55rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 12px 28px rgba(83, 72, 111, 0.18);
    text-shadow: 0 1px 2px rgba(15, 23, 42, 0.18);
}

.stillmotion-symbol-mark-sm {
    width: 26px;
    height: 26px;
    flex-basis: 26px;
    font-size: 1.25rem;
    box-shadow: none;
}

.stillmotion-document h3 {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.04em;
    color: #a94b2b;
}

.stillmotion-copy-block {
    max-width: 780px;
    width: 100%;
}

.stillmotion-copy-block + .stillmotion-copy-block {
    margin-top: 0.75rem;
    padding-top: 0.5rem;
}

.stillmotion-copy-block h4 {
    font-family: var(--font-header);
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
}

.stillmotion-copy-block p {
    margin-bottom: 0.85rem;
}

.stillmotion-lede {
    color: #a14925 !important;
    font-family: var(--font-header);
    font-size: clamp(1.35rem, 3vw, 2rem) !important;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.stillmotion-app-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0.15rem 0 1.1rem;
    border: 1px solid rgba(197, 96, 51, 0.22);
    border-radius: 9999px;
    background: linear-gradient(135deg, rgba(197, 96, 51, 0.1), rgba(209, 178, 135, 0.12));
    color: #a14925;
    font-family: var(--font-header);
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    padding: 0.6rem 0.9rem;
    transition: var(--transition);
}

.stillmotion-app-link:hover {
    border-color: rgba(197, 96, 51, 0.38);
    color: #7f371b;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(197, 96, 51, 0.12);
}

.stillmotion-app-link svg {
    width: 15px;
    height: 15px;
}

.stillmotion-gallery-block {
    max-width: 100%;
}

.stillmotion-wide-figure {
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    background: #fff;
    margin: 1.2rem 0 1.8rem;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.05);
}

.stillmotion-wide-figure img {
    display: block;
    width: 100%;
    height: auto;
}

.stillmotion-wide-figure figcaption {
    padding: 0.85rem 1rem;
    color: var(--text-secondary);
    font-size: 0.86rem;
    font-weight: 600;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.stillmotion-final-line {
    max-width: 780px;
    margin-top: 1rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(197, 96, 51, 0.2);
    color: #a14925 !important;
    font-family: var(--font-header);
    font-size: 1.15rem !important;
    font-weight: 700;
}

@media (max-width: 900px) {
    .stillmotion-summary-grid,
    .stillmotion-flow,
    .stillmotion-gallery {
        grid-template-columns: 1fr;
    }
}

/* Theme: Wellness Product Provenance (Emerald/Teal) */
.theme-provenance.feature-card {
    border-left: 4px solid #10b981;
}
.theme-provenance .feature-icon-wrapper {
    background: rgba(16, 185, 129, 0.08) !important;
    border-color: rgba(16, 185, 129, 0.2) !important;
    color: #10b981 !important;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.1);
}

/* Theme: Digital Biomarker (Blue) */
.theme-biomarker.feature-card {
    border-left: 4px solid #3b82f6;
}
.theme-biomarker .feature-icon-wrapper {
    background: rgba(59, 130, 246, 0.08) !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
    color: #3b82f6 !important;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.1);
}

/* Theme: Emotional Wellness (Blue) */
.theme-emotional.feature-card {
    border-left: 4px solid #3b82f6;
}
.theme-emotional .feature-icon-wrapper {
    background: rgba(59, 130, 246, 0.08) !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
    color: #3b82f6 !important;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.1);
}

/* Theme: AI for Healthy Aging (Amber) */
.theme-aging.feature-card {
    border-left: 4px solid #f59e0b;
}
.theme-aging .feature-icon-wrapper {
    background: rgba(245, 158, 11, 0.08) !important;
    border-color: rgba(245, 158, 11, 0.2) !important;
    color: #f59e0b !important;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.1);
}

/* Theme: Digital Continuity (Purple/Violet) */
.theme-continuity.feature-card {
    border-left: 4px solid #8b5cf6;
}
.theme-continuity .feature-icon-wrapper {
    background: rgba(139, 92, 246, 0.08) !important;
    border-color: rgba(139, 92, 246, 0.2) !important;
    color: #8b5cf6 !important;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.1);
}

/* Clickable diagram thumbnail styles */
.diagram-thumbnail-container {
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.4);
    padding: 1.5rem;
    margin: 2rem 0;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.diagram-thumbnail-container:hover {
    border-color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 10px 30px rgba(36, 83, 184, 0.05);
}

.diagram-thumbnail-container::after {
    content: 'Click to expand';
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.4rem 0.85rem;
    border-radius: 9999px;
    opacity: 0;
    transform: translateY(4px);
    transition: var(--transition);
    pointer-events: none;
}

.diagram-thumbnail-container:hover::after {
    opacity: 1;
    transform: translateY(0);
}

.diagram-thumbnail-target {
    width: 100%;
    max-width: 100%;
    display: flex;
    justify-content: center;
}

.diagram-thumbnail-target svg {
    max-width: 100%;
    height: auto !important;
    display: block;
}

/* Modal Overlay Styles */
.diagram-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.diagram-modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    border-radius: 24px;
    padding: 3rem;
    width: 95vw;
    height: 85vh;
    max-width: 1400px;
    overflow: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

.diagram-modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    font-size: 2.5rem;
    line-height: 1;
    color: var(--text-primary);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1001;
}

.modal-close:hover {
    background: white;
    transform: scale(1.1);
    color: #ef4444;
}

.modal-content svg {
    width: 100% !important;
    height: auto !important;
    min-width: 1100px; /* Force it to remain wide, clear and highly readable */
    display: block;
    margin: 0 auto;
}


