@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&family=Sora:wght@400;700;800&display=swap');

:root {
    --primary-bg: #050709;
    /* Deeper black */
    --secondary-bg: #0B0E14;
    --accent-gold: #D4AF37;
    --accent-gold-glow: rgba(212, 175, 55, 0.4);
    --text-pure: #FFFFFF;
    --text-dim: #718096;
    /* Darker dimmed text */
    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.05);
    --transition-smooth: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: var(--primary-bg);
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-pure);
    background-color: var(--primary-bg);
    overflow-x: hidden;
    line-height: 1.6;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--secondary-bg);
    /* Fallback baseline */
    background-image: url('assets/services.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 0.15;
    /* Subtle branding presence */
    z-index: -1;
    pointer-events: none;
}

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

ul {
    list-style: none;
}

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

/* Typography Extensions */
h1,
h2,
h3,
.logo {
    font-family: 'Sora', sans-serif;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

/* Glassmorphism Utility */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

/* Premium Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 18px 36px;
    /* Increased for touch target */
    min-height: 48px;
    /* Ensuring 44px+ touch target */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 13px;
    border-radius: 2px;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    z-index: 1;
    /* Added button resets */
    background: none;
    border: none;
    color: inherit;
}

.btn-primary {
    background: var(--accent-gold);
    color: var(--primary-bg);
    border: none;
}

@media (hover: hover) {
    .btn-primary:hover {
        background: var(--text-pure);
        box-shadow: 0 0 30px var(--accent-gold-glow);
        transform: translateY(-2px);
    }
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-pure);
}

@media (hover: hover) {
    .btn-outline:hover {
        background: var(--text-pure);
        color: var(--primary-bg);
        border-color: var(--text-pure);
    }
}

.btn-cta {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #F5D76E 100%);
    color: var(--primary-bg);
    border: none;
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.2);
}

@media (hover: hover) {
    .btn-cta:hover {
        transform: translateY(-3px) scale(1.02);
        box-shadow: 0 15px 30px rgba(212, 175, 55, 0.4);
        background: var(--text-pure);
    }
}

.header-cta {
    display: none;
}

@media (min-width: 500px) {
    .header-cta {
        display: inline-flex;
        padding: 10px 20px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .header-inner {
        gap: 10px;
    }

    .logo a {
        font-size: 1rem;
    }

    .header-cta {
        display: none !important;
        /* Hide on very small mobile to prevent overlap */
    }
}

/* Navigation */
#site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 24px 0;
    transition: var(--transition-smooth);
}

#site-header.scrolled {
    padding: 16px 0;
    background: rgba(11, 14, 20, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    /* Reduced for mobile */
}

@media (min-width: 768px) {
    .container {
        padding: 0 40px;
    }
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #FFF 0%, #AAA 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.menu-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.2em;
    /* Reset button defaults */
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    font-family: inherit;
}

.menu-toggle i {
    font-size: 18px;
    color: var(--accent-gold);
}

/* Side Drawer Redesign */
.side-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-bg);
    z-index: 2001;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
    padding: 40px;
}

@media (min-width: 768px) {
    .side-drawer {
        width: 450px;
        border-left: 1px solid var(--glass-border);
    }
}

.side-drawer.active {
    right: 0;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 60px;
}

.drawer-nav ul {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.drawer-nav a {
    font-family: 'Sora', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    opacity: 0.6;
    letter-spacing: -0.01em;
    padding: 15px 0;
    /* Increased touch target */
    display: block;
}

@media (hover: hover) {
    .drawer-nav a:hover {
        opacity: 1;
        color: var(--accent-gold);
        padding-left: 10px;
    }
}

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

.hero-bg-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-bg-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 100%;
    /* Pin to the very bottom edge where the truck is */
    filter: brightness(0.85) contrast(1.15);
    transition: var(--transition-smooth);
}

.hero-bg-media::after {
    content: '';
    position: absolute;
    inset: 0;
    /* Flipped Horizontal: Clear on left (cab), dark on right (trailer) */
    background: linear-gradient(to right, rgba(5, 7, 9, 0.1) 0%, rgba(5, 7, 9, 0.0) 30%, rgba(5, 7, 9, 0.8) 60%, rgba(5, 7, 9, 0.95) 100%);
    z-index: 1;
}

