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

:root {
    --color-navy: #2e3760;
    --color-red: #ff5757;
    --color-white: #ffffff;
    --color-text: #545454;
    --color-light-bg: #f8f9fa;
    --color-border: #e1e4e8;
    --font-heading: 'Rocoleta', serif;
    --font-body: 'Cooper BT', serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* Shadow System for consistent depth */
    --shadow-sm: 0 2px 8px rgba(46, 55, 96, 0.08);
    --shadow-md: 0 4px 16px rgba(46, 55, 96, 0.12);
    --shadow-lg: 0 8px 24px rgba(46, 55, 96, 0.15);
    --shadow-xl: 0 12px 32px rgba(46, 55, 96, 0.18);
}

html {
    scroll-behavior: smooth;
}

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

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-navy);
    line-height: 1.2;
    font-weight: 600;
}

/* ============================================
   Container & Layout
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 80px 0;
}

/* ============================================
   Header
   ============================================ */
.header {
    background-color: var(--color-white);
    border-bottom: 2px solid var(--color-navy);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(46, 55, 96, 0.08);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

.logo-container {
    height: 60px;
}

.logo {
    height: 100%;
    width: auto;
}

.nav {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-link {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--color-navy);
    text-decoration: none;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    position: relative;
}

.nav-link:after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-red);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateZ(0);
}

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

/* Active navigation state */
.nav-link.active {
    color: var(--color-red);
    font-weight: 600;
}

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

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

.nav-link-cta {
    background-color: var(--color-navy);
    color: var(--color-white);
    padding: 10px 24px;
    border-radius: 4px;
}

.nav-link-cta:after {
    display: none;
}

.nav-link-cta:hover {
    background-color: var(--color-red);
    transform: translateY(-2px) translateZ(0);
    box-shadow: 0 4px 12px rgba(255, 87, 87, 0.3);
}

/* Focus states for navigation */
.nav-link:focus {
    outline: 2px solid var(--color-red);
    outline-offset: 4px;
    border-radius: 2px;
}

/* ============================================
   Mobile Navigation - Hamburger Menu
   ============================================ */
.mobile-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 48px;
    height: 48px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 12px;
    z-index: 1001;
    transition: transform 0.3s ease;
}

.mobile-nav-toggle:hover {
    transform: scale(1.05);
}

.mobile-nav-toggle:focus {
    outline: 2px solid var(--color-red);
    outline-offset: 4px;
    border-radius: 4px;
}

.hamburger-line {
    width: 24px;
    height: 3px;
    background-color: var(--color-navy);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

/* Hamburger animation when open */
.mobile-nav-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-nav-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.mobile-nav-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1998;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile Menu Drawer */
.mobile-menu-drawer {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    max-width: 80vw;
    height: 100vh;
    background-color: var(--color-white);
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.2);
    z-index: 1999;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu-drawer.active {
    display: block;
    right: 0;
}

.mobile-menu-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.mobile-menu-close:hover {
    transform: rotate(90deg);
}

.mobile-menu-close:focus {
    outline: 2px solid var(--color-red);
    outline-offset: 4px;
    border-radius: 4px;
}

.close-icon {
    font-size: 36px;
    color: var(--color-navy);
    line-height: 1;
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    padding: 80px 32px 32px;
    gap: 8px;
}

.mobile-nav-link {
    font-family: var(--font-body);
    font-size: 18px;
    color: var(--color-navy);
    text-decoration: none;
    padding: 16px 20px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
    min-height: 48px;
    display: flex;
    align-items: center;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus {
    background-color: var(--color-light-bg);
    color: var(--color-red);
    outline: none;
}

.mobile-nav-link-cta {
    background-color: var(--color-navy);
    color: var(--color-white);
    margin-top: 16px;
    justify-content: center;
    font-weight: 600;
}

.mobile-nav-link-cta:hover,
.mobile-nav-link-cta:focus {
    background-color: var(--color-red);
    color: var(--color-white);
}

/* Prevent body scroll when menu is open */
body.mobile-menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--color-navy) 0%, #1a1f3a 100%);
    padding: clamp(60px, 10vh, 100px) 0;
    position: relative;
    overflow: hidden;
}

