/* The climb: scroll story (section#climb). All classes prefixed climb-. */
.climb { --climb-row: 44px; overflow-x: clip; }

.climb-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.climb-ill { display: inline-block; font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; line-height: 1.4; padding: 2px 6px; border: 1px solid currentColor; color: var(--muted); white-space: nowrap; vertical-align: middle; }
.climb-disclaimer { margin-top: 14px; font-size: .9rem; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }

/* Layout: steps left, sticky phone right */
.climb-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; column-gap: clamp(40px, 6vw, 96px); align-items: start; }
.climb-left { grid-column: 1; grid-row: 1; min-width: 0; }
.climb-phone-col { grid-column: 2; grid-row: 1; position: sticky; top: 110px; align-self: start; display: flex; justify-content: center; z-index: 2; }
.climb-phone-col::before { content: ""; position: absolute; inset: -30px -10px; background: radial-gradient(closest-side, #F3E4FF, rgba(243, 228, 255, 0)); z-index: -1; pointer-events: none; }

/* Phone */
.climb-phone { width: 340px; max-width: 100%; margin: 0; border: 10px solid var(--ink); border-radius: 42px; background: var(--ink); box-shadow: 0 30px 60px -30px rgba(17, 17, 17, .45); }
.climb-screen { background: #fff; border-radius: 32px; overflow: hidden; }
.climb-status { display: flex; justify-content: space-between; align-items: center; padding: 8px 22px 6px; font-size: .74rem; font-weight: 700; }
.climb-map { position: relative; height: 130px; background: #EEF1F7; }
.climb-map svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.climb-area { position: absolute; left: 10px; top: 8px; background: #fff; font-size: .68rem; font-weight: 600; padding: 3px 8px; line-height: 1.4; }

/* Pin states. CSS scales the wrapper; GSAP only touches .climb-pin and .climb-ring. */
.climb-pin-wrap { transform-box: fill-box; transform-origin: 50% 100%; transition: opacity .35s, transform .35s; }
.climb-ring { opacity: 0; }
.climb-ghost { opacity: 0; }
.climb[data-stage="0"] .climb-pin-wrap { opacity: 0; }
.climb[data-stage="0"] .climb-ghost { opacity: 1; }
.climb[data-stage="1"] .climb-pin-wrap { transform: scale(.7); }
.climb[data-stage="2"] .climb-pin-wrap { transform: scale(.85); }

.climb-search { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; margin: -20px 12px 0; padding: 9px 14px; background: #fff; border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 8px 20px -10px rgba(17, 17, 17, .4); font-size: .85rem; color: var(--muted); }
.climb-search svg { flex: none; }

/* Results list: 5 rows plus a peeking 6th slot */
.climb-list-wrap { position: relative; margin-top: 8px; }
.climb-list { list-style: none; min-height: calc(var(--climb-row) * 6); }
.climb-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: center; height: var(--climb-row); padding: 0 14px; border-bottom: 1px solid var(--line); background: #fff; font-size: .86rem; line-height: 1.2; transition: background-color .3s, color .3s; }
.climb-row[hidden] { display: none; }
.climb-rank { font-weight: 700; color: var(--muted); }
.climb-biz { min-width: 0; }
.climb-name { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.climb-meta { display: block; font-size: .76rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.climb-stars { color: #B07D00; }
.climb-tags { display: flex; gap: 4px; }
.climb-tag { font-size: .64rem; font-weight: 700; background: var(--orange); color: #fff; padding: 3px 7px; white-space: nowrap; }
.climb-tag-top { background: var(--butter); color: var(--ink); }
.climb:not([data-stage="3"]) .climb-tag-top { display: none; }
.climb-you { background: #FFF3EC; }
.climb-you .climb-rank { color: var(--orange); }
.climb[data-stage="3"] .climb-you { background: #FFE4D4; box-shadow: inset 3px 0 0 var(--orange); }
.climb-peek { background: var(--soft); color: var(--muted); border-top: 1px dashed #C4C6CC; border-bottom: 0; }
.climb-peek .climb-rank::before { content: "#"; }
.climb-peek .climb-name { font-weight: 500; }
.climb-peek .climb-tag { background: #9A9DA6; }
.climb-note { position: absolute; left: 0; right: 0; bottom: 0; height: var(--climb-row); display: none; align-items: center; gap: 8px; padding: 0 14px; background: var(--soft); border-top: 1px dashed #C4C6CC; color: var(--muted); font-size: .8rem; font-weight: 600; }
.climb[data-stage="0"] .climb-note { display: flex; }

/* Metric tiles */
.climb-metrics { padding: 10px 12px 14px; border-top: 1px solid var(--line); }
.climb-metrics-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .7rem; color: var(--muted); margin-bottom: 6px; }
.climb-metrics-head .climb-ill { font-size: .56rem; padding: 1px 5px; }
.climb-tiles { display: grid; grid-template-columns: 1fr 1fr 1.45fr; gap: 6px; }
.climb-tile { padding: 8px 10px; background: var(--mint); min-width: 0; }
.climb-tile:nth-child(2) { background: #DDE3FF; }
.climb-tile:nth-child(3) { background: var(--butter); }
.climb-tile dt { font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #3B3D44; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.climb-tile dd { font-size: 1.1rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Steps with a progress line */
.climb-stepwrap { position: relative; }
.climb-track { position: absolute; left: 23px; top: 35vh; bottom: 35vh; width: 2px; background: var(--line); }
.climb-fill { position: absolute; inset: 0; background: var(--orange); transform-origin: 50% 0; }
/* Without GSAP (or with reduced motion) the line follows the active stage */
.climb[data-stage="0"] .climb-fill { transform: scaleY(0); }
.climb[data-stage="1"] .climb-fill { transform: scaleY(.3333); }
.climb[data-stage="2"] .climb-fill { transform: scaleY(.6667); }
.climb-steps { list-style: none; }
.climb-step { position: relative; min-height: 70vh; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 28px; align-items: center; }
.climb-num { position: relative; z-index: 1; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--ink); background: #fff; color: var(--ink); font: 600 1.05rem var(--sans); cursor: pointer; transition: background-color .3s, color .3s, border-color .3s; }
.climb-num:hover { background: var(--soft); }
.climb-step.climb-done .climb-num { background: var(--ink); color: #fff; }
.climb-step[aria-current] .climb-num { background: var(--orange); border-color: var(--orange); color: #fff; }
.climb-body { padding: 24px 0; transition: opacity .4s; }
.climb-js .climb-step:not([aria-current]) .climb-body { opacity: .35; }
.climb-body h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 500; letter-spacing: -.02em; line-height: 1.15; margin-bottom: 12px; }
.climb-plus { color: var(--orange); }
.climb-body p { color: var(--muted); max-width: 460px; }
.climb-body .climb-stat { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--ink); font-size: .95rem; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.climb-stat b { font-weight: 700; }
.climb-cta { padding: 10px 0 0 76px; }

/* Short desktop screens: keep the whole phone in view */
@media (min-width: 961px) and (max-height: 760px) {
  .climb { --climb-row: 38px; }
  .climb-phone-col { top: 96px; }
  .climb-status { display: none; }
  .climb-map { height: 88px; }
}

/* Under 960px: compact phone sticks to the top, steps scroll beneath it */
@media (max-width: 960px) {
  .climb { --climb-row: 24px; }
  .climb-grid { grid-template-columns: minmax(0, 1fr); }
  .climb-phone-col { grid-column: 1; grid-row: 1; top: 80px; z-index: 5; margin: 0 -24px; padding: 6px 24px 8px; background: var(--bg); }
  .climb-phone-col::before { display: none; }
  .climb-phone-col::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 22px; background: linear-gradient(var(--bg), rgba(255, 255, 255, 0)); pointer-events: none; }
  .climb-left { grid-column: 1; grid-row: 2; }
  .climb-phone { width: 100%; max-width: 400px; border-width: 6px; border-radius: 24px; box-shadow: 0 16px 30px -22px rgba(17, 17, 17, .5); }
  .climb-screen { border-radius: 18px; }
  .climb-status, .climb-area { display: none; }
  .climb-map { height: 34px; }
  .climb-search { margin: 4px 10px 0; padding: 3px 12px; font-size: .76rem; box-shadow: none; }
  .climb-list-wrap { margin-top: 4px; }
  .climb-row { padding: 0 10px; font-size: .78rem; grid-template-columns: 22px minmax(0, 1fr) auto; }
  .climb-biz { display: flex; align-items: baseline; gap: 6px; }
  .climb-name { flex: 0 1 auto; min-width: 0; }
  .climb-meta { flex: none; font-size: .7rem; }
  .climb-extra { display: none; }
  .climb-tag { font-size: .58rem; padding: 2px 5px; }
  .climb-note { padding: 0 10px; font-size: .72rem; }
  .climb-metrics { padding: 6px 10px 8px; }
  .climb-metrics-head { font-size: .64rem; line-height: 1.4; margin-bottom: 3px; }
  .climb-tile { padding: 3px 8px; }
  .climb-tile dt { font-size: .54rem; }
  .climb-tile dd { font-size: .92rem; }
  /* Steps switch at 70% of the viewport here, so each body starts at the top of its block */
  .climb-track { left: 19px; top: 20px; bottom: calc(55vh - 20px); }
  .climb-step { min-height: 55vh; grid-template-columns: 40px minmax(0, 1fr); gap: 18px; align-items: start; }
  .climb-body { padding: 4px 0 24px; }
  .climb-num { width: 40px; height: 40px; font-size: .95rem; }
  .climb-cta { padding-left: 58px; }
}

@media (max-width: 768px) {
  .climb-body h3 { font-size: 1.45rem; }
  .climb-body p { font-size: 1rem; }
  .climb-body .climb-stat { font-size: .9rem; }
  .climb-cta { padding-left: 0; }
  .climb-cta .btn { width: 100%; }
}

@media (max-width: 400px) {
  .climb-tag-top { display: none; }
}
