/* ───────── tokens (from the Figma variables) ───────── */
:root {
  --brand: #ff9f0e;
  --scrim: rgba(0, 0, 0, 0.75);
  --icon-primary: #e2e2e2;
  --text-dim: #8b8b8b;
  --text-primary: #333;
  --handle: #bdbdbd;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --roboto: "Roboto", var(--sans);
  --s: 1;   /* recap scale  (set by app.js) */
  --sl: 1;  /* landing scale (set by app.js) */
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: #111;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  font-family: var(--sans);
}

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; }
img { -webkit-user-drag: none; }

/* The app is a phone-shaped viewport. On a real phone it fills the screen; on a
   desktop it shows as a centred phone so the prototype still looks right. */
#app {
  position: fixed;
  left: 50%;
  top: 50%;
  width: var(--app-w, 100vw);
  height: var(--app-h, 100dvh);
  transform: translate(-50%, -50%);
  border-radius: var(--app-r, 0);
  overflow: hidden;
  isolation: isolate;
  background: #444;
}
body.framed #app { box-shadow: 0 0 0 1px #2a2a2a, 0 30px 80px rgba(0, 0, 0, 0.6); }

/* Fixed-size design canvas, scaled to fit and centred */
.stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 375px;
  height: 844px;
  margin: -422px 0 0 -187.5px;
  transform: scale(var(--s));
  transform-origin: center;
}

/* ═════════════ Landing ═════════════ */
.landing { position: absolute; inset: 0; background: #444; overflow: hidden; }
.landing-stage { height: 812px; margin-top: -406px; transform: scale(var(--sl)); }
.landing-stage > * { position: absolute; }
.map-layer { position: absolute; inset: 0; }
.map-img { position: absolute; left: 0; right: 0; height: 82.66%; overflow: hidden; }
.map-img img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; }

