/* THORWALLET - the homepage hero phone, coded (hero.js).
   The phone rises into view and runs one swap as the hero scrolls. Device
   drawn in CSS, screens measured from captures of the real app (palette
   below). The device stays dark in the light theme: it is a product shot. */

.hero-center .hero-phone { perspective: 2200px; perspective-origin: 50% 40%; }
.hx-floor {
  position: absolute; left: 0; top: 0; width: 1px; height: 1px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.55), transparent); filter: blur(10px);
  transform-origin: 0 0; will-change: transform, opacity;
}
.hx-dev {
  position: absolute; left: 0; top: 0; width: 409px; height: 846px;
  transform-style: preserve-3d; transform-origin: 50% 50%; will-change: transform;
}
.hx-face {
  position: absolute; inset: 0; border-radius: 66px; padding: 6px;
  background: linear-gradient(145deg, #E2E7EC 0%, #9AA3AD 22%, #CBD2D9 48%, #7D8792 76%, #C3CAD1 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5), 0 50px 90px -40px rgba(0, 0, 0, 0.7);
}
.hx-bezel { position: relative; width: 100%; height: 100%; border-radius: 60px; background: #050608; padding: 11px; }
/* clip-path as well as border-radius: inside the 3D transform Safari ignores the rounded overflow clip for
   composited children (the animated screens), and their square corners showed past the frame */
.hx-screen { position: relative; width: 375px; height: 812px; border-radius: 50px; overflow: hidden; -webkit-clip-path: inset(0 round 50px); clip-path: inset(0 round 50px); background: #1F283A; isolation: isolate; }
.hx-island { position: absolute; left: 50%; top: 11px; width: 118px; height: 34px; margin-left: -59px; border-radius: 17px; background: #000; z-index: 30; }
.hx-glare {
  position: absolute; inset: 0; z-index: 31; pointer-events: none; mix-blend-mode: screen;
  background: linear-gradient(115deg, transparent 36%, rgba(255, 255, 255, 0.07) 46%, rgba(255, 255, 255, 0.02) 52%, transparent 60%);
  background-size: 260% 100%; background-position: var(--glare, 50%) 0;
}
.hx-btn { position: absolute; width: 5px; border-radius: 3px; background: linear-gradient(90deg, #7D8792, #C9D0D7); }
.hx-btn.l { left: -3px; } .hx-btn.r { right: -3px; background: linear-gradient(270deg, #7D8792, #C9D0D7); }

/* ============ the app ============
   Measured from the real flow (screen captures of the swap, 1 pt = 1 app point):
   screen #1F283A with a lighter top, cards #26354A, chips #334258, inputs #2A394D,
   review sheet #243144, primary #2B63E3, grey text #8A97A6. */
.hx-app {
  position: absolute; inset: 0; font-family: "Montserrat", -apple-system, sans-serif; color: #FFFFFF;
  -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; letter-spacing: 0; text-align: left;
}
.hx-app svg { display: block; }
.hx-app svg.hx-ver { display: inline-block; }
.hx-status { position: absolute; left: 0; right: 0; top: 0; height: 54px; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 6px 30px 0 40px; font-size: 16px; font-weight: 700; pointer-events: none; }
.hx-status i { display: flex; align-items: center; gap: 6px; }
.hx-status svg { height: 12px; width: auto; }
.hx-v { position: absolute; inset: 0; background: linear-gradient(180deg, #262E3F 0%, #222A3B 45%, #1F283A 100%); overflow: hidden; will-change: transform, opacity; }
.hx-shade { position: absolute; inset: 0; background: #0B0C10; opacity: 0; pointer-events: none; z-index: 10; }

/* shared parts */
.hx-coin { position: relative; flex-shrink: 0; display: block; }
.hx-coin > svg { width: 100%; height: 100%; border-radius: 50%; }
.hx-coin .nb { position: absolute; right: -3px; bottom: -3px; width: 42%; height: 42%; border-radius: 50%; box-shadow: 0 0 0 2px #26354A; background: #1F283A; overflow: hidden; }
.hx-coin .nb svg { width: 100%; height: 100%; }
.hx-ver { width: 13px; height: 13px; display: inline-block; vertical-align: -1px; margin-left: 4px; }
.hx-pos { color: #4ADE9B; } .hx-neg { color: #F0616D; } .hx-dim { color: #8A97A6; }
.hx-cta { height: 42px; border-radius: 12px; background: #2B63E3; display: grid; place-items: center; font-size: 17px; font-weight: 500; }
.hx-cta.off { background: #2859DC; color: #6488CD; }
.hx-cta.ghost { background: #212B3C; border: 1px solid #2F3B4E; color: #3B7BF0; }
.hx-homebar { position: absolute; left: 50%; bottom: 8px; width: 134px; height: 5px; margin-left: -67px; border-radius: 3px; background: #E8EEF3; z-index: 25; opacity: 0.9; }
.hx-sq { width: 39px; height: 39px; border-radius: 12px; background: #29384C; display: grid; place-items: center; flex-shrink: 0; }
.hx-sq svg { width: 20px; height: 20px; color: #E6ECF2; }

/* ---- wallet home ---- */
.hh-top { position: absolute; left: 13px; right: 13px; top: 58px; display: flex; align-items: center; gap: 8px; }
.hh-search { flex: 1; height: 39px; border-radius: 12px; background: #2A394D; display: flex; align-items: center; gap: 10px; padding: 0 13px; color: #8A97A6; font-size: 16px; font-weight: 500; }
.hh-search svg { width: 18px; height: 18px; }
.hh-name { position: absolute; left: 0; right: 0; top: 114px; text-align: center; font-size: 15px; font-weight: 500; color: #C6CDD6; display: flex; align-items: center; justify-content: center; gap: 4px; }
.hh-name svg { width: 14px; height: 14px; }
.hh-bal { position: absolute; left: 0; right: 0; top: 136px; text-align: center; font-size: 40px; font-weight: 700; letter-spacing: -0.01em; display: flex; align-items: center; justify-content: center; gap: 10px; }
.hh-bal small { font-size: 22px; }
.hh-bal svg { width: 20px; height: 20px; color: #8A97A6; }
.hh-acts { position: absolute; left: 13px; right: 13px; top: 204px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.hh-act { height: 72px; border-radius: 14px; background: #26354A; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; font-size: 13px; font-weight: 500; color: #E6ECF2; }
.hh-act svg { width: 23px; height: 23px; color: #5B9BFF; }
.hh-tabs { position: absolute; left: 20px; right: 13px; top: 298px; display: flex; align-items: center; gap: 22px; font-size: 16px; font-weight: 600; color: #8A97A6; }
.hh-tabs .on { color: #5B9BFF; position: relative; }
.hh-tabs .on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 2.5px; border-radius: 2px; background: #5B9BFF; }
.hh-tabs .sp { flex: 1; }
.hh-tabs .hx-sq { width: 32px; height: 32px; border-radius: 10px; }
.hh-tabs .hx-sq svg { width: 16px; height: 16px; }
.hh-list { position: absolute; left: 16px; right: 16px; top: 342px; }
.hh-row { display: flex; align-items: center; gap: 12px; height: 62px; }
.hh-row .nm { flex: 1; min-width: 0; }
.hh-row .nm > b { display: block; font-size: 16px; font-weight: 600; }
.hh-row .nm > span { display: block; font-size: 13.5px; font-weight: 500; color: #8A97A6; margin-top: 3px; }
.hh-row .vl { text-align: right; }
.hh-row .vl > b { display: block; font-size: 16px; font-weight: 600; }
.hh-row .vl > span { display: block; font-size: 13.5px; font-weight: 500; color: #8A97A6; margin-top: 3px; }
.hh-tabbar { position: absolute; left: 0; right: 0; bottom: 0; height: 92px; background: linear-gradient(180deg, rgba(31, 40, 58, 0), #1B2334 38%); display: flex; align-items: flex-start; justify-content: space-around; padding: 20px 10px 0; }
.hh-tab { width: 62px; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 11px; font-weight: 500; color: #8A97A6; }
.hh-tab svg { width: 22px; height: 22px; }
.hh-tab.on { color: #5B9BFF; }
.hh-tab.mid span { width: 52px; height: 52px; margin-top: -16px; border-radius: 50%; background: #2B63E3; display: grid; place-items: center; color: #fff; box-shadow: 0 10px 24px -8px rgba(43, 99, 227, 0.8); }

/* ---- swap ---- */
.hs-head { position: absolute; left: 20px; right: 13px; top: 57px; height: 39px; display: flex; align-items: center; gap: 16px; font-size: 24px; font-weight: 500; }
.hs-head > svg { width: 11px; height: 18px; color: #E6ECF2; }
.hs-head .sp { flex: 1; }
.hs-card { position: absolute; left: 13px; width: 351px; height: 107px; border-radius: 14px; background: #26354A; }
.hs-amt { position: absolute; left: 26px; top: 20px; height: 50px; font-size: 26px; font-weight: 700; display: flex; align-items: center; }
.hs-chip { position: absolute; right: 12px; top: 12px; height: 51px; display: flex; align-items: center; gap: 10px; padding: 0 12px 0 6px; border-radius: 14px; background: #334258; font-size: 22px; font-weight: 600; }
.hs-chip > svg { width: 13px; height: 13px; color: #C6CDD6; margin-left: 2px; }
.hs-row2 { position: absolute; left: 26px; right: 16px; top: 76px; display: flex; align-items: center; justify-content: space-between; font-size: 15px; font-weight: 500; color: #8A97A6; }
.hs-row2 > span:last-child { display: flex; align-items: center; gap: 6px; }
.hs-row2 svg { width: 14px; height: 14px; }
.hs-spin { position: absolute; left: 30px; top: 34px; width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid rgba(91, 155, 255, 0.25); border-top-color: #5B9BFF; opacity: 0; animation: hx-spin 0.8s linear infinite; }
.hs-flip { position: absolute; left: 50%; width: 30px; height: 30px; margin-left: -15px; border-radius: 50%; background: #1F2A3B; box-shadow: 0 0 0 3px #1F2C3E; display: grid; place-items: center; z-index: 2; }
.hs-flip svg { width: 15px; height: 15px; color: #E6ECF2; }
.hs-rate { position: absolute; left: 13px; width: 351px; height: 46px; border-radius: 12px; background: #2E3B4C; display: flex; align-items: center; gap: 12px; padding: 0 14px 0 16px; font-size: 16px; font-weight: 500; color: #E6ECF2; opacity: 0; }
.hs-rate .rl { width: 18px; height: 18px; flex-shrink: 0; color: #8A97A6; }
.hs-rate .sp { flex: 1; }
.hs-rate .arc { width: 16px; height: 16px; color: #E6ECF2; }
.hs-foot { position: absolute; left: 13px; right: 11px; top: 691px; }
.hs-bal small { position: absolute; left: 0; top: 0; font-size: 13px; font-weight: 500; color: #C6CDD6; }
.hs-bal b { position: absolute; left: 0; top: 21px; font-size: 16px; font-weight: 500; white-space: nowrap; }
.hs-bal .max { position: absolute; right: 0; top: 3px; height: 34px; padding: 0 17px; border-radius: 12px; background: #243548; display: grid; place-items: center; font-size: 15px; font-weight: 500; }
.hs-foot .hx-cta { position: absolute; left: 0; right: 2px; top: 45px; }
.hx-caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; background: #5B9BFF; animation: hx-blink 1s steps(1) infinite; vertical-align: -0.12em; }

/* ---- bottom sheets ---- */
.hx-sheet { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 22px 22px 0 0; z-index: 12; will-change: transform; }
.hx-sheet::before { content: ""; position: absolute; left: 50%; top: 9px; width: 27px; height: 3px; margin-left: -13.5px; border-radius: 2px; background: #4A5160; }
.ht-sheet { top: 53px; background: linear-gradient(180deg, #252E40, #21293B 30%); }
.ht-search { position: absolute; left: 13px; right: 11px; top: 24px; display: flex; gap: 8px; }
.ht-search .in { flex: 1; height: 39px; border-radius: 12px; background: #2A394D; display: flex; align-items: center; gap: 10px; padding: 0 14px; font-size: 17px; font-weight: 500; }
.ht-search .in svg { width: 19px; height: 19px; color: #8A97A6; flex-shrink: 0; }
.ht-search .ph { color: #8A97A6; }
.ht-search .hx-sq { width: 37px; height: 39px; }
.ht-chips { position: absolute; left: 13px; right: 0; top: 79px; display: flex; gap: 5px; overflow: hidden; }
.ht-chips span { flex-shrink: 0; height: 35px; padding: 0 12px; border-radius: 10px; background: #29384C; display: flex; align-items: center; font-size: 15px; font-weight: 500; color: #8C99A8; }
.ht-chips span.on { color: #3DDC97; }
.ht-top {
  position: absolute; left: 13px; right: 11px; top: 132px; height: 51px; border-radius: 12px; display: flex; align-items: center; gap: 6px; padding: 0 10px 0 12px; font-size: 15px; font-weight: 500;
  border: 1.5px solid transparent; background: linear-gradient(#263549, #263549) padding-box, linear-gradient(90deg, #2D5DA8, #7FB3AC) border-box;
}
.ht-top .t { flex: 1; min-width: 0; line-height: 1.2; }
.ht-top .tile { width: 34px; height: 34px; border-radius: 8px; background: #2A425A; display: grid; place-items: center; flex-shrink: 0; }
.ht-list { position: absolute; left: 13px; right: 11px; top: 200px; }
.ht-set { position: absolute; left: 0; right: 0; top: 0; opacity: 0; }
.ht-row { display: flex; align-items: center; gap: 13px; height: 66px; margin-bottom: 7px; padding: 0 16px 0 12px; border-radius: 14px; background: #26354A; }
.ht-row .nm { flex: 1; min-width: 0; }
.ht-row .nm > b { display: block; font-size: 17px; font-weight: 600; }
.ht-row .nm > span { display: block; font-size: 16px; font-weight: 400; color: #8A97A6; margin-top: 2px; }
.ht-row .vl { text-align: right; }
.ht-row .vl > b { display: block; font-size: 18px; font-weight: 600; }
.ht-row .vl > span { display: block; font-size: 16px; font-weight: 400; color: #8A97A6; margin-top: 2px; }
.ht-row.hit { box-shadow: inset 0 0 0 1.5px #3B7BF0; }
.ht-shim { height: 66px; margin-bottom: 7px; border-radius: 14px; background: linear-gradient(90deg, #26354A 0%, #2F4058 45%, #26354A 90%); background-size: 220% 100%; animation: hx-shim 1.1s linear infinite; }
.hr-sheet { height: 556px; background: #243144; }
.hr-title { position: absolute; left: 0; right: 0; top: 36px; text-align: center; font-size: 17px; font-weight: 600; }
.hr-pair { position: absolute; left: 15px; right: 15px; top: 72px; height: 182px; border-radius: 14px; background: #263549; }
.hr-leg { position: absolute; left: 18px; right: 20px; }
.hr-leg .ic { position: absolute; left: 0; top: 0; }
.hr-leg .a { position: absolute; right: 0; top: 6px; font-size: 19px; font-weight: 700; white-space: nowrap; }
.hr-leg .b { position: absolute; left: 0; right: 0; top: 48px; display: flex; align-items: center; justify-content: space-between; font-size: 11px; font-weight: 500; color: #8A97A6; }
.hr-leg .b > span:first-child { display: flex; align-items: center; gap: 6px; color: #C6CDD6; }
.hr-leg .addr { display: inline-flex; align-items: center; gap: 4px; height: 17px; padding: 0 7px 0 3px; border-radius: 7px; background: #2F3B4E; color: #AEB8C4; font-size: 9.5px; }
.hr-leg .b > span:last-child { font-size: 11.5px; color: #657386; }
.hr-arrow { position: absolute; left: 50%; top: 82px; width: 16px; height: 16px; margin-left: -8px; }
.hr-arrow svg { width: 16px; height: 16px; color: #C6CDD6; }
.hr-fast { position: absolute; right: 19px; top: 270px; display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.hr-fast svg { width: 18px; height: 18px; color: #E6ECF2; }
.hr-fees { position: absolute; left: 15px; right: 15px; top: 307px; height: 141px; border-radius: 14px; background: #263549; }
.hr-fees .rw { position: absolute; left: 18px; right: 20px; display: flex; align-items: center; justify-content: space-between; font-size: 11px; font-weight: 500; color: #C6CDD6; }
.hr-fees .rw b { color: #FFFFFF; font-size: 15px; font-weight: 600; }
.hr-fees hr { position: absolute; left: 18px; right: 20px; top: 77px; margin: 0; border: 0; border-top: 1px solid #7C8C9D; }
.hr-fees .tf b { height: 32px; padding: 0 12px; border-radius: 10px; background: #171E2B; border: 1.5px solid #2B4A7A; display: flex; align-items: center; gap: 6px; }
.hr-sheet .hx-cta { position: absolute; left: 16px; right: 17px; top: 463px; height: 41px; }

/* ---- passcode ---- */
.hp-logo { position: absolute; left: 50%; top: 58px; width: 30px; height: 30px; margin-left: -15px; }
.hp-t { position: absolute; left: 0; right: 0; top: 168px; text-align: center; font-size: 26px; font-weight: 700; letter-spacing: 0.01em; text-transform: uppercase; }
.hp-s { position: absolute; left: 0; right: 0; top: 210px; text-align: center; font-size: 10px; font-weight: 500; color: #C6CDD6; }
.hp-dots { position: absolute; left: 32px; right: 30px; top: 268px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.hp-dots i { height: 60px; border-radius: 8px; background: #222A3E; border: 1px solid #2E3950; display: grid; place-items: center; }
.hp-dots i::after { content: ""; width: 13px; height: 13px; border-radius: 50%; background: #FFFFFF; transform: scale(var(--f, 0)); }
.hp-dots i.cur { border-color: #3B7BF0; }
.hp-keys span { position: absolute; width: 76px; height: 64px; margin: -32px 0 0 -38px; border-radius: 18px; display: grid; place-items: center; font-size: 26px; font-weight: 500; }
.hp-keys span.down { background: rgba(91, 155, 255, 0.2); }
.hp-keys svg { width: 22px; height: 22px; color: #E6ECF2; }

/* ---- pending / sent ---- */
.hd-ring { position: absolute; left: 50%; width: 96px; height: 96px; margin-left: -48px; }
.hd-ring svg { width: 100%; height: 100%; }
.hd-spin { animation: hx-spin 1.1s linear infinite; transform-origin: 50% 50%; }
.hd-t { position: absolute; left: 20px; right: 20px; text-align: center; font-size: 19px; font-weight: 700; line-height: 1.25; }
.hd-s { position: absolute; left: 10px; right: 10px; top: 413px; text-align: center; font-size: 12px; font-weight: 500; color: #E6ECF2; line-height: 1.4; }
.hd-btns .hx-cta { position: absolute; left: 10px; right: 18px; height: 42px; border-radius: 10px; font-size: 15px; }

/* ---- touch ---- */
.hx-tap { position: absolute; left: 0; top: 0; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; z-index: 40; pointer-events: none; opacity: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.55) 0 30%, rgba(255, 255, 255, 0.18) 31% 60%, transparent 61%); }

@keyframes hx-spin { to { transform: rotate(360deg); } }
@keyframes hx-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes hx-shim { from { background-position: 120% 0; } to { background-position: -120% 0; } }
@media (prefers-reduced-motion: reduce) {
  .hx-caret, .ht-shim, .hs-spin, .hd-spin { animation: none; }
}
