/**
 * Pulse Protector - Light Theme with Glassmorphism
 * Professional, scientific, medical research aesthetic
 * Mobile-first responsive design
 */

/* CSS Custom Properties */
:root {
    /* Light theme colors */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-gradient-soft: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    
    /* Dark theme colors */
    --dark-bg-primary: #1e293b;
    --dark-bg-secondary: #0f172a;
    --dark-bg-tertiary: #334155;
    --dark-text-primary: #f1f5f9;
    --dark-text-secondary: #cbd5e1;
    --dark-text-muted: #94a3b8;
    --dark-border-color: rgba(255, 255, 255, 0.1);
    --dark-glass-bg: rgba(30, 41, 59, 0.8);
    
    /* Text colors */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    /* Accent colors */
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-blue: #3b82f6;
    --accent-cyan: #06b6d4;
    --accent-green: #10b981;
    --accent-orange: #f59e0b;
    --accent-red: #ef4444;
    --accent-purple: #8b5cf6;
    
    /* Glass effect colors */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
    
    /* Triage colors */
    --triage-red: #ef4444;
    --triage-yellow: #f59e0b;
    --triage-green: #10b981;
    --triage-black: #64748b;
    
    /* Border & shadows */
    --border-color: rgba(0, 0, 0, 0.08);
    --border-light: rgba(255, 255, 255, 0.3);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Border radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease;
}

/* Reset & Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

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

/* Dark mode theme */
body.dark-theme {
    background: var(--dark-bg-primary);
    color: var(--dark-text-primary);
}

body.dark-theme .glass-card-light {
    background: var(--dark-glass-bg);
    border-color: var(--dark-border-color);
}

body.dark-theme .header,
body.dark-theme .header.light {
    background: rgba(30, 41, 59, 0.9);
    border-color: var(--dark-border-color);
}

body.dark-theme .nav-link {
    color: var(--dark-text-secondary);
}

body.dark-theme .nav-link:hover,
body.dark-theme .nav-link.active {
    color: var(--accent-primary);
}

body.light-theme {
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    background-attachment: fixed;
}

/* Light shining background effect */
body.light-theme::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(6, 182, 212, 0.06) 0%, transparent 50%),
                radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.04) 0%, transparent 60%);
    animation: shimmer 15s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
    will-change: transform;
}

@keyframes shimmer {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-5%, -5%) rotate(3deg); }
}

/* Light orbs floating effect */
body.light-theme::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.05) 0%, transparent 25%),
        radial-gradient(circle at 80% 70%, rgba(6, 182, 212, 0.04) 0%, transparent 25%);
    animation: floatOrbs 20s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
    will-change: transform;
}

@keyframes floatOrbs {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.8; }
    50% { transform: translateY(-20px) scale(1.05); opacity: 1; }
}

/* =============================================
   GLASSMORPHISM CARDS
   ============================================= */

.glass-card-light {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    transition: all var(--transition-normal);
}

.glass-card-light:hover {
    box-shadow: var(--shadow-lg);
}

.glass-card-light.hoverable:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

/* =============================================
   HEADER
   ============================================= */

.header {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: var(--space-md) var(--space-xl);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header.light {
    background: rgba(255, 255, 255, 0.85);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.logo h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.logo .subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Navigation */
.main-nav {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

.nav-link {
    padding: var(--space-sm) var(--space-md);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.nav-link:hover {
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.08);
}

.nav-link.active {
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.12);
    font-weight: 600;
}

/* =============================================
   HERO SECTION
   ============================================= */

.hero-section {
    position: relative;
    min-height: 90vh;
    min-height: 90dvh;
    display: flex;
    align-items: center;
    padding: var(--space-3xl) var(--space-xl);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.08) 50%, rgba(6, 182, 212, 0.05) 100%);
    z-index: -1;
}

.hero-background::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 80%;
    height: 150%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 60%);
    animation: float 20s ease-in-out infinite;
}

.hero-background::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -20%;
    width: 60%;
    height: 120%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
    animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(5deg); }
    66% { transform: translate(-20px, 20px) rotate(-3deg); }
}

.hero-content {
    flex: 1;
    max-width: 700px;
    z-index: 1;
}

.badge-research {
    display: inline-block;
    padding: var(--space-sm) var(--space-lg);
    background: var(--bg-gradient);
    color: white;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-md);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
}

.gradient-text {
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-2xl);
}

.hero-stats {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
    flex-wrap: wrap;
}

.hero-stat {
    padding: var(--space-lg);
    flex: 1;
    min-width: 150px;
    text-align: center;
}

