/* =============================================================
   JAI AMBEY ROADLINE — app.css
   Global styles, design tokens, typography, utilities
   ============================================================= */

/* ---------------------------------------------------------------
   1. CSS CUSTOM PROPERTIES (Design Tokens)
--------------------------------------------------------------- */
:root {
    /* Brand Colors */
    --color-primary:        #D50000;
    --color-primary-dark:   #A80000;
    --color-primary-light:  #FF3333;
    --color-secondary:      #0B2A5B;
    --color-secondary-dark: #071C3E;
    --color-secondary-light:#1A4080;

    /* Neutrals */
    --color-white:          #FFFFFF;
    --color-off-white:      #F8F9FB;
    --color-light-gray:     #F2F4F7;
    --color-gray-100:       #E8ECF2;
    --color-gray-200:       #D0D6E2;
    --color-gray-400:       #8899B0;
    --color-gray-600:       #4A5568;
    --color-gray-800:       #1E2937;
    --color-dark:           #0D1B2E;

    /* Semantic */
    --color-success:        #10B981;
    --color-warning:        #F59E0B;
    --color-error:          #EF4444;
    --color-info:           #3B82F6;

    /* Gradients */
    --gradient-primary:     linear-gradient(135deg, var(--color-primary) 0%, #FF5722 100%);
    --gradient-secondary:   linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-light) 100%);
    --gradient-dark:        linear-gradient(135deg, #0D1B2E 0%, #0B2A5B 100%);
    --gradient-hero:        linear-gradient(135deg, rgba(11,42,91,0.95) 0%, rgba(11,42,91,0.8) 50%, rgba(213,0,0,0.3) 100%);
    --gradient-red-blue:    linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 100%);

    /* Typography */
    --font-primary:         'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-secondary:       'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Font Sizes (clamp for fluid type) */
    --fs-xs:    0.75rem;
    --fs-sm:    0.875rem;
    --fs-base:  1rem;
    --fs-md:    1.125rem;
    --fs-lg:    1.25rem;
    --fs-xl:    1.5rem;
    --fs-2xl:   1.875rem;
    --fs-3xl:   2.25rem;
    --fs-4xl:   clamp(2rem, 4vw, 3rem);
    --fs-5xl:   clamp(2.5rem, 5vw, 3.75rem);
    --fs-hero:  clamp(2.75rem, 6vw, 4.5rem);

    /* Spacing */
    --space-xs:  0.5rem;
    --space-sm:  0.75rem;
    --space-md:  1rem;
    --space-lg:  1.5rem;
    --space-xl:  2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    --space-section: clamp(4rem, 8vw, 7rem);

    /* Border Radius */
    --radius-sm:   6px;
    --radius-md:   12px;
    --radius-lg:   20px;
    --radius-xl:   28px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm:  0 2px 8px rgba(11,42,91,0.06);
    --shadow-md:  0 8px 24px rgba(11,42,91,0.10);
    --shadow-lg:  0 16px 48px rgba(11,42,91,0.15);
    --shadow-xl:  0 24px 64px rgba(11,42,91,0.20);
    --shadow-card:0 4px 20px rgba(11,42,91,0.08);
    --shadow-red: 0 8px 32px rgba(213,0,0,0.25);
    --shadow-hover:0 20px 60px rgba(11,42,91,0.18);

    /* Transitions */
    --transition-fast:   150ms ease;
    --transition-base:   300ms ease;
    --transition-slow:   500ms ease;
    --transition-bounce: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Z-index layers */
    --z-base:     1;
    --z-dropdown: 100;
    --z-sticky:   200;
    --z-overlay:  300;
    --z-modal:    400;
    --z-loader:   9999;
}

/* ---------------------------------------------------------------
   2. CSS RESET & BASE
--------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden; /* pair with body to prevent mobile horizontal scroll */
}

