/* ==========================================================================
   ShipOra — freight rate comparison demo
   Design language: monochrome ink on white, one accent, 1px rules, generous
   whitespace. Reference points: MSC (calm corporate carrier), Booking.com
   (segmented search bar, card results with the price isolated on the right).
   ========================================================================== */

:root {
  --ink:        #0A0D12;
  --ink-2:      #2B3440;
  --muted:      #6B7684;
  --muted-2:    #98A1AD;
  --line:       #E3E7EC;
  --line-soft:  #EFF2F5;
  --surface:    #F7F8FA;
  --surface-2:  #FBFCFD;
  --white:      #FFFFFF;
  /* Brand colour, chosen 2026-09-15. Signal orange is the real colour language
     of ports: hi-vis, container paint, crane steel. It is warm against footage
     that is uniformly cool grey, and it is deliberately NOT the indigo/cyan
     every generated site reaches for.
     --accent is a FILL. Text on it is --ink, not white: white on this orange is
     only 3.1:1, ink is 6.8:1, and black-on-orange is the authentic signage look
     anyway. --accent-ink is the text-safe variant for light backgrounds. */
  --accent:     #FF5A1F;
  --accent-ink: #C0390A;
  --accent-soft:#FFEDE6;
  --good:       #0E6E4F;
  --good-soft:  #E7F3EE;
  --warn:       #9A6206;
  --warn-soft:  #FDF5E6;

  --r-sm: 9px;
  --r:    12px;
  --r-lg: 16px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(10,13,18,.06), 0 1px 1px rgba(10,13,18,.04);
  --shadow:    0 4px 16px rgba(10,13,18,.07), 0 1px 3px rgba(10,13,18,.05);
  --shadow-lg: 0 12px 40px rgba(10,13,18,.11), 0 2px 8px rgba(10,13,18,.05);

  --wrap: 1200px;
  --header-h: 68px;
}

* { box-sizing: border-box; }

/* `.field` sets display:flex, which beats the browser's default
   [hidden]{display:none} — so the weight, container and volume fields all
   rendered at once no matter which mode was selected. Any explicit display
   rule does this, so keep the override global and !important. */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--ink); margin: 0; font-weight: 700; letter-spacing: -0.018em; }
