/* ==========================================================================
   CSS Variables & Configuration
   ========================================================================== */
:root {
    --bg-dark: #F5F7FA;
    --bg-card: #FFFFFF;
    --bg-alt: #E2E8F0;
    --text-main: #1A202C;
    --text-muted: #4A5568;
    --accent: #FF6A00; /* Industrial Orange */
    --accent-glow: rgba(255, 106, 0, 0.2);
    --border-color: rgba(0, 0, 0, 0.1);
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--text-main);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4 {
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: var(--accent);
}

.section-desc {
    color: var(--text-muted);
    font-size: 1.125rem;
    max-width: 600px;
    margin-bottom: 3rem;
}

/* ==========================================================================
   Layout & Grid Utilities
   ========================================================================== */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.container-sm {
    max-width: 800px;
}

.section {
    padding: 6rem 0;
}

.bg-alt {
    background-color: var(--bg-alt);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.grid {
    display: grid;
    gap: 2rem;
}

/* ==========================================================================
   Components
   ========================================================================== */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 50px;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--accent);
    color: #fff;
    box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-primary:hover {
    background-color: #e65f00;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 106, 0, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-main);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--text-muted);
}

.btn-block {
    width: 100%;
}

/* Cards */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 16px; /* Enhanced rounding */
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: rgba(255,255,255,0.2);
}

.card:hover::before {
    opacity: 1;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    padding: 1.25rem 0;
}

.navbar.scrolled {
    padding: 0.75rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.1em;
}

.logo .accent {
    color: var(--accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.nav-links a:hover {
    color: var(--text-main);
}

.nav-btn {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-main);
    transition: var(--transition);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('assets/images/hero_light.png') right 20% center/cover no-repeat;
    z-index: -2;
}

.hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.4);
    z-index: -1;
}

/* Glassmorphism Styles */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-radius: 16px;
}

