/* Process and pickup point (Figma 10.10.2026: "Wynajem / How · new",
   "Serwis / How · new"). Steps panel with a route line, map with a route
   button, contacts below. On laptops the block fits under the navigation. */
.journey-section {
  --journey-muted: #565d63;
  --journey-panel: #f4f6f2;
  --journey-line: rgb(var(--lime-rgb) / 45%);
  padding-block: 24px;
  background: #ffffff;
  color: var(--ink);
}

.journey-inner {
  width: var(--page-width, calc(100% - 48px));
  margin-inline: auto;
}

.journey-header {
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
}

.journey-header h2 {
  margin: 0;
}

.journey-header p {
  margin: 0;
  color: var(--journey-muted);
  font-size: clamp(18px, 2.2vw, 30px);
  font-weight: 400;
  line-height: 1.3;
  text-wrap: balance;
}

.journey-layout {
  display: grid;
  grid-template-columns: minmax(0, 432fr) minmax(0, 742fr);
  gap: 40px;
  align-items: stretch;
}

/* Steps. */
.journey-steps {
  --icon: 48px;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 20px;
  background: var(--journey-panel);
  list-style: none;
}

.journey-step {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 18px;
}

/* Route line between icon centres; rows share the panel height. */
.journey-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  bottom: -50%;
  left: calc(18px + var(--icon) / 2 - 1px);
  width: 2px;
  background: var(--journey-line);
}

.journey-icon {
  position: relative;
  z-index: 1;
  display: grid;
  width: var(--icon);
  height: var(--icon);
  flex: 0 0 var(--icon);
  place-items: center;
  border-radius: 12px;
  background: var(--icon-tile-bg);
}

.journey-icon svg {
  display: block;
  width: 70%;
  height: 70%;
}

.journey-step-copy {
  display: grid;
  flex: 1;
  gap: 6px;
  min-width: 0;
}

.journey-step-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.journey-step h3 {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 28px;
  text-wrap: pretty;
}

.journey-number {
  flex: 0 0 auto;
  color: var(--journey-muted);
  font-size: 16px;
  font-weight: 800;
  line-height: 20px;
  font-variant-numeric: tabular-nums;
}

.journey-step p {
  margin: 0;
  color: var(--journey-muted);
  font-size: 20px;
  font-weight: 400;
  line-height: 28px;
  text-wrap: pretty;
}

/* Pickup point. */
.journey-pickup {
  min-width: 0;
}

.journey-pickup-title {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.journey-pickup-card {
  display: flex;
  height: 100%;
  flex-direction: column;
  gap: 12px;
}

.journey-map {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: clamp(220px, calc(100svh - 452px), 487px);
  flex: 1 0 auto;
  overflow: hidden;
  border-radius: 20px;
  background: var(--journey-panel);
}

.journey-map-fallback,
.journey-map-fallback img,
.journey-map-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.journey-map-fallback img { object-fit: cover; }
.journey-map-canvas { opacity: 0; pointer-events: none; transition: opacity 180ms ease; }
.journey-map[data-map-state="ready"] .journey-map-canvas { opacity: 1; pointer-events: auto; }
.journey-map[data-map-state="ready"] .journey-map-fallback { visibility: hidden; }
.journey-map-canvas .maplibregl-canvas { outline-offset: -3px; }
.journey-map-canvas:has(:focus-visible) { outline: 2px solid var(--ink); outline-offset: -3px; }
.journey-map-canvas .maplibregl-cooperative-gesture-screen { font: 600 14px/1.5 var(--font-sans); }

.journey-pin { position: relative; display: block; width: 44px; height: 44px; outline-offset: 1px; }
.journey-pin img { position: absolute; bottom: 0; left: 7px; width: 30px; height: 36px; filter: drop-shadow(0 3px 5px rgb(33 56 23 / 15%)); }

.journey-map-status {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  max-width: calc(100% - 24px);
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--journey-muted);
  font-size: 13px;
  line-height: 20px;
}

.journey-map-status[hidden] { display: none; }

/* White route pill on the map (mockup), a real link to Google Maps. */
.journey-route-button {
  position: absolute;
  z-index: 3;
  bottom: 20px;
  left: 20px;
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid rgb(0 0 0 / 6%);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 6px 20px rgb(0 0 0 / 12%);
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
  line-height: 26px;
  transition: transform 140ms var(--ease-out), box-shadow 160ms ease;
}

.journey-route-label {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.journey-route-label img {
  width: 22px;
  height: 22px;
}

.journey-map-attribution {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 0;
  color: #182018;
  font: 500 11px/1.5 var(--font-sans);
}

.journey-map-attribution summary {
  position: absolute;
  right: 0;
  bottom: 0;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 12px;
  cursor: pointer;
  list-style: none;
}

.journey-map-attribution summary::-webkit-details-marker { display: none; }

.journey-map-attribution summary span {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid rgb(0 0 0 / 12%);
  border-radius: 50%;
  background: #ffffff;
  color: var(--journey-muted);
  font: 700 12px/1 var(--font-sans);
}

.journey-map-attribution > div { margin: 0 40px 8px 8px; padding: 8px; border-radius: 8px; background: rgb(255 255 255 / 95%); }
.journey-map-attribution a { display: inline-flex; min-height: 24px; align-items: center; text-decoration: underline; text-underline-offset: 2px; }

/* Contacts: three centred columns on laptops. */
.journey-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding: 18px;
  border-radius: 20px;
  background: var(--journey-panel);
}

.journey-contact {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.journey-contact:not(:first-child)::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -12px;
  width: 1px;
  background: #dde1dd;
}

.journey-contact-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 22px;
}

