/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Apple-inspired Color Palette */
    --primary-blue: #007AFF;
    --primary-blue-dark: #0056D6;
    --background-primary: #ffffff;
    --background-secondary: #f5f5f7;
    --background-tertiary: #fafafa;
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-tertiary: #86868b;
    --border-light: #e5e5e7;
    --border-medium: #d1d1d6;
    --success-green: #30d158;
    --warning-orange: #ff9f0a;
    --error-red: #ff3b30;
    --pending-gray: #8e8e93;
    
    /* Typography */
    --font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 2.5rem;
    --spacing-3xl: 3rem;
    --spacing-4xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 16px 64px rgba(0, 0, 0, 0.15);
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-primary);
    overflow-x: hidden;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.nav-logo h2 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--primary-blue);
    letter-spacing: -0.02em;
}

.nav-menu {
    display: flex;
    gap: var(--spacing-xl);
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 400;
    font-size: var(--font-size-base);
    transition: color 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-blue);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-blue);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--background-secondary) 0%, var(--background-primary) 100%);
    padding: 120px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23f0f0f0" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
    z-index: 0;
}

.hero-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: var(--font-size-5xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.03em;
    animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-subtitle {
    font-size: var(--font-size-3xl);
    font-weight: 300;
    color: var(--primary-blue);
    margin-bottom: var(--spacing-lg);
    letter-spacing: -0.02em;
    animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) 0.1s both;
}

.hero-description {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

.hero-btn {
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: var(--spacing-2xl);
    display: inline-block;
    box-shadow: var(--shadow-sm);
    animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) 0.25s both;
}

.hero-btn:hover {
    background: var(--primary-blue-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.hero-btn:active {
    transform: translateY(0);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--spacing-3xl);
    animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: var(--font-size-4xl);
    font-weight: 700;
    color: var(--primary-blue);
    line-height: 1;
    margin-bottom: var(--spacing-xs);
}

.stat-label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
}

/* Section Titles */
.section-title {
    font-size: var(--font-size-3xl);
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: var(--spacing-3xl);
    letter-spacing: -0.02em;
}

/* How to Use Section */
.how-to-use {
    padding: var(--spacing-4xl) 0;
    background: var(--background-primary);
}

.legend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-3xl);
}

.legend-item {
    background: var(--background-tertiary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-light);
}

.legend-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-medium);
}

.legend-symbol {
    font-size: var(--font-size-2xl);
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.legend-symbol.pending {
    background: rgba(142, 142, 147, 0.1);
}

.legend-symbol.in-progress {
    background: rgba(255, 159, 10, 0.1);
}

.legend-symbol.complete {
    background: rgba(48, 209, 88, 0.1);
}

.legend-symbol.na {
    background: rgba(255, 59, 48, 0.1);
}

.legend-content h4 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.legend-content p {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.legend-action {
    font-size: var(--font-size-sm);
    color: var(--primary-blue);
    font-weight: 500;
    display: block;
}

.tip-box {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
    color: white;
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    text-align: center;
    font-size: var(--font-size-base);
    box-shadow: var(--shadow-md);
    line-height: 1.5;
    margin-top: var(--spacing-xl);
}

/* Progress Overview */
.progress-overview {
    padding: var(--spacing-4xl) 0;
    background: var(--background-secondary);
}

.progress-bar-container {
    text-align: center;
    margin-bottom: var(--spacing-3xl);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-light);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: var(--spacing-md);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue), var(--success-green));
    width: 0%;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 4px;
}

.progress-text {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
}

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

.section-progress-card {
    background: var(--background-primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-progress-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.section-progress-title {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-primary);
}

.section-progress-percentage {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--primary-blue);
}

.section-progress-bar {
    width: 100%;
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
    overflow: hidden;
}

.section-progress-fill {
    height: 100%;
    background: var(--primary-blue);
    width: 0%;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

/* Checklist Container */
.checklist-container {
    padding: var(--spacing-4xl) 0;
    background: var(--background-primary);
}

.checklist-sections {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-3xl);
}

.checklist-section {
    background: var(--background-tertiary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.checklist-section:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-medium);
}

.section-header {
    background: var(--background-primary);
    padding: var(--spacing-xl);
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
}

.section-header:hover {
    background: var(--background-secondary);
}

.section-header-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.section-number {
    background: var(--primary-blue);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: var(--font-size-lg);
}

