/**
 * AI Mastery for Students — mobile-first styles
 * Palette: white bg, slate text, blue secondary, green CTA, magenta brand accent
 */

:root {
    --color-bg: #ffffff;
    --color-bg-alt: #f8fafc;
    --color-text: #1f2937;
    --color-muted: #6b7280;
    --color-primary: #111827;
    --color-secondary: #2563eb;
    --color-cta: #10b981;
    --color-cta-hover: #059669;
    --color-accent: #e91e63;
    --color-border: #e5e7eb;
    --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.06);
    --shadow-md: 0 10px 40px -12px rgba(17, 24, 39, 0.12);
    --radius: 14px;
    --radius-sm: 10px;
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --max: 1100px;
    --narrow: 640px;
    --header-h: 64px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-secondary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 1.25rem;
}

.container.narrow {
    max-width: var(--narrow);
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--color-primary);
    color: #fff;
    padding: 0.5rem 1rem;
    z-index: 10000;
}

.skip-link:focus {
    left: 1rem;
}

/* --- Landing (home): fixed background image + scrolling content --- */
.page--home {
    background-color: #eef2f7;
}

.page-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.page-bg__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
}

.page-bg__veil {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: saturate(130%) blur(3px);
}

.page-front {
    position: relative;
    z-index: 1;
    isolation: isolate;
}

.page--home .page-main {
    display: flex;
    flex-direction: column;
}

.page--home .page-main > .section {
    border-bottom: 1px solid rgba(226, 232, 240, 0.55);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.5);
}

.page--home .page-main > .section:last-of-type {
    border-bottom: none;
}

.page--home .page-main > .section--alt {
    background: rgba(241, 245, 249, 0.68);
    border-top: 1px solid rgba(226, 232, 240, 0.45);
    border-bottom: 1px solid rgba(226, 232, 240, 0.45);
}

.page--home .hero.section {
    padding-top: 2.5rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0.38) 100%);
}

@media (min-width: 900px) {
    .page--home .hero.section {
        padding-top: 3rem;
        padding-bottom: 3.25rem;
        min-height: min(76vh, 50rem);
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .page--home .hero .container {
        width: 100%;
    }
}

.page--home .site-header {
    background: rgba(255, 255, 255, 0.76);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom-color: rgba(226, 232, 240, 0.88);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65) inset;
}

.page--home .site-footer {
    background: rgba(248, 250, 252, 0.78);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(226, 232, 240, 0.8);
}

@media (prefers-reduced-motion: reduce) {
    .page-bg__veil {
        backdrop-filter: none;
    }

    .page--home .page-main > .section,
    .page--home .page-main > .section--alt {
        backdrop-filter: none;
    }
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--header-h);
    gap: 1rem;
}

.brand__logo {
    max-height: 44px;
    width: auto;
}

.nav-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Typography */
.eyebrow {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-accent);
    margin: 0 0 0.75rem;
}

.hero__title {
    font-size: clamp(1.85rem, 5vw, 2.75rem);
    line-height: 1.15;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0 0 1rem;
}

.h3 {
    font-size: 1.35rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    color: var(--color-primary);
}

.h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.35rem;
    color: var(--color-primary);
}

.section__title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    color: var(--color-primary);
    text-align: center;
    margin: 0 0 0.875rem;
    letter-spacing: -0.02em;
}

.section__title::after {
    content: "";
    display: block;
    width: 3rem;
    height: 3px;
    margin: 0.65rem auto 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--color-secondary), var(--color-accent));
}

.section__intro {
    text-align: center;
    font-size: 1.0625rem;
    margin: 0 auto 1.25rem;
    max-width: 36rem;
}

.muted {
    color: var(--color-muted);
}

.small-print {
    font-size: 0.875rem;
    margin-top: 2rem;
}

.text-accent {
    color: var(--color-accent);
    font-weight: 600;
}

/* Sections */
.section {
    padding: 2.25rem 0;
    position: relative;
}

.section--alt {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 45%, #f8fafc 100%);
    border-top: 1px solid rgba(226, 232, 240, 0.85);
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
}

.section--signup {
    padding-bottom: 3.25rem;
}

@media (min-width: 768px) {
    .section {
        padding: 2.75rem 0;
    }

    .section--signup {
        padding-bottom: 3.5rem;
    }
}

/* Hero */
.hero__grid {
    display: grid;
    gap: 1.35rem;
    align-items: start;
}

@media (min-width: 900px) {
    .hero__grid {
        grid-template-columns: 1.2fr 0.9fr;
        gap: 2rem;
    }
}

