/* TipzPop — home + studio sign-in styles. Scoped to body.tz-home / tz-* classes so other pages are untouched.
 *
 * Performance rules: no backdrop-filter on page content, no infinite background/gradient animations,
 * no masks on animated children. The only always-running loop is the UPI marquee (transform only).
 */

:root {
  --tz-ink: #07060d;
  --tz-line: rgba(255, 255, 255, 0.09);
  --tz-violet: #7c5cff;
  --tz-pink: #ff4fd8;
  --tz-amber: #ffb84d;
  --tz-mint: #5bf0c0;
  --tz-grad: linear-gradient(115deg, #7c5cff 0%, #ff4fd8 55%, #ffb84d 100%);
}

body.tz-home { background: var(--tz-ink) !important; background-image: none !important; }
.tz-root { position: relative; min-height: 100vh; }
.tz-display { font-family: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif; letter-spacing: -0.035em; }
.tz-mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
section[id] { scroll-margin-top: 88px; }
.tz-content { position: relative; z-index: 2; }

/* one static background layer */
.tz-page-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(900px 600px at 82% -8%, rgba(124, 92, 255, 0.22), transparent 60%),
    radial-gradient(700px 500px at 8% 38%, rgba(255, 79, 216, 0.09), transparent 60%),
    var(--tz-ink);
}

/* ---------- text ---------- */
.tz-grad-text {
  background: var(--tz-grad); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.tz-word { display: inline-block; opacity: 0; transform: translateY(60%); animation: tzWordIn 0.8s cubic-bezier(0.2, 0.9, 0.2, 1) forwards; }
@keyframes tzWordIn { to { opacity: 1; transform: none; } }
.tz-squiggle path { stroke-dasharray: 260; stroke-dashoffset: 260; animation: tzDraw 1s 1s ease-out forwards; }
@keyframes tzDraw { to { stroke-dashoffset: 0; } }

/* ---------- buttons ---------- */
.tz-btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 28px; border-radius: 16px; color: #fff; font-weight: 700; cursor: pointer;
  background: linear-gradient(115deg, #7c5cff 0%, #ff4fd8 100%); border: 0;
  box-shadow: 0 10px 30px -12px rgba(255, 79, 216, 0.6);
  transition: transform 0.2s ease, filter 0.2s ease;
}
.tz-btn-primary:hover { transform: translateY(-2px); filter: brightness(1.08); }
.tz-btn-primary:active { transform: translateY(0) scale(0.98); }
.tz-btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 24px;
  border-radius: 16px; color: #f4f1ff; font-weight: 600; cursor: pointer; background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16); transition: background 0.2s ease, border-color 0.2s ease;
}
.tz-btn-ghost:hover { background: rgba(255, 255, 255, 0.11); border-color: rgba(255, 255, 255, 0.3); }
.tz-btn-primary:focus-visible, .tz-btn-ghost:focus-visible, .tz-focus:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ---------- surfaces ---------- */
.tz-card {
  position: relative; border-radius: 26px; border: 1px solid var(--tz-line);
  background: linear-gradient(180deg, rgba(24, 20, 44, 0.94), rgba(14, 11, 27, 0.94));
  transition: border-color 0.25s ease;
}
.tz-card:hover { border-color: rgba(255, 255, 255, 0.22); }
.tz-glass { background: rgba(18, 14, 36, 0.92); border: 1px solid var(--tz-line); }