.section-title-text {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--text-primary);
}

.section-header-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.section-progress {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    font-weight: 500;
}

.expand-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--background-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.expand-icon::after {
    content: '+';
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.checklist-section.expanded .expand-icon::after {
    transform: rotate(45deg);
}

.section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.checklist-section.expanded .section-content {
    max-height: 2000px;
}

.checklist-table {
    width: 100%;
    border-collapse: collapse;
}

.checklist-table th {
    background: var(--background-primary);
    padding: var(--spacing-md) var(--spacing-lg);
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-light);
}

.checklist-table td {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-light);
    vertical-align: top;
}

.checklist-table tr:hover {
    background: var(--background-primary);
}

.item-number {
    font-weight: 600;
    color: var(--text-primary);
    width: 60px;
}

.item-description {
    font-size: var(--font-size-base);
    color: var(--text-primary);
    line-height: 1.5;
}

.status-select {
    appearance: none;
    background: var(--background-primary);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    padding: var(--spacing-sm);
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.status-select:hover {
    border-color: var(--primary-blue);
}

.status-select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.evidence-input {
    width: 100%;
    padding: var(--spacing-sm);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    transition: all 0.2s ease;
}

.evidence-input:hover {
    border-color: var(--primary-blue);
}

.evidence-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: var(--spacing-3xl) 0;
    text-align: center;
}

.footer-content h3 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
}

.footer-content p {
    font-size: var(--font-size-base);
    opacity: 0.8;
    margin-bottom: var(--spacing-sm);
}

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

.fade-in-up {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 var(--spacing-lg);
    }
    
    .nav-menu {
        gap: var(--spacing-lg);
    }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-container {
        padding: 0 var(--spacing-lg);
    }
    
    .hero-title {
        font-size: var(--font-size-4xl);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-2xl);
    }
    
    .hero-stats {
        flex-direction: column;
        gap: var(--spacing-lg);
    }
    
    .container {
        padding: 0 var(--spacing-lg);
    }
    
    .legend-grid {
        grid-template-columns: 1fr;
    }
    
    .section-progress-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        padding: var(--spacing-lg);
    }
    
    .section-header-left {
        gap: var(--spacing-md);
    }
    
    .section-title-text {
        font-size: var(--font-size-lg);
    }
    
    .checklist-table {
        font-size: var(--font-size-sm);
    }
    
    .checklist-table th,
    .checklist-table td {
        padding: var(--spacing-sm) var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .nav-menu {
        display: none;
    }
    
    .hero-title {
        font-size: var(--font-size-3xl);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-xl);
    }
    
    .section-title {
        font-size: var(--font-size-2xl);
    }
    
    .legend-item {
        padding: var(--spacing-lg);
        gap: var(--spacing-md);
    }
    
    .legend-symbol {
        width: 40px;
        height: 40px;
        font-size: var(--font-size-xl);
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hero,
    .progress-overview {
        display: none;
    }
    
    .checklist-section {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
        margin-bottom: var(--spacing-lg);
    }
    
    .section-content {
        max-height: none !important;
    }
    
    .expand-icon {
        display: none;
    }
}

/* How to Use Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    background-color: var(--background-primary);
    margin: 10vh auto;
    width: 90%;
    max-width: 1000px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-xl);
    border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
    margin: 0;
    font-size: var(--font-size-2xl);
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    color: var(--text-tertiary);
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--primary-blue);
}

.modal-body {
    padding: var(--spacing-xl);
}

.modal-section-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--border-light);
    padding-bottom: var(--spacing-xs);
}

.modal-section-title:first-child {
    margin-top: 0;
}

.instructions-grid {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.instruction-item {
    display: flex;
    gap: var(--spacing-lg);
    align-items: flex-start;
}

.instruction-number {
    background: var(--primary-blue);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.instruction-content h4 {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.instruction-content p {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.shortcut-item {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    background: var(--background-secondary);
}

.shortcut-key {
    font-family: monospace;
    background: var(--background-primary);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    border: 1px solid var(--border-light);
    color: var(--primary-blue);
    font-weight: 500;
    white-space: nowrap;
}

.shortcut-action {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

/* Focus styles for better accessibility */
button:focus,
select:focus,
input:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-light: #000;
        --border-medium: #000;
        --text-secondary: #000;
        --text-tertiary: #000;
    }
}
