/* =========================================================
   MATHSIGHT HOME PAGE ADDITIONS
   The shared space theme and base typography remain in styles.css.
========================================================= */
.home-page main { position: relative; z-index: 1; }
.home-hero-section { position: relative; min-height: 650px; padding: 72px 5vw 50px; display: grid; align-items: center; overflow: hidden; }
.home-hero-inner { width: min(1240px, 100%); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr); align-items: center; gap: clamp(24px, 5vw, 74px); }
.home-hero-content { width: 100%; max-width: 680px; }
.home-welcome-pill { display: inline-flex; align-items: center; gap: 8px; margin: 24px 0 2px; padding: 8px 13px; border: 1px solid rgba(196,138,255,.25); border-radius: 999px; background: rgba(100,53,155,.13); color: #e4caff; font-size: .82rem; letter-spacing: .02em; }
.home-welcome-pill span { color: #f4b4ff; }
.home-hero-copy { max-width: 620px; }
.home-hero-buttons { flex-wrap: wrap; }
.home-hero-note { display: flex; align-items: center; gap: 10px; margin-top: 24px; color: rgba(246,236,255,.62); font-size: .88rem; }
.home-note-icon { display: inline-grid; place-items: center; width: 31px; height: 31px; border: 1px solid rgba(197,108,255,.24); border-radius: 50%; background: rgba(197,108,255,.09); }
.home-hero-universe { min-width: 0; width: min(100%, 500px); justify-self: center; }
.home-orbit-caption { position: absolute; z-index: 3; color: rgba(231,204,255,.68); font-size: .65rem; font-weight: 800; letter-spacing: .2em; text-shadow: 0 0 15px rgba(174,97,255,.45); }
.home-orbit-caption.caption-one { top: 20%; right: 4%; }
.home-orbit-caption.caption-two { bottom: 13%; left: 0; }
.home-scroll-cue { display: flex; width: fit-content; align-items: center; gap: 9px; margin: 13px auto 0; text-decoration: none; color: rgba(231,211,255,.55); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; }
.home-scroll-cue span { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid rgba(195,133,255,.28); border-radius: 50%; color: #e2b5ff; }
.home-section { position: relative; width: min(1240px, 90%); margin: 0 auto; padding: 64px 0; }
.home-section-heading { max-width: 760px; margin: 0 auto 30px; text-align: center; }
.home-section-heading h2 { margin: 9px 0 10px; color: #fff; font-size: clamp(1.85rem, 4vw, 3rem); line-height: 1.1; }
.home-section-heading p { margin: 0 auto; max-width: 680px; color: rgba(244,235,255,.62); line-height: 1.75; }
.home-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.home-stat-card { min-height: 155px; padding: 23px 20px; display: flex; flex-direction: column; gap: 6px; border: 1px solid rgba(174,112,255,.2); border-radius: 20px; background: linear-gradient(140deg, rgba(25,15,44,.82), rgba(9,8,19,.8)); box-shadow: 0 15px 45px rgba(0,0,0,.17); }
.home-stat-icon { font-size: 1.3rem; margin-bottom: 5px; }
.home-stat-card strong { color: #fff; font-size: 1.15rem; }
.home-stat-card > span:last-child { color: rgba(234,220,255,.55); font-size: .83rem; line-height: 1.45; }
.home-explore-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; }
.home-feature-card { position: relative; isolation: isolate; min-height: 280px; display: flex; flex-direction: column; align-items: flex-start; padding: 24px 22px; text-decoration: none; border: 1px solid rgba(190,135,255,.22); border-radius: 22px; background: linear-gradient(155deg, rgba(32,19,52,.92), rgba(8,7,18,.96)); color: #fff; overflow: hidden; box-shadow: 0 18px 45px rgba(0,0,0,.2); transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.home-feature-card::after { content: ""; position: absolute; z-index: -1; width: 180px; height: 180px; top: -95px; right: -75px; border-radius: 50%; background: rgba(173,93,255,.12); filter: blur(18px); }
.home-feature-card:hover { transform: translateY(-6px); border-color: rgba(207,151,255,.55); box-shadow: 0 24px 60px rgba(95,43,155,.19); }
.home-feature-icon { display: grid; place-items: center; width: 49px; height: 49px; margin-bottom: 20px; border: 1px solid rgba(207,154,255,.25); border-radius: 15px; background: rgba(154,91,224,.14); font-size: 1.5rem; }
.home-feature-tag { margin-bottom: 8px; color: #d6a5ff; font-size: .62rem; font-weight: 800; letter-spacing: .15em; }
.home-feature-card h3 { margin: 0 0 9px; color: #fff; font-size: 1.25rem; }
.home-feature-card p { margin: 0 0 19px; color: rgba(239,228,255,.62); font-size: .88rem; line-height: 1.65; }
.home-feature-link { display: flex; align-items: center; gap: 8px; margin-top: auto; color: #dfbaff; font-size: .83rem; font-weight: 750; }
.home-feature-link b { font-size: 1rem; }
.home-heading-with-action { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; max-width: none; text-align: left; }
.home-heading-with-action p { margin-left: 0; }
.home-outline-link { flex: 0 0 auto; display: inline-flex; gap: 10px; align-items: center; padding: 11px 15px; margin-bottom: 4px; border: 1px solid rgba(192,137,255,.34); border-radius: 12px; background: rgba(144,78,211,.09); color: #e6c8ff; text-decoration: none; font-size: .82rem; font-weight: 750; transition: background .2s ease, border-color .2s ease; }
.home-outline-link:hover { background: rgba(144,78,211,.19); border-color: rgba(211,166,255,.62); }
.home-feed-status, .home-announcement-status { margin: -13px 0 18px; color: rgba(230,207,255,.55); text-align: right; font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.home-club-post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; align-items: stretch; }
.home-club-post-card, .home-announcement-card { min-width: 0; overflow: hidden; border: 1px solid rgba(178,117,255,.22); border-radius: 21px; background: linear-gradient(150deg, rgba(23,14,39,.96), rgba(8,7,17,.97)); box-shadow: 0 19px 50px rgba(0,0,0,.2); }
.home-post-meta-row { display: flex; align-items: center; gap: 10px; padding: 17px 17px 12px; }
.home-post-avatar { display: grid; place-items: center; flex: 0 0 38px; height: 38px; border: 1px solid rgba(206,150,255,.35); border-radius: 50%; background: radial-gradient(circle, rgba(185,104,255,.28), rgba(67,31,99,.35)); color: #e9d0ff; font-size: 1.1rem; }
.home-post-author-block { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.home-post-author-block strong { overflow: hidden; color: #fff; font-size: .83rem; text-overflow: ellipsis; white-space: nowrap; }
.home-post-author-block span { color: rgba(233,218,255,.47); font-size: .7rem; }
.home-post-category { flex: 0 0 auto; margin-left: auto; max-width: 43%; padding: 5px 8px; border-radius: 999px; background: rgba(165,94,228,.13); color: #d9b0ff; font-size: .62rem; font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-post-caption { display: -webkit-box; min-height: 45px; margin: 0; padding: 0 17px 13px; overflow: hidden; color: rgba(247,239,255,.82); font-size: .87rem; line-height: 1.65; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.home-post-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 125px; gap: 3px; overflow: hidden; background: rgba(0,0,0,.3); text-decoration: none; }
.home-post-gallery.one-photo { grid-template-columns: 1fr; grid-auto-rows: 245px; }
.home-post-gallery.two-photos .home-post-image-wrap:first-child { grid-row: span 1; }
.home-post-gallery.three-photos .home-post-image-wrap:first-child { grid-row: span 2; }
.home-post-image-wrap { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: rgba(100,65,135,.22); }
.home-post-image-wrap img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.home-post-gallery:hover img { transform: scale(1.025); }
.home-gallery-more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(11,5,20,.68); color: #fff; font-size: 1.4rem; font-weight: 800; }
.home-post-image-placeholder { height: 175px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: radial-gradient(circle at 50% 35%, rgba(157,83,236,.26), rgba(8,7,18,.94)); color: #e5c6ff; text-decoration: none; }
.home-post-image-placeholder span { font-size: 3rem; }
.home-post-image-placeholder small { color: rgba(245,230,255,.58); font-size: .72rem; }
.home-post-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 13px 16px; border-top: 1px solid rgba(255,255,255,.065); color: rgba(234,216,255,.54); font-size: .69rem; }
.home-post-card-footer a { flex: 0 0 auto; color: #e3bdff; font-weight: 750; text-decoration: none; }
.home-post-card-footer a:hover { color: #fff; }
.home-loading-card, .home-empty-state { grid-column: 1 / -1; min-height: 210px; padding: 32px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; border: 1px dashed rgba(184,126,255,.28); border-radius: 20px; background: rgba(19,11,32,.65); }
.home-loading-symbol, .home-empty-state-icon { margin-bottom: 9px; font-size: 2rem; filter: drop-shadow(0 0 12px rgba(177,98,255,.3)); }
.home-loading-card h3, .home-empty-state h3 { margin: 0 0 8px; color: #fff; font-size: 1.1rem; }
.home-loading-card p, .home-empty-state p { max-width: 540px; margin: 0; color: rgba(238,225,255,.58); font-size: .88rem; line-height: 1.7; }
.home-empty-state .home-text-link { margin-top: 14px; }
.home-community-cta { margin-top: 20px; padding: 19px 22px; display: flex; align-items: center; gap: 15px; border: 1px solid rgba(188,127,255,.2); border-radius: 19px; background: linear-gradient(105deg, rgba(115,61,172,.16), rgba(15,10,25,.72)); }
.home-community-cta-icon { display: grid; place-items: center; flex: 0 0 43px; height: 43px; border-radius: 14px; background: rgba(191,112,255,.13); font-size: 1.25rem; }
.home-community-cta > div:nth-child(2) { flex: 1; }
.home-community-cta strong { color: #fff; font-size: .91rem; }
.home-community-cta p { margin: 4px 0 0; color: rgba(236,223,255,.55); font-size: .78rem; line-height: 1.5; }
.home-community-cta .btn { flex: 0 0 auto; }
.home-daily-spark-card { display: grid; grid-template-columns: .7fr 1.3fr; gap: 30px; align-items: center; padding: clamp(24px, 4vw, 42px); border: 1px solid rgba(195,131,255,.25); border-radius: 28px; background: radial-gradient(ellipse at 12% 50%, rgba(155,80,232,.2), transparent 42%), linear-gradient(130deg, rgba(25,15,43,.95), rgba(8,7,18,.96)); box-shadow: 0 22px 65px rgba(0,0,0,.24); }
.home-daily-spark-art { position: relative; min-height: 210px; display: grid; place-items: center; border: 1px solid rgba(193,128,255,.16); border-radius: 22px; background: radial-gradient(circle, rgba(165,90,244,.19), rgba(8,7,18,.1) 68%); overflow: hidden; }
.home-daily-spark-art strong { display: grid; place-items: center; width: 100px; height: 100px; border: 1px solid rgba(227,190,255,.48); border-radius: 50%; background: radial-gradient(circle, rgba(204,151,255,.35), rgba(64,28,104,.7)); box-shadow: 0 0 55px rgba(169,90,247,.25); color: #fff; font-size: 3.3rem; }
.home-daily-spark-art span { position: absolute; color: rgba(230,194,255,.78); font-size: 2rem; text-shadow: 0 0 20px rgba(206,143,255,.5); }
.home-daily-spark-art span:nth-child(1) { top: 22%; left: 23%; }
.home-daily-spark-art span:nth-child(2) { top: 28%; right: 20%; font-size: 1.7rem; }
.home-daily-spark-art span:nth-child(3) { bottom: 16%; left: 26%; font-size: 1.55rem; }
.home-daily-spark-copy h2 { margin: 10px 0 14px; color: #fff; font-size: clamp(1.8rem, 3.5vw, 2.6rem); line-height: 1.18; }
.home-daily-spark-copy p { max-width: 620px; margin: 0 0 18px; color: rgba(241,228,255,.68); line-height: 1.8; }
.home-text-link { display: inline-flex; align-items: center; gap: 8px; color: #e1baff; font-size: .87rem; font-weight: 800; text-decoration: none; }
.home-text-link:hover { color: #fff; }
.home-announcement-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.home-announcement-card { padding: 21px; position: relative; }
.home-announcement-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, #a56bff, #f08bd8); }
.home-announcement-card.is-pinned { border-color: rgba(237,157,220,.42); }
.home-announcement-pinned { display: inline-block; margin-bottom: 10px; padding: 5px 8px; border-radius: 999px; background: rgba(230,127,204,.12); color: #f4b8e7; font-size: .65rem; font-weight: 800; }
.home-announcement-topline { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 7px; margin: 0 0 12px; color: #deb6ff; font-size: .68rem; font-weight: 750; }
.home-announcement-topline time { color: rgba(238,225,255,.42); font-weight: 500; }
.home-announcement-card h3 { margin: 0 0 9px; color: #fff; font-size: 1.1rem; line-height: 1.4; }
.home-announcement-card p { margin: 0; color: rgba(241,229,255,.63); font-size: .84rem; line-height: 1.7; overflow-wrap: anywhere; }
.home-announcement-empty { min-height: 190px; }
.home-values-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.home-value-card { padding: 25px; border: 1px solid rgba(174,112,255,.19); border-radius: 20px; background: rgba(17,10,30,.79); }
.home-value-card > span { display: inline-grid; place-items: center; width: 45px; height: 45px; margin-bottom: 15px; border-radius: 14px; background: rgba(161,88,227,.13); font-size: 1.3rem; }
.home-value-card h3 { margin: 0 0 9px; color: #fff; font-size: 1.1rem; }
.home-value-card p { margin: 0; color: rgba(238,226,255,.59); font-size: .86rem; line-height: 1.7; }
.home-bottom-cta { margin-top: 30px; padding: 26px 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid rgba(195,131,255,.22); border-radius: 22px; background: linear-gradient(110deg, rgba(135,67,210,.18), rgba(15,10,25,.83)); }
.home-bottom-cta h2 { margin-top: 7px; color: #fff; font-size: clamp(1.2rem, 2.4vw, 1.75rem); }
.home-footer { position: relative; z-index: 1; margin-top: 10px; padding: 36px 20px 28px; text-align: center; border-top: 1px solid rgba(186,125,255,.15); background: rgba(5,4,12,.48); }
.home-footer .footer-logo { color: #e3baff; font-weight: 800; font-size: 1.45rem; }
.home-footer > p { margin-top: 9px; color: rgba(235,221,255,.48); font-size: .8rem; }
.home-footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 18px; margin: 19px 0; }
.home-footer-links a { color: rgba(238,220,255,.72); font-size: .8rem; text-decoration: none; }
.home-footer-links a:hover { color: #fff; }

@media (max-width: 1050px) {
    .home-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-explore-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-club-post-grid, .home-announcement-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-club-post-card:last-child:nth-child(odd), .home-announcement-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
    .home-hero-section { min-height: 0; padding: 45px 5vw 30px; }
    .home-hero-inner { grid-template-columns: 1fr; gap: 10px; }
    .home-hero-content { max-width: none; }
    .home-hero-universe { min-height: 320px; max-width: 380px; }
    .home-orbit-caption.caption-one { right: 0; }
    .home-section { width: min(100% - 36px, 620px); padding: 43px 0; }
    .home-section-heading { margin-bottom: 22px; }
    .home-heading-with-action { align-items: flex-start; flex-direction: column; gap: 14px; }
    .home-feed-status, .home-announcement-status { margin: -4px 0 15px; text-align: left; }
    .home-community-cta { align-items: flex-start; flex-wrap: wrap; }
    .home-community-cta > div:nth-child(2) { min-width: calc(100% - 70px); }
    .home-community-cta .btn { width: 100%; text-align: center; justify-content: center; }
    .home-daily-spark-card { grid-template-columns: 1fr; gap: 22px; }
    .home-daily-spark-art { min-height: 170px; }
    .home-values-grid { grid-template-columns: 1fr; }
    .home-bottom-cta { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 540px) {
    .home-stat-grid, .home-explore-grid, .home-club-post-grid, .home-announcement-grid { grid-template-columns: 1fr; }
    .home-club-post-card:last-child:nth-child(odd), .home-announcement-card:last-child:nth-child(odd) { grid-column: auto; }
    .home-feature-card { min-height: 235px; }
    .home-post-gallery { grid-auto-rows: 145px; }
    .home-post-gallery.one-photo { grid-auto-rows: 240px; }
    .home-post-meta-row { padding: 15px 13px 11px; }
    .home-post-caption { padding-inline: 13px; }
    .home-post-card-footer { padding-inline: 13px; }
}
@media (prefers-reduced-motion: reduce) {
    .home-feature-card, .home-post-gallery img { transition: none; }
}