.hero-bg-media {
    background-color: var(--secondary-bg);
    /* Baseline fallback */
}


.hero-overlay-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, var(--primary-bg) 10%, transparent 70%),
        linear-gradient(to top, var(--primary-bg) 0%, transparent 30%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
}

.hero-content h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 0.9;
    margin-bottom: 30px;
    font-weight: 800;
}

.hero-content p {
    font-size: clamp(1rem, 4vw, 1.25rem);
    color: var(--text-dim);
    margin-bottom: 40px;
    max-width: 600px;
}

/* Premium Grid Sections */
.section {
    padding: 180px 0;
    /* More expansive spacing */
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    /* Mobile-first: single column */
    gap: 60px;
    align-items: center;
}

@media (min-width: 992px) {
    .grid-2 {
        grid-template-columns: 1fr 1fr;
        gap: 100px;
    }
}

.image-stack {
    position: relative;
}

.img-main {
    width: 100%;
    border-radius: 4px;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
}

.tagline {
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 0.4em;
    font-weight: 600;
    font-size: 13px;
    display: block;
    margin-bottom: 20px;
}

.section-title {
    font-size: clamp(2rem, 8vw, 3rem);
    margin-bottom: 30px;
}

/* Features Glass Grid */
.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* Mobile-first */
    gap: 20px;
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 30px;
    }
}

.feature-card {
    padding: 60px 40px;
    transition: var(--transition-smooth);
}

@media (hover: hover) {
    .feature-card:hover {
        background: rgba(212, 175, 55, 0.05);
        border-color: var(--accent-gold);
        transform: translateY(-10px);
    }
}

.feature-card i {
    font-size: 40px;
    color: var(--accent-gold);
    margin-bottom: 30px;
    display: block;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--text-dim);
}

/* Article Card Premium Interactive */
.article-card {
    transition: var(--transition-smooth);
    display: block;
}

@media (hover: hover) {
    .article-card:hover {
        background: rgba(212, 175, 55, 0.05);
        border-color: var(--accent-gold);
        transform: translateY(-10px);
    }
}

/* Footer Premium */
footer {
    padding: 100px 0 40px;
    background: var(--secondary-bg);
    border-top: 1px solid var(--glass-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* Mobile-first: single column */
    gap: 40px;
    margin-bottom: 60px;
}

@media (min-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 992px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
        gap: 60px;
        margin-bottom: 80px;
    }
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    display: block;
}

.footer-col h4 {
    margin-bottom: 30px;
    color: var(--accent-gold);
    font-size: 14px;
    letter-spacing: 0.1em;
}

.footer-col ul li {
    margin-bottom: 15px;
}

.footer-col a {
    color: var(--text-dim);
}

.footer-col a:hover {
    color: var(--text-pure);
}

.footer-bottom {
    padding-top: 40px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    /* Mobile-first */
    gap: 20px;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-dim);
    text-align: center;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        text-align: left;
    }
}

/* Animations */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

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

[data-delay="1"] {
    transition-delay: 0.1s;
}

[data-delay="2"] {
    transition-delay: 0.2s;
}

[data-delay="3"] {
    transition-delay: 0.3s;
}

/* CPM Calculator Styles */
.calculator-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* Mobile-first */
    gap: 40px;
    align-items: flex-start;
}

@media (min-width: 1025px) {
    .calculator-grid {
        grid-template-columns: 1.2fr 0.8fr;
        gap: 60px;
    }
}

.input-group-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.input-group-header i {
    color: var(--accent-gold);
}

.input-group-header h3 {
    font-size: 14px;
    letter-spacing: 0.1em;
}

.input-container {
    padding: 20px;
    /* Reduced for mobile */
    display: grid;
    grid-template-columns: 1fr;
    /* Mobile-first */
    gap: 20px;
}

@media (min-width: 600px) {
    .input-container {
        grid-template-columns: 1fr 1fr;
        padding: 30px;
        gap: 24px;
    }
}

