/* ============================================
   BASE CSS — GlobalLogistics Premium
   Variables, Reset, Typography, Utilities
   ============================================ */

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

/* --- Design Tokens --- */
:root {
    /* Brand Colors */
    --clr-navy: #0B1D3A;
    --clr-navy-mid: #132D54;
    --clr-navy-light: #1A3A5C;
    --clr-accent: #E8A317;
    /* Warm Amber — professional, logistics-feel */
    --clr-accent-hover: #CC8E10;
    --clr-surface: #F6F8FA;
    --clr-surface-alt: #EDF0F4;
    --clr-white: #FFFFFF;
    --clr-border: rgba(255, 255, 255, 0.08);
    --clr-border-light: #E2E6EC;
    
    /* Fixed Colors (for sections that don't change theme) */
    --clr-white-fixed: #FFFFFF;
    --clr-navy-fixed: #0B1D3A;

    /* Text */
    --clr-text: #1E293B;
    --clr-text-mid: #64748B;
    --clr-text-light: #94A3B8;
    --clr-text-on-dark: #CBD5E1;
    --clr-heading: var(--clr-navy);

    /* Fonts */
    --ff-body: 'Inter', system-ui, -apple-system, sans-serif;
    --ff-heading: 'Outfit', 'Inter', sans-serif;

    /* Spacing */
    --sp-1: 0.25rem;
    --sp-2: 0.5rem;
    --sp-3: 0.75rem;
    --sp-4: 1rem;
    --sp-6: 1.5rem;
    --sp-8: 2rem;
    --sp-10: 2.5rem;
    --sp-12: 3rem;
    --sp-16: 4rem;
    --sp-20: 5rem;
    --sp-24: 6rem;

    /* Layout */
    --max-w: 1280px;
    --header-h: 72px;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    /* Transitions */
    --tr-fast: 0.2s ease;
    --tr-base: 0.3s ease;
    --tr-slow: 0.5s ease;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(11, 29, 58, 0.06);
    --shadow-md: 0 4px 12px rgba(11, 29, 58, 0.08);
    --shadow-lg: 0 8px 30px rgba(11, 29, 58, 0.12);
    --shadow-xl: 0 20px 60px rgba(11, 29, 58, 0.15);
    --shadow-glow: 0 0 20px rgba(232, 163, 23, 0.3);
}

/* --- Dark Mode Variables Overlay --- */
[data-theme="dark"] {
    --clr-navy: #0B1D3A; 
    --clr-navy-mid: #071226;
    --clr-navy-light: #050E1C;
    --clr-surface: #0f172a;
    --clr-surface-alt: #1e293b;
    --clr-white: #020617;
    --clr-text: #f1f5f9;
    --clr-text-mid: #94a3b8;
    --clr-text-light: #64748b;
    --clr-heading: #ffffff;
    --clr-border: rgba(255, 255, 255, 0.1);
    --clr-border-light: rgba(255, 255, 255, 0.05);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.6);

    /* Chart Colors */
    --clr-chart-text: #94a3b8;
    --clr-chart-grid: rgba(255, 255, 255, 0.08);
}

:root {
    --clr-chart-text: #64748b;
    --clr-chart-grid: rgba(0, 0, 0, 0.05);
}

/* --- Reset --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--ff-body);
    font-size: 1rem;
    color: var(--clr-text);
    background-color: var(--clr-white);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

::selection {
    background-color: var(--clr-accent);
    color: var(--clr-white);
}

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

ul,
ol {
    list-style: none;
}

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input,
select,
textarea {
    font-family: inherit;
    font-size: 1rem;
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--ff-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--clr-heading);
}

h1 {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
}

h4 {
    font-size: 1.125rem;
}

p {
    color: var(--clr-text-mid);
    line-height: 1.7;
}

.text-accent {
    color: var(--clr-accent);
}

.text-white {
    color: var(--clr-white);
}

.label-tag {
    display: inline-block;
    font-family: var(--ff-heading);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--clr-accent);
    margin-bottom: var(--sp-4);
}

.section-intro {
    max-width: 640px;
    margin: 0 auto var(--sp-12);
    text-align: center;
}

.section-intro h2 {
    margin-bottom: var(--sp-4);
}

/* --- Layout --- */
.container {
    width: 100%;
    max-width: var(--max-w);
    margin-inline: auto;
    padding-inline: var(--sp-6);
}