body {
    font-family: var(--font-secondary);
    font-size: var(--fs-base);
    font-weight: 400;
    line-height: 1.7;
    color: var(--color-gray-800);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover {
    color: var(--color-primary);
}

ul, ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

input, textarea, select {
    font-family: inherit;
}

/* ---------------------------------------------------------------
   3. TYPOGRAPHY
--------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-secondary);
}

h1 { font-size: var(--fs-hero); }
h2 { font-size: var(--fs-4xl); }
h3 { font-size: var(--fs-3xl); }
h4 { font-size: var(--fs-2xl); }
h5 { font-size: var(--fs-xl); }
h6 { font-size: var(--fs-lg); }

p {
    color: var(--color-gray-600);
    line-height: 1.8;
}

.lead {
    font-size: var(--fs-md);
    font-weight: 400;
    color: var(--color-gray-600);
}

/* ---------------------------------------------------------------
   4. BUTTONS
--------------------------------------------------------------- */
.btn {
    font-family: var(--font-primary);
    font-size: var(--fs-sm);
    font-weight: 600;
    letter-spacing: 0.03em;
    border-radius: var(--radius-full);
    padding: 0.75rem 1.75rem;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.12);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.btn:hover::after {
    opacity: 1;
}

/* Primary Button */
.btn-primary {
    background: var(--color-primary);
    color: var(--color-white) !important;
    border-color: var(--color-primary);
    box-shadow: 0 4px 20px rgba(213,0,0,0.3);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(213,0,0,0.4);
    color: var(--color-white) !important;
}

.btn-primary:active {
    transform: translateY(0);
}

/* Secondary Button */
.btn-secondary {
    background: var(--color-secondary);
    color: var(--color-white) !important;
    border-color: var(--color-secondary);
    box-shadow: 0 4px 20px rgba(11,42,91,0.25);
}

.btn-secondary:hover {
    background: var(--color-secondary-dark);
    border-color: var(--color-secondary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(11,42,91,0.35);
    color: var(--color-white) !important;
}

/* Outline Primary */
.btn-outline-primary {
    background: transparent;
    color: var(--color-primary) !important;
    border-color: var(--color-primary);
}

.btn-outline-primary:hover {
    background: var(--color-primary);
    color: var(--color-white) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-red);
}

/* Outline White */
.btn-outline-white {
    background: transparent;
    color: var(--color-white) !important;
    border-color: rgba(255,255,255,0.6);
}

.btn-outline-white:hover {
    background: var(--color-white);
    color: var(--color-secondary) !important;
    border-color: var(--color-white);
    transform: translateY(-2px);
}

/* White Button */
.btn-white {
    background: var(--color-white);
    color: var(--color-secondary) !important;
    border-color: var(--color-white);
    box-shadow: 0 4px 20px rgba(255,255,255,0.2);
}

.btn-white:hover {
    background: var(--color-off-white);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(255,255,255,0.3);
    color: var(--color-primary) !important;
}

/* Button Sizes */
.btn-lg {
    padding: 1rem 2.25rem;
    font-size: var(--fs-base);
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: var(--fs-xs);
}

/* ---------------------------------------------------------------
   5. SECTION STYLES
--------------------------------------------------------------- */
.section {
    padding: var(--space-section) 0;
}

.section-light {
    background-color: var(--color-light-gray);
}

.section-white {
    background-color: var(--color-white);
}

.section-dark {
    background: var(--gradient-dark);
    color: var(--color-white);
}

.section-primary {
    background: var(--gradient-primary);
    color: var(--color-white);
}

/* Section Label / Eyebrow */
.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-primary);
    font-size: var(--fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-primary);
    margin-bottom: var(--space-md);
}

.section-eyebrow::before,
.section-eyebrow::after {
    content: '';
    display: block;
    width: 28px;
    height: 2px;
    background: var(--color-primary);
    border-radius: 2px;
}

/* Section Title */
.section-title {
    font-size: var(--fs-4xl);
    font-weight: 800;
    color: var(--color-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.15;
}

.section-title span {
    color: var(--color-primary);
}

.section-title--white {
    color: var(--color-white);
}

.section-title--white span {
    color: rgba(255,255,255,0.7);
}

/* Section Subtitle */
.section-subtitle {
    font-size: var(--fs-md);
    color: var(--color-gray-600);
    max-width: 580px;
    margin-bottom: var(--space-2xl);
    line-height: 1.8;
}

.section-subtitle--white {
    color: rgba(255,255,255,0.8);
}

/* Section Divider */
.section-divider {
    width: 56px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-lg);
}

