/* =========================================
   MATHLUCID — CLASS 9 LANDING PAGE V2
   ========================================= */

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

:root {
    --page-bg: #f7f7f3;
    --surface: #ffffff;
    --text: #303030;
    --heading: #30358c;
    --muted: #666666;
    --accent: #4f46e5;
    --border: #e3e3df;
    --header-bg: #f0f1f7;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--page-bg);
    color: var(--text);
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.5;
}

main {
    flex: 1;
}

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

/* Header */

.site-header {
    height: 58px;
    display: flex;
    align-items: center;
    padding: 0 6%;
    background: var(--header-bg);
    border-bottom: 1px solid #e1e2e8;
}

.header-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    color: #252525;
    font-size: 1.05rem;
    font-weight: 700;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.chapter-info {
    color: #666b78;
    font-size: 0.78rem;
}

.theme-button {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: #ffffff;
    border: 1px solid #d9dbe2;
    border-radius: 7px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
}

/* Introduction */

.class-intro {
    padding: 40px 20px 30px;
    border-bottom: 1px solid var(--border);
}

.class-intro-content {
    width: 88%;
    max-width: 1100px;
    margin: 0 auto;
}

.back-link {
    display: inline-block;
    margin-bottom: 34px;
    color: var(--muted);
    font-size: 0.85rem;
}

.back-link:hover {
    color: var(--heading);
}

.section-label {
    margin-bottom: 10px;
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.16em;
}

.class-intro h1 {
    margin-bottom: 10px;
    color: var(--heading);
    /* font-size: clamp(2.3rem, 4vw, 3.2rem); */
    line-height: 1.15;
}

.intro-description {
    color: var(--muted);
    font-size: 1.05rem;
}

/* Learning paths */

.learning-paths {
    padding: 52px 0 82px;
}

.learning-container {
    width: 88%;
    max-width: 1100px;
    margin: 0 auto;
}

.section-heading {
    margin-bottom: 28px;
}

.section-heading > p:last-child {
    color: var(--muted);
    font-size: 0.98rem;
}

.path-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Path cards */

.path-card {
    position: relative;
    min-height: 176px;
    display: grid;
    grid-template-columns: 52px 1fr auto;
    align-items: center;
    column-gap: 10px;
    padding: 30px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 9px;
    transition:
        border-color 0.2s ease,
        transform 0.2s ease,
        background-color 0.2s ease;
}

.path-available {
    overflow: hidden;
}

.path-available::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent);
}

.path-available:hover {
    border-color: #c7c9df;
    transform: translateY(-1px);
}

.path-number {
    align-self: start;
    padding-top: 3px;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.path-content h2 {
    margin-bottom: 8px;
    color: var(--heading);
    font-size: clamp(1.7rem, 3vw, 2.05rem);
    line-height: 1.2;
}

.path-content > p {
    max-width: 720px;
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.6;
}

.path-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 14px;
    color: var(--muted);
    font-size: 0.76rem;
}

.path-meta span:first-child {
    color: var(--accent);
    font-weight: 700;
}

.path-arrow {
    margin-left: 25px;
    color: var(--accent);
    font-size: 1.5rem;
}

/* Coming soon */

.path-coming-soon {
    opacity: 0.62;
    cursor: default;
}

.path-coming-soon .path-number {
    color: #888;
}

.path-coming-soon .path-content h2 {
    color: #555;
}

.path-coming-soon .path-content > p {
    color: #888;
}

.coming-label {
    margin-left: 25px;
    color: #777;
    font-size: 0.8rem;
}

/* Footer */

.site-footer {
    padding: 25px 6% 18px;
    background: #ffffff;
    border-top: 1px solid #e5e5e5;
}

.footer-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-logo {
    color: #252525;
    font-size: 1.05rem;
    font-weight: 700;
}

.footer-container > p {
    color: var(--muted);
    font-size: 0.8rem;
}

.copyright {
    width: 100%;
    max-width: 1200px;
    margin: 17px auto 0;
    padding-top: 12px;
    border-top: 1px solid #e5e5e5;
    color: var(--muted);
    font-size: 0.72rem;
}

.footer-brand a {
    color: var(--heading);
    text-decoration: none;
    font-weight: 700
}

.footer-brand p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: .8rem
}

.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: .8rem
}

.footer-links a:hover {
    color: var(--heading)
}


/* Dark mode */

body.dark {
    --page-bg: #121417;
    --surface: #181b20;
    --text: #d4d6da;
    --heading: #b8bcff;
    --muted: #9297a2;
    --border: #30343b;
    --header-bg: #181b20;
}

