:root {
  --paper: #F4EFE6;
  --card: #FBF8F2;
  --ink: #16233B;
  --muted: #5E6B7D;
  --line: rgba(22, 35, 59, .12);
  --yellow: #FFC531;
  --green: #2E9E6B;
  --red: #C8463B;
  --head: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --sans: "Instrument Sans", system-ui, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --gutter: clamp(16px, 3.4vw, 52px);
  --col: min(470px, 40vw);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { background: var(--paper); scroll-behavior: smooth; }
body { font-family: var(--sans); font-size: 17px; line-height: 1.55; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }

/* typografia */
.h1, .h2, h3 { font-family: var(--head); font-weight: 800; letter-spacing: -.005em; line-height: .95; }
.h1 { font-size: clamp(48px, 5.6vw, 92px); }
.h2 { font-size: clamp(36px, 3.6vw, 58px); }
h3 { font-size: 24px; line-height: 1.05; }
.kicker, .eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 16px; }
.kicker::before, .eyebrow::before { content: ""; width: 18px; height: 6px; border-radius: 2px; background: repeating-linear-gradient(90deg, var(--yellow) 0 6px, var(--ink) 6px 9px); }
.lead { margin-top: 20px; font-size: 18px; color: var(--muted); max-width: 40ch; }

/* przyciski */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 15px 24px; border-radius: 12px; border: 2px solid var(--ink); cursor: pointer;
  background: var(--ink); color: #fff; font: 600 15px/1 var(--sans); text-decoration: none; transition: transform .35s var(--ease), box-shadow .35s var(--ease), background-color .25s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--yellow); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-sm { padding: 10px 16px; font-size: 14px; border-radius: 10px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* nawigacja */
.nav { position: fixed; inset: 0 0 auto; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px var(--gutter);
  background: rgba(244, 239, 230, .78); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--head); font-weight: 900; font-size: 26px; letter-spacing: .04em; text-decoration: none; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--ink); position: relative; }
.brand-mark::after { content: ""; position: absolute; left: 5px; right: 5px; top: 11px; height: 4px; border-radius: 2px; background: var(--yellow); box-shadow: 0 -6px 0 -1px var(--yellow); }
.nav nav { display: flex; gap: 28px; font-size: 14px; font-weight: 500; }
.nav nav a { text-decoration: none; color: var(--muted); }
.nav nav a:hover { color: var(--ink); }