.hero__lead {
    font-size: 1.125rem;
    margin: 0 0 1.5rem;
}

.hero__ctas {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

@media (min-width: 480px) {
    .hero__ctas {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }
}

.price-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    padding: 0.75rem 1.1rem;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.price-badge__label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-muted);
}

.price-badge__amount {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-primary);
}

/* Cards */
.card {
    background: #fff;
    border: 1px solid rgba(229, 231, 235, 0.95);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow:
        0 1px 2px rgba(17, 24, 39, 0.04),
        0 4px 12px -2px rgba(17, 24, 39, 0.06);
    transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
}

@media (hover: hover) and (pointer: fine) {
    .card:hover {
        border-color: rgba(37, 99, 235, 0.18);
        box-shadow:
            0 8px 24px -6px rgba(17, 24, 39, 0.1),
            0 2px 8px -2px rgba(37, 99, 235, 0.08);
        transform: translateY(-2px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .card {
        transition: none;
    }

    .card:hover {
        transform: none;
    }
}

.card-grid {
    display: grid;
    gap: 1rem;
}

.card-grid--icons {
    grid-template-columns: 1fr;
}

@media (min-width: 600px) {
    .card-grid--icons {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .card-grid--icons {
        grid-template-columns: repeat(3, 1fr);
    }
}

.card-grid--3 {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .card-grid--3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.card-grid--2 {
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .card-grid--2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.icon-card__icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(233, 30, 99, 0.1));
    color: var(--color-secondary);
    margin-bottom: 0.75rem;
}

.pay-info__icon {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.details-card {
    max-width: 32rem;
    margin: 0 auto;
}

.details-list {
    margin: 0;
}

.details-list > div {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 0.5rem 1rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--color-border);
}

.details-list > div:last-child {
    border-bottom: none;
}

.details-list dt {
    font-weight: 600;
    color: var(--color-muted);
    font-size: 0.9rem;
}

.details-list dd {
    margin: 0;
}

/* Lists */
.bullet-list,
.check-list {
    padding-left: 1.25rem;
    margin: 0 0 1rem;
}

.bullet-list li,
.check-list li {
    margin-bottom: 0.5rem;
}

.check-list {
    list-style: none;
    padding-left: 0;
}

.check-list li {
    padding-left: 1.75rem;
    position: relative;
}

.check-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.45rem;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--color-cta);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.strong-paragraph {
    font-size: 1.05rem;
    margin: 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.15rem;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 999px;
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn--sm {
    padding: 0.45rem 0.9rem;
    font-size: 0.875rem;
}

.btn--lg {
    padding: 0.85rem 1.35rem;
    font-size: 1rem;
}

.btn--cta {
    background: var(--color-cta);
    color: #fff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn--cta:hover {
    background: var(--color-cta-hover);
    color: #fff;
}

.btn--secondary {
    background: var(--color-secondary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.btn--secondary:hover {
    color: #fff;
    filter: brightness(1.05);
}

.btn--ghost {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-border);
}

.btn--ghost:hover {
    border-color: var(--color-secondary);
    color: var(--color-secondary);
}

.btn--block {
    width: 100%;
}

.btn__loading {
    display: none;
}

.btn.is-loading .btn__text {
    display: none;
}

.btn.is-loading .btn__loading {
    display: inline;
}

/* Countdown */
.countdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin: 1rem 0 1.25rem;
    text-align: center;
}

.countdown__unit {
    background: var(--color-bg-alt);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.25rem;
}

.countdown__num {
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-primary);
    font-variant-numeric: tabular-nums;
}

.countdown__lbl {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-muted);
}

/* Testimonial */
.testimonial {
    margin: 0;
    font-size: 1.1rem;
}

.testimonial footer {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--color-muted);
}

/* Accordion */
.accordion {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
}

.accordion__btn {
    width: 100%;
    text-align: left;
    padding: 1rem 1.15rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-bottom: 1px solid var(--color-border);
    background: #fff;
    cursor: pointer;
    color: var(--color-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.accordion__btn::after {
    content: "+";
    font-weight: 700;
    color: var(--color-secondary);
    font-size: 1.25rem;
}

.accordion__btn[aria-expanded="true"]::after {
    content: "−";
}

.accordion__btn:last-of-type {
    border-bottom: 1px solid var(--color-border);
}

.accordion__panel {
    padding: 0 1.15rem 1rem;
    border-bottom: 1px solid var(--color-border);
}

.accordion__panel:last-child {
    border-bottom: none;
}

.accordion__panel[hidden] {
    display: none;
}

/* Form */
.form__row {
    margin-bottom: 1rem;
}

.form__row label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
    color: var(--color-primary);
}

.form__row input[type="text"],
.form__row input[type="email"],
.form__row input[type="tel"],
.form__row input[type="file"] {
    width: 100%;
    padding: 0.75rem 0.9rem;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: #fff;
}

.form__row input:focus {
    outline: 2px solid rgba(37, 99, 235, 0.35);
    outline-offset: 1px;
    border-color: var(--color-secondary);
}

.form__submit {
    margin-top: 0.5rem;
}

.alert {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.9375rem;
}

.alert--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* Payment page */
.pay-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 540px) {
    .pay-methods {
        grid-template-columns: repeat(4, 1fr);
    }
}

