/* Homepage only (templates/home.html). Built from the approved design
   (homepage-v2). This page is a documented exception to DESIGN.md: gradient
   buttons that lift and glow, a 12px button radius and motion that shows how
   money moves. Every class is prefixed hp- so base.html's shared styles
   (.btn, .card, .hero ...) never mix in. The fonts, colour tokens, buttons,
   header and footer it shares with the login and sign-up pages are in
   static/css/brand.css, which base.html loads first. */

:root {
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.hp-lock { fill: var(--hp-amber); stroke: var(--hp-amber); }
.hp-lock rect { stroke: none; }
*, *::before, *::after { box-sizing: inherit; }
html { scroll-behavior: smooth; scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 88px); }
html, body { margin: 0; background: var(--hp-ink-3); }  /* the footer's colour, so nothing lighter shows below it */
body {
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 16px;
  color: var(--hp-on-dark); overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--hp-focus); outline-offset: 3px; border-radius: 6px; }

/* The page's skip link is base.html's own, styled as in the design. */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100; background: #fff; color: var(--hp-text);
  padding: 10px 14px; border-radius: 10px; font-weight: 600; font-size: 16px; text-decoration: none; outline: none;
}
.skip-link:focus { top: 12px; outline: none; }



/* Hero */
.hp-hero { background: linear-gradient(180deg, var(--hp-ink-2) 0%, var(--hp-ink) 100%); margin-top: -76px; padding-top: 76px; }
.hp-hero .hp-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 40px;
  min-height: min(700px, calc(100vh - 76px)); padding-block: 48px 72px;
}
.hp-messages { padding-top: 16px; }
.hp-messages .message { max-width: 640px; }
.hp-copy { display: flex; flex-direction: column; gap: 22px; max-width: 560px; }
.hp-label { margin: 0; font-size: 15px; font-weight: 500; color: var(--hp-blue-soft); }
.hp-hero h1 { margin: 0; font-size: clamp(38px, 5.2vw, 66px); line-height: 1.04; font-weight: 800; letter-spacing: -.03em; }
.hp-hero h1 .hp-accent { color: var(--hp-teal); }  /* same teal as "hold" in the wordmark */
.hp-lead { margin: 0; font-size: 18px; line-height: 1.7; color: var(--hp-on-dark-2); max-width: 52ch; }
.hp-ctas { display: flex; gap: 14px; margin-top: 6px; }
.hp-ctas .hp-btn { min-height: 56px; }
.hp-copy > * { animation: hp-up .7s cubic-bezier(.2,.9,.3,1) both; }
.hp-copy > *:nth-child(2) { animation-delay: .08s; }
.hp-copy > *:nth-child(3) { animation-delay: .16s; }
.hp-copy > *:nth-child(4) { animation-delay: .24s; }
@keyframes hp-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Deal card */
.hp-stage { position: relative; height: 560px; display: flex; align-items: center; justify-content: center; perspective: 1200px; touch-action: pan-y; }
.hp-floor {
  position: absolute; top: calc(50% + 200px); width: 320px; height: 34px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0,0,0,.7), transparent 70%); filter: blur(8px);
  animation: hp-floor 7s ease-in-out infinite; pointer-events: none;
}
.hp-enter { animation: hp-card-in .9s cubic-bezier(.2,.9,.3,1) .3s both; transform-style: preserve-3d; }
.hp-tilt { transform-style: preserve-3d; animation: hp-float 7s ease-in-out infinite; }
.hp-stage.active .hp-tilt { animation: none; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .12s linear; }
.hp-stage.active .hp-floor { animation: none; transform: translateX(var(--fx, 0px)); opacity: .6; transition: transform .12s linear; }
.hp-edge {
  position: relative; width: 370px; padding: 1px; border-radius: 26px; transform-style: preserve-3d;
  background: rgba(255,255,255,.14); box-shadow: 0 40px 80px rgba(0,0,0,.5);
}
.hp-card {
  position: relative; border-radius: 25px; padding: 26px 26px 24px;
  background: linear-gradient(160deg, #283660 0%, #182140 55%, #10283A 100%);
  transform-style: preserve-3d; display: flex; flex-direction: column; gap: 18px;
}
/* At rest the sheen is still and blends normally (cheap). It switches to the
   moving, screen-blended shimmer only while the card is being tilted. */
.hp-holo {
  position: absolute; inset: 0; border-radius: 25px; pointer-events: none; opacity: .7;
  background:
    radial-gradient(circle at var(--px, 30%) var(--py, 20%), rgba(255,255,255,.2), transparent 40%),
    linear-gradient(115deg, transparent 28%, rgba(96,165,250,.2) 40%, rgba(167,139,250,.16) 50%, rgba(43,196,180,.2) 60%, transparent 72%);
  background-size: 100% 100%, 280% 100%; background-position: 0 0, var(--hx, 70%) 0;
  transition: background-position .12s linear, opacity .3s;
}
.hp-stage.hp-moving .hp-holo { mix-blend-mode: screen; opacity: 1; }
.hp-c-row { display: flex; justify-content: space-between; align-items: center; transform: translateZ(18px); }
.hp-ref { font-size: 13px; font-weight: 500; color: #9AA6C0; font-variant-numeric: tabular-nums; }
/* "Money held" in the homepage teal, the one colour this card uses for held
   money (green would read as paid). */
.hp-badge {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600;
  color: var(--hp-teal); background: rgba(43,196,180,.12); border: 1px solid rgba(43,196,180,.45);
  padding: 6px 12px; border-radius: 99px;
}
.hp-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--hp-teal); }
/* "Example": this card is an illustration, not a live deal. */
.hp-example {
  margin-left: 8px; padding: 2px 7px; border: 1px solid rgba(255,255,255,.18); border-radius: 99px;
  font-size: 11px; font-weight: 600; color: #9AA6C0; vertical-align: 1px;
}
.hp-item { display: flex; flex-direction: column; gap: 4px; transform: translateZ(40px); }
.hp-item span { font-size: 19px; font-weight: 700; }
.hp-item strong { font-size: 36px; font-weight: 800; letter-spacing: -.02em; color: #60A5FA; font-variant-numeric: tabular-nums; }
.hp-flow { display: flex; align-items: center; margin-top: 4px; transform-style: preserve-3d; }
.hp-node { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 0 0 auto; transform: translateZ(26px); }
.hp-node div { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; }
.hp-node span { font-size: 12px; font-weight: 500; color: #9AA6C0; }
.hp-n-b div { background: rgba(59,130,246,.16); border: 1.5px solid rgba(96,165,250,.55); color: var(--hp-blue-soft); }
.hp-n-e div { background: rgba(245,180,84,.1); border: 1.5px solid rgba(245,180,84,.6); }
.hp-n-s div { background: rgba(34,197,94,.12); border: 1.5px solid rgba(74,222,128,.45); color: #86EFAC; }
.hp-line {
  flex: 1; position: relative; height: 2px; margin: 0 8px 26px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.22) 0 5px, transparent 5px 10px);
}
.hp-line i {
  position: absolute; top: -3px; left: 0; width: 8px; height: 8px; border-radius: 50%;
  background: #60A5FA; box-shadow: 0 0 10px #60A5FA; animation: hp-to-vault 2.6s cubic-bezier(.5,0,.4,1) infinite;
}
.hp-held {
  transform: translateZ(14px); border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04);
  border-radius: 14px; padding: 13px; text-align: center; font-size: 13px; color: var(--hp-on-dark-2);
}
.hp-held b { color: var(--hp-teal); font-weight: 600; }
.hp-stage.hp-paused .hp-tilt, .hp-stage.hp-paused .hp-floor, .hp-stage.hp-paused .hp-line i,
.hp-stage.hp-paused .hp-enter { animation-play-state: paused; }
@keyframes hp-float {
  0%, 100% { transform: rotateX(9deg) rotateY(-14deg) translateY(0); }
  50% { transform: rotateX(3deg) rotateY(10deg) translateY(-14px); }
}
@keyframes hp-floor {
  0%, 100% { transform: translateX(12px) scaleX(.9); opacity: .75; }
  50% { transform: translateX(-8px) scaleX(1); opacity: .5; }
}
@keyframes hp-to-vault {
  0% { left: 0; opacity: 0; } 12% { opacity: 1; } 78% { left: calc(100% - 8px); opacity: 1; }
  92%, 100% { left: calc(100% - 8px); opacity: 0; }
}
@keyframes hp-card-in { from { opacity: 0; transform: translateY(24px) scale(.96); } to { opacity: 1; transform: none; } }