.hero:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.03) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.03) 4px);
    pointer-events: none;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(28px, 6vw, 54px);
    color: var(--color-white);
    margin-bottom: 24px;
    font-weight: 600;
    line-height: 1.15;
    animation: fadeInUp 0.8s ease-out;
    will-change: opacity, transform;
    backface-visibility: hidden;
}

.hero-subtitle {
    font-size: clamp(16px, 3.5vw, 20px);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 48px;
    line-height: 1.6;
    animation: fadeInUp 0.8s ease-out 0.2s both;
    will-change: opacity, transform;
    backface-visibility: hidden;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-bottom: 48px;
    animation: fadeInUp 0.8s ease-out 0.4s both;
    will-change: opacity, transform;
    backface-visibility: hidden;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 56px;
    color: var(--color-red);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
    opacity: 1;
    animation: fadeInUp 0.8s ease-out 0.6s both;
    will-change: opacity, transform;
    backface-visibility: hidden;
}

.stat-number-k,
.stat-number-b {
    /* K and B suffixes handled in JavaScript */
}

.stat-number:not(.stat-number-k):not(.stat-number-b)::after {
    content: '';
}

.stat-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    max-width: 200px;
}

.stat-divider {
    width: 1px;
    background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   CTA Buttons
   ============================================ */
.cta-button {
    display: inline-block;
    background-color: var(--color-red);
    color: var(--color-white);
    padding: 16px 40px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid var(--color-red);
    font-family: var(--font-body);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    backface-visibility: hidden;
}

.cta-button:hover {
    background-color: transparent;
    transform: translateY(-2px) scale(1.02) translateZ(0);
    box-shadow: 0 12px 32px rgba(255, 87, 87, 0.4);
}

/* Ripple effect for buttons */
.cta-button:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease-out, height 0.6s ease-out;
}

.cta-button:active:before {
    width: 300px;
    height: 300px;
    transition: width 0s, height 0s;
}

/* Focus state for accessibility */
.cta-button:focus {
    outline: 3px solid var(--color-red);
    outline-offset: 4px;
}

.cta-button-large {
    padding: 20px 56px;
    font-size: 20px;
    animation: fadeInUp 0.8s ease-out 0.6s both;
    will-change: opacity, transform;
    backface-visibility: hidden;
}

/* ============================================
   Alert Banner
   ============================================ */
.alert-banner {
    background-color: #fff3cd;
    border-top: 2px solid #ffc107;
    border-bottom: 2px solid #ffc107;
    padding: 20px 0;
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.alert-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.alert-content p {
    margin: 0;
    color: #856404;
    font-size: 15px;
    font-weight: 500;
}

/* ============================================
   Section Headers
   ============================================ */
.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 64px;
}

.section-title {
    font-size: clamp(24px, 5vw, 42px);
    color: var(--color-navy);
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: clamp(15px, 3vw, 18px);
    color: var(--color-text);
    line-height: 1.7;
}

/* ============================================
   About Section
   ============================================ */
.section-about {
    background-color: var(--color-light-bg);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    margin-bottom: 80px;
}

.about-card {
    background-color: var(--color-white);
    padding: 40px;
    border-radius: 8px;
    border: 2px solid var(--color-border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backface-visibility: hidden;
    transform: translateZ(0);
}

.about-card:hover {
    border-color: var(--color-red);
    transform: translateY(-6px) translateZ(0);
    box-shadow: 
        0 12px 32px rgba(46, 55, 96, 0.15),
        0 0 0 1px var(--color-red);
}

.about-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 24px;
}

.about-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.about-card:hover .about-icon img {
    transform: scale(1.1) rotate(2deg);
}

.about-card-title {
    font-size: 24px;
    margin-bottom: 16px;
    color: var(--color-navy);
}

.about-card-text {
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-text);
}

/* ============================================
   Data Visualization
   ============================================ */
.data-viz-container {
    background-color: var(--color-white);
    padding: 48px;
    border-radius: 8px;
    border: 2px solid var(--color-navy);
}

.data-viz-title {
    font-size: 28px;
    text-align: center;
    margin-bottom: 32px;
    color: var(--color-navy);
}

.chart-wrapper {
    margin-bottom: 16px;
}

.data-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    content-visibility: auto;
}

.data-image-large {
    max-width: 100%;
    content-visibility: auto;
}

/* Image loading optimization */
img[loading="lazy"] {
    content-visibility: auto;
}

/* Prevent layout shift for images */
img {
    max-width: 100%;
    height: auto;
}

