/* =============================================================
   LYB Cargo — base styles
   Palette: bone paper, deep green, cargo rust, ink
   ============================================================= */

:root {
    --paper: #f4f0e8;
    --paper-2: #ece6d9;
    --paper-3: #e2dacb;
    --ink: #101c1e;
    --ink-2: #1b2a2c;
    --green: #0f4d3f;
    --green-deep: #0a3a2f;
    --orange: #de4f26;
    --orange-dark: #c0401b;
    --muted: #596562;
    --muted-dark: #a8b2ae;
    --line: rgba(16, 28, 30, 0.16);
    --line-strong: rgba(16, 28, 30, 0.34);
    --line-dark: rgba(239, 234, 223, 0.16);
    --paper-on-dark: #efeade;
    --error: #a92f1f;

    --display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
    --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
    --arabic: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
    --serif: "Instrument Serif", Georgia, "Times New Roman", serif;

    --container: 1320px;
    --gutter: clamp(20px, 4vw, 56px);
    --section-y: clamp(70px, 8.5vw, 126px);
    --header-h: 78px;
}

/* ---------- Reset ---------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    background-color: var(--paper);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

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

img {
    height: auto;
}

h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd {
    margin: 0;
}

ul, ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

::selection {
    background: var(--orange);
    color: var(--paper);
}

:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 3px;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.skip-link {
    position: fixed;
    top: 12px;
    inset-inline-start: 12px;
    z-index: 200;
    padding: 10px 16px;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--mono);
    font-size: 12px;
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: none;
}

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

/* ---------- Type ---------- */

.display {
    font-family: var(--display);
    font-weight: 600;
    line-height: 0.9;
    letter-spacing: -0.01em;
    text-transform: uppercase;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.14em;
    line-height: 1.4;
    text-transform: uppercase;
    color: var(--muted);
}

.eyebrow::before {
    content: "";
    width: 24px;
    height: 1px;
    flex: 0 0 auto;
    background: var(--orange);
}

.section {
    padding-block: var(--section-y);
}

.section--tight {
    padding-block: clamp(56px, 6vw, 88px);
}

.section-head {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: clamp(28px, 6vw, 88px);
    align-items: end;
    margin-bottom: clamp(40px, 5vw, 64px);
}

.section-title {
    margin-top: 18px;
    font-family: var(--display);
    font-size: clamp(46px, 5.4vw, 80px);
    font-weight: 600;
    line-height: 0.9;
    letter-spacing: -0.012em;
    text-transform: uppercase;
}

.section-lead {
    max-width: 48ch;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.7;
}

.on-dark {
    background: var(--ink);
    color: var(--paper-on-dark);
}

.on-dark .eyebrow {
    color: var(--muted-dark);
}

.on-dark .section-lead {
    color: rgba(239, 234, 223, 0.68);
}