.pay-methods__btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.85rem 0.5rem;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.pay-methods__btn:hover,
.pay-methods__btn:focus-visible {
    border-color: var(--color-secondary);
    outline: none;
}

.pay-methods__btn.is-active {
    border-color: var(--color-cta);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.pay-methods__icon {
    font-size: 1.5rem;
}

.pay-details {
    border-top: 1px solid var(--color-border);
    padding-top: 1rem;
    margin-bottom: 1rem;
}

.pay-panel p {
    margin: 0.5rem 0 0;
}

.bank-dl {
    margin: 0.5rem 0;
}

.bank-dl > div {
    display: grid;
    grid-template-columns: 7rem 1fr;
    gap: 0.35rem 0.75rem;
    margin-bottom: 0.35rem;
}

.bank-dl dt {
    font-weight: 600;
    color: var(--color-muted);
    font-size: 0.875rem;
}

.bank-dl dd {
    margin: 0;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge--soon {
    background: #fef3c7;
    color: #92400e;
}

/* Confirmation */
.page--confirm .success-hero {
    text-align: center;
    margin-bottom: 2rem;
}

.success-icon {
    width: 56px;
    height: 56px;
    line-height: 56px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-cta);
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.confirm-cta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 2rem;
}

@media (min-width: 480px) {
    .confirm-cta {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

/* Sticky mobile CTA */
.sticky-cta {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    padding: 0.75rem 1.25rem calc(0.75rem + env(safe-area-inset-bottom));
    background: linear-gradient(to top, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.92));
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -4px 24px rgba(17, 24, 39, 0.08);
}

@media (max-width: 767px) {
    .sticky-cta {
        display: block;
    }

    .page--home {
        padding-bottom: 6.5rem;
    }
}

/* WhatsApp: white pill tooltip + tail + circular FAB (#25D366) */
.whatsapp-fab-stack {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 95;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.whatsapp-fab {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    text-decoration: none;
    color: inherit;
}

.whatsapp-fab:hover {
    text-decoration: none;
}

.whatsapp-fab__tooltip {
    position: relative;
    margin-bottom: 0.5rem;
    padding: 0.5rem 1rem;
    max-width: 15rem;
    background: #ffffff;
    color: var(--color-primary);
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
    border-radius: 999px;
    box-shadow:
        0 4px 18px rgba(17, 24, 39, 0.1),
        0 2px 6px rgba(17, 24, 39, 0.06);
}

/* Speech-bubble tail pointing down toward the FAB (anchored bottom-right of pill) */
.whatsapp-fab__tooltip::after {
    content: "";
    position: absolute;
    bottom: -6px;
    right: 1.35rem;
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 7px solid #ffffff;
}

.whatsapp-fab__tooltip-text {
    display: block;
}

.whatsapp-fab__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #25d366;
    box-shadow:
        0 4px 14px rgba(37, 211, 102, 0.45),
        0 2px 6px rgba(17, 24, 39, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-fab:hover .whatsapp-fab__btn {
    transform: scale(1.06);
    box-shadow:
        0 6px 20px rgba(37, 211, 102, 0.5),
        0 2px 8px rgba(17, 24, 39, 0.14);
}

.whatsapp-fab__logo {
    display: block;
}

@media (max-width: 767px) {
    .whatsapp-fab-stack {
        right: 0.75rem;
    }

    /* Lift above sticky “Sign Up” bar on home only */
    .page--home .whatsapp-fab-stack {
        bottom: 5.35rem;
    }

    .whatsapp-fab__tooltip {
        font-size: 0.75rem;
        padding: 0.45rem 0.85rem;
        max-width: 13.5rem;
    }
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

.reveal--delay {
    transition-delay: 0.08s;
}

/* Footer */
.site-footer {
    padding: 2rem 0;
    border-top: 1px solid var(--color-border);
    background: var(--color-bg-alt);
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.site-footer p {
    margin: 0;
}
