/* =========================================
   MATHLUCID — GLOBAL DESIGN SYSTEM V2
   ========================================= */


/* =========================================
   RESET
   ========================================= */

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


/* =========================================
   COLOR SYSTEM
   ========================================= */

:root {
    --page-bg: #f7f7f3;
    --surface: #ffffff;

    --text: #303030;
    --heading: #30358c;
    --muted: #666666;

    --accent: #4f46e5;
    --accent-soft: #eef0ff;

    --purple: #7c6ee6;
    --orange: #c96a16;
    --green: #18804a;
    --blue: #4f6edb;

    --border: #e3e3df;
    --header-bg: #f0f1f7;

    --button-bg: #4f46e5;
    --button-text: #ffffff;
}


/* =========================================
   BASE
   ========================================= */

html {
    scroll-behavior: smooth;
}

body {
    background: var(--page-bg);
    color: var(--text);

    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.5;
}

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

button,
a {
    -webkit-tap-highlight-color: transparent;
}


/* =========================================
   HEADER
   Matches Number Systems header language
   ========================================= */

.site-header {
    height: 58px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0 6%;

    background: var(--header-bg);
    border-bottom: 1px solid #e1e2e8;
}

.header-container {
    width: 100%;
    max-width: 1200px;

    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;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.main-nav a {
    color: #666b78;

    font-size: 0.78rem;

    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: var(--heading);
}

.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;
}


/* =========================================
   MAIN
   ========================================= */

main {
    width: 100%;
}


/* =========================================
   HERO
   ========================================= */

.hero {
    min-height: 72vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 70px 20px 80px;

    background:
        radial-gradient(circle at 50% 42%,
            rgba(238, 240, 255, 0.95) 0%,
            rgba(247, 247, 243, 0.92) 54%,
            rgba(247, 247, 243, 1) 78%);
}

.hero-content {
    width: 90%;
    max-width: 760px;

    text-align: center;
}

.hero-label {
    margin-bottom: 13px;

    color: var(--accent);

    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
}

.hero h1 {
    margin-bottom: 18px;

    color: var(--heading);

    font-size: clamp(2.7rem, 5vw, 3.6rem);
    line-height: 1.12;
    font-weight: 700;
}

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

.hero-description {
    max-width: 570px;
    margin: 0 auto 28px;

    color: var(--muted);

    font-size: 1.05rem;
    line-height: 1.65;
}


/* =========================================
   PRIMARY BUTTON
   ========================================= */