.hero-stat .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: var(--space-xs);
}

.hero-stat.highlight .stat-number {
    color: var(--accent-green);
}

.hero-stat .stat-text {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.hero-cta {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.product-image {
    max-width: 500px;
    width: 100%;
    height: auto;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Global image fixes */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Image container alignment */
.hero-image,
.page-hero-image,
.workflow-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.workflow-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.product-image.floating {
    animation: floating 6s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* =============================================
   BUTTONS
   ============================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-lg {
    padding: var(--space-md) var(--space-xl);
    font-size: 1rem;
}

.btn-primary {
    background: var(--bg-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--accent-primary);
    border: 2px solid var(--accent-primary);
}

.btn-outline:hover {
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

/* =============================================
   CONTAINER & SECTIONS
   ============================================= */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.section {
    padding: var(--space-3xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: var(--space-md);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* =============================================
   PROBLEM SECTION
   ============================================= */

.problem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
}

.problem-card {
    padding: var(--space-xl);
    text-align: center;
}

.problem-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
}

.problem-icon.red { color: var(--accent-red); }
.problem-icon.orange { color: var(--accent-orange); }
.problem-icon.blue { color: var(--accent-blue); }
.problem-icon.green { color: var(--accent-green); }
.problem-icon.purple { color: var(--accent-purple); }

.problem-card.blue-bg {
    background: rgba(59, 130, 246, 0.05);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
}

.problem-card.green-bg {
    background: rgba(16, 185, 129, 0.05);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
}

.problem-card.purple-bg {
    background: rgba(139, 92, 246, 0.05);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
}

.problem-card.orange-bg {
    background: rgba(245, 158, 11, 0.05);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
}

.problem-card.red-bg {
    background: rgba(239, 68, 68, 0.05);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
}

.problem-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.problem-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* =============================================
   SOLUTION SECTION
   ============================================= */

.solution-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
}

.solution-card {
    padding: var(--space-xl);
    text-align: center;
    text-decoration: none;
    color: inherit;
}

.solution-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
}

.solution-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.solution-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: var(--space-md);
}

.solution-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: var(--space-md);
}

.learn-more {
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 0.875rem;
}

/* =============================================
   METRICS SECTION
   ============================================= */

.metrics-section {
    background: var(--bg-gradient-soft);
    border-radius: var(--radius-xl);
    margin: var(--space-2xl) 0;
    padding: var(--space-3xl) var(--space-xl);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
}

.metric-card {
    padding: var(--space-xl);
    text-align: center;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: var(--space-sm);
}

.metric-value.green { color: var(--accent-green); }
.metric-value.blue { color: var(--accent-blue); }
.metric-value.purple { color: var(--accent-purple); }
.metric-value.orange { color: var(--accent-orange); }

.metric-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.metric-detail {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* =============================================
   COMPONENTS SECTION
   ============================================= */

.components-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
}

.component-item {
    padding: var(--space-xl);
}

.component-item.featured {
    border: 2px solid var(--accent-primary);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
}

.component-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.component-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.component-tag {
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.component-tag.red {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
}

.component-tag.blue {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
}

.component-tag.green {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
}

.component-tag.purple {
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-purple);
}

.component-tag.orange {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-orange);
}

.component-item h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.component-item p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: var(--space-md);
}

.component-stat {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-color);
}

.stat-highlight {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-green);
}

.component-stat span:last-child {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* =============================================
   WORKFLOW SECTION
   ============================================= */

.workflow-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: start;
}

.workflow-image-container {
    padding: var(--space-md);
    overflow: hidden;
}

.workflow-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}

.workflow-steps {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.workflow-step {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-lg);
    align-items: flex-start;
}

.workflow-step.active {
    border-left: 3px solid var(--accent-primary);
    background: rgba(99, 102, 241, 0.05);
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--bg-gradient);
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.step-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* =============================================
   QUICK LINKS SECTION
   ============================================= */

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
}

.quick-link-card {
    padding: var(--space-xl);
    text-decoration: none;
    color: inherit;
}

.quick-link-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
}

.quick-link-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.quick-link-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* =============================================
   TEAM SECTION
   ============================================= */

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-lg);
}

.team-member {
    padding: var(--space-xl);
    text-align: center;
}

.member-avatar {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-md);
    font-size: 2rem;
    font-weight: 700;
    color: white;
}