/* scena 3D */
.world { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
.no-3d .world { display: none; }
.no-3d body, .no-3d .journey { background: linear-gradient(#CFE5F3, #F4EFE6 40%); }

/* trasa: bloki treści przypięte do momentów historii */
.journey { position: relative; z-index: 1; height: 1150vh; pointer-events: none; }
.block { position: absolute; left: var(--gutter); width: var(--col); pointer-events: auto; }
.block > * { position: relative; }
.block::before { content: ""; position: absolute; inset: -26px -28px; z-index: -1; border-radius: 22px; background: rgba(251, 248, 242, .9); backdrop-filter: blur(10px); box-shadow: 0 30px 60px -30px rgba(22, 35, 59, .35); border: 1px solid rgba(255, 255, 255, .7); }
.hero::before { inset: -34px -40px; }

/* hero */
.hero { width: min(560px, 46vw); }
.live { list-style: none; display: flex; gap: 22px; margin-top: 28px; padding-top: 18px; border-top: 1px dashed var(--line); font-size: 14px; color: var(--muted); }
.live b { display: block; font-family: var(--head); font-weight: 800; font-size: 30px; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }

/* problem */
.cards { display: grid; gap: 10px; margin-top: 22px; }
.card { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start; padding: 16px 18px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.num { font-family: var(--head); font-weight: 900; font-size: 26px; line-height: 1; color: var(--ink); background: var(--yellow); border-radius: 8px; text-align: center; padding: 6px 0 4px; }
.q { font-size: 16px; line-height: 1.4; }

/* dowód */
.stats { display: grid; gap: 4px; margin-top: 18px; }
.stat { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.stat .n { display: flex; align-items: baseline; gap: 6px; }
.stat b { font-family: var(--head); font-weight: 900; font-size: 64px; line-height: .9; font-variant-numeric: tabular-nums; }
.stat .n span { font-weight: 700; color: var(--muted); }
.stat p:last-child { color: var(--muted); font-size: 15px; }

/* usługi */
.services { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.services li { padding: 16px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.services h3 { margin-top: 12px; }
.cat { display: inline-block; margin: 6px 0 8px; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: rgba(255, 197, 49, .35); }
.services p:last-child { font-size: 14px; color: var(--muted); line-height: 1.4; }
.ico { display: block; width: 46px; height: 30px; position: relative; }
.ico::before, .ico::after { content: ""; position: absolute; border-radius: 4px; }
.ico-ftl::before { left: 0; top: 4px; width: 32px; height: 20px; background: var(--ink); } .ico-ftl::after { left: 33px; top: 10px; width: 13px; height: 14px; background: var(--yellow); }
.ico-ltl::before { left: 0; top: 10px; width: 14px; height: 14px; background: var(--yellow); box-shadow: 16px 0 0 var(--ink), 32px 0 0 var(--yellow); }
.ico-wh::before { left: 2px; top: 6px; width: 42px; height: 22px; background: var(--ink); clip-path: polygon(0 35%, 50% 0, 100% 35%, 100% 100%, 0 100%); } .ico-wh::after { left: 18px; top: 16px; width: 10px; height: 12px; background: var(--yellow); }
.ico-ec::before { left: 4px; top: 4px; width: 26px; height: 22px; background: var(--yellow); } .ico-ec::after { left: 12px; top: 4px; width: 10px; height: 8px; background: var(--ink); }

/* trasa */
.route { list-style: none; margin-top: 20px; position: relative; --tcol: 58px; --rail: 22px; --gap: 14px; }
.route::before { content: ""; position: absolute; left: calc(var(--tcol) + var(--gap) + var(--rail) / 2 - 1.5px); top: 18px; bottom: 18px; width: 3px; border-radius: 2px;
  background: repeating-linear-gradient(var(--line) 0 8px, transparent 8px 14px); }
.route li { display: grid; grid-template-columns: var(--tcol) var(--rail) 1fr; column-gap: var(--gap); align-items: start; padding: 9px 0; position: relative; opacity: .45; transition: opacity .4s; }
.route li.on { opacity: 1; }
.route time { font-family: var(--head); font-weight: 800; font-size: 22px; line-height: 1.15; font-variant-numeric: tabular-nums; text-align: right; }
.pin { position: relative; z-index: 1; justify-self: center; margin-top: 5px; width: 16px; height: 16px; border-radius: 50%; background: var(--card); border: 3px solid var(--muted); transition: all .4s var(--ease); }
.route li.on .pin { background: var(--yellow); border-color: var(--ink); box-shadow: 0 0 0 5px rgba(255, 197, 49, .35); }
.route h3 { font-size: 21px; line-height: 1.15; }
.route p { font-size: 14px; color: var(--muted); margin-top: 2px; }

/* glob */
.map { position: relative; margin-top: 18px; border-radius: 16px; overflow: hidden; background: radial-gradient(70% 60% at 50% 45%, #FFFFFF, #EEF2F4); border: 1px solid var(--line); }
.globe { display: block; width: 100%; aspect-ratio: 1 / .82; }
.g-label { position: absolute; padding: 3px 8px; border-radius: 6px; background: rgba(255, 255, 255, .94); border: 1px solid var(--line);
  font: 600 12px var(--sans); color: var(--muted); white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .3s, color .3s, border-color .3s; }
.g-right { transform: translate(12px, -50%); }
.g-left { transform: translate(calc(-100% - 12px), -50%); }
.g-above { transform: translate(-50%, calc(-100% - 12px)); }
.g-below { transform: translate(-50%, 12px); }
.g-small { font-size: 11px; padding: 2px 6px; }
.g-label.done { color: var(--ink); border-color: var(--ink); }
.map figcaption { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; font-size: 14px; color: var(--muted); background: #fff; border-top: 1px solid var(--line); }
.map figcaption b { font-family: var(--head); font-size: 24px; color: var(--ink); margin-right: 6px; }
.ok { color: var(--green); font-weight: 700; }

/* opinia */
.quote blockquote { font-family: var(--head); font-weight: 800; font-size: clamp(32px, 3vw, 46px); line-height: 1; }
.who { margin-top: 14px; color: var(--muted); font-size: 15px; }

/* CMR */
.cmr-block { width: min(560px, 46vw); }
.cmr-block::before { display: none; }
.cmr { position: relative; background: #FFFDF7; border: 2px solid var(--ink); border-radius: 6px; box-shadow: 10px 12px 0 rgba(22, 35, 59, .18); padding: 0; overflow: hidden; }
.cmr-head { padding: 18px 20px 14px; border-bottom: 2px solid var(--ink); background: repeating-linear-gradient(-45deg, rgba(200, 70, 59, .06) 0 10px, transparent 10px 20px); }
.cmr-title { font-family: var(--head); font-weight: 900; font-size: 34px; line-height: 1; }
.cmr-title::after { content: "CMR"; margin-left: 12px; font-size: 16px; padding: 2px 8px; border: 2px solid var(--red); color: var(--red); border-radius: 4px; vertical-align: 6px; }
.cmr-sub { font-size: 14px; color: var(--muted); margin-top: 6px; }
.cmr-grid { display: grid; grid-template-columns: 1fr 1fr; }
.box { position: relative; display: grid; gap: 4px; padding: 10px 12px 10px 38px; border-bottom: 1px solid rgba(22, 35, 59, .35); border-right: 1px solid rgba(22, 35, 59, .35); }
.box:nth-child(2n) { border-right: 0; }
.box.wide { grid-column: span 2; border-right: 0; }
.bn { position: absolute; left: 10px; top: 10px; font: 700 12px var(--sans); color: var(--red); border: 1.5px solid var(--red); border-radius: 50%; width: 20px; height: 20px; display: grid; place-items: center; }
.bl { font-size: 12px; font-weight: 600; color: var(--muted); }
.box input { font: 500 16px var(--sans); color: var(--ink); background: transparent; border: 0; border-bottom: 1px dashed rgba(22, 35, 59, .3); padding: 4px 0; outline: none; width: 100%; }
.box input:focus { border-bottom-color: var(--ink); background: rgba(255, 197, 49, .12); }
.box input[aria-invalid="true"] { border-bottom: 2px solid var(--red); }
.cmr-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 16px 20px 18px; }
.sign { flex: 1; font-size: 12px; color: var(--muted); }
.sign svg { display: block; width: 100%; max-width: 220px; height: 50px; border-bottom: 1px solid var(--ink); }
#sig { fill: none; stroke: #1F4FA8; stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 520; stroke-dashoffset: 520; transition: stroke-dashoffset 1.1s ease; }
.cmr.signed #sig { stroke-dashoffset: 0; }
.btn-sign { background: var(--yellow); color: var(--ink); border-color: var(--ink); }
.stamp { position: absolute; right: 24px; top: 70px; padding: 8px 16px; border: 4px solid var(--green); border-radius: 10px; color: var(--green); font-family: var(--head); font-weight: 900; font-size: 34px; line-height: .9; text-align: center; text-transform: uppercase; rotate: -12deg; opacity: 0; scale: 1.6; transition: opacity .3s .9s, scale .4s .9s var(--ease); pointer-events: none; }
.stamp small { font-size: 14px; letter-spacing: .2em; }
.cmr.signed .stamp { opacity: .9; scale: 1; }
.status { padding: 0 20px 16px; font-size: 14px; color: var(--muted); min-height: 1.2em; }
.status.ok { color: var(--green); }

/* tracker */
.tracker { position: fixed; z-index: 20; right: var(--gutter); top: 84px; width: 300px; padding: 14px 16px; border-radius: 16px; background: rgba(251, 248, 242, .92); backdrop-filter: blur(10px); border: 1px solid var(--line); box-shadow: 0 20px 40px -24px rgba(22, 35, 59, .5);
  opacity: 0; translate: 0 -10px; transition: opacity .5s, translate .5s var(--ease); }
.tracker.on { opacity: 1; translate: 0 0; }
.tr-id { font-size: 12px; font-weight: 700; color: var(--muted); }
.tr-route { font-family: var(--head); font-weight: 800; font-size: 24px; display: flex; align-items: center; gap: 8px; }
.arrow { width: 26px; height: 2px; background: var(--ink); position: relative; }
.arrow::after { content: ""; position: absolute; right: -1px; top: -4px; border: 5px solid transparent; border-left: 7px solid var(--ink); border-right: 0; }
.tr-row { display: grid; grid-template-columns: auto auto 1fr; gap: 16px; margin-top: 8px; }
.tr-row b { display: block; font-family: var(--head); font-weight: 800; font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; }
.tr-row span { font-size: 11px; color: var(--muted); }
#tr-status { font-size: 18px; color: var(--green); }
.tr-bar { margin-top: 10px; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.tr-bar span { display: block; height: 100%; width: var(--p, 0%); background: repeating-linear-gradient(90deg, var(--ink) 0 10px, var(--yellow) 10px 20px); }

/* po trasie */
.after { position: relative; z-index: 2; background: var(--paper); border-top: 1px solid var(--line); padding-top: 110px; }
.faq { max-width: 860px; }
.faq .h2 { margin-bottom: 28px; }
details { border-top: 1px solid var(--line); }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { list-style: none; cursor: pointer; padding: 20px 48px 20px 0; position: relative; font-family: var(--head); font-weight: 800; font-size: 26px; line-height: 1.1; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 0; top: 50%; translate: 0 -50%; width: 32px; height: 32px; border-radius: 8px; background: var(--yellow); display: grid; place-items: center; font: 700 20px var(--sans); transition: rotate .35s var(--ease); }
details.is-open summary::after { rotate: 45deg; }
details p { padding: 0 0 22px; color: var(--muted); max-width: 62ch; overflow: hidden; }
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 80px; padding-bottom: 28px; font-size: 13px; color: var(--muted); }

.skipper { position: fixed; z-index: 25; right: var(--gutter); bottom: 22px; border: 2px solid var(--ink); background: var(--card); color: var(--ink); border-radius: 10px; padding: 10px 14px; font: 600 14px var(--sans); cursor: pointer; transition: opacity .4s; }
.skipper.gone { opacity: 0; pointer-events: none; }

/* wejścia bloków (start tylko z JS) */
.js .block > * { opacity: 0; translate: 0 26px; transition: opacity .7s var(--ease), translate .8s var(--ease); }
.js .block::before { opacity: 0; scale: .97; transition: opacity .6s var(--ease), scale .7s var(--ease); }
.js .block.in > *, .js .block.in::before { opacity: 1; translate: 0 0; scale: 1; }
.js .block.in > *:nth-child(2) { transition-delay: .06s; } .js .block.in > *:nth-child(3) { transition-delay: .12s; } .js .block.in > *:nth-child(4) { transition-delay: .18s; }

@media (max-width: 900px) {
  :root { --col: calc(100vw - 2 * var(--gutter) - 24px); }
  .nav nav { display: none; }
  .block, .hero, .cmr-block { left: calc(var(--gutter) + 12px); width: var(--col); }
  .block::before { inset: -16px -14px; }
  .h1 { font-size: 46px; }
  .h2 { font-size: 36px; }
  .services { grid-template-columns: 1fr 1fr; }
  .services p:last-child { display: none; }
  .stat { grid-template-columns: 110px 1fr; }
  .stat b { font-size: 48px; }
  .tracker { left: var(--gutter); right: var(--gutter); width: auto; top: 66px; padding: 10px 12px; }
  .tr-route { font-size: 18px; }
  .tr-row b { font-size: 18px; }
  .cmr-grid { grid-template-columns: 1fr; }
  .box, .box:nth-child(2n) { border-right: 0; }
  .box.wide { grid-column: auto; }
  .stamp { top: 54px; font-size: 26px; }
  .live { gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
