/* Magspire Edu landing page, decorative touches only */

/* Consistent violet glow, independent of theme accent colours */
.hero-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;

    background:
        radial-gradient(
            ellipse 85% 65% at 20% 8%,
            rgba(91, 79, 207, 0.14) 0%,
            rgba(91, 79, 207, 0.06) 45%,
            transparent 100%
        ),
        radial-gradient(
            ellipse 70% 55% at 85% 0%,
            rgba(167, 139, 250, 0.12) 0%,
            transparent 100%
        );
}

[data-theme="dark"] .hero-glow {
    background:
        radial-gradient(
            ellipse 85% 65% at 20% 8%,
            rgba(91, 79, 207, 0.16) 0%,
            rgba(91, 79, 207, 0.06) 45%,
            transparent 100%
        ),
        radial-gradient(
            ellipse 70% 55% at 85% 0%,
            rgba(167, 139, 250, 0.09) 0%,
            transparent 100%
        );
}

.feature-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(91, 79, 207, 0.10);
    color: var(--color-primary);
    flex-shrink: 0;
}
[data-theme="dark"] .feature-icon { background: rgba(124, 115, 255, 0.16); }

.step-number {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    background: var(--color-primary);
    color: var(--color-primary-content);
    flex-shrink: 0;
}

.hero-underline {
    display: inline-block;
    position: relative;
    padding-bottom: 4px;
}

.hero-underline::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 5px;
    background-color: #5b4fcf;
    border-radius: 999px;
}

.badge-gradient-border {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 999px;
    border: 2px solid transparent;
    background-image: linear-gradient(var(--color-base-100), var(--color-base-100)),
                      linear-gradient(135deg, #4233c8, #a78bfa, #4233c8);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.03em;
    white-space: normal;
    text-align: center;
    position: relative;
}

.badge-dot {
    flex-shrink: 0;
    width: clamp(16px, 3vw, 18px);
    height: clamp(16px, 3vw, 18px);
    background: transparent;
    position: relative;
    display: inline-block;
}

.badge-dot::before {
    content: '✦';
    font-size: clamp(14px, 3vw, 16px);
    color: #a78bfa;
    text-shadow: 0 0 0px #a78bfa, 0 0 0px #a78bfa;
    line-height: 1;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.bg-dot-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(0, 0, 0, 0.08) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
  pointer-events: none;
}

[data-theme="dark"] .bg-dot-grid {
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1.5px, transparent 1.5px);
}


.badge-text {
    color: #a78bfa;
}

.strength-bar {
  transition: background-color 0.3s ease;
}

#password-helper {
  display: none;
}

/* ── How it works cards ──────────────────── */
.hiw-step {
    transition: transform .25s ease, box-shadow .25s ease, opacity .25s ease, border-color .25s ease;
    outline: none;
    cursor: default;
}

/* Focus effect: dim the others while one is hovered or focused */
.hiw-list:has(.hiw-step:hover) .hiw-step:not(:hover),
.hiw-list:has(.hiw-step:focus-within) .hiw-step:not(:focus-within) { opacity: .45; }

.hiw-step:hover,
.hiw-step:focus-within {
    transform: translateY(-6px) scale(1.04);
    opacity: 1;
    border-color: rgba(91, 79, 207, .6);
    box-shadow: 0 14px 34px rgba(91, 79, 207, .22);
    z-index: 1;
}
.hiw-step .step-number { transition: transform .25s ease; }
.hiw-step:hover .step-number,
.hiw-step:focus-within .step-number { transform: scale(1.15); }

/* Slide-in: runs when the section gets .in from the scroll script */
@keyframes hiw-rise {
    from { opacity: 0; transform: translateY(36px); }
    to   { opacity: 1; transform: none; }
}
.js .reveal.in .hiw-step {
    animation: hiw-rise 0.9s cubic-bezier(.2, .7, .2, 1) backwards;
}

.js .reveal.in .hiw-step:nth-child(1) { animation-delay: .1s; }
.js .reveal.in .hiw-step:nth-child(2) { animation-delay: .40s; }
.js .reveal.in .hiw-step:nth-child(3) { animation-delay: .65s; }
.js .reveal.in .hiw-step:nth-child(4) { animation-delay: .90s; }