@media (min-width: 768px) {
    .container {
        padding-inline: var(--sp-8);
    }
}

.section {
    padding: var(--sp-20) 0;
}

.bg-navy {
    background-color: var(--clr-navy);
    color: var(--clr-white);
}

.bg-navy h1,
.bg-navy h2,
.bg-navy h3,
.bg-navy h4 {
    color: var(--clr-white);
}

.bg-navy p {
    color: var(--clr-text-on-dark);
}

.bg-surface {
    background-color: var(--clr-surface);
}

/* --- Brand Logo --- */
.logo {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    flex-shrink: 0;
    text-decoration: none;
}

.logo-icon {
    font-size: 1.75rem;
    color: var(--clr-accent);
}

.logo-text {
    font-family: var(--ff-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--clr-white-fixed);
    letter-spacing: 1px;
    text-transform: uppercase;
}

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

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-sm);
    font-family: var(--ff-heading);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all var(--tr-base);
    cursor: pointer;
    border: 2px solid transparent;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--clr-accent);
    color: var(--clr-navy);
    border-color: var(--clr-accent);
}

.btn-primary:hover {
    background-color: var(--clr-accent-hover);
    border-color: var(--clr-accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-outline {
    background: transparent;
    color: var(--clr-accent);
    border-color: var(--clr-accent);
}

.btn-outline:hover {
    background-color: var(--clr-accent);
    color: var(--clr-navy);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-outline-light {
    background: transparent;
    color: var(--clr-white-fixed);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-outline-light:hover {
    background-color: var(--clr-white-fixed);
    color: var(--clr-navy-fixed);
    border-color: var(--clr-white-fixed);
}

.btn-outline-dark {
    background: transparent;
    color: var(--clr-heading);
    border-color: var(--clr-heading);
}

.btn-outline-dark:hover {
    background-color: var(--clr-heading);
    color: var(--clr-surface);
}

/* --- Cards --- */
.card {
    background: var(--clr-white);
    padding: var(--sp-8);
    border-radius: var(--radius-md);
    border: 1px solid var(--clr-border-light);
    box-shadow: var(--shadow-sm);
    transition: all var(--tr-base);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(232, 163, 23, 0.2);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: rgba(232, 163, 23, 0.1);
    color: var(--clr-accent);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: var(--sp-6);
}

.btn-pill {
    border-radius: var(--radius-full);
    padding: 0.6rem 1.5rem;
    font-size: 0.85rem;
}

/* --- Form Inputs --- */
.form-group {
    margin-bottom: var(--sp-6);
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--clr-text); /* Changed from --clr-navy to be theme-aware */
    margin-bottom: var(--sp-2);
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--clr-border-light);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    color: var(--clr-text);
    background: var(--clr-surface); /* Changed from --clr-white to stay light/dark appropriately */
    transition: border-color var(--tr-fast), box-shadow var(--tr-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--clr-accent);
    box-shadow: 0 0 0 3px rgba(232, 163, 23, 0.15);
}

.form-input-dark {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--clr-white);
}

.form-input-dark:focus {
    border-color: var(--clr-accent);
}

.form-input-dark::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* --- Utility --- */
.text-center {
    text-align: center;
}

.uppercase {
    text-transform: uppercase;
}

.tracking-wide {
    letter-spacing: 1px;
}

.tracking-widest {
    letter-spacing: 2px;
}

.font-bold {
    font-weight: 700;
}

.font-extrabold {
    font-weight: 800;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

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

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: var(--sp-2);
}

.gap-4 {
    gap: var(--sp-4);
}

.gap-6 {
    gap: var(--sp-6);
}

.gap-8 {
    gap: var(--sp-8);
}

.gap-12 {
    gap: var(--sp-12);
}

.grid {
    display: grid;
}

.flex-grow {
    flex-grow: 1;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .section {
        padding: var(--sp-16) 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding-inline: var(--sp-4);
    }

    .section {
        padding: var(--sp-12) 0;
    }
}

/* --- RTL Support --- */
[dir="rtl"] {
    direction: rtl;
}
/* Update header height CSS variable at responsive breakpoints */
@media (max-width: 768px) {
    :root {
        --header-h: 64px;
    }
}

@media (max-width: 360px) {
    :root {
        --header-h: 56px;
    }
}