.section-divider--center {
    margin-left: auto;
    margin-right: auto;
}

/* ---------------------------------------------------------------
   6. CARDS
--------------------------------------------------------------- */
.card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    transition: all var(--transition-base);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

/* Glass Card */
.card-glass {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-lg);
}

/* ---------------------------------------------------------------
   7. BADGES & TAGS
--------------------------------------------------------------- */
.badge-primary {
    display: inline-block;
    background: rgba(213,0,0,0.1);
    color: var(--color-primary);
    font-size: var(--fs-xs);
    font-weight: 600;
    font-family: var(--font-primary);
    padding: 0.3rem 0.9rem;
    border-radius: var(--radius-full);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.badge-secondary {
    display: inline-block;
    background: rgba(11,42,91,0.08);
    color: var(--color-secondary);
    font-size: var(--fs-xs);
    font-weight: 600;
    font-family: var(--font-primary);
    padding: 0.3rem 0.9rem;
    border-radius: var(--radius-full);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ---------------------------------------------------------------
   8. PAGE LOADER
--------------------------------------------------------------- */
#page-loader {
    position: fixed;
    inset: 0;
    background: var(--color-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-loader);
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#page-loader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-inner {
    text-align: center;
}

.loader-logo {
    margin-bottom: 2rem;
    animation: loaderPulse 1.5s ease-in-out infinite;
}

.loader-bar {
    width: 200px;
    height: 3px;
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius-full);
    margin: 0 auto 1rem;
    overflow: hidden;
}

.loader-progress {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    animation: loaderProgress 1.5s ease-in-out forwards;
}

.loader-text {
    color: rgba(255,255,255,0.6);
    font-family: var(--font-primary);
    font-size: var(--fs-xs);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin: 0;
}

@keyframes loaderPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(0.97); }
}

@keyframes loaderProgress {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* ---------------------------------------------------------------
   9. PAGE HERO BANNER (Inner Pages)
--------------------------------------------------------------- */
.page-hero {
    position: relative;
    background: var(--gradient-dark);
    padding: 9rem 0 5rem;
    overflow: hidden;
    margin-top: 0;
}

.page-hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.hero-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.07;
}

.hero-shape--1 {
    width: 600px;
    height: 600px;
    background: var(--color-primary);
    top: -200px;
    right: -100px;
}

.hero-shape--2 {
    width: 400px;
    height: 400px;
    background: var(--color-secondary-light);
    bottom: -150px;
    left: -100px;
}

.hero-shape--road {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: repeating-linear-gradient(
        90deg,
        var(--color-primary) 0px,
        var(--color-primary) 40px,
        transparent 40px,
        transparent 70px
    );
    opacity: 0.4;
}

.page-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(213,0,0,0.2);
    border: 1px solid rgba(213,0,0,0.4);
    color: var(--color-primary-light);
    font-family: var(--font-primary);
    font-size: var(--fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-md);
}

.page-hero-title {
    font-size: var(--fs-4xl);
    font-weight: 800;
    color: var(--color-white);
    margin-bottom: var(--space-lg);
    line-height: 1.1;
}

.page-hero-description {
    color: rgba(255,255,255,0.75);
    font-size: var(--fs-md);
    margin-bottom: var(--space-xl);
    line-height: 1.8;
}

.page-breadcrumb {
    --bs-breadcrumb-divider-color: rgba(255,255,255,0.4);
    --bs-breadcrumb-item-active-color: rgba(255,255,255,0.7);
}

.page-breadcrumb .breadcrumb-item a {
    color: rgba(255,255,255,0.7);
    font-size: var(--fs-sm);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: color var(--transition-base);
}

.page-breadcrumb .breadcrumb-item a:hover {
    color: var(--color-white);
}

.page-breadcrumb .breadcrumb-item.active {
    color: var(--color-primary-light);
    font-size: var(--fs-sm);
}

.page-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255,255,255,0.3);
}

.page-hero-cut {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 50px;
    background: var(--color-white);
    clip-path: polygon(0 100%, 100% 100%, 100% 40%, 0 100%);
}

