/* Ways to Exit (pinned) — Figma 2329:408 / 2346:1691, ScrollStep 2313:28, Motion spec 2343:731.
   Default (no .js = reduced motion): every option open, first screen shown, nothing pinned.
   ≥1061px + .js: 320svh runway, sticky card, options/screens scrubbed by js/sections/08-exit.js.
   ≤1060px: stacked options, phone stage pins to the top under .js. */
.exit {
  --exit-soft: #a8c6c0;                    /* secondary text on dark */
  --exit-line: rgba(255, 255, 255, .14);
  --exit-fill: rgba(255, 255, 255, .05);
  --exit-chip: rgba(49, 226, 154, .14);
  --exit-phone-h: 571.78px;                /* Phone/P2PMarket instance height in the 1440 frame */
  padding-block: 46px;
}

/* ---------- ExitCard ---------- */
.exit__card {
  display: flex;
  align-items: center;
  gap: 46px;
  padding: 44px;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(169.17deg, var(--ink-btn) 11.9%, var(--ink-deep) 83.33%);
  color: #fff;
}
.exit__main {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Copy */
.exit__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
}
.exit__caption {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}
.exit__caption img { flex: none; }
.exit__title {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.02em;
  color: #fff;
}
.exit__lede {
  font-size: 14px;
  line-height: 1.6;
  color: var(--exit-soft);
}

/* ---------- Options (ScrollStep, State=On by default) ---------- */
.exit__opts {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.exit__opt {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 17px;
  border: 1px solid var(--exit-line);
  border-radius: 12px;
  background: var(--exit-fill);
  transition:
    opacity var(--t-state) var(--ease),
    background-color var(--t-state) var(--ease),
    border-color var(--t-state) var(--ease);
}
.exit__num {
  flex: none;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 7px;
  background: var(--accent);
  color: var(--ink-deep);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  transition: background-color var(--t-state) var(--ease), color var(--t-state) var(--ease);
}
.exit__opt-content {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.exit__opt-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.02em;
  color: #fff;
}
.exit__opt-body {
  margin-top: 5px;
  overflow: hidden;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--exit-soft);
}
.exit__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
  overflow: hidden;
}
.exit__tags li {
  padding: 4px 9px;
  border-radius: 99px;
  background: var(--exit-chip);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--accent);
  white-space: nowrap;
}

/* Desktop / phone copy variants (the 390 frame uses shorter copy) */
.exit__m { display: none; }

/* ---------- Stage: phone screens + progress ---------- */
.exit__stage {
  flex: 0 0 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.exit__screens {
  position: relative;
  flex: none;
  height: var(--exit-phone-h);
  width: calc(var(--exit-phone-h) * 242 / 506);
}
.exit__shot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: translate(-50%, -44%) scale(.96);
  filter: drop-shadow(0 29px 40px rgba(6, 33, 31, .22));
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}
.exit__shot.is-on {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.exit__shot img {
  width: 100%;
  height: 100%;
  /* exports are flattened on the light canvas — clip to the bezel's own radius (34/242 × 34/506) */
  clip-path: inset(.5px round 14.05% / 6.72%);
}

.exit__progress {
  display: flex;
  gap: 6px;
}
.exit__bar {
  position: relative;
  width: 26px;
  height: 3px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, .2);
}
.exit__bar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .4s var(--ease);
}
.exit__bar.is-on::after { transform: scaleX(1); }

/* ---------- Desktop pinned runway (motion only) ---------- */
@media (min-width: 1061px) {
  .js .exit {
    --exit-card-h: max(560px, calc(100vh - 104px));
    height: 320vh;
  }
  @supports (height: 1svh) {
    .js .exit { --exit-card-h: max(560px, calc(100svh - 104px)); height: 320svh; }
  }
  .js .exit {
    /* phone shrinks on short viewports: card − 2×44 padding − 23 progress */
    --exit-phone-h: min(571.78px, calc(var(--exit-card-h) - 111px));
  }
  .js .exit__wrap { height: 100%; }
  .js .exit__card {
    position: sticky;
    top: 76px;
    height: var(--exit-card-h);
    min-height: 560px;
  }

  /* ScrollStep State=Off */
  .js .exit__opt-body,
  .js .exit__tags {
    transition: max-height .55s var(--ease), margin-top .55s var(--ease);
  }
  .js .exit__opt-body { max-height: 210px; }
  .js .exit__tags { max-height: 70px; }
  .js .exit__opt:not(.is-on) {
    opacity: .42;
    background-color: transparent;
    border-color: transparent;
  }
  .js .exit__opt:not(.is-on) .exit__num {
    background: rgba(255, 255, 255, .12);
    color: var(--exit-soft);
  }
  .js .exit__opt:not(.is-on) .exit__opt-body,
  .js .exit__opt:not(.is-on) .exit__tags {
    max-height: 0;
    margin-top: 0;
  }
}

/* ---------- ≤1060: un-pinned, screen pins to the top ---------- */
@media (max-width: 1060px) {
  .exit { --exit-phone-h: clamp(260px, 42vh, 400px); --exit-card-px: 36px; }
  .exit__card {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 40px var(--exit-card-px);
    overflow: visible;           /* lets the stage stick */
    background: var(--ink-deep);
  }
  .exit__main { display: contents; }
  .exit__copy { order: 0; }
  .exit__stage {
    order: 1;
    flex: none;
    gap: 6px;
    margin-inline: calc(-1 * var(--exit-card-px));
    padding: 16px var(--exit-card-px) 10px;
    background: var(--ink-deep);
  }
  .exit__opts { order: 2; gap: 10px; padding-top: 6px; }

  .js .exit__stage {
    position: sticky;
    top: var(--nav-h);
    z-index: 1;
  }
  .js .exit__opt:not(.is-on) { opacity: .6; }
  .exit__shot { filter: drop-shadow(0 16px 22px rgba(6, 33, 31, .22)); }
}

/* ---------- Phone (390 frame) ---------- */
@media (max-width: 720px) {
  .exit { --exit-phone-h: 313.72px; --exit-card-px: 20px; padding: 24px 0 64px; }
  .exit__card { padding-block: 32px; border-radius: 24px; }
  .exit__caption { line-height: 1.4; }
  .exit__title { font-size: 26px; line-height: 1.15; }
  .exit__d { display: none; }
  .exit__m { display: inline; }
}
