/* =========================================
   EVidey CSS Design System
   ========================================= */

:root {
    /* Color Palette */
    --bg-dark: #0B1014;         /* Midnight Asphalt */
    --bg-card: #1A2229;         /* Rest Stop Slate */
    --accent-green: #00E676;    /* Full Charge Green */
    --accent-amber: #FFAB00;    /* Low Battery Amber */
    --text-primary: #F8FAFC;    /* Headlight White */
    --text-secondary: #94A3B8;  /* Fog Grey */
    
    /* Typography */
    --font-display: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

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

h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--text-primary);
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); line-height: 1.1; margin-bottom: 1.5rem; letter-spacing: -1px; }
h2 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.2; margin-bottom: 1rem; letter-spacing: -0.5px; }
h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.5rem; }
p { color: var(--text-secondary); font-size: 1.125rem; }

.text-gradient {
    background: linear-gradient(90deg, #00E676, #00B0FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

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

/* Focus States for Accessibility */
a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 2px solid var(--accent-green);
    outline-offset: 4px;
}

/* =========================================
   Layout & Containers
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

/* Make room for the route line on larger screens */
@media (min-width: 769px) {
    .container { padding-left: 80px; }
}

.section {
    padding: 6rem 0;
    position: relative;
}

.bg-slate {
    background-color: var(--bg-card);
}

.section-subtitle {
    max-width: 600px;
    margin: 0 auto 4rem auto;
}

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

/* Buttons */
.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--accent-green);
    color: var(--bg-dark);
    padding: 0.875rem 2rem;
    box-shadow: 0 4px 15px rgba(0, 230, 118, 0.2);
}

.btn-primary:hover {
    background-color: #00C853;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 230, 118, 0.4);
}

.btn-small { padding: 0.5rem 1.25rem; font-size: 0.875rem; }
.btn-large { padding: 1rem 2.5rem; font-size: 1.125rem; }

/* Navbar */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 72px;
    background: rgba(11, 16, 20, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 50;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

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

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

.nav-links a:not(.btn) {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:not(.btn):hover { color: var(--accent-green); }

@media (max-width: 768px) {
    .nav-links a:not(.btn) { display: none; }
}

/* =========================================
   Route Line Indicator
   ========================================= */
.route-line {
    position: fixed;
    top: 0;
    left: 40px;
    width: 2px;
    height: 100vh;
    background: rgba(255,255,255,0.05);
    z-index: 0;
}

.route-line-fill {
    position: fixed;
    top: 0;
    left: 40px;
    width: 2px;
    height: 0%;
    background: var(--accent-green);
    box-shadow: 0 0 10px var(--accent-green);
    z-index: 1;
    transition: height 0.1s linear;
}

@media (max-width: 768px) {
    .route-line { left: 20px; }
    .route-line-fill { left: 20px; }
    .container { padding-left: 50px; }
}

/* =========================================
   Hero Section & Animation
   ========================================= */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Battery Anxiety Animation Container */
.battery-anxiety {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    transition: all 0.6s cubic-bezier(0.8, 0, 0.2, 1);
    z-index: 100;
}

.battery-container {
    display: flex;
    align-items: center;
}

.battery-body {
    width: 120px;
    height: 50px;
    border: 3px solid var(--text-secondary);
    border-radius: 8px;
    padding: 4px;
    position: relative;
}

.battery-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.4s ease;
}

.anxiety-fill {
    width: 12%;
    background-color: var(--accent-amber);
    animation: pulse-anxiety 1s infinite alternate;
}

@keyframes pulse-anxiety {
    0% { opacity: 0.7; box-shadow: 0 0 10px rgba(255, 171, 0, 0.2); }
    100% { opacity: 1; box-shadow: 0 0 20px rgba(255, 171, 0, 0.6); }
}

.battery-tip {
    width: 8px;
    height: 20px;
    background: var(--text-secondary);
    border-radius: 0 4px 4px 0;
    margin-left: 2px;
}

.battery-text {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-amber);
    transition: color 0.4s ease;
}

.anxiety-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Actual Hero Content */
.hero-content {
    opacity: 0;
    transform: translateY(20px);
    display: none; /* Changed via JS */
    width: 100%;
    padding-top: 4rem;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

@media (min-width: 992px) {
    .hero-content {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    .hero-text { flex: 1.2; padding-right: 4rem; }
    .hero-visual { flex: 0.8; display: flex; justify-content: center; }
}

.hero-cta {
    margin-top: 2rem;
}

/* Phone Mockup Placeholder */
.phone-mockup {
    width: 280px;
    height: 580px;
    border: 12px solid #2a3441;
    border-radius: 40px;
    background: var(--bg-card);
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05);
    transition: box-shadow 0.3s ease;
    margin: 4rem auto 0;
}

@media (min-width: 992px) {
    .phone-mockup { margin: 0; }
}

.phone-mockup:hover {
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 30px rgba(0, 230, 118, 0.15);
}

.phone-screen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #1A2229 0%, #0B1014 100%);
    color: var(--text-secondary);
}

.phone-screen span {
    display: block;
    margin-top: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.phone-screen-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* =========================================
   Sections: How It Works & Features
   ========================================= */
.steps-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 4rem;
}

.step-card {
    display: flex;
    gap: 1.5rem;
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.02);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.step-card:hover {
    transform: translateX(10px);
    border-color: rgba(0, 230, 118, 0.2);
}

.step-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    color: rgba(255,255,255,0.05);
    line-height: 1;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.feature-card {
    background: var(--bg-dark);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3), 0 0 0 1px rgba(0, 230, 118, 0.2);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

/* =========================================
   CTA & Footer
   ========================================= */
.cta-box {
    background: linear-gradient(135deg, rgba(26, 34, 41, 0.8) 0%, rgba(0, 230, 118, 0.05) 100%);
    border: 1px solid rgba(0, 230, 118, 0.2);
    border-radius: 24px;
    padding: 4rem 2rem;
    text-align: center;
}

.cta-box p { margin-bottom: 2rem; }

.footer {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 4rem 0 2rem 0;
    background: var(--bg-dark);
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-brand p { margin-top: 1rem; max-width: 250px; }
.footer-links { display: flex; gap: 4rem; flex-wrap: wrap; }
.link-group { display: flex; flex-direction: column; gap: 1rem; }
.link-group h4 { font-family: var(--font-body); color: var(--text-primary); font-size: 1rem; }
.link-group a { color: var(--text-secondary); text-decoration: none; transition: color 0.3s; }
.link-group a:hover { color: var(--accent-green); }
.footer-bottom { text-align: center; color: var(--text-secondary); border-top: 1px solid rgba(255,255,255,0.05); padding-top: 2rem; }

/* =========================================
   Animations & Utils
   ========================================= */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-on-scroll.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

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

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-delay: -1ms !important;
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        background-attachment: initial !important;
        scroll-behavior: auto !important;
        transition-duration: 0s !important;
        transition-delay: 0s !important;
    }
}
