/* =====================================================================
   LINTAS — air-freight.html only. Shared components live in site.css;
   this file holds page-unique pieces: the departures map + board, the
   chargeable-weight balance, weight breaks, ULD drawings, rate meters.
   Motion: transform / opacity / stroke-dashoffset only.
   ===================================================================== */

/* ── Hero: framed departures map + board ─────────────────────────────── */
.af-hero .phero-grid { align-items: center; }
.af-fig { position: relative; display: grid; gap: 12px; padding: 14px 16px 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.af-fig::before, .af-fig::after { content: ""; position: absolute; width: 14px; height: 14px; border: 0 solid var(--steel); opacity: .55; pointer-events: none; }
.af-fig::before { left: 7px; top: 7px; border-left-width: 1.5px; border-top-width: 1.5px; }
.af-fig::after { right: 7px; bottom: 7px; border-right-width: 1.5px; border-bottom-width: 1.5px; }
.af-fig-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 16px; padding: 0 4px; }
.af-map { margin: 0 -6px; }
.af-map svg { border-radius: 4px; }
.rmap.af-map .rmap-node text { font-size: 13px; stroke: var(--card); stroke-width: 4px; }
.rmap.af-map .rmap-node .rmap-sub { font-size: 10.5px; }
.rmap.af-map .rmap-node.is-hub .rmap-ring { stroke-width: 1.2; }
.rmap.af-map .af-edge circle { stroke-width: 1.6; }
.rmap.af-map .rmap-glabel { font-size: 10px; }
.af-planes .af-plane { fill: var(--ink); }

.af-board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; padding: 6px 4px 0; border-top: 1px dashed var(--line-2); }
.af-board li { display: grid; grid-template-columns: 8px 34px minmax(0, 1fr) auto; align-items: center; gap: 9px; min-height: 30px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.af-board li:nth-last-child(-n+2) { border-bottom: 0; }
.af-board i { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); transition: background-color .25s ease, box-shadow .25s ease; }
.af-board b { font: 600 12.5px/1 var(--mono); letter-spacing: .04em; }
.af-city { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.af-meta { font: 500 11.5px/1 var(--mono); color: var(--steel); white-space: nowrap; }
/* air-freight.js arms the board: each row lights as its aircraft takes off */
.af-board.is-armed li { transition: opacity .3s var(--ease-out); }
.af-board.is-armed li:not(.is-on) { opacity: .4; }
.af-board.is-armed li:not(.is-on) i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-2); }
.af-board.is-armed li.is-on i { animation: af-ping .5s var(--ease-out); }
@keyframes af-ping { from { scale: 1.9; } }

@media (max-width: 991.98px) { .af-hero .phero-grid { align-items: end; } }
@media (max-width: 767.98px) {
  .af-fig { padding: 12px 12px 8px; }
  .af-map { margin: 0 -4px; }
  .af-map .rmap-dots circle { r: 1.15px; }
  .rmap.af-map .rmap-node text { font-size: 19px; stroke-width: 5px; }
  .rmap.af-map .rmap-node circle { stroke-width: 2.2; }
  .rmap.af-map .rmap-lane.is-air { stroke-width: 2.6; stroke-dasharray: 1 8; }
  .af-board { gap: 0 14px; }
  .af-board li { grid-template-columns: 8px 32px auto; gap: 7px; }
  .af-city { display: none; }
  .af-meta { justify-self: end; font-size: 11px; }
}
@media (max-width: 379.98px) { .af-meta { font-size: 10.5px; } }