.journey-contact-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 8px;
  background: var(--icon-tile-bg);
}

.journey-contact-icon img {
  width: 28px;
  height: 28px;
}

.journey-contact p,
.journey-phone-number {
  margin: 0;
  color: #3f454a;
  font-size: 18px;
  font-weight: 500;
  line-height: 26px;
}

.journey-hours-line { display: block; white-space: nowrap; }

/* The whole phone cell dials; the number stays the visible link text. */
.journey-phone-number {
  display: block;
  width: fit-content;
  white-space: nowrap;
}

.journey-phone-number::after {
  content: "";
  position: absolute;
  inset: 0;
}

.journey-section :is(a, summary):focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.journey-map-attribution summary:focus-visible { outline-offset: -3px; }
.journey-section .journey-route-button:active:not(:focus-visible) { transform: scale(.98); }

@media (hover: hover) and (pointer: fine) {
  .journey-route-button:hover { box-shadow: 0 8px 24px rgb(0 0 0 / 16%); }
  .journey-phone:hover .journey-phone-number { text-decoration: underline; text-underline-offset: 3px; }
}

/* The route draws once from step 1 to step 4 when the section first scrolls
   into view (nav.js adds .is-visible; reveal.js arms only off-screen sections). */
.journey-section.reveal-ready .journey-step::after {
  transform-origin: top center;
  transition: transform 220ms var(--ease-in-out);
}

.journey-section.reveal-ready:not(.is-visible) .journey-step::after { transform: scaleY(0); }
.journey-section.reveal-ready .journey-step:nth-child(2)::after { transition-delay: 200ms; }
.journey-section.reveal-ready .journey-step:nth-child(3)::after { transition-delay: 400ms; }

@media (prefers-reduced-motion: reduce) {
  .journey-map-canvas,
  .journey-route-button { transition: none; }
  .journey-section .journey-route-button:active { transform: none; }
  .journey-section.reveal-ready:not(.is-visible) .journey-step::after { transform: none; }
  .journey-section.reveal-ready .journey-step::after { transition: none; }
}

/* Short laptop screens: tighter rows keep steps and contacts on one screen. */
@media (min-width: 1100px) and (max-height: 800px) {
  .journey-step { padding: 12px 18px; }
  .journey-step-copy { gap: 4px; }
  .journey-step h3 { font-size: 20px; line-height: 26px; }
  .journey-step p { font-size: 17px; line-height: 24px; }
  .journey-details { padding: 14px 18px; }
  .journey-contact,
  .journey-contact-heading { gap: 6px; }
  .journey-contact-heading { font-size: 18px; }
  .journey-contact p,
  .journey-phone-number { font-size: 16px; line-height: 24px; }
}

/* Tablets and phones: steps list, then one card with the map and a contact list. */
@media (max-width: 1099px) {
  .journey-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .journey-steps {
    --gap: 22px;
    gap: var(--gap);
    padding: 20px;
    overflow: visible;
  }

  .journey-step {
    flex: initial;
    align-items: flex-start;
    gap: 16px;
    padding: 0;
  }

  .journey-step:not(:last-child)::after {
    top: calc(var(--icon) / 2);
    bottom: calc(-1 * (var(--gap) + var(--icon) / 2));
    left: calc(var(--icon) / 2 - 1px);
  }

  .journey-step-copy { gap: 4px; }
  .journey-step h3 { font-size: 20px; line-height: 26px; }
  .journey-step p { font-size: 17px; line-height: 25px; }

  .journey-pickup-card {
    gap: 0;
    overflow: hidden;
    border-radius: 20px;
    background: var(--journey-panel);
  }

  .journey-map {
    height: clamp(240px, 44vw, 400px);
    flex: none;
    border-radius: 0;
  }

  .journey-details {
    display: block;
    padding: 8px 20px;
    border-radius: 0;
  }

  /* Icon on the left of each row; label and value stacked next to it. */
  .journey-contact {
    display: grid;
    align-items: start;
    gap: 3px;
    padding: 14px 0 14px 54px;
    text-align: left;
  }

  .journey-contact:not(:first-child) { border-top: 1px solid #dde1dd; }
  .journey-contact:not(:first-child)::before { content: none; }

  .journey-contact-heading {
    display: block;
    font-size: 17px;
    line-height: 22px;
  }

  .journey-contact-icon {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
  }

  .journey-contact p {
    color: #24292e;
    font-size: 17px;
    line-height: 1.45;
  }

  .journey-phone-number {
    color: var(--ink);
    font-size: 19px;
    font-weight: 700;
    line-height: 22px;
  }
}

@media (max-width: 599px) {
  .journey-section { padding-block: 16px 24px; }

  .journey-header {
    gap: 6px;
    margin-bottom: 20px;
  }

  .journey-header p {
    font-size: 17px;
    line-height: 26px;
  }

  .journey-steps {
    --icon: 44px;
    padding: 20px 16px;
  }

  .journey-step { gap: 14px; }
  .journey-step h3 { font-size: 18px; line-height: 24px; }
  .journey-number { font-size: 13px; line-height: 18px; }
  .journey-step p { font-size: 16px; line-height: 24px; }

  .journey-map { height: 240px; }

  .journey-route-button {
    bottom: 12px;
    left: 12px;
    min-height: 44px;
    padding: 0 16px;
    font-size: 16px;
    line-height: 22px;
  }

  .journey-route-label { gap: 8px; }

  .journey-route-label img {
    width: 20px;
    height: 20px;
  }

  .journey-pin img { left: 9px; width: 26px; height: 32px; }
  .journey-details { padding: 8px 16px; }
}
