/* CSS Variables based on brand colors */
:root {
    --scarlet-red: #E63C3C;
    --jet-black: #000000;
    --white: #FFFFFF;
    --text-gray: #555555; /* Darker gray for light background */
}

/* Base Reset & Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Kufi Arabic', 'Alyamama', sans-serif;
}

body {
    background-color: var(--white);
    color: var(--jet-black);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

/* Top Navigation Bar */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 100;
}

.topbar .container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

/* Main Hero Section */
.hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 80px; /* Accounts for fixed topbar */
}

.hero-content {
    text-align: center;
    z-index: 10;
    max-width: 800px;
}

/* Badge Element */
.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(230, 60, 60, 0.1);
    color: var(--scarlet-red);
    border: 1px solid rgba(230, 60, 60, 0.2);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    animation: fadeInDown 0.8s ease-out;
}

/* Typography Styles */
.title {
    font-size: clamp(2.5rem, 6vw, 5.5rem);
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 4rem; /* Increased to accommodate advanced box animation */
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* Delivery Progress Track Area */
.progress-wrapper {
    width: 100%;
    max-width: 480px;
    margin: 0 auto 1.5rem;
    position: relative;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.progress-track {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(-90deg, rgba(230,60,60,0.2) 0%, var(--scarlet-red) 100%);
    width: 0%;
    border-radius: 6px;
    position: absolute;
    top: 0;
    right: 0;
    box-shadow: 0 0 12px rgba(230, 60, 60, 0.4);
    animation: fillAnim 4s cubic-bezier(0.4, 0.0, 0.2, 1) infinite;
}

/* Advanced Delivery Vehicle */
.delivery-vehicle {
    position: absolute;
    top: -30px;
    left: -18px; 
    width: 36px;
    height: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    z-index: 10;
}

.isometric-box {
    width: 36px;
    height: 36px;
    transform-origin: bottom center;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 6px 8px rgba(230, 60, 60, 0.3));
    animation: boxSquash 0.3s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.box-shadow {
    width: 22px;
    height: 6px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    position: absolute;
    bottom: -3px;
    animation: shadowPulse 0.3s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

/* Speed Lines Effect */
.speed-lines {
    position: absolute;
    top: 14px;
    left: 36px;
    width: 40px;
    height: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
    z-index: 1;
}

.line {
    height: 2px;
    background: var(--scarlet-red);
    border-radius: 2px;
    opacity: 0;
    transform-origin: left;
}

.line:nth-child(1) { width: 14px; animation: speedLine 0.6s infinite linear 0.1s; margin-right: auto; }
.line:nth-child(2) { width: 20px; animation: speedLine 0.5s infinite linear 0.3s; margin-right: auto; }
.line:nth-child(3) { width: 10px; animation: speedLine 0.7s infinite linear 0.2s; margin-right: auto; }

/* Status Text */
.status {
    color: var(--text-gray);
    font-size: 0.875rem;
    animation: fadeInUp 0.8s ease-out 0.8s both;
}

.highlight {
    color: var(--jet-black);
    font-weight: 600;
}

/* Ambient Background Glow */
.background-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70vw;
    height: 70vw;
    background: radial-gradient(circle, rgba(230, 60, 60, 0.06) 0%, rgba(255, 255, 255, 0) 60%);
    z-index: 1;
    pointer-events: none;
    animation: breathe 8s infinite alternate ease-in-out;
}

/* Keyframe Animations */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes fillAnim {
    0% { width: 0%; opacity: 0; }
    5% { opacity: 1; }
    90% { width: 95%; opacity: 1; }
    100% { width: 100%; opacity: 0; }
}

@keyframes boxSquash {
    0% { 
        transform: translateY(-10px) scaleY(1.05) scaleX(0.95) rotate(-2deg); 
    }
    100% { 
        transform: translateY(0px) scaleY(0.9) scaleX(1.1) rotate(1deg); 
    }
}

@keyframes shadowPulse {
    0% { transform: scale(0.6); opacity: 0.2; }
    100% { transform: scale(1.2); opacity: 0.8; }
}

@keyframes speedLine {
    0% { transform: translateX(0) scaleX(0); opacity: 0; }
    20% { transform: translateX(10px) scaleX(1); opacity: 0.8; }
    100% { transform: translateX(50px) scaleX(0.2); opacity: 0; }
}

@keyframes breathe {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
    100% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .container { padding: 0 1.5rem; }
    .logo { height: 32px; }
    .badge { margin-bottom: 1.5rem; }
    .background-glow { width: 120vw; height: 120vw; }
}
