/* How It Works page — template port (chrome lives in chrome.css) */

html {
  scroll-behavior: smooth;
}

body.how-page {
  margin: 0;
  padding: 0;
  background: #f7f3ed;
  font-family: "Jost", system-ui, sans-serif;
  color: #0f2a4d;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.how-page a {
  color: #b08b45;
  text-decoration: none;
}

body.how-page a:hover {
  color: #8a6b2e;
}

body.how-page .jrny a {
  color: rgba(247, 243, 237, 0.72);
  transition: color 0.25s ease-out;
}

body.how-page .jrny a:hover {
  color: #d8b26c;
}

body.how-page ::selection {
  background: #d8b26c;
  color: #0f2a4d;
}

* {
  box-sizing: border-box;
}

@keyframes livepulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.82);
  }
}

.anim-livepulse {
  animation: livepulse 1.8s ease-in-out infinite;
}

@keyframes ringout {
  0% {
    transform: scale(0.6);
    opacity: 0.55;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .px {
    will-change: transform;
    transition: transform 120ms linear;
  }
  .lift {
    transition:
      transform 420ms cubic-bezier(0.22, 0.61, 0.36, 1),
      box-shadow 420ms cubic-bezier(0.22, 0.61, 0.36, 1);
  }
  .lift:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 54px -28px rgba(15, 42, 77, 0.55);
  }
  .lift img {
    transition: transform 700ms cubic-bezier(0.22, 0.61, 0.36, 1);
  }
  .lift:hover img {
    transform: scale(1.045);
  }
  .cat {
    transition: transform 380ms cubic-bezier(0.22, 0.61, 0.36, 1);
  }
  .cat:hover {
    transform: translateY(-4px);
  }
  .cat img {
    transition: filter 380ms ease;
  }
  .cat:hover img {
    filter: saturate(1.12) brightness(1.04);
  }
  .soon img {
    filter: grayscale(0.35) brightness(0.96);
  }
  .btn {
    transition:
      transform 260ms cubic-bezier(0.22, 0.61, 0.36, 1),
      box-shadow 260ms ease,
      background-color 260ms ease;
  }
  .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px -14px rgba(15, 42, 77, 0.6);
  }
}

/* Map pins + leg chip — positions as % so breakpoints can override --pin-x/--pin-y */
.mapband__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(15, 42, 77, 0.95) 0%,
    rgba(15, 42, 77, 0.88) 26%,
    rgba(15, 42, 77, 0.66) 48%,
    rgba(15, 42, 77, 0.52) 74%,
    rgba(15, 42, 77, 0.46) 100%
  );
  pointer-events: none;
}

.pin {
  --pin-x: 50%;
  --pin-y: 50%;
  position: absolute;
  left: var(--pin-x);
  top: var(--pin-y);
  z-index: 3;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(15, 42, 77, 0.9);
  border: 2px solid rgba(247, 243, 237, 0.75);
  color: rgba(247, 243, 237, 0.8);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.pin--1 {
  --pin-x: 33.98%;
  --pin-y: 94.25%;
}

.pin--2 {
  --pin-x: 53.66%;
  --pin-y: 70.32%;
  z-index: 4;
}

.pin--3 {
  --pin-x: 72.66%;
  --pin-y: 46.21%;
  z-index: 4;
}

.pin--4 {
  --pin-x: 91.16%;
  --pin-y: 25.75%;
}

.legchip {
  --chip-x: 60.42%;
  --chip-y: 74.79%;
}

@media (max-width: 1100px) {
  .pin--1 {
    --pin-x: 33.98%;
    --pin-y: 86.25%;
  }
  
  .pin--2 {
    --pin-x: 52.66%;
    --pin-y: 66.32%;
    z-index: 4;
  }
  
  .pin--3 {
    --pin-x: 73.66%;
    --pin-y: 46.21%;
    z-index: 4;
  }
  
  .pin--4 {
    --pin-x: 91.16%;
    --pin-y: 30.75%;
  }
  
  .legchip {
    --chip-x: 61.42%;
    --chip-y: 70.79%;
  }
}

@media (max-width: 900px) {

  .mapband__veil {
    background: rgba(15, 42, 77, 0.5);
  }

  .mapband__route {
    transform: translateX(-16%);
  }

  .pin--1 {
    --pin-x: 17.98%;
    --pin-y: 86.25%;
  }
  
  .pin--2 {
    --pin-x: 36.66%;
    --pin-y: 66.32%;
    z-index: 4;
  }
  
  .pin--3 {
    --pin-x: 57.66%;
    --pin-y: 46.21%;
    z-index: 4;
  }
  
  .pin--4 {
    --pin-x: 75.16%;
    --pin-y: 30.75%;
  }
  
  .legchip {
    --chip-x: 45.42%;
    --chip-y: 70.79%;
  }
}

@media (max-width: 640px) {

  .mapband__veil {
    background: rgba(15, 42, 77, 0.5);
  }

  .mapband__route {
    transform: translateX(-16%);
  }

  .pin--1 {
    --pin-x: 15.98%;
    --pin-y: 80.25%;
  }
  
  .pin--2 {
    --pin-x: 36.66%;
    --pin-y: 64.32%;
    z-index: 4;
  }
  
  .pin--3 {
    --pin-x: 58.66%;
    --pin-y: 44.21%;
    z-index: 4;
  }
  
  .pin--4 {
    --pin-x: 77.16%;
    --pin-y: 32.75%;
  }
  
  .legchip {
    --chip-x: 54.42%;
    --chip-y: 70.79%;
  }
}

.pin--next {
  width: auto;
  height: auto;
  background: none;
  border: 0;
  color: inherit;
  font-size: inherit;
}

.pin--future {
  background: rgba(15, 42, 77, 0.85);
  border-color: rgba(247, 243, 237, 0.7);
  color: #f7f3ed;
  font-size: 14px;
  font-weight: 500;
}

.pin__ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-radius: 50%;
  border: 2px solid rgba(216, 178, 108, 0.5);
  animation: ringout 2.6s ease-out infinite;
  pointer-events: none;
}