/* How it works */
.hp-how { background: var(--hp-paper-2); color: var(--hp-text); padding-block: 112px; }
.hp-how-head { text-align: center; max-width: 640px; margin: 0 auto; }
.hp-how h2, .hp-trust h2, .hp-faq h2, .hp-cta h2 {
  margin: 0 0 12px; font-size: clamp(32px, 3.6vw, 46px); line-height: 1.08; font-weight: 800; letter-spacing: -.03em;
}
.hp-how .hp-sub { margin: 0; font-size: 17px; line-height: 1.6; color: var(--hp-muted); }
.hp-toggle {
  position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; border: 2px solid var(--hp-blue);
  border-radius: 14px; overflow: hidden; margin: 32px auto 52px; background: #fff;
}
.hp-toggle .hp-ind {
  position: absolute; inset: 0 auto 0 0; width: 50%; background: linear-gradient(180deg, var(--hp-btn-top), var(--hp-btn-bottom));
  transition: transform .45s cubic-bezier(.3,1.2,.4,1);
}
.hp-toggle[data-side="buy"] .hp-ind { transform: translateX(100%); }
.hp-toggle button {
  position: relative; z-index: 1; border: 0; background: none; font: 600 15px 'Poppins', system-ui, sans-serif;
  padding: 0 30px; min-height: 48px; color: var(--hp-blue-2); cursor: pointer; transition: color .3s;
}
.hp-toggle button[aria-selected="true"] { color: #fff; }
/* The ring sits inside the button, so it must show on the blue thumb and, while
   the thumb slides, on the white track: deepest ink is 3.62:1 on the blue, 18.7:1 on white. */
.hp-toggle button:focus-visible { outline: 3px solid var(--hp-ink-3); outline-offset: -4px; }
.hp-steps { position: relative; max-width: 640px; margin: 0 auto; }
.hp-rail { position: absolute; left: 21px; top: 22px; bottom: 22px; width: 2px; background: var(--hp-line); border-radius: 2px; }
.hp-rail i { display: block; width: 100%; height: var(--fill, 0%); background: linear-gradient(var(--hp-blue), var(--hp-teal)); border-radius: 2px; }
.hp-steps ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 30px; }
.hp-steps [role="tabpanel"][hidden] { display: none; }
.hp-steps li { display: flex; gap: 22px; align-items: flex-start; }
.hp-steps .hp-swap li { animation: hp-swap-in .35s ease both; }
.hp-steps .hp-swap li:nth-child(2) { animation-delay: .05s; }
.hp-steps .hp-swap li:nth-child(3) { animation-delay: .1s; }
.hp-steps .hp-swap li:nth-child(4) { animation-delay: .15s; }
@keyframes hp-swap-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.hp-num {
  position: relative; z-index: 1; flex: 0 0 44px; height: 44px; border-radius: 12px; background: #fff;
  border: 2px solid #CFDBF7; color: var(--hp-blue-2); font-weight: 700; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: background .35s ease, color .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.hp-steps li.hp-lit .hp-num {
  background: linear-gradient(180deg, var(--hp-btn-top), var(--hp-btn-bottom)); color: #fff; border-color: transparent;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--hp-btn-bottom) 30%, transparent);
}
.hp-steps li.hp-lit:last-child .hp-num { background: linear-gradient(180deg, var(--hp-step-teal-top), var(--hp-teal-2)); box-shadow: 0 8px 20px rgba(13,125,115,.3); }
.hp-steps h3 { margin: 8px 0 4px; font-size: 18px; line-height: 1.35; font-weight: 600; }
.hp-steps p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--hp-muted); }

