/* Calc.Trading homepage v3 – loaded only on "/". Pure CSS motion, all of it disabled under prefers-reduced-motion. */
.home-v3 { --h3-ink: #050a17; --h3-glass: rgba(255,255,255,.06); --h3-line: rgba(255,255,255,.12); }

/* ---------- Hero ---------- */
.h3-hero { position: relative; isolation: isolate; overflow: hidden; background: var(--h3-ink); color: #fff; padding: clamp(3rem, 6vw, 5.5rem) 0 0; }
.h3-aurora { position: absolute; inset: -20% -10% 0; z-index: -2; filter: blur(60px); opacity: .9; }
.h3-aurora span { position: absolute; width: 46vw; height: 46vw; max-width: 620px; max-height: 620px; border-radius: 50%; mix-blend-mode: screen; }
.h3-aurora span:nth-child(1) { left: 2%; top: 4%; background: radial-gradient(circle, rgba(37,99,235,.75), transparent 62%); }
.h3-aurora span:nth-child(2) { right: 0; top: -8%; background: radial-gradient(circle, rgba(16,185,129,.45), transparent 62%); }
.h3-aurora span:nth-child(3) { left: 38%; bottom: -30%; background: radial-gradient(circle, rgba(124,58,237,.5), transparent 62%); }
.h3-gridlines { position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 25%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 25%, transparent 75%); }
.h3-hero-inner { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: clamp(2rem, 4vw, 3.5rem); align-items: center; padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.h3-pill { display: inline-flex; align-items: center; gap: .55rem; padding: .38rem .8rem; border-radius: 999px; background: var(--h3-glass); border: 1px solid var(--h3-line); font-size: var(--fs-xs); font-weight: 600; color: #cfe0ff; letter-spacing: .01em; }
.h3-dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52,211,153,.6); }
.h3-hero h1 { color: #fff; font-size: clamp(2.1rem, 1.3rem + 3vw, 3.6rem); line-height: 1.08; letter-spacing: -.025em; margin: 1.1rem 0 1rem; }
.h3-hero h1 em { font-style: normal; background: linear-gradient(92deg, #93b8ff 0%, #6ee7b7 50%, #93b8ff 100%); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; }
.h3-lede { font-size: var(--fs-lg); color: #c3cfe6; max-width: 640px; margin: 0 0 1.75rem; }
.h3-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn-lg { min-height: 50px; padding: .8rem 1.35rem; font-size: var(--fs-base); border-radius: 13px; }
.h3-actions .btn:active { transform: scale(.97); }
.h3-magnet { position: relative; overflow: hidden; }
.h3-magnet::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform: translateX(-120%); }
.h3-stats { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: .5rem 2rem; margin: 2.25rem 0 0; }
.h3-stats div { min-width: 0; }
.h3-stats dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #8ea0c4; font-weight: 600; }
.h3-stats dd { margin: .15rem 0 0; font-size: 1.65rem; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.h3-stats dd.h3-date { font-size: 1.05rem; padding-top: .45rem; }

/* Demo card */
.h3-demo { position: relative; padding: 1.25rem; border-radius: 22px; background: linear-gradient(160deg, rgba(255,255,255,.09), rgba(255,255,255,.03)); border: 1px solid var(--h3-line); box-shadow: 0 30px 80px -30px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.08); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.h3-demo::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: linear-gradient(140deg, rgba(122,167,255,.7), transparent 40%, rgba(110,231,183,.5)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.h3-demo-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; flex-wrap: wrap; }
.h3-demo-title { display: inline-flex; align-items: center; gap: .4rem; font-size: var(--fs-sm); font-weight: 650; color: #dbe6ff; }
.h3-switch { position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 3px; border-radius: 999px; background: rgba(0,0,0,.35); border: 1px solid var(--h3-line); }
.h3-switch button { position: relative; z-index: 1; border: 0; background: none; color: #a9b8d6; font: inherit; font-size: .78rem; font-weight: 650; padding: .35rem .8rem; border-radius: 999px; cursor: pointer; transition: color .2s; }
.h3-switch button[aria-selected="true"] { color: #fff; }
.h3-switch button:focus-visible { outline: 2px solid #7aa7ff; outline-offset: 1px; }
.h3-switch-glider { position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / 3); border-radius: 999px; background: linear-gradient(135deg, #2563eb, #4f8bff); box-shadow: 0 4px 14px -4px rgba(37,99,235,.8); transform: translateX(calc(var(--i, 0) * 100%)); transition: transform .35s var(--ease); }
.h3-demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.h3-demo-grid label { display: grid; gap: .3rem; font-size: .72rem; font-weight: 600; color: #93a3c4; text-transform: uppercase; letter-spacing: .06em; }
.h3-in { display: flex; align-items: center; gap: .35rem; padding: 0 .7rem; height: 42px; border-radius: 11px; background: rgba(0,0,0,.32); border: 1px solid var(--h3-line); transition: border-color .2s, box-shadow .2s; }
.h3-in:focus-within { border-color: #7aa7ff; box-shadow: 0 0 0 3px rgba(79,139,255,.25); }
.h3-in i { font-style: normal; color: #7f8fb0; font-size: .85rem; }
.h3-in input { all: unset; width: 100%; min-width: 0; color: #fff; font-family: var(--font-mono); font-size: .95rem; font-variant-numeric: tabular-nums; text-transform: none; letter-spacing: 0; }
.h3-demo-out { margin-top: 1rem; padding: 1rem; border-radius: 16px; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.08); position: relative; overflow: hidden; }
.h3-big { display: flex; align-items: baseline; gap: .55rem; flex-wrap: wrap; margin-bottom: .6rem; }
.h3-label { width: 100%; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #8ea0c4; font-weight: 600; }
.h3-big strong { font-size: 2.4rem; line-height: 1; font-weight: 780; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: #fff; }
.h3-unit { color: #9fb0d0; font-size: .9rem; }
.h3-row { display: flex; justify-content: space-between; gap: 1rem; font-size: .88rem; color: #a9b8d6; padding: .3rem 0; border-top: 1px dashed rgba(255,255,255,.08); }
.h3-row b { color: #e8efff; font-family: var(--font-mono); font-weight: 600; font-variant-numeric: tabular-nums; }
.h3-spark { display: block; width: 100%; height: 64px; margin-top: .6rem; }
.h3-line { stroke-dasharray: 420; stroke-dashoffset: 0; }
.h3-demo-foot { margin: .8rem 0 0; font-size: .78rem; color: #8ea0c4; }
.h3-demo-foot a { color: #9cc0ff; }
.flash { animation: h3-flash .5s var(--ease); }

/* Formula ticker */
.h3-ticker { position: relative; border-top: 1px solid rgba(255,255,255,.08); background: rgba(0,0,0,.25); 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); }
.h3-ticker-track { display: flex; width: max-content; gap: 3rem; padding: .85rem 0; font-family: var(--font-mono); font-size: .8rem; color: #8fa2c8; white-space: nowrap; }
.h3-ticker-track span::before { content: "ƒ"; color: #6ee7b7; margin-right: .6rem; }

/* ---------- Catalogue ---------- */
.h3-cat-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.h3-cat-head h2 { margin: 0 0 .35rem; }
.h3-cat-head p { margin: 0; color: var(--text-2); max-width: 620px; }
.h3-search { display: flex; align-items: center; gap: .55rem; min-width: min(100%, 360px); height: 48px; padding: 0 .9rem; border-radius: 14px; background: var(--bg-elev); border: 1px solid var(--border); color: var(--text-3); box-shadow: var(--shadow-sm); transition: border-color .2s, box-shadow .2s; }
.h3-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-ring); }
.h3-search input { all: unset; flex: 1; color: var(--text); font-size: var(--fs-sm); }
.h3-search kbd { font-family: var(--font-mono); font-size: .72rem; padding: .1rem .4rem; border-radius: 6px; border: 1px solid var(--border); color: var(--text-3); }
.h3-tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin: .5rem 0 .75rem; }
.h3-tabs button { display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: .45rem .95rem; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text-2); font: inherit; font-size: var(--fs-sm); font-weight: 600; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .12s; }
.h3-tabs button span { font-size: .72rem; padding: .05rem .45rem; border-radius: 999px; background: var(--bg-sunken); color: var(--text-3); font-variant-numeric: tabular-nums; }
.h3-tabs button:hover { border-color: var(--border-strong); color: var(--text); }
.h3-tabs button:active { transform: scale(.97); }
.h3-tabs button[aria-selected="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.h3-tabs button[aria-selected="true"] span { background: rgba(127,127,127,.25); color: inherit; }
.h3-count { font-size: var(--fs-sm); color: var(--text-3); margin: 0 0 1rem; min-height: 1.4em; }
.h3-group { margin-bottom: 2rem; }
.h3-group[hidden] { display: none; }
.h3-group-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.h3-group-head h3 { display: inline-flex; align-items: center; gap: .5rem; margin: 0; font-size: var(--fs-lg); }
.h3-group-head a { font-size: var(--fs-sm); font-weight: 600; display: inline-flex; align-items: center; gap: .3rem; }
.h3-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .75rem; }
.h3-card { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: .8rem; padding: 1rem; border-radius: 16px; background: var(--bg-elev); border: 1px solid var(--border); color: var(--text); text-decoration: none; overflow: hidden; transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease); }
.h3-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), var(--primary-soft), transparent 45%); opacity: 0; transition: opacity .3s var(--ease); pointer-events: none; }
.h3-card:hover, .h3-card:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); color: var(--text); }
.h3-card:hover::after { opacity: 1; }
.h3-card[hidden] { display: none; }
.h3-card-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: none; }
.cat-india .h3-card-ico { background: var(--warn-soft); color: var(--warn); }
.cat-crypto .h3-card-ico { background: rgba(124,58,237,.1); color: var(--violet-600); }
.cat-invest .h3-card-ico { background: var(--pos-soft); color: var(--pos); }
[data-theme="dark"] .cat-crypto .h3-card-ico { color: #b794ff; }
.h3-card-body { display: grid; gap: .2rem; min-width: 0; }
.h3-card-body strong { font-size: .97rem; line-height: 1.3; }
.h3-card-body small { color: var(--text-2); font-size: .82rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.h3-card-go { color: var(--text-3); transition: transform .25s var(--ease), color .25s; align-self: center; }
.h3-card:hover .h3-card-go { transform: translateX(4px); color: var(--primary); }
.h3-card.is-in { animation: h3-rise .45s var(--ease) both; animation-delay: var(--d, 0s); }
.h3-empty { padding: 1.5rem; border: 1px dashed var(--border-strong); border-radius: 16px; text-align: center; color: var(--text-2); }

/* ---------- Trust ---------- */
.h3-trust { background: linear-gradient(180deg, transparent, var(--bg-sunken)); }
.h3-trust-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.h3-tile { padding: 1.35rem; border-radius: 18px; background: var(--bg-elev); border: 1px solid var(--border); transition: transform .25s var(--ease), box-shadow .25s; }
.h3-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.h3-tile h3 { font-size: 1.05rem; margin: .85rem 0 .35rem; }
.h3-tile p { margin: 0; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.6; }
.h3-tile-ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #2563eb, #7c3aed); box-shadow: 0 10px 22px -10px rgba(37,99,235,.7); }
.h3-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.5rem; counter-reset: s; }
.h3-steps div { display: flex; align-items: center; gap: .8rem; padding: .9rem 1rem; border-radius: 14px; border: 1px dashed var(--border-strong); color: var(--text-2); font-size: var(--fs-sm); font-weight: 550; }
.h3-steps b { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--text); color: var(--bg); font-size: .85rem; }

/* ---------- Extension ---------- */
.h3-ext { display: grid; grid-template-columns: 1.2fr .8fr; gap: 2rem; align-items: center; padding: clamp(1.5rem, 4vw, 2.75rem); border-radius: 26px; color: #fff; background: radial-gradient(500px 260px at 90% 10%, rgba(16,185,129,.35), transparent 60%), radial-gradient(500px 300px at 0% 100%, rgba(37,99,235,.55), transparent 60%), #0b1326; overflow: hidden; }
.h3-ext h2 { color: #fff; margin: 0 0 .5rem; }
.h3-ext p { color: #c3cfe6; margin: 0 0 1.25rem; max-width: 520px; }
.h3-ext-mock { justify-self: center; width: min(100%, 300px); border-radius: 16px; background: #0f1a33; border: 1px solid rgba(255,255,255,.14); box-shadow: 0 30px 60px -25px rgba(0,0,0,.8); overflow: hidden; transform: rotate(-3deg); }
.h3-ext-bar { display: flex; align-items: center; gap: .35rem; padding: .55rem .75rem; background: rgba(255,255,255,.06); font-size: .72rem; color: #9fb0d0; }
.h3-ext-bar i { width: 8px; height: 8px; border-radius: 50%; background: #334262; }
.h3-ext-bar span { margin-left: .4rem; }
.h3-ext-body { padding: .9rem; display: grid; gap: .5rem; }
.h3-ext-row { display: flex; justify-content: space-between; font-size: .85rem; color: #a9b8d6; }
.h3-ext-row b { color: #fff; font-family: var(--font-mono); }
.h3-ext-row b.pos { color: #34d399; }
.h3-ext-meter { height: 8px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.h3-ext-meter span { display: block; height: 100%; width: 72%; border-radius: inherit; background: linear-gradient(90deg, #2563eb, #34d399); transform-origin: left; }

/* ---------- Guides ---------- */
.h3-guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.h3-guide { display: grid; gap: .45rem; padding: 1.2rem; border-radius: 18px; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); text-decoration: none; transition: transform .25s var(--ease), box-shadow .25s, border-color .25s; }
.h3-guide:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); color: var(--text); }
.h3-guide small { color: var(--text-2); font-size: .85rem; line-height: 1.5; }
.h3-guide-go { font-size: .8rem; font-weight: 650; color: var(--primary); display: inline-flex; align-items: center; gap: .3rem; }
.h3-guide:hover .h3-guide-go svg { transform: translateX(3px); }
.h3-guide-go svg { transition: transform .25s var(--ease); }

/* ---------- Motion (only when the user has not asked for less) ---------- */
@keyframes h3-float { 0%, 100% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(3%, -4%, 0) scale(1.08); } }
@keyframes h3-pulse { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.55); } 80%, 100% { box-shadow: 0 0 0 9px rgba(52,211,153,0); } }
@keyframes h3-shine { to { background-position: -200% center; } }
@keyframes h3-sweep { 0%, 70% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@keyframes h3-ticker { to { transform: translateX(-50%); } }
@keyframes h3-draw { from { stroke-dashoffset: 420; } to { stroke-dashoffset: 0; } }
@keyframes h3-rise { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes h3-flash { 0% { color: #6ee7b7; } 100% { color: inherit; } }
@keyframes h3-meter { from { transform: scaleX(.15); } to { transform: scaleX(1); } }
@keyframes h3-in-hero { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .h3-aurora span { animation: h3-float 16s ease-in-out infinite; }
  .h3-aurora span:nth-child(2) { animation-duration: 20s; animation-delay: -6s; }
  .h3-aurora span:nth-child(3) { animation-duration: 24s; animation-delay: -12s; }
  .h3-dot { animation: h3-pulse 2.2s ease-out infinite; }
  .h3-hero h1 em { animation: h3-shine 7s linear infinite; }
  .h3-magnet::after { animation: h3-sweep 4.5s ease-in-out 1.5s infinite; }
  .h3-ticker-track { animation: h3-ticker 48s linear infinite; }
  .h3-ticker:hover .h3-ticker-track { animation-play-state: paused; }
  .h3-line { animation: h3-draw 1.6s var(--ease) .3s both; }
  .h3-copy > :not(h1) { animation: h3-in-hero .7s var(--ease) both; }
  .h3-copy > :nth-child(2) { animation-delay: .06s; } .h3-copy > :nth-child(3) { animation-delay: .12s; }
  .h3-copy > :nth-child(4) { animation-delay: .18s; } .h3-copy > :nth-child(5) { animation-delay: .24s; }
  .h3-demo { animation: h3-in-hero .8s var(--ease) .2s both; }
  .h3-ext-meter span { animation: h3-meter 2.4s var(--ease) infinite alternate; }
  .h3-stopline { transition: transform .5s var(--ease); }
}
@media (prefers-reduced-motion: reduce) {
  .h3-ticker-track { flex-wrap: wrap; width: auto; justify-content: center; gap: .5rem 2rem; }
  .h3-ticker-track span:nth-child(n+7) { display: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .h3-hero-inner { grid-template-columns: 1fr; }
  .h3-demo { max-width: 560px; }
  .h3-trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h3-guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .h3-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1.25rem; }
  .h3-demo-grid { grid-template-columns: 1fr 1fr; }
  .h3-big strong { font-size: 2rem; }
  .h3-trust-grid, .h3-guide-grid, .h3-steps, .h3-ext { grid-template-columns: 1fr; }
  .h3-ext-mock { display: none; }
  .h3-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--s-5) * -1); padding: 0 var(--s-5) .25rem; }
  .h3-tabs::-webkit-scrollbar { display: none; }
  .h3-tabs button { flex: none; }
  .h3-search { min-width: 100%; }
  .h3-cards { grid-template-columns: 1fr; }
}