.data-source {
    text-align: right;
    font-size: 14px;
    color: var(--color-text);
    font-style: italic;
}

/* ============================================
   Process Section
   ============================================ */
.section-process {
    background-color: var(--color-white);
}

.process-timeline {
    max-width: 900px;
    margin: 0 auto;
}

.process-step {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 40px;
    align-items: start;
    padding: 32px;
    background-color: var(--color-light-bg);
    border-radius: 8px;
    border-left: 4px solid var(--color-red);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backface-visibility: hidden;
    transform: translateZ(0);
}

.process-step:hover {
    background-color: var(--color-white);
    border-left-width: 8px;
    padding-left: 28px;
    box-shadow: 
        var(--shadow-lg),
        -4px 0 0 var(--color-red) inset;
}

.process-number {
    font-family: var(--font-heading);
    font-size: 72px;
    font-weight: 700;
    color: var(--color-red);
    line-height: 1;
    opacity: 0.3;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.process-step:hover .process-number {
    opacity: 0.5;
    transform: scale(1.05);
}

.process-title {
    font-size: 28px;
    margin-bottom: 12px;
    color: var(--color-navy);
}

.process-text {
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-text);
}

.process-connector {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, var(--color-red), var(--color-navy));
    margin: 0 auto;
}

/* ============================================
   Data Section
   ============================================ */
.section-data {
    background-color: var(--color-light-bg);
}

.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 48px;
    margin-bottom: 48px;
}