.primary-button {
    display: inline-flex;
    align-items: center;

    padding: 10px 17px;

    background: var(--button-bg);
    color: var(--button-text);

    border: 1px solid var(--button-bg);
    border-radius: 7px;

    font-size: 0.9rem;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.primary-button:hover {
    background: #4338ca;
    border-color: #4338ca;

    transform: translateY(-1px);
}


/* =========================================
   SECTION CONTAINER
   ========================================= */

.section-container {
    width: 88%;
    max-width: 1100px;

    margin: 0 auto;
}


/* =========================================
   SECTION HEADING
   ========================================= */

.section-heading {
    max-width: 720px;
    margin-bottom: 34px;
}

.section-label {
    margin-bottom: 9px;

    color: var(--accent);

    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
}

.section-heading h2 {
    margin-bottom: 10px;

    color: var(--heading);

    font-size: clamp(1.8rem, 3vw, 2.35rem);
    line-height: 1.2;
}

.section-heading>p:last-child {
    color: var(--muted);

    font-size: 1rem;
    line-height: 1.6;
}


/* =========================================
   HOW YOU LEARN
   ========================================= */

.how-it-works {
    padding: 70px 0;

    border-top: 1px solid var(--border);
}

.learning-flow {
    display: flex;
    align-items: stretch;

    gap: 14px;
}

.flow-card {
    position: relative;

    flex: 1;

    padding: 22px 22px 20px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;

    overflow: hidden;
}

.flow-card::before {
    content: "";

    position: absolute;
    top: 0;
    left: 0;

    width: 100%;
    height: 3px;

    background: var(--flow-accent);
}

.flow-number {
    display: block;

    margin-bottom: 20px;

    color: var(--flow-accent);

    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.flow-card h3 {
    margin-bottom: 8px;

    font-size: 1.02rem;
    line-height: 1.3;
}

.flow-card p {
    color: var(--muted);

    font-size: 0.9rem;
    line-height: 1.55;
}

.flow-blue {
    --flow-accent: var(--blue);
}

.flow-purple {
    --flow-accent: var(--purple);
}

.flow-indigo {
    --flow-accent: var(--accent);
}

.flow-green {
    --flow-accent: var(--green);
}

.flow-arrow {
    display: flex;
    align-items: center;
    justify-content: center;

    color: #999;

    font-size: 1.15rem;
}


/* =========================================
   START LEARNING
   ========================================= */

.start-learning {
    padding: 70px 0;

    border-top: 1px solid var(--border);
}

.class-card {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: space-between;

    min-height: 190px;

    padding: 28px 30px;

    background: var(--accent-soft);
    border: 1px solid #d9ddff;
    border-radius: 8px;

    overflow: hidden;

    transition:
        border-color 0.2s ease,
        transform 0.2s ease;
}

.class-card:hover {
    border-color: #bfc5ff;

    transform: translateY(-1px);
}

.class-card-content {
    position: relative;
    z-index: 2;
}

.card-label {
    margin-bottom: 7px;

    color: var(--accent);

    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
}

.class-card h3 {
    margin-bottom: 8px;

    color: var(--heading);

    font-size: 1.75rem;
    line-height: 1.2;
}

.class-card p:last-child {
    max-width: 600px;

    color: var(--text);

    font-size: 0.95rem;
    line-height: 1.55;
}

.class-card-visual {
    position: absolute;
    right: 82px;
    top: 50%;

    display: flex;
    flex-direction: column;
    gap: 4px;

    transform: translateY(-50%) rotate(-7deg);

    color: rgba(79, 70, 229, 0.16);

    font-size: 2.5rem;
    font-style: italic;
    line-height: 1;
    user-select: none;
}

.class-card-visual span:nth-child(2) {
    margin-left: 35px;
}

.class-card-visual span:nth-child(3) {
    margin-left: 12px;
}

.card-arrow {
    position: relative;
    z-index: 2;

    margin-left: 30px;

    color: var(--accent);

    font-size: 1.45rem;
}


/* =========================================
   PHILOSOPHY
   ========================================= */

.philosophy {
    display: flex;
    justify-content: center;
    align-items: center;

    padding: 88px 20px;

    background: var(--accent-soft);

    border-top: 1px solid #dfe2ff;
}

.philosophy-content {
    max-width: 700px;

    text-align: center;
}

.philosophy h2 {
    margin-bottom: 14px;

    color: var(--heading);

    font-size: clamp(1.8rem, 3vw, 2.35rem);
    line-height: 1.2;
}

.philosophy-content>p:last-child {
    color: var(--muted);

    font-size: 1.05rem;
    line-height: 1.65;
}


/* =========================================
   FOOTER
   ========================================= */

/* 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)
}

/* .copyright {
            width: 88%;
            max-width: 1100px;
            margin: 25px auto 0;
            padding-top: 14px;
            border-top: 1px solid var(--border);
            color: var(--muted);
            font-size: .72rem
        } */

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

body.dark {
    --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 .site-header {
    background: #181b20;
    border-color: #2a2e35;
}

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

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

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

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

body.dark .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 .flow-card,
body.dark .class-card {
    background: var(--surface);
    border-color: var(--border);
}

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

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

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

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

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

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


/* =========================================
   RESPONSIVENESS
   ========================================= */

@media (max-width: 768px) {

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

    .header-container {
        width: 100%;
    }

    .header-right {
        gap: 14px;
    }

    .main-nav {
        gap: 14px;
    }

    .main-nav a {
        font-size: 0.78rem;
    }

    .hero {
        min-height: auto;
        padding: 72px 20px 78px;
    }

    .hero-content {
        width: 100%;
    }

    .hero h1 {
        font-size: 2.35rem;
        line-height: 1.15;
    }

    .hero-description {
        max-width: 500px;
        font-size: 0.98rem;
    }

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

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

    .section-heading h2 {
        font-size: 1.9rem;
    }

    .how-it-works,
    .start-learning {
        padding: 58px 0;
    }

    .learning-flow {
        flex-direction: column;
        gap: 10px;
    }

    .flow-arrow {
        display: none;
    }

    .flow-card {
        padding: 19px;
    }

    .flow-number {
        margin-bottom: 12px;
    }

    .class-card {
        min-height: 175px;
        align-items: flex-start;

        padding: 22px;
    }

    .class-card h3 {
        font-size: 1.55rem;
    }

    .class-card-visual {
        right: 55px;

        font-size: 1.8rem;
    }

    .card-arrow {
        margin-left: 18px;
        font-size: 1.25rem;
    }

    .philosophy {
        padding: 70px 20px;
    }

    .philosophy h2 {
        font-size: 1.9rem;
    }

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

    .footer-container {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .copyright {
        width: 100%;
    }
}

@media (max-width: 480px) {

    .hero {
        padding-top: 64px;
        padding-bottom: 68px;
    }

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

    .hero-description {
        font-size: 0.94rem;
    }

    .class-card-visual {
        right: 42px;
        opacity: 0.8;
    }

    .card-arrow {
        margin-left: 10px;
    }
}