/* =====================================================
   EcoFreight - Global Stylesheet
   Design system: deep ocean navy + sky blue + eco green
   ===================================================== */

/* Tokens */
:root {
    /* Ocean blues */
    --primary-50: #f0f9ff;
    --primary-100: #e0f2fe;
    --primary-200: #bae6fd;
    --primary-300: #7dd3fc;
    --primary-400: #38bdf8;
    --primary-500: #0ea5e9;
    --primary-600: #0284c7;
    --primary-700: #0369a1;
    --primary-800: #075985;
    --primary-900: #0c4a6e;

    /* Deep navy */
    --navy-950: #050f1c;
    --navy-900: #07192b;
    --navy-800: #0b2439;
    --navy-700: #123049;
    --navy-600: #1a3f5d;

    /* Eco green */
    --green-300: #86efac;
    --green-400: #4ade80;
    --green-500: #22c55e;
    --green-600: #16a34a;

    /* Neutrals */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #0ea5e9;

    /* Type */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Outfit', 'Inter', sans-serif;

    /* Layout */
    --container-width: 1240px;
    --section-padding: 104px;

    /* Effects */
    --shadow-xs: 0 1px 2px rgba(8, 25, 43, 0.06);
    --shadow-sm: 0 2px 6px rgba(8, 25, 43, 0.07);
    --shadow-md: 0 8px 22px -8px rgba(8, 25, 43, 0.16);
    --shadow-lg: 0 18px 40px -12px rgba(8, 25, 43, 0.18);
    --shadow-xl: 0 32px 64px -24px rgba(8, 25, 43, 0.28);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-2xl: 28px;

    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --transition: all 0.25s ease;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.7;
    color: var(--gray-600);
    background: #fff;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

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

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

ul, ol { list-style: none; }

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

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

::selection {
    background: var(--primary-200);
    color: var(--navy-900);
}

:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: 3px;
    border-radius: 3px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    color: var(--navy-900);
    letter-spacing: -0.02em;
    text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.85rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.4rem); }
h4 { font-size: 1.0625rem; }

p { text-wrap: pretty; }

.section-label,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--primary-700);
    margin-bottom: 14px;
}

.section-label::before,
.eyebrow::before {
    content: '';
    width: 22px;
    height: 2px;
    background: var(--green-500);
    border-radius: 2px;
}

.eyebrow--light { color: rgba(255, 255, 255, 0.72); }

.section-title { margin-bottom: 16px; }
.section-desc {
    font-size: 1.0625rem;
    color: var(--gray-500);
    max-width: 620px;
    line-height: 1.8;
}

.text-gradient {
    background: linear-gradient(100deg, var(--primary-400), var(--green-400));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Layout */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

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

.section-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 64px;
}

.section-header .section-desc { margin: 0 auto; }

.section-header--left {
    text-align: left;
    margin: 0 0 48px;
}

.section-header--left .section-desc { margin: 0; }

.bg-soft { background: var(--gray-50); }

/* Skip link */
.skip-link {
    position: fixed;
    top: -60px;
    left: 24px;
    z-index: 3000;
    background: var(--navy-900);
    color: #fff;
    padding: 10px 18px;
    border-radius: 0 0 8px 8px;
    font-size: 0.875rem;
    font-weight: 600;
}
.skip-link:focus { top: 0; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 14px 26px;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.2;
    border-radius: var(--radius-md);
    transition: transform 0.25s var(--ease-out), box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
    border: 1.5px solid transparent;
    cursor: pointer;
    white-space: nowrap;
}

.btn i { font-size: 0.9em; transition: transform 0.25s var(--ease-out); }
.btn:hover i.fa-arrow-right { transform: translateX(3px); }

.btn-primary {
    background: var(--primary-600);
    color: #fff;
    box-shadow: 0 8px 20px -8px rgba(2, 132, 199, 0.6);
}
.btn-primary:hover {
    background: var(--primary-700);
    transform: translateY(-2px);
    box-shadow: 0 14px 28px -10px rgba(2, 132, 199, 0.65);
}