.mono-label {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

/* ---------- Buttons & links ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 50px;
    padding: 13px 24px;
    border: 1px solid transparent;
    border-radius: 2px;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    line-height: 1.2;
    text-transform: uppercase;
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.btn .icon {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    transition: transform 0.25s ease;
}

.btn:hover .icon {
    transform: translateX(3px);
}

.btn-primary {
    background: var(--orange);
    border-color: var(--orange);
    color: var(--ink);
}

.btn-primary:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
}

.btn-ink {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
}

.btn-ink:hover {
    background: var(--green);
    border-color: var(--green);
}

.btn-ghost {
    border-color: var(--line-strong);
    color: var(--ink);
}

.btn-ghost:hover {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--paper);
}

.btn-on-dark {
    border-color: rgba(239, 234, 223, 0.4);
    color: var(--paper-on-dark);
}

.btn-on-dark:hover {
    background: var(--paper-on-dark);
    border-color: var(--paper-on-dark);
    color: var(--ink);
}

.btn-sm {
    min-height: 40px;
    padding: 10px 18px;
    font-size: 10px;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--line-strong);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.link-arrow .icon {
    width: 15px;
    height: 15px;
    transition: transform 0.25s ease;
}

.link-arrow:hover {
    border-color: var(--orange);
    color: var(--orange-dark);
}

.link-arrow:hover .icon {
    transform: translateX(3px);
}

.status-dot {
    width: 6px;
    height: 6px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--orange);
    box-shadow: 0 0 0 3px rgba(222, 79, 38, 0.16);
}

/* ---------- Top bar ---------- */

.topbar {
    position: relative;
    z-index: 101;
    border-bottom: 1px solid var(--line-dark);
    background: var(--ink);
    color: var(--paper-on-dark);
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 36px;
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.topbar-network {
    display: flex;
    align-items: center;
    gap: 9px;
    color: rgba(239, 234, 223, 0.72);
}

.topbar-tools {
    display: flex;
    align-items: center;
    gap: 22px;
}

.topbar-link {
    color: rgba(239, 234, 223, 0.72);
    transition: color 0.2s ease;
}

.topbar-link:hover {
    color: var(--paper-on-dark);
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 7px;
    color: rgba(239, 234, 223, 0.42);
}

.lang-switch a {
    color: rgba(239, 234, 223, 0.68);
    transition: color 0.2s ease;
}

.lang-switch a:hover,
.lang-switch a.is-active {
    color: var(--paper-on-dark);
}

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-stuck {
    background: rgba(244, 240, 232, 0.96);
    box-shadow: 0 12px 36px rgba(16, 28, 30, 0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    min-height: var(--header-h);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.brand-mark {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-name {
    font-family: var(--display);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 0.9;
    text-transform: uppercase;
}

.brand-name span {
    color: var(--green);
}

.brand-sub {
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: 0.2em;
    line-height: 1.2;
    text-transform: uppercase;
    color: var(--muted);
}

.primary-nav {
    display: flex;
    align-items: center;
    gap: clamp(18px, 2.6vw, 38px);
    margin-inline-start: auto;
}

.nav-link {
    position: relative;
    padding-block: 8px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--ink);
}

.nav-link::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 1px;
    height: 1px;
    background: var(--orange);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

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

.header-tools {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    background: transparent;
}

.menu-toggle .icon {
    width: 20px;
    height: 20px;
}

.menu-close-icon {
    display: none;
}

.menu-toggle.is-open .menu-open-icon {
    display: none;
}

.menu-toggle.is-open .menu-close-icon {
    display: block;
}

/* ---------- Mobile menu ---------- */

.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 90;
    padding-top: calc(36px + var(--header-h));
    overflow-y: auto;
    background: var(--paper);
}

.mobile-menu[hidden] {
    display: none;
}

.mobile-menu-inner {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: calc(100dvh - 36px - var(--header-h));
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding: 28px var(--gutter) 40px;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--line);
}

.mobile-nav-link {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding-block: 16px;
    border-bottom: 1px solid var(--line);
    font-family: var(--display);
    font-size: clamp(34px, 8vw, 54px);
    font-weight: 600;
    line-height: 1;
    text-transform: uppercase;
}

.mobile-nav-link.is-active {
    color: var(--green);
}

.mobile-nav-index {
    min-width: 24px;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.1em;
    color: var(--orange);
}

.mobile-menu-foot {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 40px;
}

.mobile-menu-foot .btn {
    align-self: flex-start;
}

.mobile-contact {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 14px;
}

.mobile-contact a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.mobile-contact .icon {
    width: 17px;
    height: 17px;
    color: var(--green);
}

.mobile-lang {
    display: flex;
    gap: 16px;
    font-family: var(--mono);
    font-size: 11px;
    text-transform: uppercase;
}

.mobile-lang a {
    color: var(--muted);
}

.mobile-lang a.is-active {
    color: var(--orange);
}

body.menu-open {
    overflow: hidden;
}

/* ---------- Hero ---------- */

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
    border-bottom: 1px solid var(--line);
}

.hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-block: clamp(52px, 6vw, 86px);
    padding-inline-start: max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter)));
    padding-inline-end: clamp(32px, 5vw, 76px);
}

.hero-title {
    margin-top: 26px;
    font-family: var(--display);
    font-size: clamp(74px, 8.4vw, 132px);
    font-weight: 600;
    line-height: 0.8;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.hero-title span {
    display: block;
}

.hero-title .line-2 {
    color: transparent;
    -webkit-text-stroke: 1.5px var(--ink);
}

.hero-title .line-3 {
    color: var(--orange);
}

.hero-lead {
    max-width: 52ch;
    margin-top: 30px;
    color: var(--muted);
    font-size: 16.5px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.hero-footnote {
    max-width: 56ch;
    margin-top: 38px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.07em;
    line-height: 1.7;
    text-transform: uppercase;
    color: var(--muted);
}

.hero-media {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    background: var(--green-deep);
}

.hero-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.72) contrast(1.04);
}

.hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(10, 58, 47, 0.12) 0%, rgba(16, 28, 30, 0.1) 55%, rgba(16, 28, 30, 0.62) 100%),
        linear-gradient(90deg, rgba(10, 58, 47, 0.16), transparent 45%);
}

.hero-caption {
    position: absolute;
    z-index: 2;
    inset-inline-start: 26px;
    bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(239, 234, 223, 0.82);
}

.hero-caption::before {
    content: "";
    width: 22px;
    height: 1px;
    background: var(--orange);
}

.hero-stamp {
    position: absolute;
    z-index: 2;
    top: 24px;
    inset-inline-end: 24px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 11px 14px;
    border: 1px solid rgba(239, 234, 223, 0.4);
    background: rgba(16, 28, 30, 0.34);
    backdrop-filter: blur(6px);
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(239, 234, 223, 0.8);
}

.hero-stamp strong {
    font-weight: 500;
    color: var(--paper-on-dark);
}