.member-avatar.blue { background: var(--bg-gradient); }
.member-avatar.green { background: linear-gradient(135deg, #10b981, #14b8a6); }
.member-avatar.purple { background: linear-gradient(135deg, #8b5cf6, #a855f7); }
.member-avatar.orange { background: linear-gradient(135deg, #f59e0b, #f97316); }

.team-member h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.member-role {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-sm);
}

.team-member p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* =============================================
   FOOTER
   ============================================= */

.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: var(--space-3xl) var(--space-xl) var(--space-xl);
    margin-top: var(--space-3xl);
}

.footer.light {
    background: white;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-main {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: var(--space-3xl);
    margin-bottom: var(--space-2xl);
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.footer-logo .logo-icon {
    font-size: 1.5rem;
}

.footer-brand p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.footer-column h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-column a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    padding: var(--space-xs) 0;
    transition: color var(--transition-fast);
}

.footer-column a:hover {
    color: var(--accent-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border-color);
}

.disclaimer-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-orange);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
}

.footer-bottom p {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.footer-bottom a {
    color: var(--accent-primary);
    text-decoration: none;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

/* =============================================
   PAGE HERO (for inner pages)
   ============================================= */

.page-hero {
    text-align: center;
    padding: var(--space-3xl) var(--space-xl);
    background: var(--bg-gradient-soft);
    margin-bottom: var(--space-2xl);
}

.page-hero .badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    background: var(--bg-gradient);
    color: white;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: var(--space-lg);
}

.page-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.page-hero .subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto var(--space-xl);
}

.page-hero-image {
    max-width: 600px;
    margin: 0 auto;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.page-hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-md);
    max-width: 800px;
    margin: 0 auto;
}

.stat-item {
    padding: var(--space-lg);
    text-align: center;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: var(--space-xs);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Code highlight inline */
.code-highlight {
    background: rgba(99, 102, 241, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.875rem;
}

/* =============================================
   TABLES
   ============================================= */

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-lg) 0;
    background: var(--glass-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.data-table th,
.data-table td {
    padding: var(--space-md) var(--space-lg);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: rgba(99, 102, 241, 0.08);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: rgba(99, 102, 241, 0.03);
}

.data-table .total {
    background: rgba(99, 102, 241, 0.08);
    font-weight: 600;
}

.data-table .total td {
    color: var(--accent-primary);
    font-size: 1rem;
}

/* =============================================
   TIMELINE
   ============================================= */

.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-cyan));
}

.timeline-item {
    position: relative;
    padding-bottom: var(--space-xl);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -32px;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: var(--radius-full);
    background: var(--accent-primary);
    border: 3px solid white;
    box-shadow: var(--shadow-sm);
}

.timeline-item.active::before {
    background: var(--accent-green);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.timeline-item h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.timeline-item .time {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.timeline-item p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

/* =============================================
   TRIAGE CARDS
   ============================================= */

.triage-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
}

.triage-card {
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    border-left: 4px solid;
}

.triage-card.red {
    background: rgba(239, 68, 68, 0.05);
    border-color: var(--triage-red);
}

.triage-card.yellow {
    background: rgba(245, 158, 11, 0.05);
    border-color: var(--triage-yellow);
}

.triage-card.green {
    background: rgba(16, 185, 129, 0.05);
    border-color: var(--triage-green);
}

.triage-card h4 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
}

.triage-card.red h4 { color: var(--triage-red); }
.triage-card.yellow h4 { color: var(--triage-yellow); }
.triage-card.green h4 { color: var(--triage-green); }

.triage-card ul {
    list-style: none;
    padding: 0;
}

.triage-card li {
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: var(--space-xs) 0;
    padding-left: var(--space-md);
    position: relative;
}

.triage-card li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: inherit;
}

/* =============================================
   CODE BLOCKS
   ============================================= */

.code-block {
    background: #1e293b;
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: #e2e8f0;
    margin: var(--space-md) 0;
}

