/* =====================================================================
   ScholarHat home - membership cards (Views/Components/_MembershipShowcase.cshtml). Prefix .lm.
   Same cyan-to-blue accent and surfaces as the hero (home-hero.css) and the other home sections; light + dark.
   Two cards sit centred side by side; three or more flow into a grid.
   ===================================================================== */
.lm {
    --lm-ink: #0f1b2d; --lm-body: #46566b; --lm-muted: #6b7c91; --lm-line: rgba(20, 90, 140, .16); --lm-card: rgba(255, 255, 255, .78);
    --lm-a: #0891b2; --lm-b: #2563eb; --lm-a-ink: #0b6f8c; --lm-soft: rgba(8, 145, 178, .10); --lm-on: #fff; --lm-hi: rgba(255, 255, 255, .95); --lm-glow: 8, 145, 178;
    position: relative; overflow: hidden; font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--lm-body);
    padding: clamp(40px, 6vw, 72px) 0 clamp(36px, 5vw, 60px);
}
[data-bs-theme="dark"] .lm {
    --lm-ink: #eef7ff; --lm-body: #b4c6d9; --lm-muted: #7f95ab; --lm-line: rgba(110, 190, 230, .16); --lm-card: rgba(7, 24, 44, .66);
    --lm-a: #2fb8d6; --lm-b: #3b82f6; --lm-a-ink: #7fd6ec; --lm-soft: rgba(47, 184, 214, .12); --lm-on: #04233a; --lm-hi: rgba(255, 255, 255, .07); --lm-glow: 47, 184, 214;
}
.lm *, .lm *::before, .lm *::after { box-sizing: border-box; }
.lm i.bi { line-height: 1; }
.lm a:focus-visible { outline: 2px solid var(--lm-a); outline-offset: 3px; }
.lm-shell { width: min(1240px, 100% - 32px); margin-inline: auto; }
@media (min-width: 992px) { .lm-shell { width: min(1240px, 100% - 72px); } }

.lm-head { text-align: center; margin-bottom: clamp(26px, 4vw, 42px); }
.lm-head h2 { margin: 0 0 10px; font-size: clamp(1.8rem, 3.6vw, 2.75rem); line-height: 1.1; letter-spacing: -.03em; font-weight: 800; color: var(--lm-ink); text-wrap: balance; }
.lm-head h2 em { font-style: normal; background: linear-gradient(100deg, var(--lm-a), var(--lm-b) 80%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .06em; }
.lm-head p { margin: 0 auto; max-width: 40em; font-size: 1.0625rem; line-height: 1.55; text-wrap: balance; }

.lm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (min-width: 992px) { .lm-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (max-width: 991.98px) { .lm-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; } }

/* double bezel: a soft outer shell holding the inner card; wide horizontal layout (image | points | monthly price) */
.lm-card { --mx: 50%; --my: 0%; position: relative; padding: 6px; border-radius: 30px; border: 1px solid var(--lm-line); background: color-mix(in srgb, var(--lm-card) 55%, transparent); box-shadow: 0 30px 50px -36px rgba(15, 80, 130, .5); transition: transform .5s cubic-bezier(.32, .72, 0, 1), border-color .3s, box-shadow .4s; }
[data-bs-theme="dark"] .lm-card { box-shadow: 0 30px 50px -36px rgba(0, 0, 0, .9); }
/* left: 2:1 banner with the monthly price and button under it; right: name and points. Both columns end up the same height. */
.lm-core { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 250px) minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "cover body" "buy body"; gap: 16px 28px; align-items: stretch; padding: 20px; border-radius: 24px; background: var(--lm-card); box-shadow: 0 1px 0 var(--lm-hi) inset; }
.lm-core::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s; background: radial-gradient(380px circle at var(--mx) var(--my), rgba(var(--lm-glow), .13), transparent 60%); }
.lm-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--lm-a) 45%, var(--lm-line)); box-shadow: 0 40px 56px -34px rgba(var(--lm-glow), .55); }
.lm-card:hover .lm-core::before { opacity: 1; }

/* banner: 400x200 (2:1) */
.lm-cover { grid-area: cover; position: relative; display: block; aspect-ratio: 2 / 1; overflow: hidden; border-radius: 16px; background: linear-gradient(135deg, var(--lm-soft), transparent); box-shadow: 0 0 0 1px var(--lm-line); }
.lm-cover img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.32, .72, 0, 1); }
.lm-card:hover .lm-cover img { transform: scale(1.06); }
.lm-off { position: absolute; z-index: 1; top: 8px; left: 8px; padding: 3px 10px; border-radius: 999px; background: linear-gradient(135deg, var(--lm-a), var(--lm-b)); color: var(--lm-on); font-size: .6875rem; font-weight: 800; }