.btn-green {
    background: var(--green-500);
    color: #06281a;
    box-shadow: 0 8px 20px -8px rgba(34, 197, 94, 0.6);
}
.btn-green:hover {
    background: var(--green-400);
    transform: translateY(-2px);
}

.btn-white {
    background: #fff;
    color: var(--navy-900);
    box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.4);
}
.btn-white:hover {
    background: var(--primary-50);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
}
.btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.75);
    transform: translateY(-2px);
}

.btn-outline-dark {
    background: transparent;
    color: var(--navy-900);
    border-color: var(--gray-300);
}
.btn-outline-dark:hover {
    border-color: var(--primary-600);
    color: var(--primary-700);
    background: var(--primary-50);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    border-color: var(--gray-200);
}
.btn-secondary:hover { background: var(--gray-200); }

.btn-lg { padding: 17px 32px; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-sm { padding: 10px 18px; font-size: 0.8125rem; border-radius: var(--radius-md); }
.btn-block { width: 100%; }

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--primary-700);
}
.btn-link:hover { gap: 12px; color: var(--primary-600); }

/* Header */
.header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: background 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}

.header.fixed {
    position: fixed;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 12px 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 6px 24px -18px rgba(8, 25, 43, 0.35);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 11px;
    font-family: var(--font-display);
    font-size: 1.4375rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #fff;
    flex-shrink: 0;
}

.header.fixed .logo { color: var(--navy-900); }

.logo-mark {
    position: relative;
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 12px;
    background:
        radial-gradient(circle at 78% 22%, #4ade80 0 2.6px, rgba(74, 222, 128, 0.25) 3px 5.5px, transparent 6px),
        radial-gradient(120% 120% at 16% -12%, rgba(255, 255, 255, 0.38), transparent 55%),
        linear-gradient(150deg, #38bdf8 0%, #0284c7 52%, #0b3f5f 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        inset 0 -7px 14px rgba(2, 20, 38, 0.3),
        0 6px 16px -6px rgba(2, 132, 199, 0.55);
    overflow: hidden;
    transition: transform 0.35s var(--ease-out), box-shadow 0.35s ease;
}

.logo-mark::before {
    content: '';
    position: absolute;
    inset: 11px;
    border: 2px solid rgba(255, 255, 255, 0.95);
    border-radius: 50%;
}

.logo-mark::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 12px;
    margin: -6px 0 0 -16px;
    border: 2px solid rgba(255, 255, 255, 0.65);
    border-radius: 50%;
    transform: rotate(-26deg);
}

.logo:hover .logo-mark {
    transform: translateY(-1px) rotate(-5deg) scale(1.04);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        inset 0 -7px 14px rgba(2, 20, 38, 0.3),
        0 10px 24px -8px rgba(2, 132, 199, 0.75);
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.78);
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 3px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--primary-400), var(--green-400));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s var(--ease-out);
}

.nav-link:hover,
.nav-link.active { color: #fff; }
.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }

.header.fixed .nav-link { color: var(--gray-600); }
.header.fixed .nav-link:hover,
.header.fixed .nav-link.active { color: var(--primary-700); }

.nav-caret {
    font-size: 0.625rem;
    opacity: 0.65;
    transition: transform 0.25s ease;
}

.nav-item { position: relative; }
.nav-item:hover .nav-caret { transform: rotate(180deg); }

.nav-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    width: 322px;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.22s ease, transform 0.22s var(--ease-out), visibility 0.22s;
}

.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-link {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 10px;
    color: var(--gray-700);
}

.nav-dropdown-link:hover { background: var(--gray-50); }

.nav-dropdown-link strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--navy-900);
    line-height: 1.4;
}

.nav-dropdown-link small {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-500);
    line-height: 1.45;
}

.nav-dropdown-icon {
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: 9px;
    background: var(--primary-50);
    color: var(--primary-700);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.nav-dropdown-all { border-bottom: 1px solid var(--gray-100); border-radius: 10px 10px 0 0; margin-bottom: 4px; padding-bottom: 14px; }
.nav-dropdown-all .nav-dropdown-icon { background: var(--navy-900); color: var(--green-400); }

.nav-mobile-extra { display: none; }

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    height: 38px;
}