.code-block .keyword { color: #f472b6; }
.code-block .string { color: #a5d6ff; }
.code-block .function { color: #c4b5fd; }
.code-block .comment { color: #64748b; }
.code-block .number { color: #7dd3fc; }

/* =============================================
   ARCHITECTURE DIAGRAM
   ============================================= */

.architecture-diagram {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-xl);
    background: var(--bg-gradient-soft);
    border-radius: var(--radius-lg);
}

.arch-node {
    padding: var(--space-md) var(--space-lg);
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-align: center;
    min-width: 120px;
    box-shadow: var(--shadow-sm);
}

.arch-node.primary {
    background: var(--bg-gradient);
    border: none;
    color: white;
}

.arch-node strong {
    display: block;
    font-size: 0.9375rem;
    margin-bottom: var(--space-xs);
}

.arch-node small {
    font-size: 0.75rem;
    opacity: 0.8;
}

.arch-arrow {
    color: var(--text-muted);
    font-size: 1.5rem;
}

/* =============================================
   REFERENCE LIST
   ============================================= */

.reference-list {
    list-style: none;
    padding: 0;
}

.reference-item {
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    border-left: 3px solid var(--accent-primary);
}

.reference-number {
    display: inline-block;
    width: 30px;
    height: 30px;
    background: var(--bg-gradient);
    color: white;
    border-radius: var(--radius-full);
    text-align: center;
    line-height: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: var(--space-md);
    flex-shrink: 0;
}

.reference-text {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.reference-text strong {
    color: var(--text-primary);
}

/* =============================================
   RESPONSIVE DESIGN
   ============================================= */

@media (max-width: 1024px) {
    .hero-section {
        flex-direction: column;
        text-align: center;
        padding: var(--space-2xl) var(--space-lg);
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-image {
        margin-top: var(--space-2xl);
    }
    
    .product-image {
        max-width: 400px;
    }
    
    .workflow-container {
        grid-template-columns: 1fr;
    }
    
    .footer-main {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }
    
    .footer-links {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
    }
    
    .main-nav {
        width: 100%;
        justify-content: center;
        padding-top: var(--space-md);
        border-top: 1px solid var(--border-color);
        margin-top: var(--space-md);
        overflow-x: auto;
        flex-wrap: nowrap;
    }
    
    .nav-link {
        white-space: nowrap;
        padding: var(--space-sm);
        font-size: 0.8125rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-stats {
        flex-direction: column;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .architecture-diagram {
        flex-direction: column;
    }
    
    .arch-arrow {
        transform: rotate(90deg);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-md);
    }
    
    .hero-section {
        padding: var(--space-xl) var(--space-md);
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-cta {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-lg {
        width: 100%;
        justify-content: center;
    }
    
    .section {
        padding: var(--space-2xl) 0;
    }
    
    .metrics-section {
        padding: var(--space-2xl) var(--space-md);
        margin: var(--space-xl) 0;
        border-radius: var(--radius-lg);
    }
}

/* =============================================
   SAFARI/WEBKIT SPECIFIC FIXES
   ============================================= */

/* Smooth scrolling for iOS */
html {
    -webkit-overflow-scrolling: touch;
}

/* Glass effect WebKit fixes */
.glass-card-light,
.header,
.header.light {
    -webkit-backdrop-filter: blur(20px);
}

/* Touch-friendly tap targets for mobile */
@media (max-width: 1024px) {
    .btn,
    .nav-link,
    .quick-link-card,
    .solution-card {
        min-height: 44px;
        touch-action: manipulation;
    }
}

/* Fix Safari flexbox bugs */
.hero-section,
.hero-content,
.hero-image,
.hero-stats,
.hero-cta {
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
}

/* =============================================
   iPHONE BREAKPOINTS
   ============================================= */

/* iPhone SE (375px) */
@media (max-width: 375px) {
    .hero-title {
        font-size: 1.5rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    .stat-label {
        font-size: 0.625rem;
    }
    
    .metric-value {
        font-size: 1.75rem;
    }
    
    .badge-research,
    .badge {
        font-size: 0.625rem;
        padding: var(--space-xs) var(--space-sm);
    }
    
    .nav-link {
        padding: var(--space-xs);
        font-size: 0.75rem;
    }
    
    .page-hero {
        padding: var(--space-xl) var(--space-md);
    }
    
    .page-hero h1 {
        font-size: 1.75rem;
    }
}

/* iPhone 12/13/14 (390px) */
@media (min-width: 376px) and (max-width: 390px) {
    .hero-title {
        font-size: 1.625rem;
    }
    
    .section-title {
        font-size: 1.625rem;
    }
}

/* iPhone 14 Pro Max (430px) */
@media (min-width: 391px) and (max-width: 430px) {
    .hero-title {
        font-size: 1.75rem;
    }
}

/* =============================================
   iPAD BREAKPOINTS
   ============================================= */

/* iPad Mini (768px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .hero-section {
        flex-direction: row;
        text-align: left;
        padding: var(--space-2xl);
    }
    
    .hero-content {
        flex: 1;
        padding-right: var(--space-xl);
    }
    
    .hero-image {
        flex: 1;
        order: 1;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .workflow-container {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
    
    .components-overview {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .problem-grid,
    .solution-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .triage-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .triage-card:last-child {
        grid-column: 1 / -1;
        max-width: 50%;
        justify-self: center;
    }
}

/* iPad Pro 11" (1024px) */
@media (min-width: 1024px) and (max-width: 1365px) {
    .hero-title {
        font-size: 2.75rem;
    }
    
    .hero-section {
        padding: var(--space-3xl);
    }
    
    .product-image {
        max-width: 450px;
    }
}

/* iPad Pro 12.9" (1366px) */
@media (min-width: 1366px) {
    .hero-title {
        font-size: 3.25rem;
    }
    
    .container {
        max-width: 1300px;
    }
}

/* =============================================
   ANDROID CHROME OPTIMIZATIONS
   ============================================= */

/* Proper viewport handling for Android */
@media screen and (max-width: 767px) {
    html {
        scroll-padding-top: 80px;
    }
    
    /* Touch-friendly interactive elements */
    .btn,
    .nav-link,
    a {
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Ensure tap targets are at least 44x44px */
    .nav-link {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
    
    .quick-link-card,
    .solution-card,
    .component-item {
        padding: var(--space-lg);
    }
}

/* Mobile-first hero section optimization */
@media (max-width: 767px) {
    .hero-section {
        flex-direction: column;
        padding: var(--space-xl) var(--space-md);
        min-height: auto;
        text-align: center;
    }
    
    .hero-image {
        order: -1;
        width: 100%;
        margin-bottom: var(--space-xl);
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .product-image {
        max-width: 280px;
        margin: 0 auto;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .hero-stat {
        min-width: auto;
        padding: var(--space-md);
    }
}

/* Tablet and up - restore desktop layout */
@media (min-width: 768px) {
    .hero-section {
        flex-direction: row;
        text-align: left;
        padding: var(--space-3xl) var(--space-xl);
    }
    
    .hero-image {
        order: 1;
        width: 50%;
        margin-bottom: 0;
    }
    
    .hero-content {
        flex: 1;
    }
    
    .product-image {
        max-width: 500px;
    }
}

/* =============================================
   ANIMATIONS
   ============================================= */

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

.animate-fade-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Smooth page load animation */
.fade-in {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
    will-change: opacity, transform;
}

.fade-in:nth-child(1) { animation-delay: 0.1s; }
.fade-in:nth-child(2) { animation-delay: 0.2s; }
.fade-in:nth-child(3) { animation-delay: 0.3s; }
.fade-in:nth-child(4) { animation-delay: 0.4s; }
.fade-in:nth-child(5) { animation-delay: 0.5s; }

/* Page content reveal animation */
.page-loaded .fade-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Staggered section animations */
.section.fade-in {
    animation-delay: 0.2s;
}

/* Hero animations */
.hero-content.fade-in {
    animation-delay: 0.1s;
}

.hero-image.fade-in {
    animation-delay: 0.3s;
}

/* =============================================
   VITAL SIGNS DISPLAY
   ============================================= */

/* Tabular numbers for vital signs - prevents jitter when updating */
.vital-value,
.stat-number,
.stat-value,
.metric-value,
.component-price,
.stat-highlight {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

/* Connection status indicator */
.connection-status {
    position: fixed;
    top: var(--space-md);
    right: var(--space-md);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
}

.connection-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-red);
}

.connection-dot.connected {
    background: var(--accent-green);
    animation: pulse-connected 2s ease-in-out infinite;
}

.connection-dot.disconnected {
    background: var(--accent-red);
}

@keyframes pulse-connected {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    50% {
        opacity: 0.8;
        box-shadow: 0 0 0 4px rgba(16, 185, 129, 0);
    }
}

/* Mock mode toggle */
.mock-mode-toggle {
    position: fixed;
    bottom: var(--space-md);
    right: var(--space-md);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.mock-mode-toggle:hover {
    background: var(--bg-secondary);
    box-shadow: var(--shadow-lg);
}

.mock-mode-toggle.active {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Dark mode adjustments for vitals */
body.dark-theme .connection-status,
body.dark-theme .mock-mode-toggle {
    background: var(--dark-glass-bg);
    border-color: var(--dark-border-color);
    color: var(--dark-text-secondary);
}

body.dark-theme .mock-mode-toggle.active {
    background: rgba(99, 102, 241, 0.2);
}

/* =============================================
   PRINT STYLES
   ============================================= */

@media print {
    .header,
    .hero-background,
    .btn {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .glass-card-light {
        background: white;
        border: 1px solid #ddd;
        box-shadow: none;
    }
}

/* =============================================
   ACCESSIBILITY
   ============================================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =============================================
   DEMO PROFILE BUTTONS
   ============================================= */

.demo-profile-btn {
    transition: all var(--transition-fast);
}

.demo-profile-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.demo-profile-btn:hover:not(.active) {
    background: rgba(99, 102, 241, 0.1);
}