/* ---------- header ---------- */
.tz-nav { background: rgba(7, 6, 13, 0.94); border-bottom: 1px solid var(--tz-line); }
.tz-link { position: relative; color: #b9b3d6; transition: color 0.2s ease; }
.tz-link:hover { color: #fff; }

/* ---------- marquee (transform only) ---------- */
.tz-marquee-wrap { position: relative; overflow: hidden; }
.tz-marquee-wrap::before, .tz-marquee-wrap::after { content: ''; position: absolute; top: 0; bottom: 0; width: 72px; z-index: 1; pointer-events: none; }
.tz-marquee-wrap::before { left: 0; background: linear-gradient(90deg, #07060d, transparent); }
.tz-marquee-wrap::after { right: 0; background: linear-gradient(270deg, #07060d, transparent); }
.tz-marquee { display: flex; width: max-content; gap: 14px; animation: tzMarquee 50s linear infinite; will-change: transform; }
.tz-marquee:hover { animation-play-state: paused; }
@keyframes tzMarquee { to { transform: translateX(calc(-50% - 7px)); } }

/* ---------- hero coin stage ---------- */
.tz-stage { position: relative; width: 100%; max-width: 520px; aspect-ratio: 1 / 1; margin-inline: auto; touch-action: manipulation; cursor: pointer; }
.tz-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tz-stage-glow { position: absolute; inset: 8%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(124, 92, 255, 0.45), rgba(255, 79, 216, 0.18) 55%, transparent 75%); }
.tz-fallback-logo { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; }
.tz-no-webgl .tz-fallback-logo { display: flex; }

/* ---------- feature visuals (animate only while the card is hovered) ---------- */
.tz-wave { display: flex; align-items: center; gap: 4px; height: 44px; }
.tz-wave i { display: block; width: 5px; height: 100%; border-radius: 4px; background: var(--tz-grad); transform: scaleY(0.5);
  animation: tzWave 1.1s ease-in-out infinite; animation-delay: calc(var(--i) * 0.085s); animation-play-state: paused; }
.tz-card:hover .tz-wave i { animation-play-state: running; }
@keyframes tzWave { 0%, 100% { transform: scaleY(0.2); } 50% { transform: scaleY(1); } }
.tz-float { animation: tzFloat 6s ease-in-out infinite; }
@keyframes tzFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.tz-trim-handle { animation: tzTrim 4.5s ease-in-out infinite alternate; animation-play-state: paused; }
.tz-card:hover .tz-trim-handle { animation-play-state: running; }
@keyframes tzTrim { from { transform: translateX(0); } to { transform: translateX(46px); } }
.tz-chip-pop { animation: tzChip 3.2s ease-in-out infinite; animation-delay: calc(var(--i) * 0.28s); animation-play-state: paused; }
.tz-card:hover .tz-chip-pop { animation-play-state: running; }
@keyframes tzChip { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.tz-bar-fill { transform-origin: 0 50%; transform: scaleX(var(--w, 1)); }

/* modal entrance (one-shot) */
.tz-alert-in { animation: tzAlertIn 0.35s cubic-bezier(0.2, 1, 0.3, 1) both; }
@keyframes tzAlertIn { from { opacity: 0; transform: translateY(16px) scale(0.97); } to { opacity: 1; transform: none; } }

/* ---------- timeline ---------- */
.tz-line { position: absolute; left: 23px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(180deg, #7c5cff, #ff4fd8, #ffb84d); border-radius: 2px; opacity: 0.8; }
.tz-step-dot { background: linear-gradient(135deg, #7c5cff, #ff4fd8) !important; border-color: transparent !important; color: #fff !important; }

/* ---------- faq ---------- */
.tz-faq-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.3s ease; }
.tz-faq-open .tz-faq-body { grid-template-rows: 1fr; }
.tz-faq-body > div { overflow: hidden; }

/* ---------- range ---------- */
.tz-range { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 8px; outline: none;
  background: linear-gradient(90deg, #7c5cff var(--fill, 30%), rgba(255, 255, 255, 0.12) var(--fill, 30%)); }
.tz-range::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 4px solid #ff4fd8; cursor: grab; }
.tz-range::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 4px solid #ff4fd8; cursor: grab; }
.tz-range:focus-visible::-webkit-slider-thumb { outline: 2px solid #fff; outline-offset: 3px; }

.tz-cta-border { position: relative; border-radius: 34px; padding: 1.5px; background: linear-gradient(135deg, #7c5cff, #ff4fd8, #ffb84d, #5bf0c0); }

/* ---------- savings calculator ---------- */
.tz-bar-track { height: 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.tz-bar-val { height: 100%; border-radius: 999px; transition: width 0.4s ease; }
.tz-chip-btn { min-height: 38px; padding: 0 14px; border-radius: 12px; font-size: 13px; font-weight: 700; color: #cfc9e8; background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1); cursor: pointer; transition: color 0.2s ease, border-color 0.2s ease; }
.tz-chip-btn:hover { color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.tz-chip-btn[aria-pressed='true'] { color: #fff; background: linear-gradient(135deg, #7c5cff, #ff4fd8); border-color: transparent; }

/* ---------- segmented tabs ---------- */
.tz-tabs { position: relative; display: grid; padding: 4px; border-radius: 16px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--tz-line); }
.tz-tabs > .tz-tab-ind { position: absolute; top: 4px; bottom: 4px; left: 4px; border-radius: 12px; background: linear-gradient(135deg, #7c5cff, #ff4fd8);
  transition: transform 0.25s ease; }
.tz-tabs > button { position: relative; z-index: 1; min-height: 42px; border-radius: 12px; font-size: 13px; font-weight: 700; color: #b9b3d6; transition: color 0.2s ease; cursor: pointer; }
.tz-tabs > button[aria-selected='true'] { color: #fff; }
.tz-tabs > button:hover { color: #fff; }

/* ---------- inputs ---------- */
.tz-field { width: 100%; min-height: 52px; padding: 0 16px; border-radius: 14px; background: rgba(255, 255, 255, 0.05); color: #fff; font-size: 15px;
  border: 1px solid rgba(255, 255, 255, 0.12); outline: none; transition: border-color 0.2s ease, background 0.2s ease; }
.tz-field::placeholder { color: #6f6890; }
.tz-field:focus { border-color: #9d86ff; background: rgba(124, 92, 255, 0.1); }
.tz-label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: #cfc9e8; }
.tz-pin { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.tz-pin input { width: 100%; height: 58px; text-align: center; font-size: 24px; font-weight: 800; color: #fff; border-radius: 14px; outline: none;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.14); font-family: 'JetBrains Mono', ui-monospace, monospace;
  transition: border-color 0.2s ease, background 0.2s ease; caret-color: #ff4fd8; }
.tz-pin input:focus { border-color: #ff4fd8; background: rgba(255, 79, 216, 0.1); }
.tz-pin input.tz-filled { border-color: rgba(124, 92, 255, 0.7); background: rgba(124, 92, 255, 0.14); }
.tz-pin.tz-shake { animation: tzShake 0.4s; }
@keyframes tzShake { 0%, 100% { transform: none; } 20% { transform: translateX(-7px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }

/* ---------- studio sign-in screen (/creator) ---------- */
.tz-auth { position: relative; min-height: 100vh; display: grid; background: var(--tz-ink); }
@media (min-width: 1024px) { .tz-auth { grid-template-columns: 1.05fr 1fr; } }
.tz-auth-aside { position: relative; display: none; padding: 48px; border-right: 1px solid var(--tz-line);
  background: radial-gradient(900px 600px at 20% 0%, rgba(124, 92, 255, 0.34), transparent 60%), radial-gradient(700px 500px at 90% 100%, rgba(255, 79, 216, 0.2), transparent 60%), #0b0916; }
@media (min-width: 1024px) { .tz-auth-aside { display: flex; flex-direction: column; justify-content: space-between; } }
.tz-auth-main { position: relative; display: flex; align-items: center; justify-content: center; padding: 28px 18px; }
.tz-auth-card { width: 100%; max-width: 460px; border-radius: 28px; padding: 28px; background: #100d20; border: 1px solid rgba(255, 255, 255, 0.12); }
@media (min-width: 640px) { .tz-auth-card { padding: 36px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tz-word { opacity: 1 !important; transform: none !important; animation: none !important; }
  .tz-marquee, .tz-float, .tz-wave i, .tz-chip-pop, .tz-trim-handle, .tz-squiggle path, .tz-alert-in, .tz-pin.tz-shake { animation: none !important; }
  .tz-squiggle path { stroke-dashoffset: 0; }
  .tz-bar-val, .tz-tabs > .tz-tab-ind { transition: none; }
}
