/* 
  Riders Companion - Road Journey Version (REWORKED)
  Theme: Aggressive Dark Mode + Realistic Road Animation
*/

@import url('https://fonts.cdnfonts.com/css/red-seven');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;800&display=swap');

:root {
    --primary-bg: #000000;
    --secondary-bg: #0d0d0d;
    --accent-red: #ff1a1a;
    --dark-red: #b30000;
    --text-main: #ffffff;
    --text-muted: #888888;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.05);
    --red-glow: 0 0 15px rgba(255, 26, 26, 0.5);
    --transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);

    /* Responsive Variables */
    --bike-width: 400px;
    --road-stroke: 180px;
    --landing-logo-width: 600px;
    --header-height: 80px;
    --nav-logo-height: 45px;
    --content-max-width: 450px;

    /* Fluid Typography Variables - Refined for no overlap and premium feel */
    --h1-size: clamp(1.8rem, 6vw, 3.5rem);
    --h2-size: clamp(1.4rem, 4vw, 2.2rem);
    --h3-size: clamp(1.1rem, 2.5vw, 1.3rem);
    --body-size: clamp(0.9rem, 1.2vw, 1rem);
}

/* Tablet Scaling */
@media (max-width: 1024px) {
    :root {
        --bike-width: 300px;
        --road-stroke: 140px;
        --landing-logo-width: 400px;
        --content-max-width: 400px;
    }
}

/* Mobile Scaling - Drastic Typography Reduction */
@media (max-width: 768px) {
    :root {
        --bike-width: 180px;
        --road-stroke: 100px;
        --landing-logo-width: 200px;
        --header-height: 70px;
        --nav-logo-height: 35px;
        --content-max-width: 92%;

        /* Drastic reduction for mobile to prevent overflow */
        --h1-size: clamp(1.8rem, 7vw, 2.2rem);
        --h2-size: clamp(1.4rem, 6vw, 1.8rem);
        --h3-size: clamp(1rem, 4vw, 1.3rem);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--primary-bg);
    color: var(--text-main);
    font-family: 'Poppins', sans-serif;
    font-size: var(--body-size);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1 {
    font-size: var(--h1-size);
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 2rem;
    letter-spacing: 1px;
    word-break: break-word;
}

h2 {
    font-size: var(--h2-size);
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 1.5rem;
    word-break: break-word;
}

h3 {
    font-size: var(--h3-size);
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 1rem;
}

h1,
h2,
h3,
.brand-font {
    font-family: 'Red Seven', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.glow-red {
    text-shadow: var(--red-glow);
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 0 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 26, 26, 0.2);
    height: var(--header-height);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.nav-logo {
    height: var(--nav-logo-height);
    width: auto;
    filter: drop-shadow(0 0 8px rgba(255, 26, 26, 0.6));
}

.logo {
    font-size: 1.1rem;
    color: var(--accent-red);
    font-weight: 800;
}

@media (max-width: 768px) {
    .logo {
        display: none;
    }
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

@media (max-width: 768px) {
    nav ul {
        gap: 1rem;
    }

    nav ul li a {
        font-size: 0.75rem !important;
    }
}

nav ul li a {
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #fff;
    text-decoration: none;
    transition: var(--transition);
}

nav ul li a:hover {
    color: var(--accent-red);
    text-shadow: 0 0 10px var(--accent-red);
}

/* Road Journey Container */
#road-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

#road-svg {
    width: 100%;
    height: 100%;
}

#road-path {
    fill: none;
    stroke: #444;
    stroke-width: var(--road-stroke);
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 30px rgba(255, 26, 26, 0.5));
}

#road-line {
    fill: none;
    stroke: rgba(255, 255, 255, 0.6);
    stroke-width: calc(var(--road-stroke) / 25);
    stroke-dasharray: 40, 80;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#bike {
    position: fixed;
    width: var(--bike-width);
    height: auto;
    z-index: 5;
    transform-origin: center;
    filter: drop-shadow(0 0 40px rgba(255, 26, 26, 0.7));
    pointer-events: none;
    display: none;
}

@media (min-width: 769px) {
    #bike {
        z-index: 100;
    }
}

/* Sections */
section {
    position: relative;
    min-height: 100vh;
    padding: 120px 10%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 2;
    background: transparent;
}