body.dark .site-header {
    background: #181b20;
    border-color: #2a2e35;
}

body.dark .logo,
body.dark .footer-logo {
    color: #f0f1f3;
}

body.dark .chapter-info {
    color: #a7acb5;
}

body.dark .theme-button {
    background: #181b20;
    color: #f0f1f3;
    border-color: #30343b;
}

body.dark .back-link {
    color: #9297a2;
}

body.dark .back-link:hover {
    color: var(--heading);
}

body.dark .path-card {
    background: var(--surface);
    border-color: var(--border);
}

body.dark .path-available:hover {
    border-color: #474c56;
}

body.dark .path-coming-soon {
    opacity: 0.52;
}

body.dark .path-coming-soon .path-content h2 {
    color: #aaa;
}

body.dark .path-coming-soon .path-content > p,
body.dark .coming-label {
    color: #777;
}

body.dark .site-footer {
    background: #181b20;
    border-color: #2a2e35;
}

body.dark .copyright {
    border-color: #30343b;
}

/* Responsive */

@media (max-width: 768px) {

    .site-header {
        padding: 0 20px;
    }

    .header-right {
        gap: 12px;
    }

    .chapter-info {
        font-size: 0.72rem;
    }

    .class-intro {
        padding: 42px 20px 46px;
    }

    .class-intro-content {
        width: auto;
        margin: 0;
    }

    .back-link {
        margin-bottom: 28px;
    }

    .class-intro h1 {
        font-size: 2.15rem;
    }

    .intro-description {
        font-size: 0.96rem;
    }

    .learning-paths {
        padding: 44px 0 65px;
    }

    .learning-container {
        width: auto;
        margin: 0 20px;
    }

    .path-card {
        min-height: 0;
        grid-template-columns: 34px 1fr auto;
        padding: 23px 20px;
    }

    .path-content h2 {
        font-size: 1.55rem;
    }

    .path-content > p {
        font-size: 0.9rem;
    }

    .path-meta {
        font-size: 0.72rem;
    }

    .path-arrow {
        margin-left: 12px;
    }

    .coming-label {
        margin-left: 10px;
        font-size: 0.72rem;
    }

    .site-footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .footer-container {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .copyright {
        margin-top: 17px;
    }
}

@media (max-width: 480px) {

    .chapter-info {
        display: none;
    }

    .path-card {
        grid-template-columns: 30px 1fr auto;
        padding: 21px 17px;
    }

    .path-content h2 {
        font-size: 1.4rem;
    }

    .path-meta {
        flex-direction: column;
        gap: 2px;
    }

    .coming-label {
        font-size: 0.68rem;
        white-space: nowrap;
    }
}


/* =========================================
   DARK MODE
   ========================================= */

body.dark-mode {
    --page-bg: #121417;
    --surface: #181b20;

    --text: #d4d6da;
    --heading: #b8bcff;
    --muted: #9297a2;

    --border: #30343b;

    --header-bg: #181b20;

    --accent-soft: #1c2040;

    --button-bg: #5b52e8;
    --button-text: #ffffff;
}

body.dark-mode .site-header {
    background: #181b20;
    border-color: #2a2e35;
}

body.dark-mode .logo,
body.dark-mode .footer-logo {
    color: #f0f1f3;
}

body.dark-mode .main-nav a {
    color: #a7acb5;
}

body.dark-mode .main-nav a:hover,
body.dark-mode .footer-links a:hover {
    color: var(--heading);
}

body.dark-mode .theme-button {
    background: #181b20;
    color: #f0f1f3;
    border-color: #30343b;
}

body.dark-mode .hero {
    background:
        radial-gradient(
            circle at 50% 42%,
            rgba(28, 32, 64, 0.95) 0%,
            rgba(18, 20, 23, 0.96) 58%,
            rgba(18, 20, 23, 1) 80%
        );
}

body.dark-mode .flow-card,
body.dark-mode .class-card {
    background: var(--surface);
    border-color: var(--border);
}

body.dark-mode .class-card {
    background: #1c2040;
    border-color: #30365f;
}

body.dark-mode .class-card p:last-child {
    color: #c5c8ce;
}

body.dark-mode .class-card-visual {
    color: rgba(157, 163, 255, 0.16);
}

body.dark-mode .philosophy {
    background: #1c2040;
    border-color: #30365f;
}

body.dark-mode .site-footer {
    background: #181b20;
    border-color: #2a2e35;
}

body.dark-mode .copyright {
    border-color: #30343b;
}