/* Google translate restyle */
.goog-te-gadget {
    font-family: var(--font-family) !important;
    font-size: 0 !important;
    color: transparent !important;
    white-space: nowrap !important;
}

.goog-te-gadget span { display: none !important; }

.goog-te-gadget .goog-te-combo {
    margin: 0 !important;
    padding: 8px 10px !important;
    font-family: var(--font-family) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--gray-600) !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    outline: none !important;
    line-height: normal !important;
    height: 36px !important;
    max-width: 132px;
}

.header.fixed .goog-te-gadget .goog-te-combo {
    color: var(--gray-600) !important;
    background: #fff !important;
    border-color: var(--gray-200) !important;
}

.goog-te-banner-frame { display: none !important; visibility: hidden !important; }
body { top: 0 !important; }
.skiptranslate > iframe { display: none !important; }

.mobile-toggle {
    display: none;
    width: 40px;
    height: 40px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1002;
}

.mobile-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.3s var(--ease-out), opacity 0.2s ease;
}

.header.fixed .mobile-toggle { border-color: var(--gray-200); }
.header.fixed .mobile-toggle span { background: var(--navy-900); }

.mobile-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Utility classes */
.muted { color: var(--gray-500); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }

/* Reveal on scroll (JS adds .is-visible) */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s ease, transform 0.7s var(--ease-out);
    transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Responsive shell */
@media (max-width: 1120px) {
    .header-quote { display: none; }
    .lang-switch { display: none; }
}

@media (max-width: 1024px) {
    :root { --section-padding: 84px; }

    .mobile-toggle { display: flex; }

    .nav {
        position: fixed;
        inset: 0;
        z-index: 1001;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 2px;
        padding: 104px 24px 40px;
        background: var(--navy-900);
        overflow-y: auto;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity 0.3s ease, transform 0.3s var(--ease-out), visibility 0.3s;
    }

    .nav.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-link {
        font-size: 1.0625rem;
        padding: 14px 4px;
        color: rgba(255, 255, 255, 0.85);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 0;
        justify-content: space-between;
    }

    .nav-link::after { display: none; }
    .header.fixed .nav-link { color: rgba(255, 255, 255, 0.85); }
    .header.fixed .nav-link:hover,
    .header.fixed .nav-link.active,
    .nav-link:hover, .nav-link.active { color: #fff; }

    .has-dropdown .nav-dropdown {
        position: static;
        width: 100%;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0 0 8px;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
    }

    .has-dropdown.open .nav-dropdown { display: block; }
    .has-dropdown.open .nav-caret { transform: rotate(180deg); }

    .nav-dropdown-link { padding: 10px 10px; }
    .nav-dropdown-link strong { color: rgba(255, 255, 255, 0.9); }
    .nav-dropdown-link small { color: rgba(255, 255, 255, 0.5); }
    .nav-dropdown-link:hover { background: rgba(255, 255, 255, 0.06); }
    .nav-dropdown-icon { background: rgba(255, 255, 255, 0.08); color: var(--green-400); }
    .nav-dropdown-all { border-bottom-color: rgba(255, 255, 255, 0.08); }

    .nav-mobile-extra {
        display: flex;
        flex-direction: column;
        gap: 18px;
        margin-top: 26px;
    }

    .nav-mobile-contact {
        display: flex;
        flex-direction: column;
        gap: 8px;
        font-size: 0.875rem;
        color: rgba(255, 255, 255, 0.6);
    }

    .nav-mobile-contact a { display: inline-flex; align-items: center; gap: 9px; }
    .nav-mobile-contact i { color: var(--green-400); width: 16px; }

    .mobile-toggle.active span { background: #fff; }
}

@media (max-width: 480px) {
    :root { --section-padding: 64px; }
    .container { padding: 0 18px; }
    .btn-lg { padding: 15px 24px; font-size: 0.9375rem; }
    .logo { font-size: 1.25rem; gap: 9px; }
    .logo-mark { width: 36px; height: 36px; }
    .logo-mark::before { inset: 10px; }
    .logo-mark::after { width: 29px; height: 11px; margin: -5.5px 0 0 -14.5px; }
}