/* What you can count on */
.hp-trust { background: var(--hp-ink); padding-block: 112px; text-align: center; }
.hp-trust .hp-sub { margin: 0 auto; max-width: 520px; font-size: 17px; line-height: 1.6; color: var(--hp-on-dark-3); }
.hp-t-grid { list-style: none; margin: 52px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.hp-tc {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 34px 18px 30px;
  border-radius: 20px; background: var(--hp-panel); border: 1px solid var(--hp-panel-line);
}
.hp-tc .hp-ico { color: var(--hp-teal); width: 52px; height: 52px; margin-bottom: 10px; }
.hp-tc h3 { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 700; text-wrap: wrap; }
.hp-tc p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--hp-on-dark-3); }
.js .hp-trust .hp-t-in, .js .hp-trust .hp-tc { opacity: 0; transform: translateY(28px); }
.js .hp-trust .hp-tc .hp-ico { opacity: 0; transform: scale(.6); }
.js .hp-trust .hp-show { animation: hp-t-in .7s cubic-bezier(.2,.9,.3,1) both; }
.js .hp-trust .hp-tc.hp-show .hp-ico { animation: hp-ico-in .5s cubic-bezier(.3,1.6,.5,1) both; animation-delay: inherit; }
@keyframes hp-t-in { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes hp-ico-in { 0%, 40% { opacity: 0; transform: scale(.6); } 100% { opacity: 1; transform: none; } }

/* FAQ. Without JavaScript every answer is shown open; home.js closes them. */
.hp-faq { background: var(--hp-paper); color: var(--hp-text); padding-block: 112px; }
.hp-faq .hp-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: 64px; align-items: start; }
.hp-faq-side { position: sticky; top: 120px; }
.hp-faq-side p { margin: 0; font-size: 17px; line-height: 1.6; color: var(--hp-muted); max-width: 320px; }
.hp-faq-side .hp-mail { margin-top: 24px; font-size: 15px; }
.hp-faq-side .hp-mail a, .hp-faq-all {
  color: var(--hp-blue-2); font-weight: 600;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
  text-decoration-color: rgba(37,99,235,.35);  /* a softer --hp-blue-2 */
  transition: text-decoration-color .2s ease;
}
@media (hover: hover) and (pointer: fine) {
  .hp-faq-side .hp-mail a:hover, .hp-faq-all:hover { text-decoration-color: var(--hp-blue-2); }
}
.hp-faq-list { border-top: 1px solid var(--hp-line); }
.hp-qa { border-bottom: 1px solid var(--hp-line); }
.hp-qa h3 { margin: 0; font-size: inherit; }
.hp-qa-q {
  all: unset; box-sizing: border-box; width: 100%; display: flex; justify-content: space-between; align-items: center;
  gap: 24px; padding: 22px 0; font-size: 18px; font-weight: 600; line-height: 1.4; color: var(--hp-text); cursor: pointer;
}
.hp-qa-q:focus-visible { outline: 3px solid var(--hp-focus); outline-offset: 4px; border-radius: 6px; }
/* Hover colour only with a real pointer: on a phone, a tap would leave it stuck on. */
@media (hover: hover) and (pointer: fine) { .hp-qa-q:hover span { color: var(--hp-blue-2); } }
.hp-qa-ic {
  position: relative; flex: 0 0 30px; height: 30px; border-radius: 50%; border: 1.5px solid #CFD6E4;
  transition: background .2s ease, border-color .2s ease;
}
.hp-qa-ic::before, .hp-qa-ic::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px;
  background: var(--hp-text); border-radius: 1px; transition: transform .3s cubic-bezier(.3,1.2,.4,1), background .2s ease;
}
.hp-qa-ic::after { transform: rotate(90deg); }
.hp-qa-q[aria-expanded="true"] .hp-qa-ic { background: var(--hp-text); border-color: var(--hp-text); }
.hp-qa-q[aria-expanded="true"] .hp-qa-ic::before, .hp-qa-q[aria-expanded="true"] .hp-qa-ic::after { background: #fff; }
.hp-qa-q[aria-expanded="true"] .hp-qa-ic::after { transform: rotate(0deg); }
.hp-qa-a { display: grid; grid-template-rows: 1fr; }
.js .hp-qa-a { grid-template-rows: 0fr; transition: grid-template-rows .35s cubic-bezier(.2,.9,.3,1); }
.js .hp-qa.hp-open .hp-qa-a { grid-template-rows: 1fr; }
.hp-qa-a > div { overflow: hidden; }
.hp-qa-a p { margin: 0; padding: 0 48px 24px 0; font-size: 16px; line-height: 1.65; color: var(--hp-muted); max-width: 62ch; }
.hp-faq-all { display: inline-block; margin-top: 26px; font-size: 16px; }

/* Final call to action */
.hp-cta { background: var(--hp-ink); padding-block: 120px 112px; text-align: center; }
.hp-mark { width: 120px; height: 96px; margin: 0 auto 28px; display: block; overflow: visible; }
.hp-mark .hp-bl, .hp-mark .hp-br { transition: transform .8s cubic-bezier(.3,1.5,.5,1); }
.hp-mark .hp-coin { transition: transform .7s cubic-bezier(.3,1.4,.5,1) .15s, opacity .4s ease .15s; transform-origin: 60px 48px; }
.js .hp-cta .hp-mark .hp-bl { transform: translateX(-16px); }
.js .hp-cta .hp-mark .hp-br { transform: translateX(16px); }
.js .hp-cta .hp-mark .hp-coin { transform: translateY(-34px); opacity: 0; }
.js .hp-cta.hp-show .hp-mark .hp-bl, .js .hp-cta.hp-show .hp-mark .hp-br, .js .hp-cta.hp-show .hp-mark .hp-coin { transform: none; opacity: 1; }
.hp-cta p { margin: 0 auto; max-width: 460px; font-size: 17px; line-height: 1.6; color: var(--hp-on-dark-3); }
.hp-cta .hp-btn { margin-top: 32px; min-height: 56px; padding: 0 36px; }


/* Tablet */
@media (max-width: 1100px) {
  .hp-t-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .hp-tc { grid-column: span 2; }
  .hp-tc:nth-child(4) { grid-column: 2 / span 2; }
}
/* Phone */
@media (max-width: 860px) {
  .hp-hero { margin-top: -68px; padding-top: 68px; }
  .hp-hero .hp-grid { grid-template-columns: 1fr; min-height: 0; gap: 0; padding-block: 24px 20px; }
  .hp-how { position: relative; z-index: 1; }  /* starts clean: covers the card's shadow from above */
  .hp-copy { gap: 16px; }
  .hp-label { font-size: 14px; }
  .hp-hero h1 { font-size: 38px; letter-spacing: -.025em; }
  .hp-lead { font-size: 16px; line-height: 1.6; }
  .hp-ctas { gap: 10px; }
  .hp-ctas .hp-btn { flex: 1 1 0; min-height: 52px; padding: 0 12px; font-size: 15px; }
  .hp-stage { height: 380px; margin-top: 8px; }
  .hp-edge { width: min(330px, calc(100vw - 48px)); }
  .hp-card { padding: 22px 20px 20px; gap: 15px; }
  .hp-item strong { font-size: 31px; }
  .hp-floor { top: calc(50% + 165px); width: 260px; }
  .hp-how, .hp-trust, .hp-faq { padding-block: 80px; }
  .hp-how .hp-sub, .hp-trust .hp-sub { font-size: 16px; }
  .hp-toggle { margin: 28px auto 40px; }
  .hp-toggle button { padding: 0 20px; font-size: 14px; }
  .hp-steps li { gap: 16px; }
  .hp-steps ol { gap: 26px; }
  .hp-steps h3 { font-size: 17px; }
  .hp-steps p { font-size: 15px; }
  .hp-t-grid { grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 36px; }
  .hp-tc, .hp-tc:nth-child(4) { grid-column: auto; }
  .hp-tc:last-child { grid-column: 1 / -1; }
  .hp-tc { padding: 24px 14px 22px; gap: 6px; border-radius: 18px; }
  .hp-tc .hp-ico { width: 40px; height: 40px; margin-bottom: 6px; }
  .hp-tc h3 { font-size: 15px; }
  .hp-tc p { font-size: 13px; }
  .hp-faq .hp-wrap { grid-template-columns: 1fr; gap: 24px; }
  .hp-faq-side { position: static; }
  .hp-qa-q { font-size: 17px; padding: 20px 0; }
  .hp-qa-a p { padding-right: 0; font-size: 15px; }
  .hp-cta { padding-block: 88px 80px; }
  .hp-cta p { font-size: 16px; }
  .hp-cta .hp-btn { width: 100%; max-width: 360px; }
}
@media (max-width: 640px) {
  .hp-faq-side { text-align: center; }
  .hp-faq-side p { margin-inline: auto; }
}
@media (max-width: 360px) {
  .hp-hero h1 { font-size: 34px; }
  .hp-ctas { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hp-tilt { transform: rotateX(6deg) rotateY(-10deg); }
  .js .hp-trust .hp-t-in, .js .hp-trust .hp-tc, .js .hp-trust .hp-tc .hp-ico { opacity: 1; transform: none; }
  .js .hp-cta .hp-mark .hp-bl, .js .hp-cta .hp-mark .hp-br, .js .hp-cta .hp-mark .hp-coin { transform: none; opacity: 1; }
}