.glass-img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    object-fit: cover;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.about-content h3 {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
}
.about-glass-card {
    padding: 3rem;
}
.about-glass-card p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.hero-content {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* ==========================================================================
   Services Section
   ========================================================================== */
.services-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.service-card .card-icon {
    width: 48px;
    height: 48px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--accent);
    border: 1px solid rgba(255, 106, 0, 0.2);
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ==========================================================================
   Fleet Section
   ========================================================================== */
.fleet-stats {
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 3rem;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.stat-box {
    padding: 2rem 0;
    text-align: center;
    border-right: 1px solid var(--border-color);
}

.stat-box:last-child {
    border-right: none;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

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

/* US Map Route Animation (Fleet Section) */
.us-map-container {
    height: auto;
    background-color: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.us-map-animation {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
}

.map-base {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    filter: invert(0.05); /* slightly darken to match theme */
}

.map-overlay-svg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 2;
}

.us-path-anim-svg {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawUSPath 8s infinite linear;
    filter: drop-shadow(0 0 6px var(--accent-glow));
}

@keyframes drawUSPath {
    0% { stroke-dashoffset: 1000; opacity: 1; }
    75% { stroke-dashoffset: 0; opacity: 1; }
    90% { stroke-dashoffset: 0; opacity: 1; }
    95% { stroke-dashoffset: 0; opacity: 0; }
    100% { stroke-dashoffset: 1000; opacity: 0; }
}

.us-truck-svg {
    animation: fadeTruck 8s infinite linear;
}

@keyframes fadeTruck {
    0% { opacity: 0; }
    5% { opacity: 1; }
    75% { opacity: 1; }
    90% { opacity: 1; }
    95% { opacity: 0; }
    100% { opacity: 0; }
}

/* ==========================================================================
   Technology Section
   ========================================================================== */
.tech-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.tech-list li {
    margin-bottom: 2rem;
    padding-left: 2rem;
    position: relative;
}

.tech-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    background-color: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-glow);
}

.tech-list h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.tech-list p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Mock Dashboard UI */
.mock-dash {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(0,0,0,0.1);
    font-family: 'Courier New', Courier, monospace;
}

.dash-header {
    background-color: var(--bg-alt);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dash-header .dot {
    width: 10px; height: 10px; border-radius: 50%;
}
.dot.red { background-color: #ff5f56; }
.dot.yellow { background-color: #ffbd2e; }
.dot.green { background-color: #27c93f; }

.dash-title {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.dash-body {
    grid-template-columns: 2fr 1fr;
    gap: 0;
}

.dash-module {
    padding: 1.5rem;
}

/* City Map Animation (Tech Section) */
.city-map {
    border-right: 1px solid var(--border-color);
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    overflow: hidden;
}

.city-map-base {
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.5;
}

.city-path-bg-svg {
    stroke: rgba(255, 106, 0, 0.2);
    stroke-width: 4px;
    stroke-linejoin: round;
}

.city-path-anim-svg {
    stroke: var(--accent);
    stroke-width: 4px;
    stroke-linejoin: round;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawCityPath 8s infinite linear;
}

@keyframes drawCityPath {
    0% { stroke-dashoffset: 1000; opacity: 1; }
    75% { stroke-dashoffset: 0; opacity: 1; }
    90% { stroke-dashoffset: 0; opacity: 1; }
    95% { stroke-dashoffset: 0; opacity: 0; }
    100% { stroke-dashoffset: 1000; opacity: 0; }
}

.city-target-node {
    animation: pulseTargetSvg 8s infinite;
}

@keyframes pulseTargetSvg {
    0%, 75% { opacity: 1; stroke: rgba(255, 106, 0, 0); stroke-width: 0; }
    76% { stroke: rgba(255, 106, 0, 0.8); stroke-width: 0px; }
    85% { stroke: rgba(255, 106, 0, 0); stroke-width: 30px; }
    100% { opacity: 1; stroke: rgba(255, 106, 0, 0); stroke-width: 0; }
}

.city-truck-svg {
    animation: fadeTruck 8s infinite linear;
}

.dash-side {
    display: flex;
    flex-direction: column;
}

.status-bar {
    border-bottom: 1px solid var(--border-color);
}

.status-label {
    font-size: 0.7rem; color: var(--text-muted); margin-bottom: 0.5rem;
}

.status-indicator {
    color: #27c93f; font-weight: bold; font-size: 0.875rem;
}

.data-feed {
    font-size: 0.7rem;
    color: var(--accent);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.data-feed .cursor {
    animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ==========================================================================
   Value Grid Section
   ========================================================================== */
.value-cards {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.value-card {
    text-align: center;
    padding: 2.5rem 1.5rem;
}

.value-icon {
    margin: 0 auto 1.5rem;
    color: var(--text-main);
}

.value-card h4 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.value-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.form-container {
    background-color: var(--bg-card);
    padding: 3rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(255, 106, 0, 0.1);
}

.form-message {
    margin-top: 1rem;
    font-size: 0.875rem;
    padding: 1rem;
    border-radius: 4px;
    display: none;
}

.form-message.success {
    display: block;
    background-color: rgba(39, 201, 63, 0.1);
    color: #27c93f;
    border: 1px solid rgba(39, 201, 63, 0.3);
}

.form-message.error {
    display: block;
    background-color: rgba(255, 95, 86, 0.1);
    color: #ff5f56;
    border: 1px solid rgba(255, 95, 86, 0.3);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    border-top: 1px solid var(--border-color);
    padding-top: 4rem;
}

.footer-content {
    grid-template-columns: 2fr 1fr 1fr;
    margin-bottom: 4rem;
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 1rem;
    max-width: 300px;
    font-size: 0.875rem;
}

.footer h4 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

.footer ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer ul li a,
.footer ul li {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer ul li a:hover {
    color: var(--text-main);
}

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

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   Animations & Interaction Utilities
   ========================================================================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.appear {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 900px) {
    .tech-layout, 
    .about-grid,
    .dash-body {
        grid-template-columns: 1fr;
    }
    .module-map {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        height: auto;
    }
    .us-map-animation {
        height: auto;
    }
    .map-base {
        object-fit: cover;
        height: 100%;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 4rem 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-content {
        margin-top: 0 !important;
        align-self: center !important;
        padding: 2rem !important;
    }
    
    .fleet-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-box {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 1.5rem 0;
    }
    
    .stat-box:last-child {
        border-bottom: none;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    /* Mobile Nav */
    .menu-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--bg-card);
        flex-direction: column;
        justify-content: center;
        padding: 2rem;
        transition: var(--transition);
        border-left: 1px solid var(--border-color);
    }
    
    .nav-links.active {
        right: 0;
        box-shadow: -10px 0 30px rgba(0,0,0,0.8);
    }
    
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
}
