/* ===================================================================
   Monex — New cinematic sections (CSS motion-graphics)
   بر اساس بنرها و محتوای طرح‌های کاربر — بدون تصویر، فقط CSS/SVG
   =================================================================== */

/* ---------- shared section intro ---------- */
.sec-kicker { font-size: .8rem; letter-spacing: 3px; text-transform: uppercase; color: var(--brand-2); font-weight: 800; }
.sec-sub { color: var(--text-soft); display: inline-flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; margin-top: 10px; }
.sec-sub span { position: relative; }
.sec-sub span + span::before { content: '╱'; color: var(--brand-2); margin-inline-end: 14px; opacity: .65; }

/* reveal helper variants (stagger) */
.reveal[data-d="1"]{ transition-delay:.08s } .reveal[data-d="2"]{ transition-delay:.16s }
.reveal[data-d="3"]{ transition-delay:.24s } .reveal[data-d="4"]{ transition-delay:.32s }
.reveal[data-d="5"]{ transition-delay:.40s }

/* =====================================================================
   1) SERVICES — NEXWAVE / NEXPULSE / NEXRADAR  (cinematic banners)
   ===================================================================== */
.svc-rail { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.svc-banner {
  position: relative; border-radius: 18px; overflow: hidden; isolation: isolate;
  min-height: 430px; display: flex; flex-direction: column; justify-content: flex-end;
  border: 1px solid var(--line); background: #05060c;
  box-shadow: 0 18px 50px rgba(0,0,0,.5);
  transition: transform .5s cubic-bezier(.2,.7,.2,1), box-shadow .5s;
}
.svc-banner:hover { transform: translateY(-8px); box-shadow: 0 30px 70px rgba(0,0,0,.6); }
.svc-stage { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.svc-banner::after { /* legibility gradient */
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(5,6,12,0) 38%, rgba(5,6,12,.55) 66%, rgba(5,6,12,.92) 100%);
}
.svc-body { position: relative; z-index: 2; padding: 26px 24px 28px; display: flex; flex-direction: column; align-items: flex-start; }
.svc-name { font-family: 'INGAME', var(--font); font-size: 1.9rem; letter-spacing: 1px; color: #fff; line-height: 1; }
.svc-name b { color: var(--brand-2); font-weight: inherit; }
.svc-banner.is-pulse .svc-name b { color: var(--gold); }
.svc-desc { color: #d7c7d0; font-size: .95rem; margin-top: 12px; max-width: 30ch; }
.svc-go { margin-top: 16px; display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 700; font-size: .9rem;
  border: 1px solid rgba(255,255,255,.28); padding: 9px 16px; border-radius: 999px; backdrop-filter: blur(6px);
  transition: background .25s, border-color .25s, gap .25s; }
.svc-go:hover { background: rgba(255,255,255,.12); border-color: #fff; gap: 12px; }
.svc-tag { position: absolute; z-index: 2; top: 16px; inset-inline-start: 16px; font: 800 .66rem var(--font);
  letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,.8);
  background: rgba(0,0,0,.32); border: 1px solid rgba(255,255,255,.18); padding: 5px 11px; border-radius: 999px; backdrop-filter: blur(6px); }

/* --- NEXWAVE: stormy ocean + glass orb + waveform + lightning --- */
.stg-wave { background:
  radial-gradient(120% 80% at 50% 8%, #16335c 0%, #0a1730 38%, #04060f 78%); }
.stg-wave .sea { position: absolute; inset: 58% 0 0 0;
  background: linear-gradient(180deg, #0c2a52 0%, #050c1c 70%); opacity: .9;
  mask: linear-gradient(180deg, transparent, #000 30%); }
.stg-wave .sea::before { content:''; position:absolute; inset:0;
  background: repeating-linear-gradient(180deg, rgba(120,180,255,.10) 0 2px, transparent 2px 9px);
  animation: seaShift 6s linear infinite; }
@keyframes seaShift { to { transform: translateY(9px); } }
.orb { position: absolute; left: 50%; top: 44%; width: 150px; height: 150px; transform: translate(-50%,-50%); border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, rgba(150,205,255,.55), rgba(20,55,110,.5) 46%, rgba(4,10,24,.85) 72%);
  box-shadow: inset 0 0 40px rgba(120,190,255,.45), 0 0 60px rgba(80,160,255,.4); }
.orb::after { content:''; position:absolute; inset:-3px; border-radius:50%; border:1px solid rgba(150,205,255,.35); }
.wave-line { position: absolute; left: 50%; top: 44%; width: 150px; height: 60px; transform: translate(-50%,-50%); overflow: hidden; }
/* svg باید از چپ لنگر بگیرد (position:absolute) وگرنه در RTL راست‌چین می‌شود
   و translateX منفی نیمه‌ی راستِ پنجره را خالی می‌گذارد → موجِ نصفه/بریده */
.wave-line svg { position: absolute; left: 0; top: 0; width: 450px; height: 60px; animation: waveScroll 3.2s linear infinite; will-change: transform; }
.wave-line path { fill: none; stroke: #9fd2ff; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 6px #6cf); }
/* شیفت دقیقاً ۲ پریود (۱۵۰px) در ناحیه‌ی داخلیِ مسیرِ ۴۵۰px:
   پنجره همیشه بینِ x=75..375 می‌ماند، پس نقاطِ ابتدا/انتهای مسیر هرگز دیده نمی‌شوند → حلقه‌ی کاملاً بی‌درز */
@keyframes waveScroll { from { transform: translateX(-75px); } to { transform: translateX(-225px); } }
.bolt { position: absolute; left: 50%; top: 0; width: 3px; height: 44%; transform: translateX(-50%);
  background: linear-gradient(#dff1ff, #6cf 60%, transparent);
  filter: drop-shadow(0 0 8px #aee0ff); animation: boltFlash 5s steps(1) infinite; }
@keyframes boltFlash { 0%,7%,100%{opacity:0} 2%,5%{opacity:1} 3%{opacity:.3} }

/* --- NEXPULSE: eclipse ring + sunrise horizon + rising bars --- */
.stg-pulse { background: radial-gradient(120% 90% at 50% 120%, #3a1d04 0%, #1a0e16 45%, #070410 80%); }
.ring { position: absolute; left: 50%; top: 42%; width: 168px; height: 168px; transform: translate(-50%,-50%); border-radius: 50%;
  background: conic-gradient(from 210deg, var(--gold), #ffe9a8 18%, transparent 40% 60%, #6fb6ff 82%, var(--gold));
  -webkit-mask: radial-gradient(circle, transparent 60%, #000 61%); mask: radial-gradient(circle, transparent 60%, #000 61%);
  filter: drop-shadow(0 0 14px rgba(245,196,81,.5)); animation: ringSpin 14s linear infinite; }
@keyframes ringSpin { to { transform: translate(-50%,-50%) rotate(360deg); } }
.ring-core { position: absolute; left: 50%; top: 42%; width: 12px; height: 12px; transform: translate(-50%,-50%); border-radius: 50%;
  background: #fff; box-shadow: 0 0 22px 8px rgba(255,230,160,.8); animation: corePulse 3s ease-in-out infinite; }
@keyframes corePulse { 50% { box-shadow: 0 0 30px 12px rgba(255,230,160,.95); } }
.horizon { position: absolute; inset: 70% 0 0 0; background: linear-gradient(180deg, rgba(245,196,81,.32), transparent 70%);
  mask: linear-gradient(180deg,#000,transparent); }
.bars { position: absolute; bottom: 18%; inset-inline: 12%; height: 70px; display: flex; align-items: flex-end; gap: 5px; opacity: .8; }
.bars i { flex: 1; background: linear-gradient(180deg,#ffd877,#d99a2b); border-radius: 2px 2px 0 0; transform-origin: bottom; animation: barRise 2.6s ease-in-out infinite; }
@keyframes barRise { 0%,100%{ transform: scaleY(.35) } 50%{ transform: scaleY(1) } }

/* --- NEXRADAR: command-center radar sweep + blips --- */
.stg-radar { background: radial-gradient(120% 100% at 50% 50%, #0a1f1a 0%, #05110f 50%, #03080a 80%); }
.radar { position: absolute; left: 50%; top: 44%; width: 210px; height: 210px; transform: translate(-50%,-50%); border-radius: 50%;
  border: 1px solid rgba(90,230,180,.35); box-shadow: inset 0 0 40px rgba(40,200,150,.18); overflow: hidden; }
.radar::before { content:''; position:absolute; inset:0; border-radius:50%;
  background: repeating-radial-gradient(circle, transparent 0 24px, rgba(90,230,180,.16) 24px 25px); }
.radar::after { content:''; position:absolute; inset:0; background: conic-gradient(from 0deg, rgba(90,230,180,.45), transparent 28%);
  animation: radSweep 3.4s linear infinite; }
@keyframes radSweep { to { transform: rotate(360deg); } }
.radar .cross { position:absolute; inset:0; }
.radar .cross::before, .radar .cross::after { content:''; position:absolute; background: rgba(90,230,180,.25); }
.radar .cross::before { left:50%; top:0; bottom:0; width:1px; }
.radar .cross::after { top:50%; left:0; right:0; height:1px; }
.blip { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #5ce6b4; box-shadow: 0 0 10px #5ce6b4;
  animation: blipPing 3.4s ease-out infinite; }
@keyframes blipPing { 0%,70%{ opacity:0; transform: scale(.4) } 78%{ opacity:1; transform: scale(1) } 100%{ opacity:0; transform: scale(1.6) } }

/* =====================================================================
   2) MARKETS — FOREX / METALS / ENERGY / INDICES / STOCKS / CRYPTO
   ===================================================================== */
.mkt-grid { display: grid; grid-template-columns: repeat(6,1fr); gap: 14px; }
.mkt {
  position: relative; height: 340px; border-radius: 16px; overflow: hidden; isolation: isolate;
  border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: flex-end;
  cursor: default; transition: transform .5s cubic-bezier(.2,.7,.2,1), box-shadow .5s, flex-grow .5s;
}
.mkt:hover { transform: translateY(-6px); box-shadow: 0 24px 50px rgba(0,0,0,.5); }
.mkt-art { position: absolute; inset: -1px; z-index: 0; width: calc(100% + 2px); height: calc(100% + 2px); object-fit: cover;
  transform: scale(1.03); transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.mkt:hover .mkt-art { transform: scale(1.1); }
.mkt::after { content:''; position:absolute; inset:0; z-index:1; pointer-events:none;
  background: linear-gradient(180deg, rgba(0,0,0,0) 32%, rgba(0,0,0,.45) 64%, rgba(0,0,0,.9) 100%); }
.mkt-cap { position: relative; z-index: 2; padding: 16px 14px; }
.mkt-cap b { display: block; font: 800 1.05rem var(--font); letter-spacing: 2px; color: #fff; }
.mkt-cap small { color: rgba(255,255,255,.72); font-size: .76rem; }
.mkt .mkt-line { position:absolute; z-index:2; left:14px; right:14px; bottom:54px; height:2px; transform: scaleX(0); transform-origin: inline-start;
  background: linear-gradient(90deg, var(--gold), transparent); transition: transform .5s; }
.mkt:hover .mkt-line { transform: scaleX(1); }

/* =========================================================
   Market cinematic scenes (CSS + SVG, no images)
   ========================================================= */
.mkt-art > * { position: absolute; }
.mkt-art svg { width: 100%; height: 64%; left: 0; bottom: 0; }

/* --- FOREX: weathered currency vault --- */
.scene-forex { background: radial-gradient(130% 95% at 32% 22%, #38473a, #1a221a 58%, #0a0e0a); --m-accent:#9fcaa0; }
.scene-forex .fx-fog { inset:0; background: linear-gradient(115deg, transparent 30%, rgba(120,170,120,.12) 50%, transparent 70%);
  animation: fxFog 9s ease-in-out infinite; }
@keyframes fxFog { 0%,100%{ transform: translateX(-20%) } 50%{ transform: translateX(20%) } }
.scene-forex .fx-big { inset:0; display:grid; place-items:center; font:900 9rem/1 var(--font); color: rgba(190,220,190,.10);
  text-shadow: 0 0 50px rgba(120,180,120,.25); animation: fxPulse 6s ease-in-out infinite; }
@keyframes fxPulse { 50%{ color: rgba(190,220,190,.18); transform: scale(1.04); } }
.scene-forex .fx-glyphs { inset:0; }
.scene-forex .fx-glyphs i { position:absolute; font-style:normal; font-weight:800; color: rgba(180,230,190,.5);
  font-size: 1.1rem; animation: fxDrift 7s ease-in-out infinite; }
.scene-forex .fx-glyphs i:nth-child(1){ left:18%; top:24%; } .scene-forex .fx-glyphs i:nth-child(2){ left:70%; top:32%; }
.scene-forex .fx-glyphs i:nth-child(3){ left:30%; top:60%; } .scene-forex .fx-glyphs i:nth-child(4){ left:64%; top:66%; }
.scene-forex .fx-glyphs i { animation-delay: calc(var(--i) * 1.3s); }
@keyframes fxDrift { 50%{ transform: translateY(-12px); opacity:.85; } }

/* --- METALS: molten gold pour + bars --- */
.scene-metals { background: radial-gradient(130% 95% at 60% 18%, #5c3f10, #271a06 58%, #110b03); --m-accent:#f5c451; }
.scene-metals .mt-pour { inset:-10% -30%; background:
  linear-gradient(118deg, transparent 38%, rgba(255,205,90,.85) 47%, #fff5d0 50%, rgba(255,180,60,.85) 53%, transparent 62%);
  filter: blur(.5px); animation: mtPour 3.6s linear infinite; }
@keyframes mtPour { 0%{ transform: translate(-12%,-12%) } 100%{ transform: translate(12%,12%) } }
.scene-metals .mt-bars { left:0; right:0; bottom:10%; height:38%; display:flex; align-items:flex-end; justify-content:center; gap:6px; }
.scene-metals .mt-bars i { width:26%; max-width:46px; border-radius:3px 3px 1px 1px;
  background: linear-gradient(180deg, #ffe9a8, #d99a2b 60%, #8a5e12);
  box-shadow: 0 0 14px rgba(245,196,81,.45), inset 0 2px 4px rgba(255,255,255,.5); }
.scene-metals .mt-bars i:nth-child(1){ height:55%; } .scene-metals .mt-bars i:nth-child(2){ height:78%; } .scene-metals .mt-bars i:nth-child(3){ height:62%; }
.scene-metals .mt-sparks i { position:absolute; left:var(--x); top:-6px; width:3px; height:3px; border-radius:50%;
  background:#ffe9a8; box-shadow:0 0 8px #ffd34d; animation: mtSpark 2.2s linear infinite; animation-delay:var(--d); }
@keyframes mtSpark { from{ transform: translateY(0); opacity:0 } 12%{opacity:1} to{ transform: translateY(230px); opacity:0 } }

/* --- ENERGY: oil derrick at sunset --- */
.scene-energy { background: linear-gradient(180deg, #ff7b2e 0%, #b3340c 40%, #5a1606 68%, #1a0905 100%); --m-accent:#ff8a3d; }
.scene-energy .en-sun { width:120px; height:120px; left:50%; top:38%; transform:translate(-50%,-50%); border-radius:50%;
  background: radial-gradient(circle, #fff2c4, #ffb04d 55%, transparent 72%); filter: blur(2px); animation: enSun 6s ease-in-out infinite; }
@keyframes enSun { 50%{ transform: translate(-50%,-54%) scale(1.06); } }
.scene-energy .en-rig path { fill:none; stroke:#1a0a05; stroke-width:2.2; stroke-linejoin:round; stroke-linecap:round;
  filter: drop-shadow(0 0 2px rgba(0,0,0,.6)); }
.scene-energy .en-trend { left:8%; right:8%; bottom:20%; height:2px; background: linear-gradient(90deg, transparent, #ffe08a);
  box-shadow:0 0 10px #ffce6b; transform-origin:left; animation: enTrend 4s ease-in-out infinite; }
@keyframes enTrend { 0%,100%{ transform: rotate(-8deg) scaleX(.9) } 50%{ transform: rotate(-14deg) scaleX(1) } }

/* --- INDICES: exchange building + green data --- */
.scene-indices { background: radial-gradient(130% 95% at 45% 26%, #0f5a36, #073320 55%, #02110b); --m-accent:#34d399; }
.scene-indices .ix-haze { inset:0; background: repeating-linear-gradient(90deg, rgba(52,211,153,.06) 0 1px, transparent 1px 22px);
  mask: linear-gradient(180deg, transparent, #000 40%); }
.scene-indices .ix-bldg polygon, .scene-indices .ix-bldg rect { fill: rgba(4,20,14,.85); stroke: rgba(80,240,170,.55); stroke-width:1; }
.scene-indices .ix-bars { left:0; right:0; bottom:8%; height:30%; display:flex; align-items:flex-end; justify-content:space-evenly; }
.scene-indices .ix-bars i { width:8%; background: linear-gradient(180deg,#5cf0b0,#16996a); border-radius:2px 2px 0 0; transform-origin:bottom;
  box-shadow:0 0 8px rgba(52,211,153,.5); animation: ixBar 2.4s ease-in-out infinite; }
.scene-indices .ix-bars i:nth-child(2){ animation-delay:.3s } .scene-indices .ix-bars i:nth-child(3){ animation-delay:.6s }
.scene-indices .ix-bars i:nth-child(4){ animation-delay:.9s } .scene-indices .ix-bars i:nth-child(5){ animation-delay:1.2s }
@keyframes ixBar { 0%,100%{ transform: scaleY(.4) } 50%{ transform: scaleY(1) } }

/* --- STOCKS: charging bull spotlight --- */
.scene-stocks { background: radial-gradient(120% 100% at 50% 36%, #6b4715, #2c1a06 58%, #0d0703); --m-accent:#f0b35a; }
.scene-stocks .st-spot { width:170px; height:170px; left:50%; top:42%; transform:translate(-50%,-50%); border-radius:50%;
  background: radial-gradient(circle, rgba(255,210,120,.4), transparent 65%); animation: stSpot 5s ease-in-out infinite; }
@keyframes stSpot { 50%{ opacity:.7; transform: translate(-50%,-50%) scale(1.08); } }
.scene-stocks .st-bull { height:72%; }
.scene-stocks .st-bull path { fill: #100a03; stroke: #f0b35a; stroke-width:1.4; stroke-linejoin:round;
  filter: drop-shadow(0 0 8px rgba(240,179,90,.5)); }
.scene-stocks .st-bars { left:0; right:0; bottom:9%; height:24%; display:flex; align-items:flex-end; justify-content:space-evenly; opacity:.85; }
.scene-stocks .st-bars i { width:9%; background: linear-gradient(180deg,#ffd591,#c98a2c); border-radius:2px 2px 0 0; transform-origin:bottom;
  animation: ixBar 2.8s ease-in-out infinite; }
.scene-stocks .st-bars i:nth-child(2){ animation-delay:.4s } .scene-stocks .st-bars i:nth-child(3){ animation-delay:.8s } .scene-stocks .st-bars i:nth-child(4){ animation-delay:1.2s }

/* --- CRYPTO: glowing coins + bokeh --- */
.scene-crypto { background: radial-gradient(130% 95% at 50% 30%, #7a5a12, #3a2a06 55%, #140e03); --m-accent:#ffd34d; }
.scene-crypto .cr-bokeh { inset:0; background:
  radial-gradient(circle at 24% 70%, rgba(255,210,90,.3), transparent 30%),
  radial-gradient(circle at 78% 60%, rgba(255,210,90,.22), transparent 28%),
  radial-gradient(circle at 60% 24%, rgba(255,230,150,.2), transparent 24%);
  animation: crBokeh 7s ease-in-out infinite; }
@keyframes crBokeh { 50%{ opacity:.7; transform: scale(1.05); } }
.scene-crypto .cr-coin { display:grid; place-items:center; border-radius:50%; font-weight:800; color:#1a1203;
  box-shadow: inset 0 3px 8px rgba(255,255,255,.6), 0 6px 18px rgba(0,0,0,.45); animation: crFloat 4.5s ease-in-out infinite; }
.scene-crypto .cr-btc { width:78px; height:78px; left:50%; top:40%; transform:translate(-58%,-50%); font-size:2.3rem;
  background: radial-gradient(circle at 36% 30%, #ffe9a8, #f5c451 55%, #b9821f); z-index:2; }
.scene-crypto .cr-eth { width:58px; height:58px; left:50%; top:46%; transform:translate(18%,-30%); font-size:1.7rem;
  background: radial-gradient(circle at 36% 30%, #ffeec0, #e0e0e8 55%, #9aa0b0); animation-delay:.8s; }
@keyframes crFloat { 50%{ transform: translate(-58%,-58%); } }
.scene-crypto .cr-eth { animation-name: crFloat2 } @keyframes crFloat2 { 50%{ transform: translate(18%,-40%); } }

/* =====================================================================
   3) COURSES — MONEX badge cards
   ===================================================================== */
.course-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; max-width: 1000px; margin: 0 auto; }
.course { flex: 1 1 290px; max-width: 312px; }
.course {
  position: relative; border-radius: 18px; overflow: hidden; padding: 26px 22px 24px; text-align: center;
  background: linear-gradient(160deg, #2a0c1e 0%, #120208 52%, #1d0814 100%);
  border: 1px solid rgba(178,62,125,.4); box-shadow: 0 16px 40px rgba(0,0,0,.45);
  transition: transform .45s cubic-bezier(.2,.7,.2,1), box-shadow .45s, border-color .45s;
}
.course::before { content:''; position:absolute; inset:0; opacity:.0; transition: opacity .45s;
  background: radial-gradient(120% 80% at 50% 0%, rgba(245,196,81,.18), transparent 60%); }
.course:hover { transform: translateY(-7px) rotateX(3deg); border-color: rgba(245,196,81,.55); box-shadow: 0 28px 60px rgba(0,0,0,.55); }
.course:hover::before { opacity: 1; }
.course .c-brand { font-family: 'INGAME', var(--font); letter-spacing: 1px; font-size: 1.6rem; color: #fff; }
.course .c-kind { color: var(--text-soft); font-size: .82rem; margin: 6px 0 16px; }
.course .c-title { font: 800 1.5rem/1.1 var(--font); letter-spacing: 1px; text-transform: uppercase;
  background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent; }
.course.c-magenta .c-title { background: linear-gradient(135deg,#ff7bb8,#b23e7d); -webkit-background-clip: text; background-clip: text; color: transparent; }
.course .c-title small { display: block; font-size: .92rem; letter-spacing: 2px; margin-top: 2px;
  -webkit-text-fill-color: #f3d488; color: #f3d488; }
.course.c-magenta .c-title small { -webkit-text-fill-color: #ff9fcb; color: #ff9fcb; }
.course .c-for { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.1); color: var(--text-soft); font-size: .85rem; }
.course .c-cta { margin-top: 14px; }

/* Light mode — adapt course badges to a light card (no harsh dark block) */
[data-theme="light"] .course {
  background: linear-gradient(160deg, #ffffff 0%, #fbeef4 100%);
  border-color: rgba(178,62,125,.26);
  box-shadow: 0 16px 40px rgba(107,10,73,.12);
}
[data-theme="light"] .course::before { background: radial-gradient(120% 80% at 50% 0%, rgba(217,154,43,.16), transparent 60%); }
[data-theme="light"] .course .c-brand { color: var(--brand); }
[data-theme="light"] .course .c-title { background: linear-gradient(135deg,#c08a16,#8a5e12); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-theme="light"] .course .c-title small { -webkit-text-fill-color: #a9760f; color: #a9760f; }
[data-theme="light"] .course.c-magenta .c-title { background: linear-gradient(135deg,#b23e7d,#7a1f54); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-theme="light"] .course.c-magenta .c-title small { -webkit-text-fill-color: #8a1259; color: #8a1259; }
[data-theme="light"] .course .c-for { border-top-color: rgba(28,18,24,.12); }

/* =====================================================================
   4) MARKET NEWS — تحلیل / چشم‌انداز / خبر
   ===================================================================== */
.news3 { display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: 20px; align-items: stretch; }
.ncard { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--line);
  background: var(--surface); display: flex; flex-direction: column; transition: transform .4s, box-shadow .4s, border-color .4s; }
.ncard:hover { transform: translateY(-5px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.ncard .n-head { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 16px; }
.ncard .n-head b { font-size: .9rem; color: var(--text); }
.ncard .n-head .sq { width: 9px; height: 9px; background: var(--brand-2); }
.n-visual { position: relative; height: 200px; overflow: hidden; background: #060810; }
.n-img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.ncard:hover .n-img { transform: scale(1.05); }
.n-body { padding: 18px 16px 22px; text-align: center; }
.n-body h4 { font-size: 1.02rem; font-weight: 800; line-height: 1.5; }
.n-body p { color: var(--text-soft); font-size: .88rem; margin-top: 6px; }
.n-body .more { margin-top: 14px; }
.ncard.feature { box-shadow: 0 18px 46px rgba(0,0,0,.4); }

/* چشم‌انداز visual — SP500 (bull/gold) vs NASDAQ (bear/blue) split */
.vs { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; }
.vs .side { position: relative; overflow: hidden; }
.vs .bull { background: radial-gradient(120% 100% at 70% 60%, #7a5510, #2a1c05 60%, #110b02); }
.vs .bear { background: radial-gradient(120% 100% at 30% 60%, #123a6b, #08203f 60%, #03101f); }
.vs .lbl { position: absolute; top: 14px; inset-inline: 0; text-align: center; font: 800 1rem var(--font); letter-spacing: 1px; color:#fff; opacity:.95; }
.vs .bull .lbl { color: var(--gold); }
.vs .bear .lbl { color: #7fb6ff; }
.vs .seam { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, #fff, transparent); box-shadow: 0 0 18px #fff; animation: seamGlow 3s ease-in-out infinite; }
@keyframes seamGlow { 50% { opacity: .55; } }
/* mini chart lines */
.vs .spark { position:absolute; left:8%; right:8%; bottom:22%; height:2px; }
.vs .bull .spark { background: linear-gradient(90deg, transparent, var(--gold)); transform: rotate(-12deg); box-shadow:0 0 8px var(--gold); }
.vs .bear .spark { background: linear-gradient(90deg, #7fb6ff, transparent); transform: rotate(10deg); box-shadow:0 0 8px #7fb6ff; }
.vs .tagline { position:absolute; bottom:10px; inset-inline:0; text-align:center; color:rgba(255,255,255,.78); font-size:.66rem; letter-spacing:2px; text-transform:uppercase; }

/* placeholder visual for analysis/news side cards */
.n-mini { position:absolute; inset:0; }
.n-mini.analysis { background: radial-gradient(120% 100% at 50% 30%, #2a1430, #140a18 60%, #07040b); }
.n-mini.news { background: radial-gradient(120% 100% at 50% 30%, #102444, #0a1426 60%, #05080f); }
.n-mini .grid-lines { position:absolute; inset:0; background:
  repeating-linear-gradient(0deg, rgba(255,255,255,.05) 0 1px, transparent 1px 26px),
  repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 1px, transparent 1px 26px); mask: linear-gradient(180deg,#000,transparent); }
.n-mini .trend { position:absolute; left:10%; right:10%; top:50%; height:2px; background: linear-gradient(90deg, transparent, var(--brand-2), transparent);
  box-shadow:0 0 10px var(--brand-2); animation: trendShift 4s ease-in-out infinite; }
@keyframes trendShift { 50% { transform: translateY(-18px) rotate(-6deg); } }

/* =====================================================================
   5) FAMILY CTA band (آماده ورود به دنیای جدید…)
   ===================================================================== */
.family { position: relative; overflow: hidden; border-radius: 22px; padding: 48px 28px; text-align: center;
  background: var(--grad-brand); box-shadow: 0 24px 60px rgba(107,10,73,.4); }
.family::before { content:''; position:absolute; width:380px; height:380px; top:-180px; inset-inline-end:-120px; border-radius:50%;
  background: conic-gradient(from 0deg, rgba(245,196,81,.22), transparent 34%); animation: radsweep 9s linear infinite; }
.family::after { content:''; position:absolute; width:300px; height:300px; bottom:-160px; inset-inline-start:-90px; border-radius:50%;
  background: radial-gradient(circle, rgba(255,255,255,.12), transparent 65%); }
.family > * { position: relative; z-index: 1; }
.family h2 { color:#fff; font-size: clamp(24px,3.4vw,38px); font-weight: 800; }
.family p { color: rgba(255,255,255,.85); margin-top: 10px; font-size: 1.05rem; }
.family .fam-btns { display:flex; gap:14px; justify-content:center; flex-wrap:wrap; margin-top:24px; }
.family .btn-white { background:#fff; color: var(--brand); }
.family .btn-white:hover { transform: translateY(-2px); box-shadow:0 12px 30px rgba(0,0,0,.3); }
.family .btn-tg { background: rgba(255,255,255,.12); color:#fff; border:1px solid rgba(255,255,255,.4); }
.family .btn-tg:hover { background: rgba(255,255,255,.2); }

/* =====================================================================
   5b) CAREERS — submit-CV call (طرح عکس ۵۵)
   ===================================================================== */
.careers-box { position: relative; max-width: 760px; margin: 0 auto; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 44px 28px; border-radius: 22px; border: 1px solid var(--line);
  background: radial-gradient(120% 120% at 50% 0%, rgba(178,62,125,.10), transparent 60%); }
.careers-box h2 { font-size: clamp(26px,3.6vw,38px); font-weight: 800; line-height: 1.3; }
.careers-box .sec-sub { margin-top: 2px; font-weight: 700; }
.careers-box > p { color: var(--text-soft); font-size: 1.06rem; max-width: 52ch; margin-top: 4px; }
.careers-box .btn { margin-top: 12px; }
/* لایت‌مد: دکمه‌ی «ارسال رزومه» به‌جای ghostِ کم‌رنگ، یک CTAِ توپرِ برند شود */
[data-theme="light"] .careers-box .btn-ghost {
  background: var(--grad-brand); border-color: transparent; color: #fff;
  box-shadow: 0 8px 22px rgba(107,10,73,.26); }
[data-theme="light"] .careers-box .btn-ghost:hover {
  background: var(--grad-brand); border-color: transparent;
  transform: translateY(-2px); box-shadow: 0 14px 34px rgba(107,10,73,.42); }

/* =====================================================================
   6) AUTH cosmic background (Less noise · More edge.)
   ===================================================================== */
.cosmos { position: absolute; inset: 0; z-index: 0; overflow: hidden;
  background: radial-gradient(140% 120% at 80% 30%, #3a0b3f 0%, #1a0826 34%, #0a0414 70%, #050208 100%); }
.cosmos .neb { position:absolute; width:520px; height:520px; border-radius:50%; filter: blur(60px); opacity:.55; }
.cosmos .neb.n1 { background: radial-gradient(circle, rgba(178,62,125,.7), transparent 65%); top:-10%; inset-inline-end:6%; animation: nebFloat 16s ease-in-out infinite; }
.cosmos .neb.n2 { background: radial-gradient(circle, rgba(120,40,200,.55), transparent 65%); bottom:-12%; inset-inline-end:24%; animation: nebFloat 20s ease-in-out infinite reverse; }
@keyframes nebFloat { 50% { transform: translate(-24px,18px) scale(1.08); } }
.cosmos .planet { position:absolute; width:230px; height:230px; border-radius:50%; right:14%; top:34%;
  background: radial-gradient(circle at 36% 32%, #4a2b66, #1b0e2c 60%, #0a0514 80%);
  box-shadow: inset -18px -10px 50px rgba(0,0,0,.7), 0 0 70px rgba(178,62,125,.4); }
.cosmos .stars { position:absolute; inset:0; background-image:
  radial-gradient(1px 1px at 20% 30%, #fff, transparent), radial-gradient(1px 1px at 60% 70%, #fff, transparent),
  radial-gradient(1px 1px at 80% 20%, #fff, transparent), radial-gradient(1px 1px at 40% 80%, #fff, transparent),
  radial-gradient(1px 1px at 75% 50%, #fff, transparent), radial-gradient(1px 1px at 12% 62%, #fff, transparent);
  opacity:.8; animation: twk 4s ease-in-out infinite; }
/* falling candlesticks */
.cosmos .candles { position:absolute; inset:0; }
.cosmos .candles i { position:absolute; bottom:-40px; width:6px; border-radius:2px;
  background: linear-gradient(180deg, #ff5e8a, #b23e7d); box-shadow: 0 0 10px rgba(255,94,138,.6);
  animation: candleRise linear infinite; opacity:.55; }
@keyframes candleRise { from { transform: translateY(0); opacity:0 } 10%{opacity:.6} to { transform: translateY(-110vh); opacity:0 } }
.cosmos-tag { position: absolute; z-index: 2; top: 8%; inset-inline-start: 8%; color:#fff; font-weight: 800;
  font-size: clamp(1.1rem,2vw,1.6rem); letter-spacing:.5px; text-shadow:0 2px 20px rgba(0,0,0,.6); }
.cosmos-tag b { color: var(--brand-2); }

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 980px) {
  .svc-rail { grid-template-columns: 1fr; }
  .mkt-grid { grid-template-columns: repeat(3,1fr); }
  .course-grid { grid-template-columns: repeat(2,1fr); }
  .news3 { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .mkt-grid { grid-template-columns: repeat(2,1fr); }
  .course-grid { grid-template-columns: 1fr; }
  .mkt { height: 260px; }
  .svc-banner { min-height: 360px; }
}

/* =====================================================================
   SCROLL-DRIVEN ANIMATIONS  (CSS scroll/view timelines — Chromium/Edge)
   Fallback: IntersectionObserver `.reveal.show` در main.js محتوا را نمایش می‌دهد
   ===================================================================== */

/* top scroll-progress bar */
.scroll-prog { position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 120;
  background: linear-gradient(90deg, var(--brand-2), var(--gold)); transform: scaleX(0); transform-origin: 0 50%;
  box-shadow: 0 0 12px rgba(245,196,81,.5); pointer-events: none; }
[dir="rtl"] .scroll-prog { transform-origin: 100% 50%; }

@supports (animation-timeline: scroll()) {
  .scroll-prog { animation: spGrow auto linear; animation-timeline: scroll(root); }
  @keyframes spGrow { to { transform: scaleX(1); } }

  /* subtle parallax for decorative layers */
  .globe-glow { animation: plxUp auto linear; animation-timeline: scroll(root); animation-range: 0% 60%; }
  @keyframes plxUp { to { transform: translateY(70px); } }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    /* generic content rise+fade as it enters */
    .reveal { opacity: 1; transform: none;
      animation: sdRise both linear; animation-timeline: view(); animation-range: entry 0% cover 30%; }
    @keyframes sdRise { from { opacity: 0; transform: translateY(54px); } to { opacity: 1; transform: none; } }

    /* hero cards / banners pop with scale + soft blur */
    .svc-banner.reveal, .mkt.reveal, .course.reveal, .ncard.reveal {
      animation: sdPop both linear; animation-timeline: view(); animation-range: entry 2% cover 32%; }
    @keyframes sdPop {
      from { opacity: 0; transform: translateY(70px) scale(.92); filter: blur(6px); }
      60%  { opacity: 1; filter: blur(0); }
      to   { opacity: 1; transform: none; filter: blur(0); }
    }

    /* staggered grids: offset each card's range so they cascade as you scroll */
    .mkt.reveal[data-d="1"],  .course.reveal[data-d="1"], .svc-banner.reveal[data-d="1"] { animation-range: entry 0%  cover 26%; }
    .mkt.reveal[data-d="2"],  .course.reveal[data-d="2"], .svc-banner.reveal[data-d="2"] { animation-range: entry 5%  cover 30%; }
    .mkt.reveal[data-d="3"],  .course.reveal[data-d="3"], .svc-banner.reveal[data-d="3"] { animation-range: entry 9%  cover 34%; }
    .mkt.reveal[data-d="4"],  .course.reveal[data-d="4"] { animation-range: entry 13% cover 38%; }
    .mkt.reveal[data-d="5"],  .course.reveal[data-d="5"] { animation-range: entry 17% cover 42%; }
    .mkt.reveal[data-d="6"] { animation-range: entry 21% cover 46%; }

    /* section headings: rise + clip reveal */
    .section-head.reveal { animation: sdHead both linear; animation-timeline: view(); animation-range: entry 0% cover 24%; }
    @keyframes sdHead { from { opacity:0; transform: translateY(40px); letter-spacing:-.5px; } to { opacity:1; transform:none; } }
  }
}