.navtop { left: 0; top: 0; width: 375px; height: 108px; pointer-events: none; }
.navtop > * { position: absolute; }
.nav-grad { left: 0; top: 0; width: 375px; height: 106px; background: linear-gradient(to top, rgba(119, 119, 119, 0), #464646); mix-blend-mode: multiply; opacity: 0.75; }
.hunt-logo { left: 50%; margin-left: -44.62px; top: 72px; width: 89.25px; height: 24px; }
.hunt-logo img { position: absolute; display: block; }

.glass-round {
  width: 48px; height: 48px; border-radius: 50%;
  background:
    linear-gradient(rgba(255,255,255,.28), rgba(255,255,255,.12)),
    rgba(150, 150, 150, 0.82);
  box-shadow: inset 0 0 0 .5px rgba(255,255,255,.35), 0 1px 4px rgba(0,0,0,.18);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.glass-round .ico { position: absolute; left: 12px; top: 12px; width: 24px; height: 24px; display: block; }
.compass img, .compass i { position: absolute; display: block; }
.compass i { background: #1a1a1a; border-radius: 2px; }

.glass-pill {
  border-radius: 34px;
  background: linear-gradient(180deg, #bdbdbd 0%, #dcdcdc 30%, #e6e6e6 50%, #dcdcdc 70%, #bdbdbd 100%);
  box-shadow: -1.25px 0 0 -.75px #dbdbdb, inset 0 0 0 .5px rgba(255,255,255,.5), 0 2px 8px rgba(0,0,0,.2);
  display: flex; align-items: center; gap: 8px; padding: 4px 8px;
  color: #1a1a1a; text-align: left;
}
.icon-box { position: relative; width: 31px; height: 32px; border-radius: 16px; flex: none; display: block; }
.icon-box img { position: absolute; left: 3px; top: 3.61px; width: 24px; height: 24.774px; }
.labels { display: flex; flex-direction: column; align-items: flex-start; }
.l-small { font-size: 11px; line-height: 16px; height: 13px; font-weight: 400; white-space: nowrap; }
.l-big { font-size: 18px; line-height: 24px; font-weight: 700; white-space: nowrap; }

.banner { left: 84px; top: 112px; width: 206px; height: 48px; transition: transform .15s ease, filter .15s ease; }
.banner:active { transform: scale(0.96); filter: brightness(.92); }
.banner:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.layers { left: 16px; top: 668px; width: 120px; height: 48px; }

.basemaps { left: 311px; top: 594px; width: 48px; height: 57px; flex-direction: column; justify-content: center; padding: 8px 4px; gap: 8px; box-shadow: 0 8px 48px rgba(0,0,0,.25), inset 0 0 0 .5px rgba(255,255,255,.5); }
.basemaps .bm-line { position: absolute; left: 2px; top: 29px; width: 44px; height: 1px; opacity: .6; }
.bm-top, .bm-bottom { height: 16px; display: flex; align-items: center; justify-content: center; font-size: 12px; line-height: 14.3px; }
.bm-bottom { font-weight: 700; }

.tabbar { left: 0; top: 721px; width: 375px; height: 91px; pointer-events: none; }
.tab-bg { position: absolute; left: 21px; top: 12px; width: 333px; height: 58px; border-radius: 296px; background: rgba(214, 214, 214, 0.92); box-shadow: 0 8px 40px rgba(0,0,0,.12), inset 0 0 0 .5px rgba(255,255,255,.55); }
.tab { position: absolute; top: 16px; width: 70.75px; height: 50px; text-align: center; color: #1a1a1a; }
.tab img { position: absolute; left: 23.375px; top: 6px; width: 24px; height: 24px; }
.tab span { position: absolute; left: 0; right: 0; top: 31px; font-size: 9px; line-height: 12px; white-space: nowrap; }
.tab-sel { position: absolute; left: -2px; top: 0; width: 75px; height: 50px; border-radius: 100px; background: #ededed; }

/* ═════════════ Recap sheet ═════════════ */
.recap {
  position: absolute; inset: 0;
  background: #222;
  transform: translate3d(0, 100%, 0);
  visibility: hidden;
  transition: transform .5s var(--ease), visibility 0s linear .5s;
  will-change: transform;
  touch-action: none;
  z-index: 5;
}
.recap.open { transform: translate3d(0, 0, 0); visibility: visible; transition: transform .5s var(--ease), visibility 0s; }
.recap.dragging { transition: none; }

.carousel { position: absolute; inset: 0; overflow: hidden; }
.track { display: flex; height: 100%; width: 100%; transform: translate3d(0, 0, 0); transition: transform .38s var(--ease); will-change: transform; }
.track.dragging { transition: none; }

.slide { position: relative; flex: 0 0 100%; height: 100%; overflow: hidden; background: var(--bg, #222); }

/* background art – coordinates are in the 375 x 844 design space, bleeds past the stage on tall screens */
.bg { position: absolute; left: 0; top: 0; width: 375px; height: 844px; pointer-events: none; }
.bg > * { position: absolute; }
.bg img.cover, .bg .mask-img img.fill { display: block; max-width: none; object-fit: cover; }
.bg img.cover { position: absolute; }
.bg .mask-img { position: absolute; }
.bg img.fill { position: absolute; inset: 0; width: 100%; height: 100%; }
.topo { left: 0; top: 7px; width: 385px; height: 837px; overflow: hidden; }
.topo img { position: absolute; max-width: none; height: 100.26%; left: -137.44%; top: -0.13%; width: 383.59%; }

/* body layout (Body → Content → Content in Figma) */
.body { position: absolute; left: 0; top: 0; width: 374px; height: 844px; display: flex; flex-direction: column; }

.top-space { flex: none; height: 44px; }
.pager-space { flex: none; height: 32px; }

/* fixed header: stays put while slides swipe underneath */
.chrome { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.chrome .icon-btn { pointer-events: auto; }
.sheet-top { position: absolute; left: 0; top: 0; width: 375px; padding: 0 16px 4px; }
.handle-row { height: 16px; display: flex; justify-content: center; align-items: flex-end; }
.handle-row i { display: block; width: 32px; height: 4px; border-radius: 2px; background: var(--handle); }
.icon-row { display: flex; justify-content: flex-end; gap: 20px; height: 24px; }
.icon-btn { position: relative; width: 24px; height: 24px; display: block; }
.icon-btn img { display: block; width: 24px; height: 24px; }
.icon-btn::after { content: ""; position: absolute; inset: -12px -10px; }
.icon-btn:active { opacity: .6; }

.content { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; gap: 16px; padding: 0 16px 32px; }
.inner { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; gap: 8px; padding-bottom: 16px; }
.inner.end { justify-content: flex-end; }

/* swipe-linked motion: content runs ahead of the photo and fades as it leaves/arrives */
.inner {
  transform: translate3d(calc(var(--p, 0) * 112px), calc(var(--ap, 0) * 12px), 0);
  opacity: calc(1 - var(--ap, 0) * 0.9);
  will-change: transform, opacity;
}
.no-motion .inner { transform: none; opacity: 1; will-change: auto; }

/* first slide: text rises in as the sheet slides up */
@keyframes rise { from { opacity: 0; transform: translate3d(0, 16px, 0); } to { opacity: 1; transform: none; } }
.recap.intro .slide[data-index="0"] .text > * { animation: rise .6s var(--ease) both; animation-delay: calc(.3s + var(--i, 0) * .09s); }
.recap.intro .slide[data-index="0"] .text > :nth-child(2) { --i: 1; }
.recap.intro .slide[data-index="0"] .text > :nth-child(3) { --i: 2; }

.pager { position: absolute; left: 16px; top: 44px; width: 342px; display: flex; align-items: center; justify-content: center; gap: 16px; padding: 12px 0; }
.pager i { flex: 0 0 8px; display: block; width: auto; min-width: 8px; height: 8px; border-radius: 99px; background: var(--icon-primary); transition: flex-grow .38s var(--ease), background-color .38s ease; }
.pager i.done { background: var(--brand); }
.pager i.now { flex-grow: 1; background: var(--brand); }

.text { flex: 1 0 0; min-height: 1px; display: flex; flex-direction: column; gap: 8px; padding: 20px 8px 16px; word-break: break-word; }
.text.fixed { flex: none; }
.text.center { justify-content: center; }

.t-title1 { margin: 0; font-size: 36px; line-height: 43px; font-weight: 700; color: #fff; }
.t-title4 { margin: 0; font-size: 18px; line-height: 21.5px; font-weight: 700; color: #fff; }
.t-body { margin: 0; font-family: var(--roboto); font-size: 22px; line-height: 28px; font-weight: 400; color: #fff; }
.t-sub { margin: 0; font-size: 22px; line-height: 26.3px; font-weight: 400; color: #fff; }
.t-display { margin: 0; font-size: 57px; line-height: 68px; font-weight: 700; color: var(--brand); }
.profile { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; width: 100%; }
.summer-copy { display: flex; flex-direction: column; gap: 4px; width: 100%; }
.avatar { border-radius: 80px; overflow: hidden; flex: none; }
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }

.footer { flex: none; display: flex; align-items: center; padding: 4px 16px; background: var(--scrim); border-radius: 2px; }
.footer .logo { display: flex; align-items: center; gap: 7px; flex: none; }
.footer .logo img { display: block; }
.footer .tag { margin: 0; flex: 1 1 0; min-width: 1px; text-align: right; font-size: 14px; line-height: 16.7px; font-weight: 700; color: #fff; }

/* slide 4 chart */
.graphic { display: inline-grid; grid-template-rows: max-content; place-items: start; line-height: 0; position: relative; flex: none; width: 100%; }
.g-grp, .g-item { grid-column: 1; grid-row: 1; position: relative; }
.g-grp { display: inline-grid; grid-template-rows: max-content; place-items: start; }
.g-label { margin: 0; font-size: 16px; line-height: 19.1px; font-weight: 510; color: #fff; text-align: center; }
.g-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.g-col.g-gap { justify-content: flex-start; gap: 22px; }
.g-col .g-label { white-space: nowrap; }
.g-end { flex: 1 0 0; min-height: 1px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.g-vec { display: flex; align-items: center; justify-content: center; container-type: size; }
.g-rot { flex: none; transform: rotate(9.57deg) skewX(1.42deg); }
.g-rel { position: relative; width: 100%; height: 100%; }
.g-inset { position: absolute; }
.g-inset img { display: block; max-width: none; width: 100%; height: 100%; }

/* slide 8 stats */
.stats-grid { flex: none; height: 269px; display: flex; flex-direction: column; gap: 8px; padding-bottom: 24px; }
.stats-row { flex: none; display: flex; gap: 8px; width: 100%; }
.stat-card {
  flex: 1 0 0; min-width: 1px;
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 20px; border-radius: 16px; background: var(--scrim);
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.12)) drop-shadow(0 4px 8px rgba(0,0,0,.2));
  white-space: nowrap;
}
.stat-label { font-size: 11px; line-height: 14px; font-weight: 400; color: var(--text-dim); }
.stat-value { font-size: 24px; line-height: 29px; font-weight: 700; color: #fff; }

.share-profile {
  flex: none; width: 100%; min-height: 64px; padding: 20px 16px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--brand); color: #333; border-radius: 8px;
  font-size: 16px; line-height: 19.1px; font-weight: 800;
  transition: filter .15s ease, transform .15s ease;
}
.share-profile:active { filter: brightness(.92); transform: scale(.985); }
.icon-mask { display: block; width: 24px; height: 24px; background: #333; -webkit-mask: var(--icon) center/24px 24px no-repeat; mask: var(--icon) center/24px 24px no-repeat; }

/* ═════════════ Share sheet ═════════════ */
.share-layer { position: absolute; inset: 0; z-index: 6; visibility: hidden; transition: visibility 0s linear .45s; }
.share-layer.open { visibility: visible; transition: visibility 0s; }
.share-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0); transition: background .45s ease; }


.share-sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: calc(764px * var(--s));
  background: #fff;
  border-radius: calc(16px * var(--s)) calc(16px * var(--s)) 0 0;
  overflow: hidden;
  transform: translate3d(0, 100%, 0);
  transition: transform .45s var(--ease);
  box-shadow: 0 -4px 24px rgba(0,0,0,.12);
  touch-action: none;
}
.share-layer.open .share-sheet { transform: translate3d(0, 0, 0); }
.share-sheet.dragging { transition: none; }

.share-inner {
  position: absolute; left: 50%; top: 0; width: 375px; height: 764px; margin-left: -187.5px;
  transform: scale(var(--s)); transform-origin: top center;
  background: #fff; color: var(--text-primary);
}
.share-inner > * { position: absolute; left: 0; width: 375px; }
.sheet-handle { top: 0; height: 32px; display: flex; justify-content: center; align-items: flex-start; padding-top: 12px; }
.sheet-handle i { display: block; width: 32px; height: 4px; border-radius: 2px; background: var(--handle); }
.sheet-header { top: 32px; padding: 0 16px; }
.sheet-header h2 { margin: 0; font-size: 24px; line-height: 28.6px; font-weight: 700; color: var(--text-primary); }
.sheet-header p { margin: 2px 0 0; font-size: 11px; line-height: 13.1px; color: #777; }

.share-cards { top: 82px; height: 424px; overflow: hidden; }
.sc { position: absolute; border-radius: 16px; overflow: hidden; }
.sc img { display: block; }
.sc-main { left: 76px; top: 20px; width: 208.4px; height: 384px; box-shadow: none; }
.sc-main img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; }
.sc-left { left: -149px; top: 125px; width: 201px; height: 174px; opacity: .25; box-shadow: 0 1px 4px rgba(0,0,0,.12), 0 4px 16px rgba(0,0,0,.2); }
.sc-left img { position: absolute; max-width: none; height: 251.16%; left: -11.06%; top: -81.4%; width: 122.11%; }
.sc-right { left: 308.4px; top: 20px; width: 216px; height: 384px; opacity: .25; }
.sc-right img { width: 100%; height: 100%; object-fit: cover; }

.share-dots { top: 505px; height: 20px; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 4px 0; }
.share-dots i { display: block; width: 8px; height: 8px; border-radius: 99px; background: #f5f5f5; }
.share-dots i.on { background: var(--brand); }

.share-row { display: flex; justify-content: center; gap: 16px; padding: 0 24px; }
.share-row-apps { top: 524px; padding-top: 16px; height: 112px; }
.share-row-tools { top: 636px; padding-top: 12px; height: 128px; }
.share-item { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 64px; }
.share-btn { width: 64px; height: 64px; border-radius: 16px; display: flex; align-items: center; justify-content: center; transition: transform .12s ease, filter .12s ease; }
.share-item:active .share-btn { transform: scale(.94); filter: brightness(.92); }
.share-btn.neutral { background: #ebebeb; }
.share-btn.ig { background-image: var(--ig-bg); }
.share-label { font-family: var(--roboto); font-weight: 500; font-size: 11px; line-height: 16px; color: #777; text-align: center; white-space: nowrap; }

/* ═════════════ Toast ═════════════ */
.toast {
  position: absolute; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  max-width: calc(100% - 48px); padding: 10px 16px; border-radius: 10px;
  background: rgba(20,20,20,.92); color: #fff; font-size: 14px; line-height: 18px; font-weight: 500; text-align: center;
  transition: opacity .2s ease, transform .2s ease; z-index: 20;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  .recap, .track, .share-sheet { transition-duration: .01s !important; }
}
