/* Lumen Study · home, subject page and gentle motion. Loaded after lumen.css on the app pages.
   Motion is short and soft (fade + small rise, bars that fill, numbers that count) and is switched off for reduced motion. */

/* ---------- motion ---------- */
@keyframes lsRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes lsFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes lsFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes lsGlow { 0%, 100% { opacity: .55; transform: scale(1); } 50% { opacity: .9; transform: scale(1.06); } }
@keyframes lsPulse { 0% { box-shadow: 0 0 0 0 rgba(139,107,255,.45); } 100% { box-shadow: 0 0 0 14px rgba(139,107,255,0); } }
@keyframes lsRing { from { stroke-dashoffset: 100; } }
.page > *, .ptiles > *, .subs > *, .tcards > li, .how2 > *, .ptopics > a { animation: lsRise .6s cubic-bezier(.2,.75,.25,1) both; }
.page > *:nth-child(2) { animation-delay: .06s } .page > *:nth-child(3) { animation-delay: .12s } .page > *:nth-child(4) { animation-delay: .18s }
.page > *:nth-child(5) { animation-delay: .24s } .page > *:nth-child(6) { animation-delay: .3s } .page > *:nth-child(n+7) { animation-delay: .36s }
.ptiles > *:nth-child(2), .subs > *:nth-child(2), .tcards > li:nth-child(2), .how2 > *:nth-child(2), .ptopics > a:nth-child(2) { animation-delay: .12s }
.ptiles > *:nth-child(3), .subs > *:nth-child(3), .tcards > li:nth-child(3), .how2 > *:nth-child(3), .ptopics > a:nth-child(3) { animation-delay: .18s }
.ptiles > *:nth-child(4), .subs > *:nth-child(4), .tcards > li:nth-child(4), .how2 > *:nth-child(4), .ptopics > a:nth-child(4) { animation-delay: .24s }
.tcards > li:nth-child(5), .ptopics > a:nth-child(5) { animation-delay: .3s }
.bar i { transform-origin: left center; animation: lsFill 1.1s .35s cubic-bezier(.2,.8,.2,1) both; }
.abtn, .sub, .cont2, .tcard, .ptile, .hw, .grank { transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s, border-color .25s, background-color .25s, filter .2s; }
.abtn:hover { transform: translateY(-1px); } .abtn:active { transform: translateY(1px) scale(.98); }
.sub.open:hover, .ptile:hover, .hw:hover { transform: translateY(-3px); }
.ptile:hover, .hw:hover { border-color: var(--line-2); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- home: welcome (signed out) ---------- */
.hero2 { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: center; margin: 10px 0 18px; }
.kick { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--violet-2); background: var(--violet-bg); border: 1px solid var(--violet-line); padding: 6px 12px; border-radius: 999px; margin-bottom: 16px; }
.kick i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); animation: lsGlow 2.4s ease-in-out infinite; }
.hero2 h1.hi { font-size: clamp(34px, 5.2vw, 56px); line-height: 1.04; letter-spacing: -.035em; margin-bottom: 14px; }
.hero2 .lede { font-size: 17.5px; line-height: 1.6; margin-bottom: 24px; }
.abtn.big { padding: 14px 22px; font-size: 16px; display: inline-flex; align-items: center; gap: 8px; }
.abtn.big svg { transition: transform .25s; } .abtn.big:hover svg { transform: translateX(3px); }
.proof { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 26px; color: var(--muted); font-size: 14px; }
.proof b { color: var(--text); font: 700 18px var(--f-disp); margin-right: 4px; }
.hart { position: relative; height: 430px; }
.hglow { position: absolute; inset: 10% 8%; border-radius: 50%; background: radial-gradient(closest-side, rgba(139,107,255,.45), rgba(255,199,106,.12) 60%, transparent); filter: blur(30px); animation: lsGlow 6s ease-in-out infinite; }
.hphoto { position: absolute; top: 24px; left: 50%; width: 300px; height: 300px; margin-left: -150px; border-radius: 26px; overflow: hidden; border: 1px solid rgba(255,255,255,.12); box-shadow: 0 30px 60px -25px rgba(0,0,0,.8); transform: rotate(-3deg); animation: lsFloat 7s ease-in-out infinite; }
.hphoto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hlbl { position: absolute; left: var(--x); top: var(--y); font: 600 12px var(--f-body); color: #fff; padding: 3px 8px; background: rgba(11,10,20,.75); border-radius: 6px; white-space: nowrap; transform: translate(14px, -50%); }
.hlbl i { position: absolute; right: 100%; top: 50%; width: 30px; height: 1.5px; background: #fff; }
.hlbl i::before { content: ""; position: absolute; left: -4px; top: -2.5px; width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.hcap { position: absolute; left: 12px; bottom: 10px; font-size: 11px; color: rgba(255,255,255,.8); background: rgba(0,0,0,.45); padding: 2px 7px; border-radius: 5px; }
.hcard { position: absolute; background: rgba(20,19,31,.92); backdrop-filter: blur(10px); border: 1px solid var(--line-2); border-radius: 16px; padding: 12px 14px; box-shadow: 0 20px 40px -20px rgba(0,0,0,.8); }
.hsay { left: 0; top: 250px; width: 250px; display: flex; gap: 10px; animation: lsFloat 6s 1s ease-in-out infinite; }
.hsay .who { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-grad); color: #fff; font: 700 13px var(--f-disp); }
.hsay p { margin: 0; font: 400 13.5px/1.45 'Source Serif 4', Georgia, serif; color: var(--soft); }
.hsay p b { display: block; font: 600 12px var(--f-body); color: var(--violet-2); margin-bottom: 2px; }
.hmark { right: 0; top: 0; width: 250px; animation: lsFloat 6.5s .5s ease-in-out infinite; }
.hmark small { display: block; padding-right: 38px; font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.hmark p { margin: 4px 0; font-size: 13px; color: var(--soft); }
.hmark .ok { color: var(--mint); font-weight: 700; margin-right: 4px; }
.hmark em { color: var(--muted); font-style: normal; }
.hmark .score { position: absolute; right: 12px; top: 10px; font: 700 13px var(--f-mono); color: var(--gold); }

/* how it works */
.how2 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.hw { position: relative; padding: 20px 18px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.hw .hn { position: absolute; right: 16px; top: 12px; font: 800 30px var(--f-disp); color: rgba(185,166,255,.10); }
.hw .hi2 { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--violet-bg); color: var(--violet-2); margin-bottom: 14px; }
.hw b { font: 600 16px var(--f-disp); display: block; margin-bottom: 6px; }
.hw p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.cta2 { margin-top: 40px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 26px 28px; border-radius: 22px; border: 1px solid var(--violet-line);
  background: radial-gradient(600px 200px at 0% 0%, rgba(139,107,255,.25), transparent 70%), radial-gradient(400px 200px at 100% 100%, rgba(255,199,106,.12), transparent 70%), var(--panel); }
.cta2 b { font: 700 22px var(--f-disp); } .cta2 p { margin: 4px 0 0; color: var(--muted); }

/* continue card with the topic picture */
.cont2 { display: flex; align-items: center; gap: 18px; padding: 12px 18px 12px 12px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); color: inherit; text-decoration: none; margin-bottom: 8px; }
.cont2:hover { border-color: var(--violet); box-shadow: 0 16px 40px -20px rgba(139,107,255,.6); transform: translateY(-2px); }
.cont2 .cimg { flex: none; width: 120px; height: 80px; border-radius: 14px; background: center/cover no-repeat; }
.cont2 .tx { flex: 1; min-width: 0; }
.cont2 small { display: block; color: var(--muted); font-size: 12.5px; }
.cont2 b { display: block; font: 600 18px var(--f-disp); margin: 3px 0; }
.cont2 .m { color: var(--muted); font-size: 14px; }
.cont2 .go { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-grad); color: #fff; animation: lsPulse 2.2s ease-out infinite; }

/* home: signed in */
.ghead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.ghead .lede { margin-bottom: 0; }
h1.hi em { background: linear-gradient(100deg,#CDBDFF 0%,#8B6BFF 45%,#FFC76A 100%); -webkit-background-clip: text; background-clip: text; color: transparent; font-style: normal; }
.grank { display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 10px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--panel); color: inherit; text-decoration: none; }
.grank:hover { border-color: var(--violet); transform: translateY(-2px); }
.grank small { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.grank b { display: block; font: 700 16px var(--f-disp); }
.grank .rp { font: 600 12px var(--f-mono); color: var(--gold); }
.hometiles { margin: 14px 0 0; }

/* ---------- subject page ---------- */
.shead { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.shead .lede { margin-bottom: 0; }
.sring { position: relative; flex: none; width: 112px; height: 112px; }
.sring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.sring circle { fill: none; stroke-width: 3; }
.sring .rb { stroke: var(--line); }
.sring .rf { stroke: url(#none); stroke: var(--violet); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--p)); animation: lsRing 1.3s .3s cubic-bezier(.2,.8,.2,1) both; filter: drop-shadow(0 0 4px rgba(139,107,255,.6)); }
.sring span { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.sring b { font: 700 26px var(--f-disp); line-height: 1; }
.sring small { font-size: 11px; color: var(--muted); }
.tcards { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 14px; }
.tcard { display: grid; grid-template-columns: 280px minmax(0, 1fr); border-radius: 22px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); }
.tcard:hover { border-color: var(--violet-line); box-shadow: 0 18px 44px -24px rgba(139,107,255,.55); transform: translateY(-2px); }
.tpic { position: relative; display: block; overflow: hidden; min-height: 180px; }
.tpic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.tcard:hover .tpic img { transform: scale(1.06); }
.tpic::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 55%, var(--panel) 100%), linear-gradient(0deg, rgba(11,10,20,.55), transparent 50%); }
.tno { position: absolute; left: 16px; bottom: 10px; z-index: 1; font: 800 40px/1 var(--f-disp); color: #fff; letter-spacing: -.04em; text-shadow: 0 4px 20px rgba(0,0,0,.6); }
.tdone { position: absolute; left: 12px; top: 12px; z-index: 1; font: 600 12px var(--f-body); color: #0B0A14; background: var(--gold); padding: 3px 9px; border-radius: 999px; }
.tbody { padding: 22px 24px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tlab { color: var(--violet-2); font-size: 12.5px; letter-spacing: .04em; }
.tbody h2 { margin: 0; font: 700 21px/1.25 var(--f-disp); letter-spacing: -.01em; }
.tbody h2 a { color: inherit; text-decoration: none; } .tbody h2 a:hover { color: var(--violet-2); }
.tbody .k { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.tprog2 { display: flex; align-items: center; gap: 12px; margin: 8px 0 6px; font-size: 13px; color: var(--muted); }
.tprog2 .bar { flex: 1; max-width: 280px; }
.tbody .links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }

@media (max-width: 900px) {
  .hero2 { grid-template-columns: 1fr; gap: 10px; }
  .hart { height: 380px; max-width: 460px; width: 100%; margin: 0 auto; }
  .how2 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .tcard { grid-template-columns: 1fr; }
  .tpic { min-height: 0; aspect-ratio: 16 / 8; }
  .tpic::after { background: linear-gradient(0deg, var(--panel) 0%, transparent 60%); }
  .tbody { padding: 4px 18px 20px; }
  .shead { align-items: flex-start; }
  .sring { width: 84px; height: 84px; } .sring b { font-size: 20px; } .sring small { font-size: 9.5px; }
  .cont2 .cimg { width: 72px; height: 64px; }
  .cont2 b { font-size: 16px; }
  .hart { height: 360px; }
  .hphoto { width: 230px; height: 230px; margin-left: -115px; }
  .hsay { top: 220px; width: 230px; } .hmark { width: 220px; top: -6px; }
  .how2 { grid-template-columns: 1fr; }
  .ghead .grank { width: 100%; }
}
@media (max-width: 640px) {
  .subs { grid-template-columns: 1fr 1fr; gap: 10px; }
  .subs .sub.open { grid-column: 1 / -1; min-height: 0; }
  .subs .sub.closed { min-height: 0; padding: 14px; }
  .subs .sub.closed .sp { display: none; }
}
