/* ==========================================
   LIQUID GLASS DESIGN SYSTEM - TrialPilot AI
   Core Principles:
   - Only 2 border-radius: 16px (containers) & 9999px (buttons)
   - Glass effect: backdrop-filter with saturation boost
   - Fluid animations: cubic-bezier(0.4, 0, 0.2, 1)
   - Healthcare palette: Cyan-Teal gradient
========================================== */

/* === CSS RESET === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* === ROOT VARIABLES === */
:root {
    /* Healthcare Color Palette */
    --bg-primary: #0a0a0f;
    --bg-secondary: #1a1a24;
    --gradient-start: #06b6d4;
    --gradient-end: #14b8a6;
    --accent-amber: #f59e0b;
    --accent-green: #10b981;
    
    /* Glass System */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: rgba(0, 0, 0, 0.3);
    
    /* Typography */
    --text-primary: rgba(255, 255, 255, 0.95);
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.5);
    
    /* Spacing & Sizing */
    --radius-container: 16px;
    --radius-button: 9999px;
    --nav-height: 72px;
    
    /* Animation */
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* === BASE STYLES === */
html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Animated gradient background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(6, 182, 212, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(20, 184, 166, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
    z-index: -1;
    animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

/* === NAVIGATION === */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1000;
    transition: all 0.3s var(--transition-smooth);
}

nav.scrolled {
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(20px) saturate(150%) brightness(110%);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 24px var(--glass-shadow);
}

@supports not (backdrop-filter: blur(20px)) {
    nav.scrolled {
        background: rgba(10, 10, 15, 0.95);
    }
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: transform 0.3s var(--transition-smooth);
}

.logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: var(--radius-container);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: color 0.3s var(--transition-smooth);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    transition: width 0.3s var(--transition-smooth);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-cta {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    padding: 0.625rem 1.5rem;
    border-radius: var(--radius-button);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.3s var(--transition-smooth);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s var(--transition-smooth);
}

/* === HERO SECTION === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: calc(var(--nav-height) + 2rem) 2rem 4rem;
    overflow: hidden;
}

.hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-content {
    max-width: 1280px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text {
    max-width: 600px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(150%) brightness(110%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-button);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gradient-start);
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px var(--glass-shadow);
}

@supports not (backdrop-filter: blur(20px)) {
    .hero-badge {
        background: rgba(255, 255, 255, 0.08);
    }
}

.hero-badge::before {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: 50%;
    font-size: 0.75rem;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-highlight {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--radius-button);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.0625rem;
    transition: all 0.3s var(--transition-smooth);
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.3);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(6, 182, 212, 0.4);
}

.btn-secondary {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(150%) brightness(110%);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 1rem 2rem;
    border-radius: var(--radius-button);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.0625rem;
    transition: all 0.3s var(--transition-smooth);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

@supports not (backdrop-filter: blur(20px)) {
    .btn-secondary {
        background: rgba(255, 255, 255, 0.08);
    }
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.hero-visual {
    position: relative;
}

.hero-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(150%) brightness(110%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-container);
    padding: 2rem;
    box-shadow: 0 8px 32px var(--glass-shadow);
}

@supports not (backdrop-filter: blur(20px)) {
    .hero-card {
        background: rgba(255, 255, 255, 0.08);
    }
}

.hero-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.hero-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-card-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--accent-green);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

.hero-card-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    transition: all 0.3s var(--transition-smooth);
}

.metric-row:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: translateX(4px);
}

.metric-label {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.metric-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gradient-start);
}

/* === FEATURES SECTION === */
.features {
    padding: 6rem 2rem;
    position: relative;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(150%) brightness(110%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-button);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gradient-start);
    margin-bottom: 1rem;
}

@supports not (backdrop-filter: blur(20px)) {
    .section-badge {
        background: rgba(255, 255, 255, 0.08);
    }
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.section-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(150%) brightness(110%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-container);
    padding: 2.5rem;
    transition: all 0.3s var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

@supports not (backdrop-filter: blur(20px)) {
    .feature-card {
        background: rgba(255, 255, 255, 0.08);
    }
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    opacity: 0;
    transition: opacity 0.3s var(--transition-smooth);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px var(--glass-shadow);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: var(--radius-container);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 24px rgba(6, 182, 212, 0.3);
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.feature-list li::before {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: rgba(6, 182, 212, 0.2);
    border-radius: 50%;
    font-size: 0.75rem;
    color: var(--gradient-start);
    flex-shrink: 0;
}

/* === BENEFITS SECTION === */
.benefits {
    padding: 6rem 2rem;
    background: rgba(255, 255, 255, 0.01);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.benefit-card {
    text-align: center;
    padding: 2rem;
}

.benefit-number {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.benefit-label {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* === WORKFLOW SECTION === */
.workflow {
    padding: 6rem 2rem;
}

.workflow-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.workflow-step {
    position: relative;
    padding-left: 4rem;
}

.step-number {
    position: absolute;
    left: 0;
    top: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: var(--radius-container);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.step-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.step-description {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* === COMPLIANCE SECTION === */
.compliance {
    padding: 6rem 2rem;
    background: rgba(255, 255, 255, 0.01);
}

.compliance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.compliance-badge-item {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(150%) brightness(110%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-container);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s var(--transition-smooth);
}

@supports not (backdrop-filter: blur(20px)) {
    .compliance-badge-item {
        background: rgba(255, 255, 255, 0.08);
    }
}

.compliance-badge-item:hover {
    transform: translateY(-4px);
    border-color: var(--gradient-start);
}

.compliance-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.compliance-text {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* === CTA SECTION === */
.cta {
    padding: 6rem 2rem;
}

.cta-box {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(150%) brightness(110%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-container);
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

@supports not (backdrop-filter: blur(20px)) {
    .cta-box {
        background: rgba(255, 255, 255, 0.08);
    }
}

.cta-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
}

.cta-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}

/* === FOOTER === */
footer {
    padding: 4rem 2rem 2rem;
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand {
    max-width: 350px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.footer-description {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.footer-section h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color 0.3s var(--transition-smooth);
}

.footer-links a:hover {
    color: var(--gradient-start);
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.footer-social {
    display: flex;
    gap: 1.5rem;
}

.footer-social a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s var(--transition-smooth);
}

.footer-social a:hover {
    color: var(--gradient-start);
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-text {
        max-width: 100%;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-visual {
        max-width: 450px;
        margin: 0 auto;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .workflow-steps {
        grid-template-columns: 1fr;
    }
    
    .compliance-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .compliance-grid {
        grid-template-columns: 1fr;
    }
}

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* === FOCUS STATES === */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--gradient-start);
    outline-offset: 4px;
}
