/* Baggage carousel: what the client takes home. Shared by index.html and designsystem.html.
   Each item is a piece of luggage; the information sits on its paper luggage tag.
   Hover, focus or tap lifts the bag and opens the tag with details. */
.carousel {
  --navy: #0a1a2e;
  --sun: #ffc93c;
  --steel-hi: #c7d1db;
  --steel-lo: #6b7a89;
  position: relative;
  overflow: hidden;
  padding-top: 8px;
  -webkit-mask: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
          mask: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.belt-track {
  display: flex;
  align-items: flex-end;
  gap: 22px;
  width: max-content;
  list-style: none;
  margin: 0;
  padding: 0 20px;
  position: relative;
  z-index: 2;
  animation: belt-move 52s linear infinite;
}
.carousel:hover .belt-track,
.carousel:focus-within .belt-track,
.carousel:hover .belt-top,
.carousel:focus-within .belt-top { animation-play-state: paused; }
@keyframes belt-move { to { transform: translateX(-50%); } }

/* ---------- One piece of luggage ---------- */
.bag {
  position: relative;
  height: 348px;
  flex: none;
  display: flex; align-items: flex-end; justify-content: flex-start;
  width: calc(var(--case-w) + 110px);
  cursor: pointer;
  outline: none;
  transition: opacity .25s ease;
}
.bag::after { /* contact shadow on the belt */
  content: "";
  position: absolute; left: 4px; width: var(--case-w); bottom: -6px; height: 14px;
  background: radial-gradient(closest-side, rgba(0,0,0,.45), transparent);
  z-index: -1;
  transition: transform .3s ease, opacity .3s ease;
}
.bag-case {
  position: relative;
  display: block;
  margin-bottom: 4px;
  transform: rotate(var(--tilt, 0deg));
  transform-origin: 50% 100%;
  transition: transform .3s cubic-bezier(.2,.8,.3,1.2);
}

/* Colors */
.c-navy  { --body: #13294a; --body-hi: #24406a; --body-lo: #0a1a2e; --trim: #091424; }
.c-sun   { --body: #ffc93c; --body-hi: #ffdb7a; --body-lo: #e3a91c; --trim: #b98612; }
.c-blue  { --body: #2b65b6; --body-hi: #4a82d0; --body-lo: #1d4c8f; --trim: #163c72; }
.c-steel { --body: #b8c4cf; --body-hi: #e1e8ee; --body-lo: #8d9cab; --trim: #6b7a89; }
.c-red   { --body: #c23b3b; --body-hi: #dd5d5a; --body-lo: #9a2a2c; --trim: #771f22; }

/* Hard-shell trolley: ribs, corner guards, telescopic handle, wheels */
.t-trolley { --case-w: 138px; }
.t-trolley .bag-case {
  width: var(--case-w); height: 168px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 0 0, var(--trim) 0 14px, transparent 15px) top left / 30px 30px no-repeat,
    radial-gradient(circle at 100% 0, var(--trim) 0 14px, transparent 15px) top right / 30px 30px no-repeat,
    radial-gradient(circle at 0 100%, var(--trim) 0 14px, transparent 15px) bottom left / 30px 30px no-repeat,
    radial-gradient(circle at 100% 100%, var(--trim) 0 14px, transparent 15px) bottom right / 30px 30px no-repeat,
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(0,0,0,.10) 18px 20px, rgba(255,255,255,.16) 20px 22px),
    linear-gradient(100deg, var(--body-hi), var(--body) 45%, var(--body-lo));
  box-shadow: inset 0 0 0 3px var(--trim), inset 0 -10px 0 rgba(0,0,0,.12);
}
.t-trolley .bag-case::before { /* telescopic handle */
  content: "";
  position: absolute; left: 50%; bottom: 100%;
  width: 62px; height: 46px; margin-left: -31px;
  border: 6px solid #3b4756; border-bottom: 0;
  border-radius: 8px 8px 0 0;
  transition: height .3s ease;
}
.t-trolley .bag-case::after { /* wheels */
  content: "";
  position: absolute; left: 12px; right: 12px; bottom: -10px; height: 14px;
  background:
    radial-gradient(circle at 7px 7px, #1c242e 6px, transparent 7px) left / 14px 14px no-repeat,
    radial-gradient(circle at 7px 7px, #1c242e 6px, transparent 7px) right / 14px 14px no-repeat;
}

/* Briefcase: flap seam, clasps, small top handle */
.t-brief { --case-w: 196px; }
.t-brief .bag-case {
  width: var(--case-w); height: 124px;
  border-radius: 10px;
  background:
    linear-gradient(transparent 0 30px, rgba(0,0,0,.18) 30px 32px, transparent 32px),
    linear-gradient(170deg, var(--body-hi), var(--body) 50%, var(--body-lo));
  box-shadow: inset 0 0 0 3px var(--trim), inset 0 -8px 0 rgba(0,0,0,.12);
}
.t-brief .bag-case::before { /* top handle */
  content: "";
  position: absolute; left: 50%; bottom: 100%;
  width: 56px; height: 18px; margin-left: -28px;
  border: 6px solid var(--trim); border-bottom: 0;
  border-radius: 12px 12px 0 0;
}
.t-brief .bag-case::after { /* two clasps */
  content: "";
  position: absolute; top: 22px; left: 38px; right: 38px; height: 18px;
  background:
    linear-gradient(#e6cf86, #a8893a) left / 22px 18px no-repeat,
    linear-gradient(#e6cf86, #a8893a) right / 22px 18px no-repeat;
}

/* Duffel: rounded ends, zipper, carry straps */
.t-duffel { --case-w: 204px; }
.t-duffel .bag-case {
  width: var(--case-w); height: 112px;
  border-radius: 56px / 50px;
  background:
    repeating-linear-gradient(90deg, transparent 0 5px, rgba(255,255,255,.25) 5px 7px) 30px 19px / calc(100% - 60px) 4px no-repeat,
    linear-gradient(175deg, var(--body-hi), var(--body) 55%, var(--body-lo));
  box-shadow: inset 0 0 0 3px var(--trim), inset 0 -10px 0 rgba(0,0,0,.14);
}
.t-duffel .bag-case::before { /* straps */
  content: "";
  position: absolute; left: 56px; right: 56px; bottom: calc(100% - 14px);
  height: 34px;
  border: 7px solid var(--trim); border-bottom: 0;
  border-radius: 40px 40px 0 0;
}

/* Round brand sticker on selected bags */
.bag-sticker {
  position: absolute; left: 16px; bottom: 20px;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 3px rgba(255,255,255,.85), 0 3px 6px rgba(0,0,0,.25);
  transform: rotate(-12deg);
}
.bag-sticker::before {
  content: "";
  position: absolute; inset: 7px 10px;
  background: var(--navy);
  -webkit-mask: url("/assets/logo-line.svg") center / contain no-repeat;
          mask: url("/assets/logo-line.svg") center / contain no-repeat;
}

/* ---------- Paper luggage tag carries the information ---------- */
.ltag {
  display: block;
  position: absolute;
  z-index: 3;
  left: calc(var(--case-w) - 58px);
  bottom: 28px;
  width: 160px;
  padding: 0 11px 9px 22px;
  background: #fffdf7;
  color: var(--navy);
  border-radius: 5px 12px 12px 5px;
  box-shadow: 0 8px 16px -8px rgba(0,0,0,.5), 0 0 0 1px rgba(10,26,46,.08);
  transform: rotate(var(--ltag-tilt, 5deg));
  transform-origin: 10px 60%;
  transition: transform .35s cubic-bezier(.2,.8,.3,1.2), width .3s ease, box-shadow .3s ease;
}
.ltag::before { /* eyelet with reinforcement ring */
  content: "";
  position: absolute; left: 7px; top: 60%;
  width: 8px; height: 8px; margin-top: -4px;
  border-radius: 50%;
  background: var(--navy);
  box-shadow: 0 0 0 3px #e9dfc6;
}
.ltag::after { /* string from the eyelet up and out to the handle */
  content: "";
  position: absolute; left: 10px; bottom: 40%;
  width: 2px; height: 64px;
  background: #3b4756;
  transform: rotate(-38deg);
  transform-origin: 50% 100%;
}
.ltag-band { /* coloured top band like a real bag tag */
  display: flex; justify-content: space-between; align-items: center;
  margin: 0 -11px 7px -22px;
  padding: 4px 11px 4px 22px;
  border-radius: 5px 12px 0 0;
  background: var(--navy);
  color: #fff;
  font: 800 .68rem "JetBrains Mono", ui-monospace, monospace;
}
.ltag-band span:last-child { color: var(--sun); }
.ltag.accent .ltag-band { background: var(--sun); color: var(--navy); }
.ltag.accent .ltag-band span:last-child { color: var(--navy); }
.ltag b {
  display: block;
  font: 750 .95rem/1.15 "Bricolage Grotesque", system-ui, sans-serif;
  letter-spacing: -0.01em;
  hyphens: auto; -webkit-hyphens: auto;
  overflow-wrap: break-word;
}
.ltag small {
  display: block;
  margin-top: 3px;
  font: 500 .78rem/1.35 "Instrument Sans", system-ui, sans-serif;
  color: #3a5068;
}
.ltag-code { /* mini barcode at the bottom */
  display: block;
  height: 12px; margin-top: 8px;
  background: repeating-linear-gradient(90deg, var(--navy) 0 1px, transparent 1px 3px, var(--navy) 3px 5px, transparent 5px 6px, var(--navy) 6px 7px, transparent 7px 10px);
  opacity: .8;
}

/* Details: hidden until the bag is picked up */
.ltag-more {
  display: block;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height .4s ease, opacity .25s ease .05s;
}
.ltag-more .st {
  display: inline-block;
  margin: 8px 0 6px;
  padding: 2px 7px;
  border-radius: 3px;
  background: #eef4fb;
  font: 800 .66rem "JetBrains Mono", ui-monospace, monospace;
  color: #2559a3;
}
.ltag-more ul { list-style: none; margin: 0; padding: 0; }
.ltag-more li {
  position: relative;
  padding: 3px 0 3px 16px;
  font: 500 .78rem/1.35 "Instrument Sans", system-ui, sans-serif;
  color: #20354f;
}
.ltag-more li::before { /* check mark */
  content: "";
  position: absolute; left: 0; top: 7px;
  width: 9px; height: 5px;
  border-left: 2px solid #1d7a46; border-bottom: 2px solid #1d7a46;
  transform: rotate(-45deg);
}
.ltag-more .fmt {
  display: block;
  margin-top: 6px; padding-top: 6px;
  border-top: 1px dashed #d6e3f1;
  font: 600 .74rem "Instrument Sans", system-ui, sans-serif;
  color: #5b7088;
}

/* ---------- Picked up: hover, keyboard focus or tap ---------- */
.belt-track:hover .bag:not(:hover):not(:focus-within),
.belt-track:focus-within .bag:not(:focus-within):not(:hover) { opacity: .55; }
.bag:hover, .bag:focus-within { z-index: 5; }
.bag:hover .bag-case, .bag:focus-within .bag-case { transform: translateY(-12px) rotate(0deg); }
.bag:hover::after, .bag:focus-within::after { transform: scale(.8); opacity: .6; }
.t-trolley:hover .bag-case::before, .t-trolley:focus-within .bag-case::before { height: 62px; }
.bag:hover .ltag, .bag:focus-within .ltag {
  width: 236px;
  transform: translateY(-12px) rotate(0deg);
  animation: tag-swing .7s ease-out;
  box-shadow: 0 18px 30px -12px rgba(0,0,0,.45), 0 0 0 1px rgba(10,26,46,.1);
}
.bag:hover .ltag-more, .bag:focus-within .ltag-more { max-height: 220px; opacity: 1; }
.bag:focus, .bag:focus-visible { outline: none; }
.bag:focus-visible .ltag { outline: 3px solid var(--sun); outline-offset: 3px; }
@keyframes tag-swing {
  0%   { transform: translateY(-12px) rotate(var(--ltag-tilt, 5deg)); }
  35%  { transform: translateY(-12px) rotate(-6deg); }
  65%  { transform: translateY(-12px) rotate(3deg); }
  100% { transform: translateY(-12px) rotate(0deg); }
}

/* ---------- The belt: rubber slats, steel lip, skirt ---------- */
.belt { position: relative; z-index: 1; margin-top: -6px; }
.belt-top {
  height: 30px;
  background: repeating-linear-gradient(90deg, #2d3a4a 0 40px, #141c27 40px 42px), #2d3a4a;
  background-size: 42px 100%;
  border-radius: 10px 10px 0 0;
  box-shadow: inset 0 8px 10px -6px rgba(255,255,255,.12), inset 0 -6px 8px -4px rgba(0,0,0,.5);
  animation: belt-roll 1.02s linear infinite;
}
.belt-lip {
  height: 9px;
  background: linear-gradient(var(--steel-hi), var(--steel-lo));
  box-shadow: 0 1px 0 rgba(255,255,255,.3) inset;
}
.belt-skirt {
  height: 26px;
  background:
    repeating-linear-gradient(90deg, transparent 0 118px, rgba(255,255,255,.06) 118px 120px),
    linear-gradient(#1b2533, #0b1420);
  border-radius: 0 0 8px 8px;
}
@keyframes belt-roll { to { background-position: -42px 0, 0 0; } }

/* Phone: details in a panel below the belt instead of on the swinging tag */
.belt-detail, .belt-hint { display: none; }
.belt-detail { --navy: #0a1a2e; --sun: #ffc93c; }
@media (max-width: 560px) {
  .belt-hint { display: block; margin-top: 10px; font: 500 .875rem "Instrument Sans", system-ui, sans-serif; color: #5b7088; }
  .belt-detail:not([hidden]) { display: block; margin-top: 14px; }
  .belt-detail .ltag { position: relative; left: auto; bottom: auto; width: 100%; transform: none; animation: none; padding-left: 26px; }
  .belt-detail .ltag::after { display: none; }
  .belt-detail .ltag::before { top: 50%; }
  .belt-detail .ltag { box-shadow: 0 10px 24px -12px rgba(10,26,46,.45), 0 0 0 1px rgba(10,26,46,.1); }
  .belt-detail .ltag b { font-size: 1.1rem; }
  .belt-detail .ltag-more { max-height: none; opacity: 1; }
  .bag:hover .ltag-more, .bag:focus-within .ltag-more { max-height: 0; opacity: 0; }
  .belt-track { gap: 14px; }
  .bag { height: 250px; width: calc(var(--case-w) + 96px); }
  .t-trolley { --case-w: 120px; } .t-trolley .bag-case { height: 146px; }
  .t-brief { --case-w: 170px; } .t-brief .bag-case { height: 108px; }
  .t-duffel { --case-w: 178px; } .t-duffel .bag-case { height: 98px; }
  .ltag { width: 148px; }
  .bag:hover .ltag, .bag:focus-within .ltag { width: 148px; }
}
@media (prefers-reduced-motion: reduce) {
  .carousel { -webkit-mask: none; mask: none; }
  .belt-track { animation: none; width: auto; flex-wrap: wrap; row-gap: 24px; }
  .belt-track [aria-hidden="true"] { display: none; }
  .belt-top { animation: none; }
  .bag-case, .ltag, .ltag-more, .bag::after { transition: none; }
  .bag:hover .ltag, .bag:focus-within .ltag { animation: none; }
}