/* ── Chargeable weight calculator ────────────────────────────────────── */
.af-presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 599.98px) { .af-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.af-pre { display: grid; gap: 3px; min-height: 48px; padding: 8px 12px; text-align: left; border: 1px dashed var(--line-2); border-radius: 4px; background: transparent; transition: border-color .15s ease, background-color .15s ease, scale .14s var(--ease-out); }
.af-pre b { font-size: 14px; font-weight: 600; line-height: 1.2; }
.af-pre span { font: 500 11.5px/1.2 var(--mono); color: var(--steel); }
.af-pre:active { scale: .97; }
.af-pre[aria-pressed="true"] { border-style: solid; border-color: var(--signal); background: var(--signal-soft); }
@media (hover: hover) and (pointer: fine) { .af-pre:hover { border-color: var(--ink); } }
.af-calc .note { background: var(--paper); }
.af-basis { margin-top: -8px; font-size: 14px; color: var(--on-navy-2); }
.af-basis b { font-weight: 600; color: var(--signal-hi); }

.af-scale svg { width: 100%; max-width: 380px; height: auto; margin: 0 auto; overflow: visible; }
.af-scale path, .af-scale circle { fill: none; stroke: var(--on-navy-2); stroke-width: 1.6; stroke-linecap: square; }
.af-scale .af-beam path { stroke: var(--on-navy); stroke-width: 2.6; }
.af-scale .af-beam circle { fill: var(--navy); stroke: var(--on-navy); }
.af-scale .af-dish { fill: var(--navy-3); transition: fill .25s ease, stroke .25s ease; }
.af-scale text { font: 600 9.5px var(--mono); letter-spacing: .12em; fill: var(--on-navy-2); transition: fill .25s ease; }
.af-scale .is-key .af-dish { fill: var(--signal); stroke: var(--signal-hi); }
.af-scale .is-key text { fill: var(--signal-hi); }
.af-beam { transform-box: view-box; transform-origin: 160px 46px; }
.calc-rows [data-side] dt, .calc-rows [data-side] dd { transition: color .25s ease; }
.calc-rows [data-side].is-key dt { color: var(--on-navy); }
.calc-rows [data-side].is-key dd { color: var(--signal-hi); }

.af-breaks { display: grid; gap: 10px; }
.af-breaks-k { display: flex; justify-content: space-between; gap: 12px; font: 500 11.5px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--on-navy-2); }
.af-breaks-k b { font-weight: 600; letter-spacing: .04em; color: var(--on-navy); }
.af-breaks ol { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.af-breaks li { display: grid; place-items: center; height: 30px; border: 1px solid var(--navy-line); border-radius: 3px; background: var(--navy-2); font: 500 11px/1 var(--mono); color: var(--on-navy-2); transition: background-color .2s ease, border-color .2s ease, color .2s ease; }
.af-breaks li.is-past { color: var(--on-navy); border-color: rgba(138, 166, 255, .3); }
.af-breaks li.is-on { background: var(--signal); border-color: var(--signal); color: #fff; }

/* ── Cut-off table foot ──────────────────────────────────────────────── */
.af-cut-foot { justify-content: space-between; margin-top: 24px; }
.af-tabs .tab-panel { padding-top: 26px; }

/* ── ULD guide: drawings draw once when the card is revealed ─────────── */
.af-uld h3 { margin-top: 2px; }
.af-draw { width: 100%; height: auto; margin: 4px 0 2px; overflow: visible; }
.af-draw .dr { fill: none; stroke: var(--on-navy); stroke-width: 1.6; stroke-linejoin: miter; }
.af-draw .dr-2 { stroke: var(--signal-hi); stroke-width: 1.3; }
.af-dim path { fill: none; stroke: var(--on-navy-2); stroke-width: 1; }
.af-dim text { font: 500 10.5px var(--mono); letter-spacing: .04em; fill: var(--on-navy-2); }
.js .af-uld .dr { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.1s var(--ease-io) calc(var(--d, 0s) + .15s); }
.js .af-uld .dr-2 { transition-duration: .9s; transition-delay: calc(var(--d, 0s) + .6s); }
.js .af-uld.is-in .dr { stroke-dashoffset: 0; }
.js .af-uld .af-dim { opacity: 0; transition: opacity .4s ease calc(var(--d, 0s) + 1.1s); }
.js .af-uld.is-in .af-dim { opacity: 1; }
.af-spec { display: grid; border-top: 1px dashed var(--navy-line); }
.af-spec div { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 8px 0; border-bottom: 1px dashed var(--navy-line); font-size: 13.5px; line-height: 1.4; }
.af-spec dt { flex: none; font: 500 11px/1.5 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--on-navy-2); }
.af-spec dd { text-align: right; color: var(--on-navy); }
.af-uld-note { margin-top: 20px; }
@media (max-width: 1099.98px) and (min-width: 600px) { .af-ulds { --cols: 2; } }

/* ── What affects your rate: photo + factor meters ───────────────────── */
.af-rate { align-items: start; }
.af-rate-fig { position: sticky; top: calc(var(--hdr) + 24px); display: grid; gap: 10px; transition: translate .34s var(--ease-out); }
.hdr-off .af-rate-fig { translate: 0 calc(var(--hdr) * -1); }
.af-rate-fig .photo { aspect-ratio: 1000 / 1150; background: var(--line); }
.af-factors { display: grid; margin-top: 30px; border-top: 1px solid var(--line); }
.af-factors li { display: grid; grid-template-columns: 34px minmax(0, 1fr) 72px; gap: 4px 16px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.af-fn { font: 600 12px/1.7 var(--mono); color: var(--signal); }
.af-factors h3 { font-size: 1.06rem; letter-spacing: -.015em; line-height: 1.3; }
.af-factors p { margin-top: 4px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.af-meter { position: relative; height: 6px; margin-top: 9px; border-radius: 3px; background: var(--line); overflow: hidden; }
.af-meter i { position: absolute; inset: 0; background: var(--ink); transform-origin: 0 50%; scale: var(--v, .5) 1; }
.js .af-factors .af-meter i { scale: 0 1; transition: scale .9s var(--ease-out) calc(.25s + var(--k, 0) * .07s); }
.js .af-factors.is-in .af-meter i { scale: var(--v, .5) 1; }
.af-factors li:nth-child(2) { --k: 1; } .af-factors li:nth-child(3) { --k: 2; } .af-factors li:nth-child(4) { --k: 3; }
.af-factors li:nth-child(5) { --k: 4; } .af-factors li:nth-child(6) { --k: 5; }
@media (max-width: 899.98px) {
  .af-rate-fig { position: static; }
  .af-rate-fig .photo { aspect-ratio: 4 / 3; }
}
@media (max-width: 479.98px) { .af-factors li { grid-template-columns: 28px minmax(0, 1fr); } .af-meter { grid-column: 2; margin-top: 6px; max-width: 160px; } }

/* ── Reduced motion: drawn and filled at once, no planes (air-freight.js) ── */
@media (prefers-reduced-motion: reduce) {
  .js .af-uld .dr { stroke-dashoffset: 0; transition: none; }
  .js .af-uld .af-dim { opacity: 1; transition: none; }
  .js .af-factors .af-meter i { scale: var(--v, .5) 1; transition: none; }
  .af-rate-fig, .af-board li, .af-board i { transition: none; }
}