.data-item {
    background-color: var(--color-white);
    padding: 40px;
    border-radius: 8px;
    border: 2px solid var(--color-border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backface-visibility: hidden;
    transform: translateZ(0);
}

.data-item:hover {
    border-color: var(--color-navy);
    transform: translateY(-4px) translateZ(0);
    box-shadow: 
        var(--shadow-lg),
        0 0 0 1px var(--color-navy);
}

.data-item-full {
    background-color: var(--color-white);
    padding: 40px;
    border-radius: 8px;
    border: 2px solid var(--color-border);
    margin-bottom: 48px;
}

.data-item-title {
    font-size: 24px;
    margin-bottom: 24px;
    color: var(--color-navy);
}

.data-insight {
    margin-top: 24px;
    padding: 20px;
    background-color: var(--color-light-bg);
    border-left: 4px solid var(--color-red);
    font-size: 15px;
    line-height: 1.7;
    color: var(--color-text);
}

.chart-container {
    position: relative;
    height: 400px;
    margin-bottom: 16px;
}

/* ============================================
   Benefits Section
   ============================================ */
.section-benefits {
    background-color: var(--color-white);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.benefit-card {
    background-color: var(--color-light-bg);
    padding: 40px;
    border-radius: 8px;
    border: 2px solid var(--color-border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.benefit-card:hover {
    background-color: var(--color-white);
    border-color: var(--color-red);
    transform: translateY(-6px) translateZ(0);
    box-shadow: 
        0 12px 32px rgba(255, 87, 87, 0.15),
        0 0 0 1px var(--color-red);
}

.benefit-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
}

.benefit-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.benefit-card:hover .benefit-icon img {
    transform: scale(1.1) rotate(2deg);
}

.benefit-title {
    font-size: 22px;
    margin-bottom: 12px;
    color: var(--color-navy);
}

.benefit-text {
    font-size: 15px;
    line-height: 1.7;
    color: var(--color-text);
}

/* ============================================
   Application Section
   ============================================ */
.section-apply {
    background: linear-gradient(135deg, var(--color-navy) 0%, #1a1f3a 100%);
    position: relative;
}

.section-apply .section-title {
    color: var(--color-white);
}

.section-apply .section-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

.apply-header {
    text-align: center;
    margin-bottom: 48px;
}

.form-container {
    max-width: 800px;
    margin: 0 auto;
}

.form-notice {
    background-color: var(--color-white);
    padding: 32px;
    border-radius: 8px;
    border: 2px solid var(--color-red);
    margin-bottom: 32px;
}

.form-notice p {
    margin-bottom: 16px;
    color: var(--color-navy);
    font-weight: 600;
}

.form-notice ul {
    margin-left: 24px;
    margin-bottom: 16px;
}

.form-notice li {
    margin-bottom: 8px;
    color: var(--color-text);
}

.form-notice-text {
    font-size: 14px;
    color: var(--color-text);
    font-style: italic;
    margin-bottom: 0 !important;
    font-weight: 400 !important;
}

.form-embed {
    background-color: var(--color-white);
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* ============================================
   Section CTA (Between Sections)
   ============================================ */
.section-cta {
    margin-top: 80px;
    text-align: center;
    padding: 60px 40px;
    background: linear-gradient(135deg, var(--color-navy) 0%, #1a1f3a 100%);
    border-radius: 8px;
    border: 2px solid var(--color-red);
}

.section-cta-title {
    font-size: 32px;
    color: var(--color-white);
    margin-bottom: 16px;
}

.section-cta-text {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-cta .cta-button {
    display: inline-block;
    background-color: var(--color-red);
    color: var(--color-white);
    padding: 18px 48px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    transition: var(--transition);
    border: 2px solid var(--color-red);
}

.section-cta .cta-button:hover {
    background-color: transparent;
    transform: translateY(-2px) scale(1.02) translateZ(0);
    box-shadow: 0 12px 32px rgba(255, 87, 87, 0.4);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background-color: #1a1d2e;
    color: var(--color-white);
    padding: 60px 0 32px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 64px;
    margin-bottom: 48px;
}

.footer-logo img {
    height: 60px;
    margin-bottom: 16px;
    filter: brightness(1.2);
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 64px;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-title {
    color: var(--color-white);
    font-size: 16px;
    margin-bottom: 8px;
    font-weight: 600;
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.footer-link:hover {
    color: var(--color-red);
    transform: translateX(4px);
}

.footer-link:focus {
    outline: 2px solid var(--color-red);
    outline-offset: 4px;
    border-radius: 2px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 32px;
}

.footer-disclaimer {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 16px;
    line-height: 1.6;
}

.footer-copyright {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
}

/* ============================================
   Scroll Progress Indicator
   ============================================ */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--color-red), var(--color-navy));
    z-index: 9999;
    transition: width 0.1s linear;
    box-shadow: 0 2px 4px rgba(255, 87, 87, 0.3);
}

/* ============================================
   Loading State Animation
   ============================================ */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--color-white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   Pulse Animation for Numbers
   ============================================ */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.stat-number.completed {
    animation: pulse 0.5s ease-out;
}

/* ============================================
   Bounce Animation for Icons
   ============================================ */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.icon-bounce {
    animation: bounce 0.6s ease-out;
}

/* ============================================
   Shimmer Effect
   ============================================ */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* ============================================
   Mobile Navigation
   ============================================ */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    z-index: 1001;
    position: relative;
}

.hamburger-line {
    display: block;
    width: 28px;
    height: 3px;
    background-color: var(--color-navy);
    margin: 5px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-nav-toggle:hover .hamburger-line {
    background-color: var(--color-red);
}

.mobile-nav-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-nav-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-nav-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 400px;
    height: 100vh;
    background-color: var(--color-white);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu-drawer.active {
    right: 0;
}

.mobile-menu-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 40px;
    color: var(--color-navy);
    cursor: pointer;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    transition: color 0.3s ease;
}

.mobile-menu-close:hover {
    color: var(--color-red);
}

.mobile-menu-content {
    padding: 80px 32px 32px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-nav-link {
    display: block;
    padding: 16px 20px;
    font-size: 18px;
    color: var(--color-navy);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
    min-height: 48px;
    display: flex;
    align-items: center;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus {
    background-color: var(--color-light-bg);
    color: var(--color-red);
    transform: translateX(4px);
}

.mobile-nav-link-cta {
    background-color: var(--color-navy);
    color: var(--color-white);
    margin-top: 16px;
    text-align: center;
    justify-content: center;
}

.mobile-nav-link-cta:hover,
.mobile-nav-link-cta:focus {
    background-color: var(--color-red);
    color: var(--color-white);
    transform: translateX(0) scale(1.02);
}

/* Prevent body scroll when mobile menu is open */
body.mobile-menu-open {
    position: fixed;
    width: 100%;
    overflow: hidden;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 968px) {
    .hero-title {
        font-size: 42px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 32px;
    }
    
    .stat-divider {
        display: none;
    }
    
    .data-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    /* Hide desktop nav, show mobile toggle */
    .nav {
        display: none;
    }
    
    .mobile-nav-toggle {
        display: flex;
    }
    
    /* Container and spacing optimizations */
    .container {
        padding: 0 16px;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    /* Typography adjustments */
    .hero-subtitle {
        margin-bottom: 32px;
    }
    
    .stat-number {
        font-size: 42px;
    }
    
    .stat-label {
        font-size: 13px;
    }
    
    .hero-stats {
        gap: 24px;
    }
    
    /* CTA Button optimizations */
    .cta-button {
        padding: 18px 32px;
        font-size: 16px;
        min-height: 48px;
    }
    
    .cta-button-large {
        padding: 20px 40px;
        font-size: 18px;
    }
    
    /* Card padding optimization */
    .about-card,
    .benefit-card,
    .data-item {
        padding: 24px;
    }
    
    .data-item-full {
        padding: 24px;
    }
    
    .data-viz-container {
        padding: 24px;
    }
    
    /* Make data visualizations scrollable on mobile if needed */
    .chart-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    .chart-wrapper::-webkit-scrollbar {
        height: 8px;
    }
    
    .chart-wrapper::-webkit-scrollbar-track {
        background: var(--color-light-bg);
        border-radius: 4px;
    }
    
    .chart-wrapper::-webkit-scrollbar-thumb {
        background: var(--color-navy);
        border-radius: 4px;
    }
    
    /* Process steps */
    .process-step {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 24px;
    }
    
    .process-number {
        font-size: 48px;
    }
    
    /* Grid layouts */
    .about-grid,
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    /* Form optimizations */
    .form-container {
        max-width: 100%;
    }
    
    .form-notice {
        padding: 24px;
    }
    
    .form-notice ul {
        margin-left: 20px;
    }
    
    .form-embed {
        padding: 16px;
    }
    
    /* Adjust form embed height for mobile */
    .form-embed > div[data-fillout-id] {
        height: 600px !important;
        min-height: 400px;
    }
    
    /* Alert banner */
    .alert-content {
        flex-direction: column;
        text-align: center;
    }
    
    .alert-content p {
        font-size: 14px;
    }
    
    /* Section CTA */
    .section-cta {
        padding: 40px 24px;
        margin-top: 60px;
    }
    
    .section-cta-title {
        font-size: 24px;
    }
    
    .section-cta-text {
        font-size: 16px;
    }
    
    /* Footer optimizations */
    .footer {
        padding: 40px 0 24px;
    }
    
    .footer-links {
        gap: 32px;
    }
    
    /* Shorter animation durations on mobile */
    .hero-title,
    .hero-subtitle,
    .hero-stats {
        animation-duration: 0.5s;
    }
    
    /* Simpler transitions on mobile */
    .about-card,
    .benefit-card,
    .data-item,
    .process-step {
        transition-duration: 0.2s;
    }
    
    /* Remove complex hover effects on small screens */
    .about-card:hover,
    .benefit-card:hover {
        transform: translateY(-2px) translateZ(0);
    }
    
    /* Disable parallax on mobile for performance */
    .hero {
        transform: none !important;
    }
}

@media (max-width: 480px) {
    /* Extra small phones - further optimizations */
    .container {
        padding: 0 12px;
    }
    
    .section {
        padding: 32px 0;
    }
    
    .hero {
        padding: 48px 0;
    }
    
    .stat-number {
        font-size: 36px;
    }
    
    .stat-label {
        font-size: 12px;
        max-width: 160px;
    }
    
    .about-card,
    .benefit-card,
    .data-item,
    .data-item-full {
        padding: 20px;
    }
    
    .data-viz-container {
        padding: 20px;
    }
    
    .process-step {
        padding: 20px;
    }
    
    .process-number {
        font-size: 40px;
    }
    
    .about-card-title,
    .benefit-title {
        font-size: 20px;
    }
    
    .process-title {
        font-size: 24px;
    }
    
    .data-item-title {
        font-size: 20px;
    }
    
    .data-viz-title {
        font-size: 22px;
    }
    
    .section-cta {
        padding: 32px 20px;
        margin-top: 48px;
    }
    
    .section-cta-title {
        font-size: 20px;
    }
    
    .section-cta-text {
        font-size: 15px;
    }
    
    .cta-button {
        padding: 16px 28px;
        font-size: 15px;
    }
    
    .cta-button-large {
        padding: 18px 32px;
        font-size: 16px;
    }
    
    .form-notice {
        padding: 20px;
    }
    
    .form-notice p,
    .form-notice li {
        font-size: 14px;
    }
    
    .form-notice ul {
        margin-left: 16px;
    }
    
    /* Further adjust form for small screens */
    .form-embed > div[data-fillout-id] {
        height: 550px !important;
    }
    
    .mobile-menu-drawer {
        width: 260px;
    }
    
    .mobile-nav-link {
        font-size: 16px;
        padding: 14px 16px;
    }
}

/* ============================================
   Accessibility - Reduced Motion Support
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    /* Disable parallax for reduced motion */
    .hero {
        transform: none !important;
        opacity: 1 !important;
    }
    
    /* Remove will-change to reduce resource usage */
    .hero-title,
    .hero-subtitle,
    .hero-stats,
    .cta-button-large,
    .about-card,
    .benefit-card,
    .data-item,
    .process-step {
        will-change: auto !important;
    }
    
    /* Disable mobile menu animations */
    .mobile-menu-drawer,
    .mobile-menu-overlay {
        transition-duration: 0.01ms !important;
    }
    
    /* Disable icon animations */
    .about-icon img,
    .benefit-icon img {
        transition: none !important;
    }
}

/* ============================================
   Touch Device Optimizations
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    /* Touch device styles */
    .about-card:active,
    .benefit-card:active,
    .data-item:active {
        transform: scale(0.98);
        border-color: var(--color-red);
    }
    
    .process-step:active {
        border-left-width: 8px;
        padding-left: 28px;
    }
    
    /* Remove hover-only effects that don't work on touch */
    .nav-link:after {
        display: none;
    }
    
    /* Ensure touch targets are at least 48x48px for better accessibility */
    .nav-link,
    .cta-button,
    .footer-link,
    .mobile-nav-link,
    .mobile-nav-toggle,
    .mobile-menu-close {
        min-height: 48px;
        min-width: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Add spacing around touch targets */
    .footer-link {
        padding: 8px 0;
    }
    
    /* Increase tap target area for links */
    a {
        position: relative;
    }
    
    a:not(.cta-button):not(.nav-link):not(.mobile-nav-link)::before {
        content: '';
        position: absolute;
        top: -8px;
        right: -8px;
        bottom: -8px;
        left: -8px;
    }
}

/* ============================================
   Mobile Animation Optimizations
   ============================================ */
@media (max-width: 768px) {
    /* Disable parallax on mobile for performance */
    .hero {
        transform: none !important;
        will-change: auto !important;
    }
    
    /* Shorter animation durations on mobile */
    .hero-title,
    .hero-subtitle,
    .hero-stats {
        animation-duration: 0.3s;
    }
    
    /* Simpler transitions on mobile */
    .about-card,
    .benefit-card,
    .data-item,
    .process-step {
        transition-duration: 0.2s;
    }
    
    /* Remove complex hover effects on small screens */
    .about-card:hover,
    .benefit-card:hover {
        transform: translateY(-2px) translateZ(0);
    }
    
    /* Optimize will-change usage on mobile */
    .hero-title,
    .hero-subtitle,
    .hero-stats,
    .cta-button-large {
        will-change: auto;
    }
    
    /* Use GPU acceleration only for active elements */
    .about-card,
    .benefit-card,
    .data-item {
        backface-visibility: hidden;
        perspective: 1000px;
    }
    
    /* Reduce box-shadow complexity on mobile */
    .about-card:hover,
    .benefit-card:hover,
    .data-item:hover {
        box-shadow: 0 4px 12px rgba(46, 55, 96, 0.12);
    }
    
    /* Optimize image rendering on mobile */
    img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
    
    /* Reduce animation complexity */
    .stat-number {
        animation: none;
    }
}

/* ============================================
   Focus Visible (Modern Focus Management)
   ============================================ */
:focus-visible {
    outline: 3px solid var(--color-red);
    outline-offset: 4px;
    border-radius: 4px;
}

/* Remove default focus styles when :focus-visible is supported */
:focus:not(:focus-visible) {
    outline: none;
}

/* High contrast focus for better accessibility */
.about-card:focus-visible,
.benefit-card:focus-visible,
.data-item:focus-visible {
    outline: 3px solid var(--color-red);
    outline-offset: 2px;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .header,
    .nav,
    .cta-button,
    .alert-banner,
    .form-embed {
        display: none;
    }
}

