/* ============================================================
   home.css — landing-page additions for the MindForgeKids
   all-in-one homepage. Layered ON TOP of css/main.css; it only
   adds new components (hero pillars, products grid, etc.) and
   never overrides the existing games-hub styles.
   Design system: indigo/purple (#6366f1) gradient, rounded
   cards, white translucent surfaces — matches academy.html.
   ============================================================ */

/* ---------- Hero pillar chips ---------- */
.hero-pillars {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    max-width: 760px;
    margin: 0 auto 1.75rem;
}
.hero-pillar {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.32);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.18s ease, background 0.18s ease;
}
.hero-pillar:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.26);
}
.hero-pillar-icon { font-size: 1.1rem; }

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    letter-spacing: 0.4px;
    color: #fff;
}

/* ---------- Generic section intro ---------- */
.section-desc {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    max-width: 680px;
    margin: -1rem auto 2rem;
    line-height: 1.65;
    font-size: 1.05rem;
}
.section-eyebrow {
    display: block;
    text-align: center;
    color: #fde68a;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.8rem;
    margin: 3rem 0 -1.5rem;
}

/* ---------- "How it works" pillar cards ---------- */
.pillar-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    margin-bottom: 3rem;
}
.pillar-card {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 20px;
    padding: 1.8rem 1.6rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    display: flex;
    flex-direction: column;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    border-top: 5px solid var(--primary, #6366f1);
}
.pillar-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.2);
}
.pillar-card.pillar-free { border-top-color: #10b981; }
.pillar-card.pillar-academy { border-top-color: #6366f1; }
.pillar-card.pillar-products { border-top-color: #f59e0b; }
.pillar-card-icon {
    font-size: 2.4rem;
    margin-bottom: 0.6rem;
}
.pillar-card-tag {
    align-self: flex-start;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 0.7rem;
}
.pillar-card-tag.tag-free { background: #d1fae5; color: #047857; }
.pillar-card-tag.tag-curriculum { background: #e0e7ff; color: #4338ca; }
.pillar-card-tag.tag-shop { background: #fef3c7; color: #b45309; }
.pillar-card h3 {
    font-size: 1.3rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 0.5rem;
}
.pillar-card p {
    color: #4b5563;
    line-height: 1.6;
    font-size: 0.96rem;
    margin-bottom: 1.1rem;
}
.pillar-card-link {
    margin-top: auto;
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--primary-dark, #4f46e5);
    text-decoration: none;
}
.pillar-card-link:hover { text-decoration: underline; }

/* ---------- Games intro band ---------- */
.games-intro {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    padding: 1.6rem 1.8rem;
    margin-bottom: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
}
.games-intro-text { color: #fff; max-width: 640px; }
.games-intro-text strong { font-size: 1.05rem; }
.games-intro-text p {
    margin-top: 0.35rem;
    opacity: 0.92;
    line-height: 1.55;
    font-size: 0.95rem;
}
.games-intro-badge {
    flex-shrink: 0;
    background: #10b981;
    color: #fff;
    font-weight: 800;
    font-size: 0.95rem;
    padding: 0.7rem 1.3rem;
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
    white-space: nowrap;
}

/* ---------- Digital Products section ---------- */
.products-section { margin-bottom: 1rem; }
.products-grid {
    display: grid;
    gap: 1.4rem;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    margin-bottom: 2rem;
}
.product-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
    display: flex;
    flex-direction: column;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    border: 2px solid transparent;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.22);
}
.product-card.is-flagship { border-color: var(--primary, #6366f1); }
.product-card-media {
    position: relative;
    background: #eef2ff;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}
.product-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.product-card-emoji {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.4rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}
.product-card-flag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 4px 11px;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.45);
}
.product-card-body {
    padding: 1.1rem 1.2rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.product-card-title {
    font-size: 1.02rem;
    font-weight: 800;
    color: #111827;
    line-height: 1.35;
    margin-bottom: 0.4rem;
}
.product-card-desc {
    font-size: 0.86rem;
    color: #4b5563;
    line-height: 1.5;
    margin-bottom: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card-foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}
.product-card-price {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--primary-dark, #4f46e5);
}
.product-card-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.1rem;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 800;
    text-decoration: none;
    background: var(--primary, #6366f1);
    color: #fff;
    box-shadow: 0 8px 18px rgba(99, 102, 241, 0.32);
    transition: transform 0.15s ease, background 0.15s ease;
}
.product-card-cta:hover {
    transform: translateY(-2px);
    background: var(--primary-dark, #4f46e5);
}
.products-note {
    text-align: center;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* ---------- Trust strip ---------- */
.trust-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin: 0 0 3rem;
}
.trust-item {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    padding: 1.1rem;
    text-align: center;
    color: #fff;
}
.trust-item-icon { font-size: 1.7rem; display: block; margin-bottom: 0.35rem; }
.trust-item strong { display: block; font-size: 0.98rem; }
.trust-item span { font-size: 0.82rem; opacity: 0.85; }

/* ---------- Footer ---------- */
.home-footer {
    text-align: center;
    padding: 2.5rem 1.5rem 3rem;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    line-height: 1.7;
}
.home-footer a { color: rgba(255, 255, 255, 0.95); }
.home-footer-links {
    display: flex;
    justify-content: center;
    gap: 1.1rem;
    flex-wrap: wrap;
    margin-bottom: 0.8rem;
}
.home-footer-links a {
    font-weight: 700;
    text-decoration: none;
}
.home-footer-links a:hover { text-decoration: underline; }
.home-footer-policy {
    font-size: 0.82rem;
    opacity: 0.85;
    margin-top: 0.2rem;
    margin-bottom: 1.2rem;
}
.home-footer-policy a { font-weight: 500; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .games-intro { flex-direction: column; align-items: flex-start; }
    .section-desc { font-size: 0.98rem; }
    .hero-pillar { font-size: 0.82rem; padding: 0.45rem 0.85rem; }
}

/* ---------- Dark mode (mirrors academy.html) ---------- */
@media (prefers-color-scheme: dark) {
    .pillar-card,
    .product-card {
        background: rgba(15, 23, 42, 0.97);
    }
    .pillar-card h3,
    .product-card-title { color: #f1f5f9; }
    .pillar-card p,
    .product-card-desc { color: #94a3b8; }
    .product-card-price,
    .pillar-card-link { color: #a5b4fc; }
    .product-card-media { background: rgba(99, 102, 241, 0.12); }
}