/* ---------------------------------------------------------------
   10. WHATSAPP FLOAT
--------------------------------------------------------------- */
.whatsapp-float {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: #25D366;
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(37,211,102,0.4);
    z-index: var(--z-sticky);
    transition: all var(--transition-bounce);
    text-decoration: none;
}

.whatsapp-float:hover {
    background: #1DA851;
    transform: scale(1.12);
    color: white;
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    transform: translateX(-8px);
    visibility: visible;
}

.whatsapp-pulse {
    position: absolute;
    inset: -4px;
    border-radius: var(--radius-full);
    border: 3px solid #25D366;
    animation: whatsappPulse 2s ease infinite;
}

.whatsapp-tooltip {
    position: absolute;
    right: calc(100% + 10px);
    white-space: nowrap;
    background: var(--color-dark);
    color: var(--color-white);
    font-size: var(--fs-xs);
    font-weight: 600;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    opacity: 0;
    visibility: hidden;
    transform: translateX(4px);
    transition: all var(--transition-base);
    pointer-events: none;
}

@keyframes whatsappPulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* ---------------------------------------------------------------
   11. BACK TO TOP
--------------------------------------------------------------- */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: var(--color-secondary);
    color: var(--color-white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    z-index: var(--z-sticky);
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: all var(--transition-bounce);
    cursor: pointer;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--color-primary);
    box-shadow: var(--shadow-red);
    transform: translateY(-4px);
}

/* ---------------------------------------------------------------
   12. UTILITIES
--------------------------------------------------------------- */
.text-primary { color: var(--color-primary) !important; }
.text-secondary-brand { color: var(--color-secondary) !important; }
.text-white { color: var(--color-white) !important; }
.text-gray { color: var(--color-gray-600) !important; }

.bg-primary-brand { background-color: var(--color-primary) !important; }
.bg-secondary-brand { background-color: var(--color-secondary) !important; }
.bg-light-gray { background-color: var(--color-light-gray) !important; }

.rounded-lg { border-radius: var(--radius-lg) !important; }
.rounded-xl { border-radius: var(--radius-xl) !important; }
.rounded-full { border-radius: var(--radius-full) !important; }

.shadow-card { box-shadow: var(--shadow-card) !important; }
.shadow-hover { box-shadow: var(--shadow-hover) !important; }

/* Gradient Text */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Highlight Accent Line */
.accent-line {
    display: inline-block;
    position: relative;
}

.accent-line::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    opacity: 0.4;
    z-index: -1;
}

/* Feature Dot List */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.4rem 0;
    color: var(--color-gray-600);
    font-size: var(--fs-sm);
}

.feature-list li::before {
    content: '';
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-primary);
    margin-top: 7px;
}

/* Divider Line */
.divider-line {
    border: none;
    border-top: 1px solid var(--color-gray-100);
    margin: var(--space-xl) 0;
}

/* Section top spacing for header overlap */
.has-header-offset {
    padding-top: 90px;
}

/* ---------------------------------------------------------------
   13. RESPONSIVE OVERRIDES
--------------------------------------------------------------- */
@media (max-width: 991.98px) {
    .section {
        padding: clamp(3rem, 8vw, 5rem) 0;
    }

    .section-title {
        font-size: var(--fs-3xl);
    }
}

@media (max-width: 767.98px) {
    .section-title {
        font-size: var(--fs-2xl);
    }

    .section-subtitle {
        font-size: var(--fs-base);
    }

    .btn-lg {
        padding: 0.85rem 1.75rem;
        font-size: var(--fs-sm);
    }

    .page-hero {
        padding: 6rem 0 3rem;
    }

    .page-hero-title {
        font-size: var(--fs-3xl);
    }
}

@media (max-width: 575.98px) {
    .page-hero {
        padding: 5.5rem 0 2.5rem;
    }

    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 80px;
        right: 16px;
    }

    .back-to-top {
        width: 42px;
        height: 42px;
        bottom: 16px;
        right: 16px;
    }
}

/* ---------------------------------------------------------------
   14. REDUCED MOTION
--------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .whatsapp-pulse {
        animation: none;
    }
}