/*
 * SafeUsPay public homepage. Loaded after app.css and ui.css and reuses their
 * tokens (dark default, light via [data-theme="light"]). Plain CSS, no build.
 * Motion: one entrance, one slow aura, one continuous "what you can pay for"
 * row; all of it stops under prefers-reduced-motion.
 */
.home-body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); line-height: 1.55; overflow-x: hidden; }
.home-wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 10px; }
.skip-link:focus { left: 16px; }
.home-body a:focus-visible, .home-body .btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

/* Header */
.home-header { position: sticky; top: 0; z-index: 20; background: var(--nav-surface); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-soft); padding-top: env(safe-area-inset-top); }
.home-header__inner { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.home-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.home-brand__name { font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
.home-nav { display: flex; gap: 22px; margin-left: 12px; }
.home-nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.home-nav a:hover { color: var(--ink); }
.home-header__actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.home-link { color: var(--ink); text-decoration: none; font-weight: 600; }
.home-link:hover { color: var(--accent); }
.home-body .btn { width: auto; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding-inline: 22px; white-space: nowrap; }
.home-link { white-space: nowrap; }

/* Hero */
.home-hero { position: relative; overflow: hidden; padding: clamp(40px, 7vw, 88px) 0 28px; }
.home-hero__aura { position: absolute; width: 620px; height: 620px; right: -120px; top: -140px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, rgba(73, 59, 255, 0.45), rgba(0, 229, 255, 0.18) 45%, transparent 70%); filter: blur(10px); animation: home-drift 26s ease-in-out infinite alternate; pointer-events: none; }
[data-theme="light"] .home-hero__aura { background: radial-gradient(circle at 40% 40%, rgba(23, 105, 255, 0.22), rgba(139, 53, 255, 0.12) 45%, transparent 70%); }
.home-hero__grid { position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.home-greeting { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 6px 14px 6px 10px; border: 1px solid var(--surface-border); border-radius: 999px; background: var(--bg-elev); color: var(--ink); font-size: 0.95rem; }
.home-greeting svg { width: 18px; height: 18px; color: var(--accent); }
.home-hero h1 { margin: 0; font-size: clamp(2.4rem, 6vw, 4.4rem); line-height: 1.02; letter-spacing: -0.035em; font-weight: 800; background: linear-gradient(90deg, var(--ink) 55%, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.home-lede { margin: 20px 0 0; max-width: 34rem; color: var(--muted); font-size: 1.1rem; }
.home-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.home-hero__visual { display: grid; gap: 18px; justify-items: center; }
.home-card { position: relative; width: min(380px, 100%); aspect-ratio: 1.586; border-radius: 22px; padding: 22px 24px; box-sizing: border-box; color: #fff; background: var(--gradient-brand); box-shadow: var(--glow-violet), 0 30px 60px -30px rgba(0, 0, 0, 0.7); display: grid; grid-template-rows: auto 1fr auto auto; transform: rotate(-6deg); }
.home-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(120deg, rgba(255,255,255,0.22), transparent 40%); pointer-events: none; }
.home-card__brand { font-weight: 700; font-size: 1.05rem; }
.home-card__chip { width: 44px; height: 32px; border-radius: 7px; background: linear-gradient(135deg, #f4d27a, #c89b3c); align-self: center; }
.home-card__number { font-size: clamp(1rem, 3.2vw, 1.25rem); letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
.home-card__foot { display: flex; justify-content: space-between; align-items: end; margin-top: 8px; font-size: 0.85rem; opacity: 0.92; }
.home-card__foot b { font-size: 1.25rem; font-style: italic; letter-spacing: 0.02em; }
.home-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: min(420px, 100%); margin: 8px 0 0; }
.home-facts div { background: var(--surface); border: 1px solid var(--surface-border); border-radius: 14px; padding: 10px 12px; text-align: center; }
.home-facts dt { color: var(--muted); font-size: 0.78rem; }
.home-facts dd { margin: 2px 0 0; font-weight: 700; font-size: 1.05rem; }
.num { font-variant-numeric: tabular-nums; }

/* What you can pay for: continuous one-direction loop */
.home-uses { position: relative; margin-top: clamp(36px, 6vw, 64px); overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.home-uses__track { display: flex; width: max-content; animation: home-marquee 38s linear infinite; }
.home-uses:hover .home-uses__track, .home-uses:focus-within .home-uses__track { animation-play-state: paused; }
.home-uses__list { display: flex; gap: 12px; margin: 0; padding: 0 12px 0 0; list-style: none; }
.home-uses__list li { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-soft); background: var(--bg-elev); color: var(--ink); font-size: 0.92rem; }
.home-uses__list svg { width: 16px; height: 16px; color: var(--accent); }

/* Sections */
.home-section { padding: clamp(48px, 8vw, 96px) 0; }
.home-section--alt { background: var(--bg-elev); border-block: 1px solid var(--line-soft); }
.home-section h2 { margin: 0 0 28px; font-size: clamp(1.6rem, 3.4vw, 2.3rem); letter-spacing: -0.02em; line-height: 1.15; }
.home-services { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 16px; }
.home-service { background: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.home-service h3 { margin: 0; font-size: 1.1rem; }
.home-service p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.home-service--lead { background: var(--gradient-brand); color: #fff; border: 0; }
.home-service--lead p { color: rgba(255, 255, 255, 0.88); }
.home-service--lead .btn { margin-top: auto; align-self: flex-start; background: #fff; color: #0B1340; }
.home-service__icon svg { width: 26px; height: 26px; color: var(--accent); }
.home-service--lead .home-service__icon svg { color: #fff; }

.home-steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.home-steps li { counter-increment: step; position: relative; padding: 22px 22px 22px 70px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line-soft); display: grid; gap: 4px; }
.home-steps li::before { content: counter(step); position: absolute; left: 20px; top: 20px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--gradient-cyan); color: #03101F; }
.home-steps span { color: var(--muted); font-size: 0.95rem; }

.home-fees { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 32px; align-items: start; }
.home-fee-list { margin: 0; border: 1px solid var(--surface-border); border-radius: var(--radius); overflow: hidden; }
.home-fee-list div { display: flex; justify-content: space-between; gap: 16px; padding: 16px 20px; border-top: 1px solid var(--line-soft); }
.home-fee-list div:first-child { border-top: 0; }
.home-fee-list dt { font-weight: 600; }
.home-fee-list dd { margin: 0; color: var(--muted); text-align: right; }

.home-trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.home-trust div { display: grid; gap: 6px; padding: 22px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line-soft); }
.home-trust svg { width: 24px; height: 24px; color: var(--accent); }
.home-trust span { color: var(--muted); font-size: 0.95rem; }
.home-final { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 36px; }
.home-final p { margin: 0; font-size: 1.2rem; font-weight: 700; }

.home-footer { padding: 36px 0 calc(36px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-soft); }
.home-footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.home-footer p { margin: 4px 0 0; color: var(--muted); }
.home-footer nav { display: flex; flex-wrap: wrap; gap: 10px 18px; min-width: 0; }
.home-footer nav a { color: var(--muted); text-decoration: none; }
.home-footer nav a:hover { color: var(--ink); }

/* One entrance (only when JS is on, so no-JS never hides content) */
.js .home-hero__copy, .js .home-hero__visual { animation: home-rise 0.6s cubic-bezier(.2,.7,.2,1) both; }
.js .home-hero__visual { animation-delay: 0.12s; }

@keyframes home-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes home-drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-60px, 40px, 0) scale(1.08); } }
@keyframes home-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Tablet */
@media (max-width: 980px) {
  .home-hero__grid { grid-template-columns: 1fr; gap: 36px; }
  .home-services { grid-template-columns: 1fr 1fr; }
  .home-service--lead { grid-column: 1 / -1; }
  .home-fees { grid-template-columns: 1fr; gap: 8px; }
}
/* Phones */
@media (max-width: 720px) {
  .home-nav { display: none; }
  .home-header__actions { gap: 10px; }
  .home-header__actions .btn { padding-inline: 14px; }
  .home-steps, .home-trust, .home-services { grid-template-columns: 1fr; }
  .home-card { transform: rotate(-3deg); }
  .home-fee-list div { flex-direction: column; gap: 2px; }
  .home-fee-list dd { text-align: left; }
  .home-uses__track { animation: none; width: auto; }
  .home-uses { overflow-x: auto; mask-image: none; -webkit-mask-image: none; scroll-snap-type: x mandatory; }
  .home-uses__list[aria-hidden="true"] { display: none; }
  .home-uses__list li { scroll-snap-align: start; }
}
/* Small/older phones */
@media (max-width: 360px) {
  .home-header__actions .home-link { display: none; }
  .home-facts { grid-template-columns: 1fr 1fr; }
  .home-facts div:last-child { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .home-hero__aura, .js .home-hero__copy, .js .home-hero__visual { animation: none; }
  .home-uses__track { animation: none; flex-wrap: wrap; width: auto; }
  .home-uses { mask-image: none; -webkit-mask-image: none; }
  .home-uses__list { flex-wrap: wrap; }
  .home-uses__list[aria-hidden="true"] { display: none; }
}

/* Brand mark illustration (owner, 2026-11-13) */
.brand__mark:not(.brand__mark--tiny), .staff-login-brand__mark, .staff-recovery-brand__mark { background: url("/assets/img/brand-mark.png?v=3") center / contain no-repeat !important; color: transparent !important; font-size: 0 !important; box-shadow: none !important; border-radius: 0 !important; width: 46px !important; height: 46px !important; }

/* Hero call to action (2026-11-13): "Get your card" + reassurance line */
.home-cta__main { padding-inline: 26px; font-weight: 700; box-shadow: 0 10px 28px -10px color-mix(in srgb, var(--accent) 70%, transparent); transition: transform .15s ease, box-shadow .15s ease; }
.home-cta__main:hover { transform: translateY(-1px); box-shadow: 0 14px 32px -10px color-mix(in srgb, var(--accent) 80%, transparent); }
.home-assure { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 18px 0 0; padding: 0; list-style: none; color: var(--muted, inherit); font-size: .92rem; }
.home-assure li { display: inline-flex; align-items: center; gap: 6px; }
.home-assure svg { width: 16px; height: 16px; color: var(--accent); flex: none; }
@media (max-width: 520px) { .home-cta .btn { flex: 1 1 100%; justify-content: center; text-align: center; } .home-assure { gap: 6px 14px; font-size: .88rem; } }
@media (prefers-reduced-motion: reduce) { .home-cta__main { transition: none; } .home-cta__main:hover { transform: none; } }

/* Owner 2026-11-22: the page never moves sideways under a finger on a phone. */
html:has(body.home-body) { overflow-x: clip; }
.home-body { overflow-x: clip; max-width: 100%; }

/* Owner 2026-11-22: first screen says what it is, how to pay and what it costs. */
.home-hero h1.home-h1 { font-size: clamp(2rem, 7.4vw, 3.6rem); line-height: 1.08; letter-spacing: -.02em; margin: 0;
  /* Owner 2026-11-22: gradient-clipped text left ghost copies of the changing word on Android Chrome. Plain colour. */
  background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--ink, #fff); -webkit-text-fill-color: currentColor; }
.home-h1__uses { display: block; white-space: nowrap; color: #2ED3A4; -webkit-text-fill-color: #2ED3A4; transition: opacity .25s ease; }
.home-h1__uses.is-out { opacity: 0; }
.home-pay { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.home-pay__item { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 8px; border-radius: 999px; font-size: .9rem; font-weight: 700; background: var(--bg-elev, rgba(255,255,255,.05)); border: 1px solid var(--surface-border, rgba(148,163,184,.25)); }
.home-pay__item i { width: 12px; height: 12px; border-radius: 50%; background: #1C4E80; flex: none; }
.home-pay__item--bkash i { background: #E2136E; }
.home-pay__item--nagad i { background: #F6921E; }
.home-pay__item--rocket i { background: #8C3494; }
.home-pay__item--upay i { background: #FFD400; }
.home-pay__item--bank i { background: #3B82C4; }
.home-price { margin: 14px 0 0; font-size: .95rem; color: var(--muted, inherit); }
.home-price b { color: var(--ink, #fff); }
.home-hero .home-cta { margin-top: 22px; }
@media (max-width: 520px) {
  .home-hero .home-cta { display: grid; grid-template-columns: 1.4fr 1fr; }
  .home-hero .home-cta .btn { flex: none; min-height: 50px; }
  .home-lede { font-size: 1rem; margin-top: 14px; }
  .home-pay { margin-top: 14px; gap: 6px; }
  .home-pay__item { font-size: .82rem; padding: 5px 10px 5px 7px; }
}
@media (prefers-reduced-motion: reduce) { .home-h1__uses { transition: none; } }

/* Owner 2026-11-22: minimal first screen. */
.home-hero .home-cta { display: block; margin-top: 26px; }
.home-hero .home-cta .home-cta__main { display: flex; width: 100%; max-width: 360px; min-height: 56px; justify-content: center; font-size: 1.05rem; border-radius: 16px; }
.home-offers { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.home-offers li, .home-offers a { display: grid; gap: 1px; padding: 8px 14px; border-radius: 14px; background: var(--bg-elev, rgba(255,255,255,.05)); border: 1px solid var(--surface-border, rgba(148,163,184,.25)); color: inherit; text-decoration: none; }
.home-offers small { font-size: .72rem; opacity: .7; } .home-offers b { font-size: 1.05rem; }
.home-offers .home-offers__spin { padding: 0; border: 0; background: none; }
.home-offers__spin a { border-color: rgba(245,184,61,.5); background: linear-gradient(120deg, rgba(245,184,61,.16), rgba(18,184,134,.08)); }
.home-offers__spin b { color: #F5B83D; }
.home-lede--section { margin: 8px 0 22px; max-width: 46rem; }
.home-signin { min-height: 42px; padding-inline: 18px; }
@media (max-width: 520px) { .home-hero .home-cta .home-cta__main { max-width: none; } .home-h1 { margin-top: 6px; } }

/* Owner 2026-11-22: premium motion. Card floats in 3D, a light sweeps across, and it turns over now and then. */
.home-flip { width: min(320px, 86%); aspect-ratio: 1.586; perspective: 1100px; margin: 0 auto; }
.home-flip__inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; animation: home-float 12s ease-in-out infinite; }
.home-flip .home-card { position: absolute; inset: 0; width: 100%; transform: none; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.home-flip .home-card::before { content: ""; position: absolute; top: -20%; bottom: -20%; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.38), transparent); transform: skewX(-18deg); animation: home-sweep 4s ease-in-out infinite; pointer-events: none; }
.home-card--back { transform: rotateY(180deg) !important; display: grid; grid-template-rows: auto auto 1fr; padding: 0; gap: 12px; }
.home-card__stripe { height: 42px; margin-top: 22px; background: #0a0f2e; }
.home-card__sign { display: flex; align-items: center; gap: 10px; margin: 0 22px; }
.home-card__sign i { flex: 1; height: 30px; border-radius: 6px; background: repeating-linear-gradient(135deg, rgba(255,255,255,.85) 0 6px, rgba(255,255,255,.65) 6px 12px); }
.home-card__sign em { font-style: italic; font-weight: 800; padding: 4px 10px; border-radius: 6px; background: #fff; color: #222; }
.home-card__backtxt { align-self: end; margin: 0 22px 18px; font-size: .78rem; opacity: .85; }
@keyframes home-float {
  0%, 30% { transform: rotateX(8deg) rotateY(-14deg) rotateZ(-3deg) translateY(0); }
  15% { transform: rotateX(4deg) rotateY(10deg) rotateZ(-2deg) translateY(-8px); }
  40%, 62% { transform: rotateX(6deg) rotateY(180deg) rotateZ(2deg) translateY(-4px); }
  72%, 100% { transform: rotateX(8deg) rotateY(346deg) rotateZ(-3deg) translateY(0); }
  86% { transform: rotateX(4deg) rotateY(370deg) rotateZ(-2deg) translateY(-8px); }
}
@keyframes home-sweep { 0%, 55% { left: -60%; } 100% { left: 130%; } }

/* Glass light across "Get your card" */
.home-cta__main { position: relative; overflow: hidden; isolation: isolate; }
.home-cta__main::after { content: ""; position: absolute; top: 0; bottom: 0; left: -45%; width: 35%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent); transform: skewX(-20deg); animation: home-glass 3.2s ease-in-out infinite; z-index: -1; mix-blend-mode: overlay; }
.home-cta__main::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(180deg, rgba(255,255,255,.22), transparent 55%); z-index: -1; pointer-events: none; }
@keyframes home-glass { 0%, 50% { left: -45%; } 100% { left: 125%; } }
.home-hero .home-cta .home-cta__main { animation: home-pulse 3.2s ease-in-out infinite; }
@keyframes home-pulse { 0%, 100% { box-shadow: 0 12px 30px -12px rgba(124,58,237,.8); } 50% { box-shadow: 0 14px 40px -10px rgba(46,211,164,.65); } }

/* Spin row */
.home-spin { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-top: 12px; padding: 10px 10px 10px 12px; border-radius: 18px; color: inherit; text-decoration: none; max-width: 360px;
  background: linear-gradient(120deg, rgba(245,184,61,.16), rgba(18,184,134,.08)); border: 1px solid rgba(245,184,61,.5); }
.home-spin__wheel { width: 40px; height: 40px; animation: home-wheel 6s linear infinite; }
.home-spin__txt { display: grid; } .home-spin__txt small { font-size: .78rem; opacity: .75; }
.home-spin__txt b { font-size: 1.25rem; font-weight: 900; background: linear-gradient(90deg, #FFE08A, #F5B83D, #FFF3C4, #F5B83D); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: home-gold 2.8s linear infinite; }
.home-spin__go { padding: 9px 16px; border-radius: 12px; font-weight: 800; font-size: .9rem; color: #2a1a00; background: linear-gradient(180deg, #FFE08A, #F5B83D); box-shadow: 0 6px 16px -6px rgba(245,184,61,.8); }
@keyframes home-wheel { to { transform: rotate(1turn); } }
@keyframes home-gold { to { background-position: -200% 0; } }
@media (max-width: 520px) { .home-spin { max-width: none; } }
@media (prefers-reduced-motion: reduce) {
  .home-flip__inner, .home-flip .home-card::before, .home-cta__main::after, .home-hero .home-cta .home-cta__main, .home-spin__wheel, .home-spin__txt b { animation: none; }
  .home-flip__inner { transform: rotateX(6deg) rotateY(-12deg); }
}