/* ── About section ───────────────────────── */
#about { scroll-margin-top: 5rem; }

@keyframes about-rise {
    from { opacity: 0; transform: translateY(26px); }
    to   { opacity: 1; transform: none; }
}
.js .reveal.in .about-row { animation: about-rise .7s cubic-bezier(.2, .7, .2, 1) backwards; }
.js .reveal.in .about-row:nth-child(1) { animation-delay: .25s; }
.js .reveal.in .about-row:nth-child(2) { animation-delay: .40s; }
.js .reveal.in .about-row:nth-child(3) { animation-delay: .55s; }

.about-row { position: relative; }
.about-row::after {
    content: ""; position: absolute; left: 0; bottom: -1px;
    height: 2px; width: 0;
    background: linear-gradient(90deg, #5b4fcf, #a78bfa);
    transition: width .4s ease;
}
.about-row:hover::after { width: 100%; }
.about-row .feature-icon { transition: transform .3s ease; }
.about-row:hover .feature-icon { transform: scale(1.15) rotate(-8deg); }

/* ── Scroll reveal (only active once JS adds .js to <html>) ── */
.js .reveal { opacity: 0; transform: translateY(32px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ── Counter section colours ─────────────── */
.home-stat-1 { color: #5b4fcf; }
.home-stat-2 { color: #a78bfa; }
.home-stat-label { color: rgb(107 114 128); }

[data-theme="dark"] .home-stat-1 { color: #6d62e8; }
[data-theme="dark"] .home-stat-2 { color: #a78bfa; }
[data-theme="dark"] .home-stat-label { color: #8b90a7; }

/* ── Built for a real exam experience: cards slide in from alternating sides ── */
.js .reveal.reveal-x { opacity: 1; transform: none; transition: none; }  /* only the cards move */

.js .reveal-x:not(.in) .fx-card { opacity: 0; }

.js .reveal-x.in .fx-card { animation: fx-from-left .8s cubic-bezier(.2, .7, .2, 1) backwards; }
.js .reveal-x.in .fx-card:nth-child(even) { animation-name: fx-from-right; }

@keyframes fx-from-left  { from { opacity: 0; transform: translateX(-60px); } to { opacity: 1; transform: none; } }
@keyframes fx-from-right { from { opacity: 0; transform: translateX(60px);  } to { opacity: 1; transform: none; } }

.js .reveal-x.in .fx-card:nth-child(1) { animation-delay: .05s; }
.js .reveal-x.in .fx-card:nth-child(2) { animation-delay: .20s; }
.js .reveal-x.in .fx-card:nth-child(3) { animation-delay: .35s; }
.js .reveal-x.in .fx-card:nth-child(4) { animation-delay: .50s; }
.js .reveal-x.in .fx-card:nth-child(5) { animation-delay: .65s; }
.js .reveal-x.in .fx-card:nth-child(6) { animation-delay: .80s; }

.fx-card { transition: transform .25s ease; }
.fx-card:hover { transform: translateY(-4px); }
.fx-card .feature-icon { transition: transform .3s ease; }
.fx-card:hover .feature-icon { transform: scale(1.12) rotate(-6deg); }

/* ── FAQ accordion ───────────────────────── */
#faq { scroll-margin-top: 5rem; }

.faq-item {
    border: 1px solid var(--color-base-300, #e5e7eb);
    border-radius: 14px;
    background: var(--color-base-100);
    transition: border-color .25s ease, box-shadow .25s ease;
}
.faq-item:hover { border-color: rgba(91, 79, 207, .5); }
.faq-item[open] {
    border-color: rgba(91, 79, 207, .6);
    box-shadow: 0 10px 26px rgba(91, 79, 207, .12);
}

.faq-item summary {
    position: relative;
    padding: 16px 48px 16px 18px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "";
    position: absolute;
    right: 20px;
    top: 50%;
    width: 9px;
    height: 9px;
    border-right: 2px solid #5b4fcf;
    border-bottom: 2px solid #5b4fcf;
    transform: translateY(-70%) rotate(45deg);
    transition: transform .25s ease;
}
[data-theme="dark"] .faq-item summary::after { border-color: #a78bfa; }
.faq-item[open] summary::after { transform: translateY(-30%) rotate(-135deg); }

.faq-item p {
    margin: 0;
    padding: 0 18px 16px;
    font-size: .875rem;
    line-height: 1.65;
    opacity: .65;
}
.faq-item[open] p { animation: faq-in .3s ease; }
@keyframes faq-in { from { opacity: 0; transform: translateY(-6px); } }

/* Questions rise in one after another */
.js .reveal.in .faq-item { animation: hiw-rise .7s cubic-bezier(.2, .7, .2, 1) backwards; }
.js .reveal.in .faq-item:nth-child(1) { animation-delay: .05s; }
.js .reveal.in .faq-item:nth-child(2) { animation-delay: .15s; }
.js .reveal.in .faq-item:nth-child(3) { animation-delay: .25s; }
.js .reveal.in .faq-item:nth-child(4) { animation-delay: .35s; }
.js .reveal.in .faq-item:nth-child(5) { animation-delay: .45s; }
.js .reveal.in .faq-item:nth-child(6) { animation-delay: .55s; }

/* ── Testimonials: avatar stack ──────────── */
.tm { text-align: center; }

.tm-stack { display: flex; justify-content: center; margin-bottom: 14px; }

.tm-av {
    position: relative;
    width: 52px;
    height: 52px;
    margin: 0 -6px;
    padding: 0;
    border: 0;
    background: none;
    border-radius: 50%;
    cursor: pointer;
    transition: transform .3s ease;
}
.tm-av:focus-visible { outline: 2px solid #a78bfa; outline-offset: 3px; }

.tm-photo {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background: var(--tm-bg, #c3b2ec);
    border: 3px solid var(--color-base-100, #fff);
    transition: box-shadow .3s ease;
}
.tm-photo svg { display: block; width: 100%; height: 100%; fill: rgba(255, 255, 255, .88); }
.tm-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }

.tm-av.is-on { transform: translateY(-5px) scale(1.18); z-index: 2; }
.tm-av.is-on .tm-photo { box-shadow: 0 0 0 2px #5b4fcf; }
[data-theme="dark"] .tm-av.is-on .tm-photo { box-shadow: 0 0 0 2px #a78bfa; }

/* All quotes share one grid cell, so the section height never jumps */
.tm-quotes { display: grid; max-width: 520px; margin: 0 auto; }
.tm-quote {
    grid-area: 1 / 1;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .35s ease, transform .35s ease, visibility .35s;
}
.tm-quote.is-on { opacity: 1; visibility: visible; transform: none; }
.tm-quote blockquote { margin: 0; font-size: 1rem; line-height: 1.6; }
.tm-quote figcaption { margin-top: 8px; font-size: .8rem; opacity: .7; }
.tm-via { display: inline-flex; align-items: center; gap: 5px; opacity: .8; }
.tm-via::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #25d366; }

/* Progress bar to the next message */
.tm-prog {
    height: 3px;
    max-width: 140px;
    margin: 14px auto 0;
    border-radius: 3px;
    overflow: hidden;
    background: var(--color-base-300, #e5e7eb);
}
.tm-prog span { display: block; height: 100%; width: 0; background: #5b4fcf; }
[data-theme="dark"] .tm-prog span { background: #a78bfa; }
.tm-prog span.run { animation: tm-fill linear forwards; }
@keyframes tm-fill { to { width: 100%; } }

/* ── Closing banner ──────────────────────── */
#get-started { scroll-margin-top: 5rem; }

/* Only the content rises, the section itself stays put (uses .reveal-x from the cards block) */
.js .reveal-x:not(.in) .cta-in { opacity: 0; }

.js .reveal.in .cta-in { animation: hiw-rise .7s cubic-bezier(.2, .7, .2, 1) backwards; }
.js .reveal.in .cta-in:nth-child(1) { animation-delay: .05s; }
.js .reveal.in .cta-in:nth-child(2) { animation-delay: .15s; }
.js .reveal.in .cta-in:nth-child(3) { animation-delay: .25s; }
.js .reveal.in .cta-in:nth-child(4) { animation-delay: .35s; }
.js .reveal.in .cta-in:nth-child(5) { animation-delay: .45s; }

.cta-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #25d366;
}

#get-started .btn { transition: transform .2s ease, box-shadow .2s ease; }
#get-started .btn:hover { transform: translateY(-2px); }

/* ── Home hero: headline with more presence ── */
.home-title {
    max-width: 18ch;
    margin-inline: auto;
    padding-bottom: 0.08em;
    font-size: clamp(2.5rem, 6.4vw, 4.25rem);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -0.04em;
    text-wrap: balance;
}

/* "Real": normal text colour, with a gradient underline that fades out to the right.
   The underline is sized in em, so it grows and shrinks with the headline. */
.home-title .hero-underline { color: inherit; padding-bottom: 0.04em; }
.home-title .hero-underline::after {
    bottom: 0;
    height: 0.1em;
    background: linear-gradient(90deg, #5b4fcf 0%, rgba(124, 109, 240, 0.65) 55%, rgba(167, 139, 250, 0) 100%);
    border-radius: 999px;
}
[data-theme="dark"] .home-title .hero-underline::after {
    background: linear-gradient(90deg, #a78bfa 0%, rgba(167, 139, 250, 0.6) 55%, rgba(167, 139, 250, 0) 100%);
}

/* Entrance: badge, headline, text and button rise one after another */
.hero-in { animation: hero-rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
.hero-in.d1 { animation-delay: 0.1s; }
.hero-in.d2 { animation-delay: 0.22s; }
.hero-in.d3 { animation-delay: 0.34s; }
@keyframes hero-rise { from { opacity: 0; transform: translateY(24px); } }

/* Start practicing button: soft glow and a slow ring */
.hero-cta .btn {
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hero-cta .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 36px -10px #5b4fcf;
}

/* ── Reduced motion: keep this block LAST in the file ── */
@media (prefers-reduced-motion: reduce) {
    .js .reveal { opacity: 1; transform: none; transition: none; }
    .hiw-step, .hiw-step .step-number { transition: none; }
    .hiw-step:hover, .hiw-step:focus-within { transform: none; }
    .js .reveal.in .hiw-step { animation: none; }
    .js .reveal.in .about-row { animation: none; }
    .js .reveal-x.in .fx-card { animation: none; }
    .js .reveal.in .faq-item, .faq-item[open] p { animation: none; }
    .tm-av, .tm-quote { transition: none; }
    .tm-prog span.run { animation: none; width: 100%; }
    .js .reveal.in .cta-in { animation: none; }
    .hero-in, .hero-cta .btn::after { animation: none; }
}

/* ── Footer social icons ─────────────────── */
.site-footer__social {
    display: flex;
    gap: .625rem;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}
.site-footer__social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    border: 1px solid rgba(128, 128, 128, .4);
    color: inherit;
    opacity: .85;
    transition: transform .2s ease, border-color .2s ease, color .2s ease, opacity .2s ease;
}
.site-footer__social a:hover {
    opacity: 1;
    color: #5b4fcf;
    border-color: #5b4fcf;
    transform: translateY(-2px);
}
[data-theme="dark"] .site-footer__social a:hover { color: #a78bfa; border-color: #a78bfa; }
.site-footer__social svg { width: 1rem; height: 1rem; }

/* ── Activate Full Access: soft panel with simple checks ── */
.access-panel {
    background: rgba(91, 79, 207, 0.08);
    border-radius: 1.25rem;
    padding: 2rem 1.5rem;
}
@media (min-width: 640px) { .access-panel { padding: 2.5rem; } }
[data-theme="dark"] .access-panel { background: rgba(124, 115, 255, 0.12); }

.access-sub { opacity: .65; }

.access-list {
    display: grid;
    gap: .75rem 1.5rem;
    max-width: 42rem;
    margin: 0 auto 2rem;
    padding: 0;
    list-style: none;
}
@media (min-width: 640px) { .access-list { grid-template-columns: 1fr 1fr; } }
.access-list li {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .875rem;
    font-weight: 600;
}

.access-check {
    flex: none;
    display: grid;
    place-items: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    background: rgba(91, 79, 207, 0.16);
    color: #5b4fcf;
}
.access-check svg { width: .7rem; height: .7rem; }
[data-theme="dark"] .access-check { background: rgba(124, 115, 255, 0.22); color: #a78bfa; }