/* The portal section's ship and figures (voyage-ship.js draws the ship), after
   the "Your business partner" section of the ELIOS concept: the ship from
   straight overhead, upright behind the heading's right-hand side, with three
   figure tiles stepping down past it, the middle one over its side.

   The figures are things the site already says: 24/7 visibility (the hero),
   one dedicated point of contact (the Halcyon standard), and the portal's six
   languages. */

.portal--dock .portal-top {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.25fr);
  gap: 4vw;
  align-items: start;
  margin-bottom: 58px;
}
.portal--dock .portal-header { margin: 0; padding-top: 40px; }

.portal-dock {
  --tile: clamp(168px, 15vw, 226px);
  position: relative;
  height: calc(var(--tile) * 2.9);
}

/* The ship runs out at the frame's top and foot rather than stopping at a
   line: it is in the background, passing. */
.portal-dock canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-out;
  -webkit-mask: linear-gradient(transparent, #000 14%, #000 86%, transparent);
  mask: linear-gradient(transparent, #000 14%, #000 86%, transparent);
}
.portal-dock.is-ready canvas { opacity: 1; }

.portal-tile {
  position: absolute;
  z-index: 1;
  width: var(--tile);
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 18px;
  box-sizing: border-box;
  text-align: center;
}
.portal-tile strong {
  font: 300 clamp(52px, 4.8vw, 82px)/1 var(--display);
  letter-spacing: -.03em;
}
.portal-tile span {
  font: 500 10px/1.55 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* Stepping down: light at the top right, black a tile to the left over the
   ship's side, red at the foot. */
.tile-light { top: 0; right: 0; background: #e8e7e4; color: var(--black); }
.tile-dark { top: calc(var(--tile) * .95); right: var(--tile); background: var(--black); color: #f4f3f1; }
.tile-red { top: calc(var(--tile) * 1.9); right: 0; background: var(--red); color: #fff; }

.dark .tile-light { background: #252526; color: #f4f3f1; }
.dark .tile-dark { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }

/* Narrower windows: the heading above, the ship and tiles across the width
   under it, so the black tile does not hide the ship. */
@media (max-width: 1100px) {
  .portal--dock .portal-top { grid-template-columns: 1fr; gap: 40px; }
  .portal--dock .portal-header { padding-top: 0; }
}

/* A phone: the ship lies across a band (bow to the right), the three tiles
   in a row under it. */
@media (max-width: 800px) {
  .portal-dock {
    --tile: auto;
    height: auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .portal-dock canvas {
    position: relative;
    grid-column: 1 / -1;
    width: calc(100% + 40px);
    height: 300px;
    margin: 0 -20px 6px;
    -webkit-mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  }
  .portal-tile {
    position: static;
    width: auto;
    gap: 10px;
    padding: 10px 6px;
  }
  .portal-tile strong { font-size: 34px; }
  .portal-tile span { font-size: 8px; letter-spacing: .1em; }
}

/* On a wide screen the long ship (voyage.css) lies under the tiles instead,
   its stern beside the heading. */
@media (min-width: 1101px) {
  .portal-dock canvas { display: none; }
}
