:root {
    --bg: #fffdf9;
    --bg-glow-1: rgba(255, 90, 165, 0.18);
    --bg-glow-2: rgba(90, 47, 232, 0.12);
    --bg-glow-3: rgba(255, 180, 77, 0.14);
    --panel: rgba(255, 255, 255, 0.86);
    --panel-soft: rgba(255, 237, 246, 0.82);
    --line: rgba(90, 47, 232, 0.12);
    --text: #221739;
    --muted: #6e6486;
    --primary: #ffb44d;
    --primary-strong: #ff5aa5;
    --white-soft: rgba(255, 255, 255, 0.92);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: auto;
}

body {
    min-height: 100vh;
    font-family: "Segoe UI", "Trebuchet MS", sans-serif;
    background:
        radial-gradient(circle at 14% 10%, var(--bg-glow-1), transparent 26%),
        radial-gradient(circle at 86% 18%, var(--bg-glow-2), transparent 24%),
        radial-gradient(circle at 72% 86%, var(--bg-glow-3), transparent 28%),
        var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(135deg, rgba(255, 90, 165, 0.04), transparent 35%),
        linear-gradient(315deg, rgba(90, 47, 232, 0.04), transparent 34%);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

.site-shell {
    position: relative;
}

.topbar,
.section-layout,
.footer {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--line);
    border-radius: 1.25rem;
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(30, 15, 56, 0.06);
}

.nav-highlight {
    position: absolute;
    top: 50%;
    left: 0;
    height: 2.7rem;
    border-radius: 0.9rem;
    background: rgba(196, 196, 196, 0.98);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.78),
        0 10px 22px rgba(0, 0, 0, 0.12);
    transform: translate3d(0, -50%, 0);
    opacity: 0;
    z-index: 0;
    pointer-events: none;
    transition:
        transform 0.3s ease,
        width 0.3s ease,
        opacity 0.25s ease,
        background-color 0.25s ease;
}

.nav-highlight.is-brand {
    background: rgba(196, 196, 196, 0.36);
    opacity: 0.28;
}

.brand {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
    z-index: 1;
}

.brand-mark {
    display: block;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.9rem;
    object-fit: contain;
    flex: 0 0 auto;
}

.brand-text {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.nav {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    left: auto;
    width: min(220px, calc(100vw - 2rem));
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
    padding: 0.7rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 38px rgba(34, 23, 57, 0.11);
    backdrop-filter: none;
    z-index: 30;
}

.nav.nav-open {
    display: flex;
}

.nav a {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 2.6rem;
    padding: 0 1rem;
    border: 1px solid rgba(90, 47, 232, 0.12);
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.86);
    color: var(--text);
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(34, 23, 57, 0.04);
    transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.nav a:hover,
.nav a:focus-visible {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(90, 47, 232, 0.18);
    transform: translateY(-1px);
}

.menu-toggle {
    display: block;
    width: 3rem;
    height: 3rem;
    border: 1px solid var(--line);
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.88);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 1.35rem;
    height: 3px;
    margin: 0.3rem auto;
    border-radius: 999px;
    background: var(--text);
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.hero {
    display: block;
    padding: 4rem 0 3rem;
}

.hero-copy,
.info-card,
.subject-card,
.download-banner {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 1.35rem;
}

.hero-copy,
.info-card,
.subject-card,
.download-banner,
.stat-card,
.menu-toggle {
    box-shadow: 0 14px 30px rgba(34, 23, 57, 0.05);
    backdrop-filter: blur(16px);
}

.hero-copy {
    max-width: 760px;
    margin: 0 auto;
    padding: 2.5rem 2.25rem;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    margin-bottom: 1.25rem;
    background: var(--panel-soft);
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero h1 {
    font-size: clamp(2.8rem, 6vw, 5.2rem);
    line-height: 0.98;
    letter-spacing: -0.04em;
    margin-bottom: 1.25rem;
}

.hero h1 span {
    color: var(--primary-strong);
}

.hero-text,
.section-heading p,
.info-card p,
.subject-card p,
.footer p,
.download-banner p {
    color: var(--muted);
}

.hero-text {
    max-width: 46rem;
    font-size: 1.08rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin: 1.8rem 0 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.9rem 1.35rem;
    cursor: pointer;
    font-weight: 700;
}

.btn-primary {
    color: var(--text);
    background: var(--primary);
}

.btn-secondary {
    color: var(--text);
    background: var(--panel);
}

.stats-grid,
.card-grid,
.subject-grid {
    display: grid;
    gap: 1rem;
}

.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stat-card {
    padding: 1rem;
    border-radius: 1rem;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.9);
}

.stat-card-subjects {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
}

.stat-card strong {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 1.4rem;
}

.stat-card-count {
    display: inline-block;
    margin-bottom: 0;
    font-size: 1.4rem;
}

.stat-card span {
    color: var(--muted);
    font-size: 0.92rem;
}

.supported-subjects-label {
    color: #f6d44d;
    font-size: 0.9rem;
    padding: 0.5rem 0.9rem;
    line-height: 1;
    text-shadow: 0 0 6px rgba(243, 207, 75, 0.35), 0 0 10px rgba(243, 207, 75, 0.18);
    animation: breatheGlow 4.2s ease-in-out infinite;
}

@keyframes breatheGlow {
    0%,
    100% {
        opacity: 0.9;
        text-shadow: 0 0 5px rgba(243, 207, 75, 0.25), 0 0 8px rgba(243, 207, 75, 0.12);
    }

    50% {
        opacity: 1;
        text-shadow: 0 0 7px rgba(243, 207, 75, 0.35), 0 0 12px rgba(243, 207, 75, 0.2);
    }
}

.section-layout {
    padding: 1.5rem 0 4rem;
}

.section-heading {
    max-width: 46rem;
    margin-bottom: 1.75rem;
}

.section-heading h2,
.download-banner h2 {
    font-size: clamp(1.7rem, 3vw, 2.7rem);
    line-height: 1.1;
}

.card-grid {
    grid-template-columns: 1fr;
}

.info-card,
.subject-card {
    padding: 1.35rem;
}

.pricing-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: 2rem;
    row-gap: 1.15rem;
    min-height: 24rem;
    padding: 2.5rem;
}