.lm-body { grid-area: body; display: flex; flex-direction: column; justify-content: center; gap: 14px; min-width: 0; padding-left: 28px; border-left: 1px solid var(--lm-line); }
.lm-body h3 { margin: 0; font-size: 1.25rem; line-height: 1.25; font-weight: 800; letter-spacing: -.02em; color: var(--lm-ink); text-wrap: balance; }
.lm-body h3 a { color: inherit; text-decoration: none; }
.lm-perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.lm-perks li { display: flex; align-items: flex-start; gap: 10px; font-size: .875rem; line-height: 1.4; color: var(--lm-body); }
.lm-perks i { flex: none; display: grid; place-items: center; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; background: var(--lm-soft); color: var(--lm-a-ink); font-size: .8rem; }
.lm-tag { margin: 0; font-size: .95rem; line-height: 1.5; }

/* the monthly price leads; the yearly total is the small print */
.lm-buy { grid-area: buy; display: flex; flex-direction: column; justify-content: flex-end; gap: 14px; }
.lm-price { display: grid; gap: 3px; min-width: 0; }
.lm-mo { display: flex; align-items: baseline; gap: 6px; }
.lm-mo b { font-size: clamp(2rem, 3.4vw, 2.5rem); line-height: 1; font-weight: 800; letter-spacing: -.04em; font-variant-numeric: tabular-nums; background: linear-gradient(100deg, var(--lm-ink), var(--lm-a-ink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lm-mo small { font-size: .9rem; font-weight: 600; color: var(--lm-muted); }
.lm-price em { font-style: normal; font-size: .78rem; color: var(--lm-muted); }
.lm-price em { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; }
.lm-cta { justify-content: space-between; flex: none; display: inline-flex; align-items: center; gap: 12px; height: 46px; padding: 0 6px 0 20px; border-radius: 999px; background: linear-gradient(135deg, var(--lm-a), var(--lm-b)); color: var(--lm-on); font-size: .875rem; font-weight: 700; white-space: nowrap; text-decoration: none; box-shadow: 0 14px 24px -14px rgba(var(--lm-glow), .85); transition: transform .35s cubic-bezier(.32, .72, 0, 1), box-shadow .3s; }
.lm-cta i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .22); transition: transform .35s cubic-bezier(.32, .72, 0, 1); }
.lm-cta:hover { color: var(--lm-on); box-shadow: 0 18px 28px -14px rgba(var(--lm-glow), 1); }
.lm-cta:hover i { transform: translate(2px, -2px) scale(1.05); }
.lm-cta:active { transform: scale(.97); }

.lm-all { display: flex; justify-content: center; margin-top: clamp(24px, 3vw, 36px); }

/* scroll reveal: soft blur resolves as each block enters; cards stagger; the banner settles from slightly zoomed */
.lm.js-in .lm-rv { opacity: 0; transform: translateY(28px); filter: blur(8px); }
.lm.js-in .lm-rv.in { opacity: 1; transform: none; filter: none; transition: opacity .9s cubic-bezier(.32, .72, 0, 1) calc(var(--k, 0) * 110ms), transform 1s cubic-bezier(.32, .72, 0, 1) calc(var(--k, 0) * 110ms), filter .9s cubic-bezier(.32, .72, 0, 1) calc(var(--k, 0) * 110ms); }
.lm.js-in .lm-card .lm-cover img { transform: scale(1.12); }
.lm.js-in .lm-card.in .lm-cover img { transform: none; transition: transform 1.4s cubic-bezier(.32, .72, 0, 1) calc(var(--k, 0) * 110ms + 150ms); }
.lm.js-in .lm-card.in:hover { transform: translateY(-4px); transition: transform .5s cubic-bezier(.32, .72, 0, 1), border-color .3s, box-shadow .4s; }
.lm.js-in .lm-card.in:hover .lm-cover img { transform: scale(1.06); transition: transform .8s cubic-bezier(.32, .72, 0, 1); }

@media (max-width: 575.98px) {
    .lm-core { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "cover" "body" "buy"; padding: 14px; gap: 16px; }
    .lm-body { padding-left: 0; border-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .lm *, .lm *::before { transition: none !important; animation: none !important; }
    .lm.js-in .lm-rv, .lm.js-in .lm-card .lm-cover img { opacity: 1; transform: none; filter: none; }
    .lm-card:hover, .lm-card:hover .lm-cover img { transform: none; }
}