.hero-copy > * {
    animation: rise 0.8s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.hero-copy > :nth-child(2) { animation-delay: 0.08s; }
.hero-copy > :nth-child(3) { animation-delay: 0.14s; }
.hero-copy > :nth-child(4) { animation-delay: 0.2s; }
.hero-copy > :nth-child(5) { animation-delay: 0.26s; }

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* ---------- Stats ---------- */

.stats {
    border-bottom: 1px solid var(--line);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat {
    padding: 26px 0;
    padding-inline: clamp(18px, 3vw, 42px);
    border-inline-start: 1px solid var(--line);
}

.stat:first-child {
    border-inline-start: 0;
    padding-inline-start: 0;
}

.stat-value {
    font-family: var(--display);
    font-size: clamp(38px, 4vw, 54px);
    font-weight: 600;
    line-height: 0.9;
    letter-spacing: -0.01em;
}

.stat-label {
    margin-top: 8px;
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.1em;
    line-height: 1.5;
    text-transform: uppercase;
    color: var(--muted);
}

/* ---------- Services grid ---------- */

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    border-inline-start: 1px solid var(--line);
}

.service-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 300px;
    padding: 28px clamp(20px, 2.4vw, 32px) 30px;
    border-inline-end: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    transition: background-color 0.3s ease;
}

.service-card::before {
    content: "";
    position: absolute;
    top: -1px;
    inset-inline-start: 0;
    width: 0;
    height: 2px;
    background: var(--orange);
    transition: width 0.35s ease;
}

.service-card:hover {
    background: rgba(236, 230, 217, 0.55);
}

.service-card:hover::before {
    width: 100%;
}

.service-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: 42px;
    border: 1px solid var(--line-strong);
    color: var(--green);
}

.service-icon .icon {
    width: 22px;
    height: 22px;
}

.service-title {
    font-family: var(--display);
    font-size: clamp(25px, 2.2vw, 31px);
    font-weight: 600;
    line-height: 1;
    text-transform: uppercase;
}

.service-text {
    margin-top: 12px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.service-tags {
    margin-top: auto;
    padding-top: 20px;
    font-family: var(--mono);
    font-size: 8.5px;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: var(--green);
}

/* ---------- Route board ---------- */

.board-section {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 88% 0%, rgba(15, 77, 63, 0.55), transparent 42%),
        var(--ink);
    color: var(--paper-on-dark);
}

.board-section::before {
    content: "LYB / TRADE LANES";
    position: absolute;
    top: 26px;
    inset-inline-end: -36px;
    transform: rotate(90deg);
    transform-origin: center;
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.28em;
    color: rgba(239, 234, 223, 0.16);
}

.board-section .section-head {
    margin-bottom: 34px;
}

.board-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-block: 12px;
    border-top: 1px solid var(--line-dark);
    border-bottom: 1px solid var(--line-dark);
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(239, 234, 223, 0.55);
}

.board-live {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--paper-on-dark);
}

.board-clock {
    color: var(--orange);
}

.board-head,
.board-row {
    display: grid;
    grid-template-columns: minmax(0, 2.15fr) 0.65fr 0.85fr 0.85fr;
    gap: clamp(12px, 2vw, 28px);
    align-items: center;
}

.board-head {
    padding-block: 12px;
    border-bottom: 1px solid var(--line-dark);
    font-family: var(--mono);
    font-size: 8.5px;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: rgba(239, 234, 223, 0.45);
}

.board-row {
    padding-block: 17px;
    border-bottom: 1px solid var(--line-dark);
    transition: background-color 0.25s ease;
}

.board-row:hover {
    background: rgba(239, 234, 223, 0.035);
}

.board-lane {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.board-point {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.board-code {
    font-family: var(--mono);
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.board-city {
    overflow: hidden;
    font-size: 10px;
    line-height: 1.3;
    color: rgba(239, 234, 223, 0.5);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-arrow {
    flex: 0 0 auto;
    color: var(--orange);
}

.board-arrow .icon {
    width: 18px;
    height: 18px;
}

.board-mode {
    justify-self: start;
    padding: 4px 8px;
    border: 1px solid var(--line-dark);
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.1em;
    line-height: 1.2;
    text-transform: uppercase;
    color: rgba(239, 234, 223, 0.8);
}

.board-transit {
    font-family: var(--display);
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.board-cutoff {
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.02em;
    color: rgba(239, 234, 223, 0.78);
}

.board-mobile-label {
    display: none;
}

.board-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
    margin-top: 26px;
}

.board-note {
    max-width: 62ch;
    padding-inline-start: 14px;
    border-inline-start: 2px solid var(--orange);
    font-size: 12px;
    line-height: 1.6;
    color: rgba(239, 234, 223, 0.55);
}

/* ---------- Reveal ---------- */

.will-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.will-reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* ---------- Keyframes ---------- */

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}