.pricing-copy-wrap {
    display: grid;
    gap: 0.8rem;
    grid-column: 1;
}

.pricing-buy-button {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: start;
    margin: 0;
    padding: 1rem 1.5rem;
}

.pricing-free-button {
    grid-column: 2;
    grid-row: 1;
}

.pricing-buy-button,
.pricing-free-button {
    min-width: 10.75rem;
}

.pricing-card[data-plan="monthly"] .pricing-buy-button,
.pricing-card[data-plan="lifetime"] .pricing-buy-button {
    font-size: 1.5rem;
    line-height: 1;
}

.pricing-status-card {
    grid-column: 1 / -1;
    display: grid;
    gap: 0.35rem;
    padding: 1.1rem 1.2rem 1.1rem 2rem;
    border: 1px solid rgba(90, 47, 232, 0.1);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.72);
}

.pricing-status-title {
    color: var(--text);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pricing-status {
    min-height: 1.2rem;
    color: var(--muted);
    font-size: 1.05rem;
}

.pricing-status-list {
    margin: 0.3rem 0 0;
    padding-left: 1.2rem;
    list-style: disc;
    list-style-position: outside;
    display: grid;
    gap: 0.2rem;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.5;
}

.pricing-status-list li::marker {
    color: var(--text);
}

.pricing-value {
    font-size: 1.75rem;
    line-height: 1.05;
    font-weight: 800;
}

.pricing-card h3 {
    font-size: 1.45rem;
}

.pricing-copy {
    font-size: 1.08rem;
    line-height: 1.55;
}

.info-icon {
    display: inline-grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    margin-bottom: 0.95rem;
    border-radius: 0.95rem;
    background: var(--panel-soft);
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.info-card h3,
.subject-card h3 {
    margin-bottom: 0.55rem;
}

.subject-grid {
    grid-template-columns: 1fr;
}

.subject-card {
    position: relative;
    padding: 1.35rem 5.75rem 1.35rem 1.35rem;
    min-height: 11rem;
}

.subject-logo {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: block;
    width: 3.65rem;
    height: 3.65rem;
    border-radius: 1rem;
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.12);
    object-fit: cover;
}

.subject-maths .subject-logo {
    background: transparent;
}

.subject-science .subject-logo {
    background: transparent;
}

.subject-reader .subject-logo {
    background: transparent;
}

.subject-card h3 {
    max-width: 12rem;
    font-size: 1.35rem;
    line-height: 1.05;
}

.subject-card p:last-child {
    max-width: 14rem;
    font-size: 0.94rem;
    line-height: 1.45;
    color: var(--muted);
}

.download-banner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.6rem;
}

.download-banner .btn {
    width: fit-content;
}

.footer {
    padding: 0 0 3rem;
    text-align: center;
}

@media (min-width: 861px) {
    .topbar,
    .section-layout,
    .footer {
        width: min(100% - 2rem, 820px);
    }

    .hero {
        padding-top: 3rem;
    }

    .hero-copy {
        margin-left: auto;
        margin-right: auto;
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 520px) {
    .topbar {
        flex-wrap: wrap;
    }

    .nav {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
    }

    .nav a {
        height: 2.2rem;
        padding: 0 0.8rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 640px) {
    .topbar,
    .section-layout,
    .footer {
        width: min(100% - 1rem, 1180px);
    }

    .topbar {
        margin-top: 0.5rem;
        padding: 0.85rem 1rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}