@media (max-width: 768px) {
    section {
        padding: 100px 4%;
        align-items: center;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.content-wrapper {
    max-width: var(--content-max-width);
    margin-left: 0;
    padding: 3rem;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    border-left: 4px solid var(--accent-red);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
    z-index: 10;
    position: relative;
}

@media (max-width: 768px) {
    .content-wrapper {
        padding: 2.5rem 1.2rem;
        margin: 0 auto !important;
        border-left: none;
        border-top: 4px solid var(--accent-red);
        text-align: center;
    }
}

/* Alternate content side */
section:nth-child(even) .content-wrapper {
    margin-left: auto;
    border-left: none;
    border-right: 4px solid var(--accent-red);
}

@media (max-width: 768px) {
    section:nth-child(even) .content-wrapper {
        border-right: none;
        border-top: 4px solid var(--accent-red);
    }
}

/* Features Section Specific Layout (Split) */
.features-layout .content-wrapper {
    max-width: 800px;
    margin-left: 0;
    border-left: 4px solid var(--accent-red);
    border-right: none !important;
}

@media (max-width: 1024px) {
    .features-layout .content-wrapper {
        max-width: 600px;
    }
}

@media (max-width: 768px) {
    .features-layout .content-wrapper {
        max-width: 92%;
        margin: 0 auto !important;
        border-left: none;
        border-top: 4px solid var(--accent-red);
    }
}

/* Hero Journey (Landing) */
.hero-journey {
    text-align: center;
    background: radial-gradient(circle at center, #1a0000 0%, #000000 80%);
}

.landing-logo {
    width: var(--landing-logo-width);
    height: auto;
    margin-bottom: 2.5rem;
    filter: drop-shadow(0 0 50px rgba(255, 26, 26, 0.6));
    animation: pulse 4s infinite ease-in-out;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.03);
    }
}

.hero-btns {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-top: 4rem;
}

@media (max-width: 768px) {
    .hero-btns {
        flex-direction: column;
        gap: 1.2rem;
        width: 100%;
        max-width: 260px;
        margin: 2rem auto 0;
    }
}

/* Buttons */
.btn {
    padding: 1.3rem 3.5rem;
    border-radius: 4px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .btn {
        padding: 1.1rem 2rem;
        width: 100%;
    }
}

.btn-primary {
    background: var(--accent-red);
    color: #fff;
    box-shadow: 0 0 25px rgba(255, 26, 26, 0.4);
}

.btn-primary:hover {
    background: #ff3333;
    transform: translateY(-5px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent-red);
    color: var(--accent-red);
}

.btn-outline:hover {
    background: var(--accent-red);
    color: #fff;
}

/* Journey Sections */
.section-subtitle {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    color: var(--accent-red);
    font-weight: 700;
    margin-bottom: 2.5rem;
}

.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: 4px;
    transition: var(--transition);
    text-align: left;
}

@media (max-width: 768px) {
    .glass-card {
        padding: 1.5rem;
        text-align: center;
    }
}

.glass-card:hover {
    border-color: var(--accent-red);
    background: rgba(255, 26, 26, 0.08);
}

.mt-4 {
    margin-top: 2.5rem;
}

.mt-2 {
    margin-top: 1.2rem;
}

.highlight-red {
    color: var(--accent-red);
    font-weight: 800;
}

/* Features Grid */
.features-grid-journey {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (max-width: 600px) {
    .features-grid-journey {
        grid-template-columns: 1fr;
    }
}

/* Timeline Journey */
.timeline-journey {
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
    margin-top: 2.5rem;
}

.timeline-item-journey {
    padding-left: 2rem;
    border-left: 4px solid var(--accent-red);
    text-align: left;
}

@media (max-width: 768px) {
    .timeline-item-journey {
        padding-left: 1.2rem;
        border-left: 3px solid var(--accent-red);
        margin-left: 2px;
    }
}

/* Contact Box */
.contact-box {
    background: var(--secondary-bg);
    padding: 2.5rem;
    border: 1px solid rgba(255, 26, 26, 0.2);
}

.contact-box h2 {
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .contact-box {
        padding: 1.5rem 1rem;
    }
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    margin-bottom: 1.2rem;
    font-family: inherit;
    font-size: 0.9rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-red);
}

/* Footer */
footer {
    background: #000;
    padding: 6rem 5% 3rem;
    border-top: 3px solid var(--accent-red);
    z-index: 10;
    position: relative;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4rem;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 3rem;
        text-align: center;
    }
}

.footer-logo {
    height: 100px;
    width: auto;
}

@media (max-width: 768px) {
    .footer-logo {
        height: 80px;
    }
}

.footer-tagline {
    font-family: 'Red Seven', sans-serif;
    color: var(--text-muted);
    letter-spacing: 4px;
    font-size: 0.9rem;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 3rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.footer-bottom a {
    color: var(--accent-red);
    text-decoration: none;
    transition: var(--transition);
    margin-left: 1rem;
    font-weight: 700;
}

.footer-bottom a:hover {
    text-shadow: 0 0 10px var(--accent-red);
    color: #fff;
}

.policy-item h3 {
    color: var(--accent-red);
    margin-bottom: 0.5rem;
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}