.pin__core {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #d8b26c;
  border: 3px solid #f7f3ed;
  color: #0f2a4d;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(15, 42, 77, 0.4);
}

.legchip {
  position: absolute;
  left: var(--chip-x);
  top: var(--chip-y);
  z-index: 2;
  transform: translate(-50%, -50%);
  background: #f7f3ed;
  border: 1px solid rgba(216, 178, 108, 0.6);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12.5px;
  color: #0f2a4d;
  box-shadow: 0 6px 18px rgba(15, 42, 77, 0.28);
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .g2 {
    gap: 52px !important;
  }
  .h1 {
    font-size: 76px !important;
  }
  .hL {
    font-size: 50px !important;
  }
  .h2 {
    font-size: 42px !important;
  }
  .factbar {
    gap: 26px !important;
    flex-wrap: wrap;
  }
}

@media (max-width: 900px) {
  .wrap {
    padding-left: 26px !important;
    padding-right: 26px !important;
  }
  .band {
    padding-left: 26px !important;
    padding-right: 26px !important;
  }

  .hero {
    height: auto !important;
    min-height: 560px;
  }
  .heroin {
    padding-top: 96px !important;
    padding-bottom: 60px !important;
  }

  .g2,
  .g3 {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }
  .g6 {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .stepnav {
    flex-wrap: wrap;
    justify-content: flex-start !important;
    gap: 10px !important;
  }

  .mapband {
    height: 420px !important;
    border-radius: 16px 16px 0 0 !important;
  }
  .mapcard {
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: auto !important;
    margin: 0 !important;
    border-radius: 0 0 16px 16px !important;
    border-top: 0 !important;
    box-shadow: none !important;
  }
  .modes {
    right: 16px !important;
    top: 16px !important;
  }
  .legchip {
    font-size: 11.5px !important;
    padding: 6px 11px !important;
  }
}

@media (max-width: 640px) {
  .wrap {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  .band {
    padding-top: 62px !important;
    padding-bottom: 62px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  .h1 {
    font-size: 46px !important;
  }
  .hL {
    font-size: 34px !important;
  }
  .h2 {
    font-size: 31px !important;
  }
  .h3 {
    font-size: 30px !important;
  }
  .h4 {
    font-size: 26px !important;
  }
  .g6 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }
  .factbar {
    padding: 18px 20px !important;
    gap: 14px !important;
  }
  .mapband {
    height: 330px !important;
  }
  .modes > div {
    width: 42px !important;
    height: 42px !important;
    border-radius: 11px !important;
  }
  .modes img {
    width: 27px !important;
    height: 27px !important;
  }
  .pin {
    transform: translate(-50%, -50%) scale(0.82);
  }
}

@media (prefers-reduced-motion: reduce) {
  .px {
    transform: none !important;
  }
  .pin__ring {
    animation: none;
    opacity: 0;
  }
  .anim-livepulse {
    animation: none;
  }
  .lift,
  .lift img,
  .cat,
  .cat img,
  .btn {
    transition: none !important;
  }
  .lift:hover,
  .cat:hover,
  .btn:hover {
    transform: none;
  }
  .lift:hover img {
    transform: none;
  }
}
