/* =====================================================================
   Liquid glass + motion for the public pages (home, calculator, pricing,
   sign in / up) and the brand mark everywhere. Keeps the app's own light
   (white) and dark (black) themes — the glass picks its tint from them.
   ===================================================================== */

:root {
  --glass-bg: rgba(255, 255, 255, .58);
  --glass-bg-2: rgba(255, 255, 255, .78);
  --glass-line: rgba(15, 20, 40, .09);
  --glass-rim: rgba(255, 255, 255, .95);
  --glass-rim-2: rgba(255, 255, 255, .25);
  --glass-shadow: 0 18px 50px rgba(15, 20, 40, .10), 0 2px 8px rgba(15, 20, 40, .05);
  --glass-inset: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 -1px 0 rgba(15, 20, 40, .03);
  --glass-shine: rgba(255, 255, 255, .55);
  --aurora-a: rgba(41, 98, 255, .16);
  --aurora-b: rgba(139, 92, 246, .11);
  --aurora-c: rgba(8, 153, 129, .09);
  --grid-line: rgba(15, 20, 40, .045);
  --tile-a: #2f8bff; --tile-b: #0a3fd6;
}
:root[data-theme="dark"] {
  --glass-bg: rgba(20, 22, 30, .52);
  --glass-bg-2: rgba(26, 28, 38, .72);
  --glass-line: rgba(255, 255, 255, .08);
  --glass-rim: rgba(255, 255, 255, .22);
  --glass-rim-2: rgba(255, 255, 255, .04);
  --glass-shadow: 0 24px 60px rgba(0, 0, 0, .55), 0 2px 10px rgba(0, 0, 0, .4);
  --glass-inset: inset 0 1px 0 rgba(255, 255, 255, .07), inset 0 -1px 0 rgba(0, 0, 0, .3);
  --glass-shine: rgba(255, 255, 255, .09);
  --aurora-a: rgba(59, 116, 255, .20);
  --aurora-b: rgba(139, 92, 246, .13);
  --aurora-c: rgba(38, 166, 154, .08);
  --grid-line: rgba(255, 255, 255, .035);
}

/* ---------------- brand mark (logo) ---------------- */
.brand-mark {
  --logo-a: #eef4ff; --logo-b: #6ad3ff;
  position: relative; background: linear-gradient(145deg, #3b93ff 0%, #1458f0 55%, #0a3bcf 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .18) inset, 0 1px 0 rgba(255, 255, 255, .35) inset, 0 4px 14px rgba(26, 98, 255, .45);
  overflow: hidden;
}
.brand-mark::after { content: ""; position: absolute; inset: 0 0 50% 0; background: linear-gradient(rgba(255, 255, 255, .28), rgba(255, 255, 255, 0)); pointer-events: none; }
.brand-mark .ic { stroke-width: 3; position: relative; z-index: 1; }
.brand-mark.sm { width: 20px; height: 20px; border-radius: 6px; }
.brand-mark.sm .ic { width: 13px; height: 13px; }
.brand-name b, .hr-brand b { font-weight: 800; background: linear-gradient(90deg, #19a7ff, #2962ff 70%, #1f46e8); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------------- glass surface ---------------- */
.glass {
  position: relative; background: var(--glass-bg);
  -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%);
  border: 1px solid var(--glass-line); box-shadow: var(--glass-shadow), var(--glass-inset);
}
/* the liquid rim: a light edge that's bright top-left and fades out */
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, var(--glass-rim), var(--glass-rim-2) 38%, transparent 60%, var(--glass-rim-2) 85%, var(--glass-rim));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
/* light that follows the pointer */
.glass.shine::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), var(--glass-shine), transparent 45%);
}
.glass.shine:hover::after { opacity: 1; }
.glass.panel { border-radius: 20px; padding: 28px; }

/* ---------------- background: aurora + faint chart grid ---------------- */
#pubMain { position: relative; overflow: clip; isolation: isolate; }
.aurora-scope { position: relative; overflow: clip; isolation: isolate; }
.aurora { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.aurora::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px; -webkit-mask: radial-gradient(1100px 700px at 70% 0%, #000 30%, transparent 75%); mask: radial-gradient(1100px 700px at 70% 0%, #000 30%, transparent 75%);
}
.aurora i { position: absolute; border-radius: 50%; filter: blur(60px); will-change: transform; }
.aurora i:nth-child(1) { width: 720px; height: 520px; right: -120px; top: -160px; background: radial-gradient(closest-side, var(--aurora-a), transparent); animation: drift1 22s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { width: 560px; height: 460px; left: -160px; top: 280px; background: radial-gradient(closest-side, var(--aurora-b), transparent); animation: drift2 26s ease-in-out infinite alternate; }
.aurora i:nth-child(4) { width: 640px; height: 520px; left: 10%; top: 1900px; background: radial-gradient(closest-side, var(--aurora-a), transparent); animation: drift2 28s ease-in-out infinite alternate; }
.aurora i:nth-child(5) { width: 600px; height: 480px; right: -80px; top: 2800px; background: radial-gradient(closest-side, var(--aurora-b), transparent); animation: drift1 24s ease-in-out infinite alternate; }
.aurora i:nth-child(3) { width: 520px; height: 420px; right: 18%; top: 980px; background: radial-gradient(closest-side, var(--aurora-c), transparent); animation: drift1 30s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-90px, 70px, 0) scale(1.15); } }
@keyframes drift2 { from { transform: translate3d(0, 0, 0) scale(1.05); } to { transform: translate3d(110px, -60px, 0) scale(.92); } }