h1 { font-size: 44px; line-height: 1.1; }
h2 { font-size: 28px; line-height: 1.2; }
h3 { font-size: 18px; line-height: 1.3; }
p  { margin: 0 0 12px; }
a  { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ---------- demo ribbon ------------------------------------------------- */
.demo-bar {
  background: var(--ink);
  color: #C9D2DD;
  font-size: 12.5px;
  letter-spacing: .01em;
  text-align: center;
  padding: 7px 24px;
}
.demo-bar b { color: #fff; font-weight: 600; }

/* ---------- header ------------------------------------------------------ */
.hdr {
  position: sticky; top: 0; z-index: 50;
  transition: box-shadow .25s ease, background .25s ease;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
/* Three columns, not flex: the two 1fr rails are equal whatever the brand and
   the button group weigh, so the nav sits on the true centre of the page. */
.hdr-in {
  height: var(--header-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  max-width: var(--wrap); margin: 0 auto; padding: 0 24px;
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; flex: none; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 26px; height: 26px; flex: none; display: block; }
.brand-name {
  font-size: 18.5px; font-weight: 700; color: var(--ink);
  letter-spacing: -.028em;
}
.nav { display: flex; gap: 30px; justify-self: center; }
.nav a {
  color: var(--ink-2); font-size: 14.5px; font-weight: 500; text-decoration: none;
  padding: 6px 0; white-space: nowrap; position: relative;
  transition: color .18s ease;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--ink); transform: scaleX(0); transform-origin: center;
  transition: transform .26s cubic-bezier(.2,.7,.3,1);
}
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav a:hover::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav a[aria-current="page"]::after { transform: scaleX(1); }
.hdr-right { justify-self: end; display: flex; align-items: center; gap: 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: 14.5px; font-weight: 600;
  padding: 10px 18px; border-radius: var(--r-pill);
  border: 1px solid transparent; cursor: pointer;
  text-decoration: none; white-space: nowrap;
  transition: background .14s ease, border-color .14s ease, color .14s ease;
}
.btn:hover { text-decoration: none; }
.btn-dark  { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #1B222D; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--muted-2); background: var(--surface); }
.btn-plain { background: transparent; color: var(--ink-2); padding: 10px 12px; }
.btn-plain:hover { color: var(--ink); background: var(--surface); }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { background: var(--accent-ink); }
.btn-lg { padding: 13px 28px; font-size: 15px; }
.btn-sm { padding: 7px 13px; font-size: 13.5px; }

.burger { display: none; }

/* ---------- hero -------------------------------------------------------- */
/* Glass is only visible when there is something behind it. On a near-white
   hero a translucent white panel reads as flat white, which is why the frost
   was invisible. These blooms and the lane art give it something to refract. */
.hero {
  position: relative;
  padding: 62px 0 0;
  background:
    radial-gradient(760px 460px at 72% -12%, rgba(255,90,31,.18) 0%, rgba(255,90,31,0) 68%),
    radial-gradient(620px 420px at 12% 110%, rgba(255,90,31,.12) 0%, rgba(255,90,31,0) 66%),
    radial-gradient(520px 340px at 92% 78%, rgba(184,134,11,.10) 0%, rgba(184,134,11,0) 70%),
    linear-gradient(180deg, #F4F7FA 0%, #FBFCFD 62%, #FFFFFF 100%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero-art {
  position: absolute; inset: 0; pointer-events: none;
  opacity: 1;
}
.hero-in { position: relative; }
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 14px;
}
.hero h1 { max-width: 15ch; }
.hero-sub {
  font-size: 18px; color: var(--muted); max-width: 56ch; margin: 16px 0 34px;
  line-height: 1.5;
}

/* ---------- search widget ---------------------------------------------- */
.search {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
}
.search-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.search-tab {
  appearance: none; background: none; border: 0; font: inherit;
  padding: 15px 22px; font-size: 14.5px; font-weight: 600; color: var(--muted);
  cursor: pointer; position: relative; border-bottom: 2px solid transparent;
  display: flex; align-items: center; gap: 9px;
  transition: color .14s ease;
}
.search-tab svg { width: 18px; height: 18px; flex: none; }
.search-tab:hover { color: var(--ink-2); }
.search-tab[aria-selected="true"] {
  color: var(--ink); background: var(--white);
  border-bottom-color: var(--accent);
}
/* One template for every mode. There used to be a `.search-body.mode-container`
   rule repeating these same columns; because it carried an extra class it beat
   both responsive breakpoints, so on a phone the fields collapsed to 30px and
   the submit button ran 464px wide inside a 390px screen. Do not reintroduce a
   higher-specificity duplicate here. */
.search-body { padding: 6px; display: grid; gap: 6px; grid-template-columns: 1fr 1fr 1fr 200px 150px; align-items: stretch; }
.field {
  border: 1px solid transparent; border-radius: var(--r);
  padding: 11px 14px; background: var(--surface-2);
  display: flex; flex-direction: column; justify-content: center; min-width: 0;
  transition: border-color .14s ease, background .14s ease;
  position: relative;
}
.field:focus-within { border-color: var(--accent); background: var(--white); box-shadow: 0 0 0 3px var(--accent-soft); }
.field label {
  font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted-2); margin-bottom: 3px;
}
.field input, .field select {
  appearance: none; border: 0; background: none; font: inherit;
  font-size: 15px; font-weight: 500; color: var(--ink); padding: 0; width: 100%;
  min-width: 0;
}
.field input:focus, .field select:focus { outline: none; }
.field input::placeholder { color: var(--muted-2); font-weight: 400; }
.field select { cursor: pointer; }
/* Reserved, always-present second line. The container mode uses a <select>
   with no descriptive sub-line while parcel and pallet have one, so without
   this the widget grew and shrank as you moved between tabs. Height is fixed
   rather than content-driven for exactly that reason. */
.field-sub { font-size: 12.5px; color: var(--muted); margin-top: 1px; min-height: 18px; }
.field > .field-sub:empty::before { content: "\00a0"; }
.field { min-height: 74px; }
.search-submit { display: flex; align-items: center; justify-content: stretch; padding: 0 6px 0 2px; }
.search-submit .btn { width: 100%; height: 46px; font-size: 14.5px; padding: 0 20px; }

.cargo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }

.search-foot {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 12px 18px 14px; border-top: 1px solid var(--line-soft);
  font-size: 13.5px; color: var(--muted);
}
.search-foot label { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.search-foot input { accent-color: var(--accent); width: 15px; height: 15px; }

/* ---------- trust strip ------------------------------------------------- */
.carriers {
  padding: 26px 0 46px;
}
.carriers-label {
  font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted-2); margin-bottom: 14px;
}
.carriers-row { display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: center; }
.carrier-chip {
  font-size: 14.5px; font-weight: 600; color: var(--muted); letter-spacing: -.01em;
}

/* ---------- sections ---------------------------------------------------- */
.sec { padding: 74px 0; }
.sec-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-head { max-width: 640px; margin-bottom: 40px; }
.sec-head p { color: var(--muted); font-size: 16.5px; margin: 12px 0 0; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 26px;
}
.card-icon {
  width: 38px; height: 38px; border-radius: var(--r); background: var(--ink);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.card-icon svg { width: 19px; height: 19px; stroke: #fff; }
.card h3 { margin-bottom: 7px; }
.card p { color: var(--muted); margin: 0; font-size: 14.5px; }

.step-n {
  font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--accent);
  margin-bottom: 10px;
}

/* ---------- results page ------------------------------------------------ */
.res-bar {
  background: var(--ink); color: #fff; padding: 16px 0;
}
.res-bar-in { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.res-route { display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 600; }
.res-route svg { width: 17px; height: 17px; stroke: #7E8B9B; flex: none; }
.res-meta { color: #97A3B2; font-size: 13.5px; display: flex; gap: 16px; flex-wrap: wrap; }
.res-bar .btn-ghost { color: #fff; border-color: #333D4B; margin-left: auto; }
.res-bar .btn-ghost:hover { background: #1B222D; border-color: #47525F; }

.res-layout { display: grid; grid-template-columns: 252px 1fr; gap: 32px; padding: 30px 0 70px; align-items: start; }

.filters { position: sticky; top: calc(var(--header-h) + 18px); }
.filter-grp { border-bottom: 1px solid var(--line); padding: 0 0 18px; margin-bottom: 18px; }
.filter-grp:last-child { border-bottom: 0; }
.filter-grp h4 { font-size: 13.5px; margin-bottom: 11px; letter-spacing: 0; }
.filter-row {
  display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--ink-2);
  padding: 4px 0; cursor: pointer;
}
.filter-row input { accent-color: var(--accent); width: 15px; height: 15px; flex: none; }
.filter-row .n { margin-left: auto; color: var(--muted-2); font-size: 13px; }

.sortbar {
  display: flex; align-items: center; gap: 2px; border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden; background: var(--white); margin-bottom: 18px;
}
.sortbar button {
  appearance: none; background: none; border: 0; font: inherit; cursor: pointer;
  padding: 13px 20px; font-size: 14.5px; font-weight: 600; color: var(--muted);
  flex: 1; text-align: center; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 2px; align-items: center;
}
.sortbar button:last-child { border-right: 0; }
.sortbar button span { font-size: 12.5px; font-weight: 400; color: var(--muted-2); }
.sortbar button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.sortbar button[aria-pressed="true"] span { color: #A8B3C0; }

.res-count { font-size: 14px; color: var(--muted); margin-bottom: 14px; }

.offer {
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--white);
  margin-bottom: 14px; overflow: hidden; transition: box-shadow .16s ease, border-color .16s ease;
}
.offer:hover { box-shadow: var(--shadow); border-color: #D2D9E1; }
.offer-main { display: grid; grid-template-columns: 1fr 210px; }
.offer-body { padding: 20px 22px; min-width: 0; }
.offer-top { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 3px; }
.offer-carrier { font-size: 17px; font-weight: 700; color: var(--ink); letter-spacing: -.015em; }
.offer-service { font-size: 13.5px; color: var(--muted); }
.badge {
  font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 3px;
}
.badge-good { background: var(--good-soft); color: var(--good); }
.badge-accent { background: var(--accent-soft); color: var(--accent-ink); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }

.leg {
  display: flex; align-items: center; gap: 14px; margin: 16px 0 14px;
}
.leg-pt { min-width: 0; }
.leg-time { font-size: 17px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.leg-place { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leg-mid { flex: 1; text-align: center; min-width: 90px; }
.leg-days { font-size: 12.5px; color: var(--muted); margin-bottom: 3px; }
.leg-line { position: relative; height: 1px; background: var(--line); }
.leg-line::before, .leg-line::after {
  content: ""; position: absolute; top: 50%; width: 5px; height: 5px; border-radius: 50%;
  background: var(--muted-2); transform: translateY(-50%);
}
.leg-line::before { left: 0; }
.leg-line::after  { right: 0; }
.leg-stop {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 7px; height: 7px; border-radius: 50%; background: var(--white);
  border: 1.5px solid var(--muted-2);
}
.leg-mode { font-size: 12px; color: var(--muted-2); margin-top: 4px; }

.offer-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  font-size: 12.5px; color: var(--ink-2); background: var(--surface);
  border: 1px solid var(--line-soft); border-radius: 20px; padding: 3px 11px;
}

.offer-side {
  border-left: 1px solid var(--line); background: var(--surface-2);
  padding: 20px 22px; display: flex; flex-direction: column; justify-content: center;
  align-items: flex-end; text-align: right; gap: 3px;
}
.offer-price { font-size: 27px; font-weight: 700; color: var(--ink); letter-spacing: -.03em; line-height: 1.1; }
.offer-unit { font-size: 12.5px; color: var(--muted); }
.offer-side .btn { width: 100%; margin-top: 12px; }
.offer-note { font-size: 12px; color: var(--muted-2); margin-top: 8px; }

.offer-more {
  border-top: 1px solid var(--line-soft); background: var(--surface-2);
  padding: 0 22px;
}
.offer-more summary {
  list-style: none; cursor: pointer; padding: 11px 0; font-size: 13.5px;
  font-weight: 600; color: var(--accent); display: flex; align-items: center; gap: 7px;
}
.offer-more summary::-webkit-details-marker { display: none; }
.offer-more summary svg { width: 14px; height: 14px; transition: transform .16s ease; }
.offer-more[open] summary svg { transform: rotate(180deg); }
.offer-more-in { padding: 4px 0 20px; display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.detail h5 { font-size: 12px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted-2); margin: 0 0 7px; font-weight: 700; }
.detail ul { margin: 0; padding-left: 16px; font-size: 13.5px; color: var(--ink-2); }
.detail li { margin-bottom: 3px; }

.empty {
  border: 1px dashed var(--line); border-radius: var(--r-lg); padding: 46px 24px;
  text-align: center; color: var(--muted);
}

/* ---------- tracking ---------------------------------------------------- */
.track-hero { background: var(--ink); color: #fff; padding: 56px 0 62px; }
.track-hero h1 { color: #fff; font-size: 36px; }
.track-hero p { color: #9AA6B4; font-size: 16.5px; max-width: 54ch; margin-top: 12px; }
.track-form { display: flex; gap: 8px; margin-top: 28px; max-width: 620px; }
.track-form input {
  flex: 1; font: inherit; font-size: 16px; padding: 14px 16px; border-radius: var(--r);
  border: 1px solid #333D4B; background: #151B24; color: #fff;
}
.track-form input::placeholder { color: #6B7684; }
.track-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,90,31,.35); }
.track-eg { margin-top: 14px; font-size: 13.5px; color: #7E8B9B; }
.track-eg button {
  appearance: none; background: none; border: 0; font: inherit; font-size: 13.5px;
  color: #9FC3E6; cursor: pointer; text-decoration: underline; padding: 0 2px;
}

.track-result { padding: 40px 0 80px; }
.track-card { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.track-card-head {
  padding: 22px 26px; border-bottom: 1px solid var(--line); background: var(--surface-2);
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.track-num { font-size: 21px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.track-sum { display: grid; grid-template-columns: repeat(4,1fr); gap: 0; border-bottom: 1px solid var(--line); }
.track-sum > div { padding: 18px 26px; border-right: 1px solid var(--line); }
.track-sum > div:last-child { border-right: 0; }
.track-sum dt { font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 4px; }
.track-sum dd { margin: 0; font-size: 15.5px; font-weight: 600; color: var(--ink); }

.timeline { padding: 30px 26px 34px; }
.tl-step { display: grid; grid-template-columns: 26px 1fr; gap: 18px; }
.tl-rail { position: relative; display: flex; justify-content: center; }
.tl-dot {
  width: 13px; height: 13px; border-radius: 50%; background: var(--white);
  border: 2px solid var(--line); margin-top: 5px; z-index: 1; flex: none;
}
.tl-line { position: absolute; top: 5px; bottom: -8px; width: 2px; background: var(--line); }
.tl-step:last-child .tl-line { display: none; }
.tl-step.done .tl-dot { background: var(--good); border-color: var(--good); }
.tl-step.done .tl-line { background: var(--good); }
.tl-step.now .tl-dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.tl-body { padding-bottom: 26px; }
.tl-title { font-size: 15.5px; font-weight: 600; color: var(--ink); }
.tl-step.pending .tl-title { color: var(--muted-2); font-weight: 500; }
.tl-when { font-size: 13.5px; color: var(--muted); margin-top: 1px; }

/* ---------- schedules --------------------------------------------------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th {
  text-align: left; font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted-2); font-weight: 700; padding: 0 16px 10px 0; border-bottom: 1px solid var(--ink);
}
.tbl td { padding: 15px 16px 15px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:hover td { background: var(--surface-2); }
.tbl .strong { font-weight: 600; color: var(--ink); }

/* ---------- account ----------------------------------------------------- */
.auth-split { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - var(--header-h) - 34px); }
.auth-left { padding: 70px 56px; display: flex; flex-direction: column; justify-content: center; }
.auth-right {
  background: var(--ink); color: #fff; padding: 70px 56px;
  display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden;
}
.auth-right h2 { color: #fff; font-size: 26px; max-width: 20ch; }
.auth-right p { color: #9AA6B4; margin-top: 14px; max-width: 42ch; }
.auth-form { max-width: 380px; width: 100%; }
.inp { margin-bottom: 15px; }
.inp label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.inp input {
  width: 100%; font: inherit; font-size: 15px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--white); color: var(--ink);
}
.inp input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.auth-stat { display: flex; gap: 34px; margin-top: 34px; }
.auth-stat b { display: block; font-size: 26px; color: #fff; letter-spacing: -.02em; }
.auth-stat span { font-size: 13.5px; color: #7E8B9B; }

/* ---------- footer ------------------------------------------------------ */
.ftr { background: var(--ink); color: #8D99A8; padding: 56px 0 34px; font-size: 14px; }
.ftr-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 34px; padding-bottom: 34px; border-bottom: 1px solid #232B36; }
.ftr h4 { color: #fff; font-size: 13px; letter-spacing: .07em; text-transform: uppercase; margin-bottom: 14px; }
.ftr a { color: #8D99A8; display: block; padding: 4px 0; }
.ftr a:hover { color: #fff; text-decoration: none; }
.ftr-brand .brand-name { color: #fff; }
.ftr-brand p { margin-top: 14px; max-width: 34ch; color: #77838F; }
.ftr-btm { padding-top: 22px; display: flex; gap: 18px; flex-wrap: wrap; color: #6B7684; font-size: 13px; }
.ftr-btm span { margin-left: auto; }

/* ---------- notice ------------------------------------------------------ */
.notice {
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  background: var(--surface-2); border-radius: var(--r);
  padding: 15px 18px; font-size: 14px; color: var(--ink-2); margin: 22px 0;
}
.notice b { color: var(--ink); }

/* ---------- responsive -------------------------------------------------- */
@media (max-width: 1080px) {
  .search-body { grid-template-columns: 1fr 1fr; }
  .search-body .search-submit { grid-column: 1 / -1; }
  .res-layout { grid-template-columns: 1fr; }
  .filters { position: static; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; }
  .offer-more-in { grid-template-columns: 1fr 1fr; }
  .ftr-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  h1 { font-size: 34px; }
  h2 { font-size: 24px; }
  .nav { display: none; }
  .burger {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border: 1px solid var(--line); border-radius: var(--r-sm);
    background: none; cursor: pointer; margin-left: auto;
  }
  .burger svg { width: 20px; height: 20px; stroke: var(--ink); }
  /* The 32px desktop gap plus 24px side padding pushed the burger 2px past the
     right edge once the header carried a wider CTA ("New search"), which made
     the whole page scroll sideways by 2px. Tighten both on small screens. */
  .hdr-in { grid-template-columns: auto 1fr; gap: 14px; padding: 0 16px; }
  .hdr-right { grid-column: 2; gap: 6px; }
  .hdr-right .btn-plain { display: none; }
  .nav.open {
    display: flex; flex-direction: column; position: absolute; top: var(--header-h); left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 10px 24px 18px; gap: 0; margin: 0;
    box-shadow: var(--shadow);
  }
  .nav.open a { padding: 12px 0; border-bottom: 1px solid var(--line-soft); border-left: 0; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .sec { padding: 52px 0; }
  .hero { padding-top: 44px; }
  .offer-main { grid-template-columns: 1fr; }
  .offer-side {
    border-left: 0; border-top: 1px solid var(--line);
    flex-direction: row; align-items: center; justify-content: space-between; text-align: left;
    flex-wrap: wrap;
  }
  .offer-side .btn { width: auto; margin-top: 0; }
  .track-sum { grid-template-columns: 1fr 1fr; }
  .track-sum > div:nth-child(2) { border-right: 0; }
  .track-sum > div:nth-child(1), .track-sum > div:nth-child(2) { border-bottom: 1px solid var(--line); }
  .auth-split { grid-template-columns: 1fr; }
  .auth-left, .auth-right { padding: 48px 24px; }
  .offer-more-in { grid-template-columns: 1fr; gap: 16px; }
  .sortbar button { padding: 11px 8px; font-size: 13.5px; }
  .tbl { display: block; overflow-x: auto; white-space: nowrap; }
}

@media (max-width: 560px) {
  .hdr-in { gap: 10px; }
  .hdr-right .btn { padding: 9px 13px; font-size: 13.5px; }
  .search-body { grid-template-columns: 1fr; }
  .cargo-grid { grid-template-columns: 1fr 1fr; }
  .search-tabs { overflow-x: auto; }
  .search-tab { padding: 13px 15px; font-size: 13.5px; white-space: nowrap; }
  .ftr-grid { grid-template-columns: 1fr; }
  .res-bar-in { gap: 12px; }
  .res-bar .btn-ghost { margin-left: 0; }
}

/* ==========================================================================
   Motion
   FAIL-OPEN BY DESIGN. Nothing is hidden by CSS alone. The opacity:0 start
   state lives behind `html.js-anim`, a class only JS adds, and app.js also
   force-reveals everything after 2.2s and on any error. A previous project
   shipped a fail-closed reveal and whole sections stayed invisible on a fast
   scroll; do not reintroduce that here.
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {

  /* ---- scroll reveal ---- */
  .js-anim .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .62s cubic-bezier(.22,.7,.28,1), transform .62s cubic-bezier(.22,.7,.28,1);
    will-change: opacity, transform;
  }
  .js-anim .reveal.in { opacity: 1; transform: none; }

  /* stagger children of a revealed group */
  .js-anim .reveal-group > * {
    opacity: 0; transform: translateY(18px);
    transition: opacity .58s cubic-bezier(.22,.7,.28,1), transform .58s cubic-bezier(.22,.7,.28,1);
  }
  .js-anim .reveal-group.in > * { opacity: 1; transform: none; }
  .js-anim .reveal-group.in > *:nth-child(1) { transition-delay: .04s; }
  .js-anim .reveal-group.in > *:nth-child(2) { transition-delay: .12s; }
  .js-anim .reveal-group.in > *:nth-child(3) { transition-delay: .20s; }
  .js-anim .reveal-group.in > *:nth-child(4) { transition-delay: .28s; }

  /* ---- hero entrance, runs on load, not on scroll ---- */
  .js-anim .hero .eyebrow,
  .js-anim .hero h1,
  .js-anim .hero .hero-sub,
  .js-anim .hero .search,
  .js-anim .hero .carriers {
    opacity: 0; transform: translateY(20px);
    animation: rise .78s cubic-bezier(.22,.7,.28,1) forwards;
  }
  .js-anim .hero .eyebrow   { animation-delay: .05s; }
  .js-anim .hero h1         { animation-delay: .13s; }
  .js-anim .hero .hero-sub  { animation-delay: .21s; }
  .js-anim .hero .search    { animation-delay: .30s; }
  .js-anim .hero .carriers  { animation-delay: .42s; }

  @keyframes rise { to { opacity: 1; transform: none; } }

  /* ---- the hero lanes actually flow ---- */
  .hero-art .lane-path {
    stroke-dasharray: 3 14;
    animation: flow 7s linear infinite;
  }
  .hero-art .lane-path:nth-child(2) { animation-duration: 9s; }
  .hero-art .lane-path:nth-child(3) { animation-duration: 11s; }
  @keyframes flow { to { stroke-dashoffset: -68; } }

  .hero-art .port { animation: pulse 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
  .hero-art .port:nth-child(2) { animation-delay: .7s; }
  .hero-art .port:nth-child(3) { animation-delay: 1.4s; }
  .hero-art .port:nth-child(4) { animation-delay: 2.1s; }
  @keyframes pulse { 0%,100% { opacity: .30; transform: scale(1); } 50% { opacity: .70; transform: scale(1.35); } }

  /* ships running the lanes. offset-rotate follows the path so a hull banks
     into the curve instead of sliding along sideways. */
  /* One mode per lane. Speeds are ordered the way the modes actually are:
     air fastest, then sea, then road on the short domestic lane. */
  .hero-art .runner { offset-rotate: auto; }
  .hero-art .runner-air  { animation: run 19s linear infinite; }
  .hero-art .runner-sea  { animation: run 34s linear infinite; animation-delay: -9s; }
  .hero-art .runner-road { animation: run 26s linear infinite; animation-delay: -17s; }
  @keyframes run { from { offset-distance: -4%; } to { offset-distance: 104%; } }

  /* ---- results stagger in as they render ---- */
  .js-anim .offer { animation: cardin .5s cubic-bezier(.22,.7,.28,1) backwards; }
  @keyframes cardin { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

  /* ---- tracking timeline draws itself ---- */
  .js-anim .tl-step { animation: stepin .48s cubic-bezier(.22,.7,.28,1) backwards; }
  @keyframes stepin { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
  .js-anim .tl-step.now .tl-dot { animation: dotpulse 2.1s ease-in-out infinite; }
  @keyframes dotpulse {
    0%,100% { box-shadow: 0 0 0 4px var(--accent-soft); }
    50%     { box-shadow: 0 0 0 9px rgba(255,90,31,.10); }
  }

  /* ---- schedule rows ---- */
  .js-anim .tbl tbody tr { animation: cardin .42s cubic-bezier(.22,.7,.28,1) backwards; }
}

/* ---- hover motion: safe to keep even with reduced motion off, it is opt-in ---- */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .card { transition: transform .28s cubic-bezier(.22,.7,.28,1), box-shadow .28s ease, border-color .28s ease; }
  .card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #D2D9E1; }
  .offer { transition: transform .22s cubic-bezier(.22,.7,.28,1), box-shadow .22s ease, border-color .22s ease; }
  .offer:hover { transform: translateY(-2px); }
  .btn { transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease; }
  .btn:active { transform: translateY(1px); }
  .carrier-chip { transition: color .2s ease; }
  .carrier-chip:hover { color: var(--ink); }
  .lane-card { transition: transform .26s cubic-bezier(.22,.7,.28,1), box-shadow .26s ease, border-color .26s ease; }
  .lane-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #D2D9E1; }
}

/* Header lifts off the page once you scroll. */
.hdr.scrolled { box-shadow: 0 1px 14px rgba(10,13,18,.09); background: rgba(255,255,255,.97); }

/* Search tab indicator slides instead of jumping. */
.search-tabs { position: relative; }
.tab-ink {
  position: absolute; bottom: 0; height: 2px; background: var(--accent);
  transition: transform .3s cubic-bezier(.22,.7,.28,1), width .3s cubic-bezier(.22,.7,.28,1);
  pointer-events: none; left: 0; width: 0;
}
.search-tab[aria-selected="true"] { border-bottom-color: transparent; }

/* ==========================================================================
   Rates page: lane cards + rate index
   ========================================================================== */
.lane-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lane-card {
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px;
  background: var(--white); display: block; text-decoration: none; color: inherit;
}
.lane-card:hover { text-decoration: none; }
.lane-route { display: flex; align-items: center; gap: 9px; font-weight: 700; color: var(--ink); font-size: 15.5px; }
.lane-route svg { width: 15px; height: 15px; stroke: var(--muted-2); flex: none; }
.lane-meta { font-size: 13px; color: var(--muted); margin-top: 3px; }
.lane-foot { display: flex; align-items: baseline; gap: 8px; margin-top: 16px; }
.lane-price { font-size: 22px; font-weight: 700; color: var(--ink); letter-spacing: -.025em; }
.lane-unit { font-size: 12.5px; color: var(--muted); }
.lane-days { margin-left: auto; font-size: 13px; color: var(--ink-2); font-weight: 600; }

.trend { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; }
.trend-up { color: #9A2020; }
.trend-down { color: var(--good); }
.trend svg { width: 12px; height: 12px; }

/* ==========================================================================
   How it works page
   ========================================================================== */
.flow { counter-reset: fstep; }
.flow-step {
  display: grid; grid-template-columns: 54px 1fr; gap: 24px;
  padding-bottom: 34px; position: relative;
}
.flow-rail { position: relative; display: flex; justify-content: center; }
.flow-num {
  counter-increment: fstep; width: 44px; height: 44px; border-radius: 50%;
  background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; flex: none; z-index: 1;
}
.flow-num::before { content: counter(fstep, decimal-leading-zero); }
.flow-line { position: absolute; top: 44px; bottom: -34px; width: 2px; background: var(--line); }
.flow-step:last-child .flow-line { display: none; }
.flow-body h3 { margin-bottom: 6px; }
.flow-body p { color: var(--muted); margin: 0; max-width: 62ch; }
.flow-note {
  margin-top: 12px; font-size: 13.5px; color: var(--ink-2);
  background: var(--surface); border-left: 2px solid var(--accent);
  padding: 10px 14px; border-radius: 0 var(--r-sm) var(--r-sm) 0; max-width: 62ch;
}

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 0; font-size: 16px; font-weight: 600;
  color: var(--ink); display: flex; align-items: center; gap: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 16px; height: 16px; margin-left: auto; flex: none; transition: transform .24s ease; stroke: var(--muted); }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq-body { padding: 0 0 20px; color: var(--muted); max-width: 74ch; }
.faq-body p:last-child { margin-bottom: 0; }

@media (max-width: 1080px) { .lane-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px)  {
  .lane-grid { grid-template-columns: 1fr; }
  .flow-step { grid-template-columns: 38px 1fr; gap: 16px; }
  .flow-num { width: 34px; height: 34px; font-size: 13px; }
  .flow-line { top: 34px; }
}

/* ==========================================================================
   Liquid glass
   Frosted translucent surfaces over the hero wash and the dark panels.
   backdrop-filter is progressive: where it is unsupported the rule below
   still leaves an opaque surface, so nothing turns unreadable.
   ========================================================================== */
.glass {
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(255,255,255,.72);
  box-shadow:
    0 1px 0 rgba(255,255,255,.85) inset,
    0 12px 40px rgba(10,13,18,.10),
    0 2px 8px rgba(10,13,18,.05);
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .glass {
    background: rgba(255,255,255,.45);
    -webkit-backdrop-filter: blur(24px) saturate(190%) brightness(1.05);
    backdrop-filter: blur(24px) saturate(190%) brightness(1.05);
    box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 14px 44px rgba(10,13,18,.12);
  }
}

.glass-dark {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 1px 0 rgba(255,255,255,.10) inset, 0 10px 40px rgba(0,0,0,.28);
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .glass-dark {
    background: rgba(255,255,255,.05);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
  }
}

/* the search widget is the hero element, so it carries the strongest glass */
.search { background: rgba(255,255,255,.70); border-color: rgba(255,255,255,.85); position: relative; }
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .search {
    background: rgba(255,255,255,.42);
    border-color: transparent;
    -webkit-backdrop-filter: blur(30px) saturate(200%) brightness(1.06);
    backdrop-filter: blur(30px) saturate(200%) brightness(1.06);
    box-shadow:
      0 1px 0 rgba(255,255,255,.95) inset,
      0 -1px 0 rgba(255,255,255,.35) inset,
      0 22px 60px rgba(10,13,18,.16),
      0 4px 12px rgba(10,13,18,.06);
  }
  /* Lit edge: a 1px gradient ring that is bright at the top-left and fades
     round the shape, which is what sells the material as glass rather than
     as a grey panel. */
  .search::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit;
    padding: 1px; pointer-events: none; z-index: 2;
    background: linear-gradient(145deg,
      rgba(255,255,255,.95) 0%,
      rgba(255,255,255,.35) 26%,
      rgba(255,255,255,.05) 50%,
      rgba(255,255,255,.35) 76%,
      rgba(255,255,255,.85) 100%);
    /* ORDER MATTERS. The `mask` shorthand resets mask-composite to `add`, so
       declaring composite BEFORE the shorthand silently disables it and the
       gradient paints across the whole panel instead of just the 1px ring —
       which washes out every control inside it. Composite goes last. */
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
  }
}
.search-tabs { background: rgba(255,255,255,.28); }
.search-tab[aria-selected="true"] { background: rgba(255,255,255,.52); }
.field { background: rgba(255,255,255,.30); border-color: rgba(255,255,255,.30); }
.field:focus-within { background: rgba(255,255,255,.72); border-color: var(--accent); }
.search-foot { border-top-color: rgba(227,231,236,.7); }

/* frosted chips */
.tag, .badge {
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

/* lane and result cards get a light frost so they sit in the same family */
.lane-card, .offer, .card { background: rgba(255,255,255,.78); }
@supports (backdrop-filter: blur(1px)) {
  .lane-card, .offer, .card {
    background: rgba(255,255,255,.66);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
  }
}
.offer-side { background: rgba(251,252,253,.6); }
.sortbar { background: rgba(255,255,255,.7); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }

/* ==========================================================================
   Page entry
   Driven by CSS keyframes with `forwards`, not by a JS class toggle, so a
   frame can never be left stuck at opacity 0. Still gated on `html.js-anim`,
   so with JS off nothing is hidden at all.
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .js-anim .page-enter > * {
    opacity: 0;
    animation: pageIn .66s cubic-bezier(.22,.7,.28,1) forwards;
  }
  .js-anim .page-enter > *:nth-child(1) { animation-delay: .04s; }
  .js-anim .page-enter > *:nth-child(2) { animation-delay: .12s; }
  .js-anim .page-enter > *:nth-child(3) { animation-delay: .20s; }
  .js-anim .page-enter > *:nth-child(4) { animation-delay: .28s; }
  .js-anim .page-enter > *:nth-child(5) { animation-delay: .36s; }
  .js-anim .page-enter > *:nth-child(6) { animation-delay: .44s; }
  @keyframes pageIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: none; }
  }
  /* A <datalist> is display:none, so its animation never runs and it sits at
     opacity 0 forever. Harmless on screen, but it trips any audit that counts
     hidden children, so exempt elements that render nothing. */
  .js-anim .page-enter > datalist,
  .js-anim .page-enter > script,
  .js-anim .page-enter > template { animation: none; opacity: 1; }

  /* the dark band on results and tracking slides down as the page arrives */
  .js-anim .res-bar, .js-anim .track-hero { animation: bandIn .55s cubic-bezier(.22,.7,.28,1) backwards; }
  @keyframes bandIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

  /* filter rail and the lane grid arrive after the band */
  .js-anim .filters { animation: pageIn .6s cubic-bezier(.22,.7,.28,1) .10s backwards; }
  .js-anim .lane-card { animation: pageIn .55s cubic-bezier(.22,.7,.28,1) backwards; }
}

/* ==========================================================================
   Auth: dark panel LEFT, form RIGHT
   ========================================================================== */
/* The demo bar used to sit above the header, hence the old -34px fudge.
   With it gone the panel just fills the viewport below the header. */
.auth-split { grid-template-columns: 1.05fr 1fr; min-height: calc(100vh - var(--header-h)); }
.auth-visual {
  background: var(--ink); color: #fff; padding: 84px 64px;
  display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
}
.auth-visual h2 { color: #fff; font-size: 30px; max-width: 18ch; letter-spacing: -.022em; }
.auth-visual p { color: #9AA6B4; margin-top: 16px; max-width: 40ch; font-size: 16px; }
.auth-form-side { padding: 84px 64px; display: flex; flex-direction: column; justify-content: center; }
.auth-quote {
  margin-top: 34px; padding: 20px 22px; border-radius: var(--r-lg);
  font-size: 15px; color: #C9D2DD; line-height: 1.55;
}
.auth-quote cite { display: block; margin-top: 10px; font-style: normal; font-size: 13.5px; color: #7E8B9B; }

@media (max-width: 860px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-visual { padding: 52px 24px; order: 2; }
  .auth-form-side { padding: 44px 24px; order: 1; }
}