.input-field {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-field label {
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.currency {
    position: absolute;
    left: 15px;
    color: var(--text-dim);
    font-size: 14px;
}

.calc-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 12px 15px 12px 35px;
    color: var(--text-pure);
    font-family: 'Outfit';
    font-size: 16px;
    border-radius: 4px;
    transition: var(--transition-smooth);
}

.calc-input:focus {
    outline: none;
    border-color: var(--accent-gold);
    background: rgba(255, 255, 255, 0.05);
}

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

/* Firefox */
input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.results-sticky {
    position: sticky;
    top: 120px;
    padding: 40px;
    border-color: var(--accent-gold);
    box-shadow: 0 0 40px rgba(212, 175, 55, 0.1);
}

.result-title {
    font-size: 1.25rem;
    margin-bottom: 30px;
    text-align: center;
}

.main-result {
    text-align: center;
    margin-bottom: 30px;
}

.result-label {
    display: block;
    color: var(--text-dim);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
}

.result-value {
    font-size: 4rem;
    font-weight: 800;
    color: var(--accent-gold);
    font-family: 'Sora';
    line-height: 1;
}

.result-divider {
    height: 1px;
    background: var(--glass-border);
    margin: 30px 0;
}

.secondary-results {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.res-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.res-label {
    color: var(--text-dim);
    font-size: 14px;
}

.res-val {
    font-weight: 600;
}

.chart-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chart-bar-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chart-label {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
}

.chart-bar {
    height: 6px;
    background: var(--glass-border);
    border-radius: 10px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--accent-gold);
    border-radius: 10px;
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Modal System */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 14, 20, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 90%;
    max-width: 550px;
    padding: 60px;
    position: relative;
    transform: translateY(40px);
    transition: var(--transition-smooth);
    border: 1px solid var(--accent-gold);
    overflow-y: auto;
    max-height: 90vh;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 36px;
    /* Larger for touch */
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-dim);
    transition: var(--transition-smooth);
}

@media (hover: hover) {
    .modal-close:hover {
        color: var(--accent-gold);
        transform: rotate(90deg);
    }
}

@media (max-width: 600px) {
    .modal-content {
        padding: 40px 25px;
    }
}

/* Premium Select Dropdown */
.premium-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 15px;
    color: white;
    outline: none;
    border-radius: 4px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23D4AF37' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

.premium-select:focus {
    border-color: var(--accent-gold) !important;
}

.premium-select option {
    background: var(--primary-bg);
    color: white;
}

.field-label {
    color: var(--text-dim);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 10px;
}

/* Tooltip Styles */
.tooltip-icon {
    font-size: 12px;
    color: var(--accent-gold);
    margin-left: 5px;
    cursor: help;
    opacity: 0.6;
    transition: var(--transition-smooth);
}

.tooltip-icon:hover {
    opacity: 1;
    transform: scale(1.2);
}

.efficiency-container strong {
    color: var(--accent-gold);
}

/* Accessibility: Focus Indicators */
:focus-visible {
    outline: 2px solid var(--accent-gold);
    outline-offset: 4px;
}

/* Print Styles for Calculator Report */
@media print {

    #site-header,
    .side-drawer,
    #hero,
    .hero-bg-media,
    .action-buttons,
    .modal-overlay,
    footer,
    .input-group-header,
    .calculator-inputs,
    .tooltip-icon,
    .btn,
    .tagline {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    body::before {
        display: none !important;
    }

    .container {
        padding: 0 !important;
        max-width: 100% !important;
    }

    .section {
        padding: 0 !important;
    }

    .glass-panel {
        background: white !important;
        color: black !important;
        border: 1px solid #eee !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        padding: 20px !important;
    }

    .calculator-grid {
        display: block !important;
    }

    .calculator-results {
        width: 100% !important;
    }

    .results-sticky {
        position: static !important;
        box-shadow: none !important;
        border-color: #ddd !important;
    }

    .result-value {
        color: #D4AF37 !important;
        font-size: 3rem !important;
    }

    .chart-bar {
        background: #eee !important;
    }

    .bar-fill {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .efficiency-container {
        background: #fdfaf0 !important;
        border-color: #D4AF37 !important;
    }

    .result-title::before {
        content: "EFFICIENT FREIGHT - OPERATIONAL REPORT";
        display: block;
        font-size: 1.5rem;
        font-weight: 800;
        margin-bottom: 20px;
        color: black;
    }
}