/* ---------------- header: floating glass bar ---------------- */
.pub .pub-top { background: transparent; border-bottom: 0; backdrop-filter: none; padding-top: 12px; }
.pub .pub-top-row {
  height: 60px; padding: 0 10px 0 16px; border-radius: 16px; position: relative;
  background: var(--glass-bg); -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%);
  border: 1px solid var(--glass-line); box-shadow: var(--glass-shadow), var(--glass-inset);
}
.pub .pub-wrap.pub-top-row { max-width: 1180px; }
.pub .pub-link { border-radius: 10px; }

/* ---------------- buttons ---------------- */
.btn.glow, .auth-card .btn.primary, .pub-nav .btn.primary { background: linear-gradient(180deg, #4b8bff, var(--accent) 55%, #1f4fe0); border-color: transparent; box-shadow: 0 8px 24px rgba(41, 98, 255, .35), inset 0 1px 0 rgba(255, 255, 255, .35); transition: transform .15s, box-shadow .15s; }
.btn.glow:hover:not(:disabled), .auth-card .btn.primary:hover:not(:disabled), .pub-nav .btn.primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(41, 98, 255, .45), inset 0 1px 0 rgba(255, 255, 255, .35); background: linear-gradient(180deg, #5a96ff, var(--accent) 55%, #1f4fe0); }
.btn .arr { transition: transform .15s; display: inline-block; }
.btn:hover .arr { transform: translateX(3px); }
.btn.lg { border-radius: 12px; }
.glass-btn { background: var(--glass-bg); -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%); border-color: var(--glass-line); box-shadow: var(--glass-inset); }
.glass-btn:hover:not(:disabled) { background: var(--glass-bg-2); }

/* ---------------- shared bits ---------------- */
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px; font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.pill .ic { width: 14px; height: 14px; }
.pill > i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }
.tile { width: 36px; height: 36px; border-radius: 10px; display: inline-grid; place-items: center; color: #fff; flex: none; position: relative; overflow: hidden;
  background: linear-gradient(145deg, var(--tile-a), var(--tile-b)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 6px 16px rgba(26, 98, 255, .3); }
.tile::after { content: ""; position: absolute; inset: 0 0 55% 0; background: linear-gradient(rgba(255, 255, 255, .3), transparent); }
.tile .ic { width: 18px; height: 18px; position: relative; z-index: 1; }
.tile.lg { width: 46px; height: 46px; border-radius: 13px; }
.tile.lg .ic { width: 22px; height: 22px; }
.sec-h { text-align: center; margin-bottom: 30px; }
.sec-h .pub-h2 { margin-bottom: 0; }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }

/* ---------------- hero ---------------- */
.hero2 { padding: 56px 0 40px; }
.hero2-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 48px; align-items: center; }
.hero2 h1 { font-size: 48px; line-height: 1.06; letter-spacing: -1.5px; margin: 0 0 18px; }
.grad { background: linear-gradient(90deg, #19a7ff, var(--accent) 45%, #8b5cf6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mk-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 4px; padding: 10px; border-radius: 16px; margin: 4px 0 22px; }
.mk { display: flex; align-items: center; gap: 9px; padding: 4px 6px; min-width: 0; }
.mk b { display: block; font-size: 13px; white-space: nowrap; }
.mk small { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk:nth-child(even) { border-left: 1px solid var(--glass-line); padding-left: 12px; }
.mini-feats { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 18px; color: var(--muted); font-size: 12.5px; }
.mini-feats span { display: inline-flex; align-items: center; gap: 6px; }
.mini-feats .ic { width: 15px; height: 15px; color: var(--accent); }
.hero-cta .btn .ic { width: 16px; height: 16px; }

/* the animated replay window */
.hero2-art { position: relative; padding: 0 0 110px 0; }
.hr { border-radius: 20px; overflow: hidden; }
.hr-top { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--glass-line); font-size: 12px; }
.hr-brand { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; letter-spacing: 1.5px; font-size: 11px; white-space: nowrap; }
.hr-tfs { display: inline-flex; gap: 2px; padding: 2px; border-radius: 9px; background: var(--hover); margin-left: auto; }
.hr-tfs span { padding: 3px 8px; border-radius: 7px; font-weight: 650; color: var(--muted); font-size: 11px; }
.hr-tfs span.on { background: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(41, 98, 255, .35); }
.hr-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 9px; background: var(--hover); color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hr-chip .ic { width: 13px; height: 13px; }
.hr-play { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 9px; background: linear-gradient(180deg, #4b8bff, var(--accent)); color: #fff; font-weight: 700; box-shadow: 0 4px 14px rgba(41, 98, 255, .4); animation: pulseGlow 2.4s ease-in-out infinite; }
.hr-play .ic { width: 12px; height: 12px; }
@keyframes pulseGlow { 50% { box-shadow: 0 4px 22px rgba(41, 98, 255, .65); } }
.hr-sym { padding: 10px 14px 0; font-size: 11.5px; font-weight: 650; color: var(--muted); }
.hr-chart { position: relative; height: 330px; margin: 4px 6px 8px; transition: opacity .45s; }
.hr-chart canvas { width: 100%; height: 100%; display: block; }
.hr-reset .hr-chart { opacity: 0; }
.hr-marks { position: absolute; inset: 0; pointer-events: none; }
.hr-dot { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #fff; border: 2.5px solid var(--up); box-shadow: 0 0 0 4px rgba(8, 153, 129, .18), 0 0 14px rgba(8, 153, 129, .7); }
.hr-dot.sell { border-color: var(--down); box-shadow: 0 0 0 4px rgba(242, 54, 69, .16), 0 0 14px rgba(242, 54, 69, .65); }
.hr-dot.buy::after, .hr-dot.sell::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 1.5px solid currentColor; opacity: 0; animation: ping 1.8s ease-out infinite; }
.hr-dot.buy { color: var(--up); } .hr-dot.sell { color: var(--down); }
.hr-dot.done::after { animation: none; }
.hr-dot.exit { width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-width: 2px; }
.hr-dot.exit.loss { border-color: var(--down); box-shadow: 0 0 10px rgba(242, 54, 69, .6); }
@keyframes ping { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }
.hr-tag {
  position: absolute; transform: translate(-50%, calc(-100% - 16px)); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 5px 10px; border-radius: 9px; font-size: 12px; font-weight: 650; color: var(--text);
  background: var(--glass-bg-2); -webkit-backdrop-filter: blur(10px) saturate(160%); backdrop-filter: blur(10px) saturate(160%);
  border: 1px solid; box-shadow: var(--glass-inset), 0 6px 18px rgba(0, 0, 0, .12); font-variant-numeric: tabular-nums;
  animation: tagIn .35s cubic-bezier(.2, .8, .2, 1);
}
.hr-tag.below { transform: translate(-50%, 16px); }
.hr-tag.win { border-color: rgba(8, 153, 129, .55); box-shadow: var(--glass-inset), 0 0 18px rgba(8, 153, 129, .25); }
.hr-tag.loss { border-color: rgba(242, 54, 69, .55); box-shadow: var(--glass-inset), 0 0 18px rgba(242, 54, 69, .22); }
.hr-tag.win span { color: var(--up); } .hr-tag.loss span { color: var(--down); }
.hr-tag b { font-weight: 750; }
.hr-tag.win b { color: var(--up); } .hr-tag.loss b { color: var(--down); }
.hr-arr { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; }
.hr-arr.buy { border-bottom: 7px solid var(--up); }
.hr-arr.sell { border-top: 7px solid var(--down); }
@keyframes tagIn { from { opacity: 0; margin-top: 6px; } to { opacity: 1; margin-top: 0; } }

.hr-card { position: absolute; left: -34px; bottom: 0; width: 248px; border-radius: 16px; padding: 14px 16px; display: grid; gap: 10px; animation: floatY 7s ease-in-out infinite; }
.hr-card-h { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; }
.hr-card-h .ic { width: 15px; height: 15px; color: var(--accent); }
.hr-card-h .live { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--up); }
.hr-card-h .live i { width: 6px; height: 6px; border-radius: 50%; background: var(--up); box-shadow: 0 0 8px var(--up); animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.hr-pnl { display: flex; align-items: baseline; justify-content: space-between; }
.hr-pnl small { color: var(--muted); font-size: 11.5px; }
.hr-pnl b { font-size: 22px; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.hr-row > div:first-child { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-bottom: 5px; }
.hr-row b { color: var(--text); font-variant-numeric: tabular-nums; }
.hr-row b i { font-style: normal; color: var(--muted); font-weight: 500; }
.hr-bar { height: 6px; border-radius: 6px; background: var(--hover); overflow: hidden; }
.hr-bar span { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, #12b39a, var(--up)); box-shadow: 0 0 10px rgba(8, 153, 129, .5); transition: width .4s ease; }
.hr-bar.warn span { background: linear-gradient(90deg, #fbbf24, #f59e0b); box-shadow: none; }
.hr-foot { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--glass-line); padding-top: 9px; }
.hr-foot b { color: var(--text); }
@keyframes floatY { 50% { transform: translateY(-10px); } }

/* markets marquee */
.mq { padding: 8px 0 18px; }
.mq-label { text-align: center; font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.mq-track { overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.mq-run { display: flex; gap: 10px; width: max-content; padding: 6px 0 14px; animation: marquee 48s linear infinite; }
.mq-track:hover .mq-run { animation-play-state: paused; }
.mq-item { display: inline-flex; align-items: center; gap: 9px; padding: 8px 14px 8px 10px; border-radius: 12px; font-size: 13px; white-space: nowrap; }
.mq-spark { width: 44px; height: 18px; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mq-spark.up { stroke: var(--up); } .mq-spark.dn { stroke: var(--down); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* sections in glass */
.pub .feat { border-radius: 18px; padding: 24px; background: var(--glass-bg); border-color: var(--glass-line); transition: transform .25s ease; }
.pub .feat:hover { transform: translateY(-3px); }
.pub .feat h3 { margin: 16px 0 6px; }
.pub .feat-grid .feat:last-child:nth-child(3n+1) { grid-column: auto; }
.pc-teaser.glass.panel { padding: 36px; }
.pc-teaser-math.glass { background: var(--glass-bg-2); }
.honest-grid .glass.panel { padding: 24px; }
.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 34px 36px; }
.faq.glass.panel { padding: 8px 28px 16px; }

/* pricing cards */
.price-card.glass { border-radius: 22px; padding: 26px; background: var(--glass-bg); border-color: var(--glass-line); transition: transform .25s ease; }
.price-card.glass:hover { transform: translateY(-4px); }
.price-card.glass.hl { box-shadow: var(--glass-shadow), var(--glass-inset), 0 0 0 1.5px var(--accent), 0 0 40px rgba(41, 98, 255, .22); }
.price-card .plan-tile { margin-bottom: 14px; }
.price-card:not(.hl) .plan-tile { --tile-a: #5b6478; --tile-b: #2b3140; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 6px 14px rgba(0, 0, 0, .15); }
.price-card .btn.wide { height: 44px; border-radius: 12px; margin-top: 16px; }
.price-badge { display: inline-flex; align-items: center; gap: 5px; left: auto; right: 22px; top: -13px; padding: 5px 12px; background: linear-gradient(180deg, #4b8bff, var(--accent)); box-shadow: 0 6px 18px rgba(41, 98, 255, .4); }
.price-badge .ic { width: 12px; height: 12px; fill: currentColor; }
.price-card .feat-list .ic { color: var(--accent); }
.glass-seg { background: var(--glass-bg); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid var(--glass-line); border-radius: 12px; padding: 4px; }
.glass-seg button { border-radius: 9px; padding: 7px 14px; font-size: 13px; }

/* auth */
.auth-card.glass.panel { max-width: 420px; padding: 32px; border-radius: 24px; }
.auth-card .input { background: var(--glass-bg-2); }
.auth .brand-name { letter-spacing: 3px; }

/* calculator page in glass */
.pc-inputs .card, .pc-results .card { background: var(--glass-bg); -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%); border-color: var(--glass-line); box-shadow: var(--glass-shadow), var(--glass-inset); border-radius: 18px; }
.pc-tile { background: var(--glass-bg-2); border-color: var(--glass-line); }

@media (max-width: 1100px) {
  .hero2-grid { grid-template-columns: 1fr; }
  .hero2-art { max-width: 680px; margin: 0 auto; width: 100%; }
  .hr-card { left: 0; }
}
@media (max-width: 900px) {
  .hero2 h1 { font-size: 36px; letter-spacing: -1px; }
  .hr-chart { height: 260px; }
  .hr-tfs, .hr-brand { display: none; }
  .cta-band { flex-direction: column; align-items: flex-start; }
  .pub .pub-top { padding: 8px 8px 0; }
}
@media (max-width: 520px) {
  .pub .pub-top-row { padding: 0 6px 0 10px; gap: 4px; height: 54px; }
  .pub .brand { gap: 7px; font-size: 12px; letter-spacing: 1px; }
  .pub .brand-mark { width: 26px; height: 26px; }
  .pub .pub-nav { gap: 2px; }
  .pub .pub-nav .btn { padding: 0 10px; height: 32px; }
  .pub .pub-link { padding: 8px 6px; font-size: 13px; }
  .hero2 { padding-top: 28px; }
  .hr-card { position: relative; right: auto; width: auto; margin: -40px 12px 0; }
  .hero2-art { padding-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .aurora i, .mq-run, .hr-card, .hr-play, .hr-dot::after { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
