/* ColisBF public site. Hand-written CSS, no framework: Section 18 asks for fast page loads, and a
   brochure site of this size does not justify shipping a utility framework over the wire.
   Palette matches the Android app's own brand (OnboardingHero's navy -> green gradient) so the
   site and the app read as one product. */

:root {
    --navy: #0f172a;
    --navy-soft: #1a2b4a;
    --green: #15803d;
    --green-bright: #22c55e;
    --ink: #111827;
    --body: #374151;
    --muted: #6b7280;
    --line: #e5e7eb;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --radius: 14px;
    --wrap: 1120px;
    --shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 8px 24px rgba(15, 23, 42, .06);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--body);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); letter-spacing: -.01em; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1rem; }
a { color: var(--green); }

/* ---------- header ---------- */
header.site {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
header.site .wrap { display: flex; align-items: center; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); text-decoration: none; font-size: 1.15rem; }
.brand .mark {
    width: 30px; height: 30px; border-radius: 8px; flex: none;
    background: linear-gradient(140deg, var(--navy), var(--green));
}
nav.main { margin-left: auto; display: flex; align-items: center; gap: 4px; }
nav.main a {
    color: var(--body); text-decoration: none; font-size: .94rem;
    padding: 8px 11px; border-radius: 8px; white-space: nowrap;
}
nav.main a:hover { background: var(--bg-alt); color: var(--ink); }
.lang { display: flex; gap: 2px; margin-left: 6px; font-size: .85rem; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.lang a { padding: 6px 9px; text-decoration: none; color: var(--muted); }
.lang a[aria-current="true"] { background: var(--navy); color: #fff; }

/* Nav collapses to a native <details> disclosure on small screens -- no JS, so it works even if
   the script fails to load. */
.menu-toggle { display: none; }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 22px; border-radius: 10px; font-weight: 600; font-size: 1rem;
    text-decoration: none; border: 1px solid transparent; cursor: pointer;
    transition: transform .06s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 4px 14px rgba(21, 128, 61, .3); }
.btn-primary:hover { background: #166534; }
.btn-ghost { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn-ghost:hover { background: rgba(255, 255, 255, .18); }
.btn-outline { background: #fff; color: var(--navy); border-color: #cbd5e1; }
.btn-outline:hover { border-color: var(--navy); }
.btn-sm { padding: 9px 15px; font-size: .9rem; }

/* ---------- hero ---------- */
.hero {
    background: linear-gradient(150deg, var(--navy) 0%, #14324a 55%, var(--green) 140%);
    color: #fff; padding: clamp(56px, 9vw, 104px) 0;
}
.hero h1 { color: #fff; max-width: 15ch; }
.hero .lede { font-size: clamp(1.05rem, 2vw, 1.25rem); color: rgba(255, 255, 255, .84); max-width: 54ch; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-note { margin-top: 20px; font-size: .88rem; color: rgba(255, 255, 255, .62); }

/* Route illustration: pure CSS/SVG, no image request. */
.route { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); border-radius: 18px; padding: 26px; }
.route-line { display: flex; align-items: center; gap: 12px; }
.route-node { text-align: center; flex: none; }
.route-flag { font-size: 1.9rem; line-height: 1; }
.route-name { font-size: .8rem; color: rgba(255, 255, 255, .8); margin-top: 6px; font-weight: 600; }
.route-track { flex: 1; height: 2px; background: linear-gradient(90deg, rgba(255,255,255,.25), var(--green-bright)); position: relative; border-radius: 2px; }
.route-track::after {
    content: "✈"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -55%);
    font-size: 1.1rem; background: var(--navy); padding: 0 8px; color: var(--green-bright);
}
.route-steps { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 9px; }
.route-steps li { display: flex; align-items: center; gap: 10px; font-size: .88rem; color: rgba(255, 255, 255, .82); }
.route-steps .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green-bright); flex: none; }
.route-steps code { background: rgba(255,255,255,.12); padding: 1px 7px; border-radius: 5px; font-size: .84rem; color: #fff; }

/* ---------- sections ---------- */
section { padding: clamp(52px, 8vw, 88px) 0; }
section.alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 62ch; margin-bottom: 44px; }
.section-head p { font-size: 1.05rem; color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: .09em; font-size: .78rem; font-weight: 700; color: var(--green); margin-bottom: 10px; }

/* ---------- steps ---------- */
.steps { display: grid; gap: 18px; counter-reset: step; }
.step {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 22px 24px; display: grid; grid-template-columns: 46px 1fr; gap: 18px; align-items: start;
}
.step-num {
    counter-increment: step; width: 46px; height: 46px; border-radius: 12px; flex: none;
    background: linear-gradient(140deg, var(--navy), var(--green));
    color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 1.05rem;
}
.step-num::before { content: counter(step); }
.step h3 { margin-bottom: 4px; }
.step p:last-child { margin-bottom: 0; }
.step .who { display: inline-block; font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; margin-bottom: 8px; }

/* ---------- cards ---------- */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card .ico { font-size: 1.6rem; line-height: 1; margin-bottom: 10px; display: block; }
.card h3 { margin-bottom: 4px; font-size: 1.02rem; }
.card p { font-size: .93rem; color: var(--muted); margin: 0; }

/* ---------- tracking ---------- */
.track-panel {
    background: linear-gradient(150deg, var(--navy), #16324b); color: #fff;
    border-radius: 20px; padding: clamp(26px, 4vw, 42px);
}
.track-panel h2 { color: #fff; }
.track-panel p { color: rgba(255, 255, 255, .78); }
.track-form { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.track-form input {
    flex: 1 1 260px; padding: 14px 16px; font-size: 1.05rem; border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .1); color: #fff;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em;
}
.track-form input::placeholder { color: rgba(255, 255, 255, .45); letter-spacing: normal; font-family: inherit; }
.track-form input:focus { outline: 2px solid var(--green-bright); outline-offset: 1px; }
.track-hint { font-size: .85rem; color: rgba(255, 255, 255, .6); margin-top: 12px; }

/* timeline on the results page */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 22px 30px; border-left: 2px solid var(--line); }
.timeline li:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline li::before {
    content: ""; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px;
    border-radius: 50%; background: #fff; border: 2px solid var(--line);
}
.timeline li.done::before { background: var(--green); border-color: var(--green); }
.timeline li.current::before { background: var(--green-bright); border-color: var(--green-bright); box-shadow: 0 0 0 4px rgba(34, 197, 94, .22); }
.timeline li.done { border-left-color: var(--green); }
.timeline .t-label { font-weight: 600; color: var(--ink); }
.timeline li.pending .t-label { color: var(--muted); font-weight: 500; }
.timeline .t-time { font-size: .85rem; color: var(--muted); }

.result-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.result-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 20px; }
.pkg-no { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.5rem; font-weight: 700; color: var(--ink); letter-spacing: .04em; }
.chip { display: inline-block; border-radius: 999px; padding: 4px 13px; font-size: .84rem; font-weight: 600; background: #ecfdf5; color: #166534; }
.meta-row { display: flex; gap: 8px; font-size: .92rem; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.meta-row:last-child { border-bottom: 0; }
.meta-row dt { color: var(--muted); min-width: 170px; margin: 0; }
.meta-row dd { margin: 0; color: var(--ink); font-weight: 500; }

.notice { border-radius: 12px; padding: 16px 18px; font-size: .95rem; }
.notice-err { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.notice-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.notice-warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }

/* ---------- consolidation diagram ---------- */
.box-tree {
    background: var(--navy); color: #e2e8f0; border-radius: var(--radius); padding: 22px 24px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92rem;
    overflow-x: auto; line-height: 1.85; margin: 0;
}
.box-tree .b { color: var(--green-bright); font-weight: 700; }
.box-tree .p { color: #fff; }

/* ---------- faq ---------- */
.faq details { border: 1px solid var(--line); border-radius: 12px; padding: 0; margin-bottom: 10px; background: #fff; }
.faq summary { cursor: pointer; padding: 16px 20px; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.35rem; color: var(--green); font-weight: 400; line-height: 1; flex: none; }
.faq details[open] summary::after { content: "\2013"; }
.faq .answer { padding: 0 20px 18px; color: var(--body); font-size: .96rem; }
.faq .answer p:last-child { margin-bottom: 0; }

/* ---------- app / download ---------- */
.store-badges { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.badge-soon {
    display: inline-flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px;
    padding: 9px 18px; background: #fff; color: var(--muted); font-size: .8rem; line-height: 1.35;
}
.badge-soon strong { color: var(--ink); font-size: .96rem; font-weight: 600; }

/* ---------- footer ---------- */
footer.site { background: var(--navy); color: rgba(255, 255, 255, .7); padding: 48px 0 32px; font-size: .92rem; }
footer.site a { color: rgba(255, 255, 255, .85); text-decoration: none; }
footer.site a:hover { color: #fff; text-decoration: underline; }
footer.site h4 { color: #fff; font-size: .95rem; margin: 0 0 12px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 36px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot-bottom { border-top: 1px solid rgba(255, 255, 255, .13); margin-top: 34px; padding-top: 20px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: .85rem; color: rgba(255, 255, 255, .5); }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; z-index: 100; background: #fff; padding: 10px 16px; border-radius: 8px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; gap: 34px; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .foot-grid { grid-template-columns: 1fr 1fr; }
}

/* Nav collapses well before the phone breakpoint: the full bar is seven links plus a button and
   the language switcher, which needs roughly 1000px. At 768px (iPad portrait) the uncollapsed nav
   was wider than the viewport and pushed the whole page into horizontal overflow -- measured, not
   guessed. Kept separate from the 720px block below so phone-only layout rules don't have to
   change with the nav breakpoint. */
@media (max-width: 1024px) {
    /* Native <details> disclosure: the nav list drops below the bar instead of overflowing it.
       No JS, so it still works if the script fails to load. */
    .menu-toggle { display: block; margin-left: auto; }
    .menu-toggle summary {
        list-style: none; cursor: pointer; padding: 8px 12px; border: 1px solid var(--line);
        border-radius: 8px; font-size: .9rem; font-weight: 600; color: var(--ink);
    }
    .menu-toggle summary::-webkit-details-marker { display: none; }
    nav.main {
        /* top:100% rather than a hard-coded offset -- header.site is sticky (a positioned
           ancestor), and its height differs between the tablet and phone breakpoints. */
        display: none; position: absolute; top: 100%; left: 0; right: 0;
        background: #fff; border-bottom: 1px solid var(--line); flex-direction: column;
        align-items: stretch; padding: 10px 16px 16px; gap: 2px; margin: 0;
        box-shadow: var(--shadow);
    }
    .menu-toggle[open] ~ nav.main { display: flex; }
    nav.main a { padding: 11px 10px; }
    .lang { margin: 8px 0 0; align-self: flex-start; }
}

@media (max-width: 720px) {
    header.site .wrap { height: 60px; }

    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .step { grid-template-columns: 38px 1fr; gap: 14px; padding: 18px; }
    .step-num { width: 38px; height: 38px; font-size: .95rem; }
    .foot-grid { grid-template-columns: 1fr; gap: 26px; }
    .meta-row { flex-direction: column; gap: 2px; }
    .meta-row dt { min-width: 0; }
    .hero-cta .btn { flex: 1 1 100%; }
    .route-steps code { font-size: .78rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}
