/* ========================================
   GENERAL STYLES
======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --brand-navy: #123a63;
    --action-blue: #2563eb;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --background-soft: #f8fafc;
}

body {
    font-family: Arial, Helvetica, sans-serif;

    background-color: #ffffff;
    color: #1f2937;
}

main {
    width: 100%;
}


/* ========================================
   NAVBAR
======================================== */

header {
    position: relative;
    z-index: 10000;

    isolation: isolate;

    background-color: #ffffff;

    border-bottom: 1px solid #e5e7eb;
}

.site-nav {
    width: min(94%, 1320px);

    margin-inline: auto;
    padding-block: clamp(14px, 2vw, 20px);

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: clamp(20px, 3vw, 40px);
}


/* ========================================
   BRAND
======================================== */

.brand {
    display: flex;
    align-items: center;

    gap: 10px;

    flex-shrink: 0;

    text-decoration: none;

    color: #1f2937;

    font-size: clamp(18px, 1.6vw, 22px);
    font-weight: bold;
}

.brand img {
    width: clamp(45px, 4vw, 48px);
    height: clamp(45px, 4vw, 48px);

    object-fit: contain;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: clamp(18px, 1.6vw, 22px);
    font-weight: 700;

    line-height: 1.1;
}

.brand-tagline {
    margin-top: 4px;

    color: #64748b;

    font-size: clamp(8px, 0.8vw, 10px);
    font-weight: 400;

    letter-spacing: 1.4px;
    text-transform: uppercase;
}


/* ========================================
   NAVIGATION LINKS
======================================== */

.nav-menu,
.nav-dropdown,
.nav-submenu {
    list-style: none;
}

.nav-menu {
    display: grid;
    grid-template-columns:
        minmax(72px, 0.85fr)
        minmax(110px, 1fr)
        minmax(150px, 1.25fr)
        minmax(72px, 0.85fr);

    align-items: center;

    column-gap: clamp(8px, 1.2vw, 18px);
}

.nav-item {
    position: relative;

    display: flex;
    justify-content: center;
}

.nav-item > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-item > .nav-parent {
    justify-content: center;
}

.nav-item > a,
.nav-parent > a {
    color: #374151;

    font-size: clamp(14px, 1.2vw, 15px);
    font-weight: 500;

    text-decoration: none;

    transition: color 0.2s ease;
}

.nav-item > a:hover,
.nav-parent > a:hover {
    color: var(--action-blue);
}

.nav-parent {
    display: flex;
    align-items: center;

    gap: 4px;
}

.nav-toggle,
.nav-subtoggle {
    border: 0;
    background: transparent;

    color: #64748b;

    cursor: pointer;
}

.nav-toggle {
    width: 34px;
    height: 34px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-chevron {
    display: inline-block;

    font-size: 17px;
    line-height: 1;

    transition:
        transform 0.2s ease,
        color 0.2s ease;
}

.nav-item-dropdown.is-open > .nav-parent .nav-chevron {
    transform: rotate(90deg);
    color: var(--action-blue);
}


/* ========================================
   FIRST LEVEL DROPDOWN
======================================== */

.nav-dropdown {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;

    min-width: 245px;

    padding: 8px;

    display: none;

    background-color: #ffffff;

    border: 1px solid #e2e8f0;
    border-radius: 10px;

    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.10);
}

.nav-item-dropdown.is-open > .nav-dropdown {
    display: block;
}

.nav-dropdown::before {
    content: "";

    position: absolute;
    top: -15px;
    right: 0;
    left: 0;

    height: 15px;
}

.nav-dropdown > li > a,
.nav-subparent {
    min-height: 42px;

    padding: 10px 12px;

    display: flex;
    align-items: center;

    border-radius: 7px;

    color: #334155;

    font-size: 14px;
    font-weight: 500;

    text-decoration: none;

    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.nav-dropdown > li > a:hover,
.nav-subparent:hover {
    background-color: #f8fafc;
    color: var(--action-blue);
}


/* ========================================
   LEARN SECOND LEVEL
======================================== */

.nav-subitem-dropdown {
    position: relative;
}

.nav-subparent {
    width: 100%;
    min-height: 44px;

    justify-content: space-between;

    gap: 16px;

    border: 0;

    text-align: left;

    cursor: pointer;
}

.nav-subtoggle {
    display: flex;
    align-items: center;
}

.nav-subitem-dropdown.is-open > .nav-subparent .nav-chevron {
    transform: rotate(90deg);
    color: var(--action-blue);
}

.nav-submenu {
    margin: 0 6px 6px;
    padding: 4px 0 4px 12px;

    display: none;

    border-left: 2px solid #e2e8f0;
}

.nav-subitem-dropdown.is-open > .nav-submenu {
    display: block;
}

.nav-submenu a {
    padding: 8px 10px;

    display: block;

    border-radius: 6px;

    color: #64748b;

    font-size: 13px;
    font-weight: 500;

    text-decoration: none;

    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.nav-submenu a:hover {
    background-color: #f8fafc;
    color: var(--action-blue);
}

.nav-toggle:focus-visible,
.nav-subtoggle:focus-visible,
.nav-menu a:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.22);
    outline-offset: 2px;
}


.mobile-menu-toggle,
.nav-mobile-overview {
    display: none;
}

/* ========================================
   HERO
======================================== */

.hero {
    width: min(94%, 1320px);

    margin-inline: auto;

    padding-block:
        clamp(40px, 5vw, 75px)
        clamp(55px, 6vw, 85px);

    display: grid;

    grid-template-columns:
        minmax(0, 0.95fr)
        minmax(0, 1.25fr);

    align-items: center;

    gap: clamp(30px, 5vw, 80px);
}


/* ========================================
   HERO LEFT SIDE
======================================== */

.hero-content {
    width: 100%;
}

.hero-eyebrow {
    margin-bottom: 15px;

    color: var(--action-blue);

    font-size: clamp(11px, 1vw, 13px);
    font-weight: 700;

    letter-spacing: 1.5px;
}

.hero-content h1 {
    margin-bottom: clamp(18px, 2vw, 22px);

    color: var(--text-dark);

    font-size: clamp(40px, 5vw, 62px);
    line-height: 1.05;
}

.hero-content h1 span {
    color: var(--brand-navy);
}

.hero-description {
    max-width: 520px;

    margin-bottom: clamp(25px, 3vw, 32px);

    color: var(--text-muted);

    font-size: clamp(16px, 1.6vw, 19px);
    line-height: 1.55;
}


/* ========================================
   HERO BUTTONS
======================================== */

.hero-buttons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 15px;
}

.hero-buttons a {
    padding:
        clamp(12px, 1.4vw, 14px)
        clamp(18px, 2vw, 24px);

    border-radius: 8px;

    text-decoration: none;

    font-size: 14px;
    font-weight: 600;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.primary-btn {
    background-color: var(--action-blue);
    color: #ffffff;
}

.primary-btn:hover {
    transform: translateY(-2px);

    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.18);
}

.secondary-btn {
    background-color: #ffffff;

    border: 1px solid #dbe2ea;

    color: #334155;
}

.secondary-btn:hover {
    transform: translateY(-2px);

    border-color: #bfdbfe;

    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}


/* ========================================
   HERO CHART
======================================== */

.hero-chart-card {
    padding: clamp(22px, 2.6vw, 30px);
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.07);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: clamp(14px, 2vw, 22px);
}

.chart-eyebrow {
    margin-bottom: 7px;
    color: var(--action-blue) !important;
    font-size: 10px !important;
    font-weight: 700;
    letter-spacing: 1.3px;
}

.chart-header h2 {
    margin-bottom: 6px;
    color: var(--text-dark);
    font-size: clamp(19px, 2vw, 22px);
}

.chart-header p:not(.chart-eyebrow) {
    color: var(--text-muted);
    font-size: clamp(13px, 1.3vw, 14px);
}

.chart-value {
    padding: 10px 14px;
    background-color: #eff6ff;
    border-radius: 9px;
    white-space: nowrap;
}

.chart-value span {
    display: block;
    margin-bottom: 2px;
    color: #475569;
    font-size: 11px;
}

.chart-value strong {
    color: #1d4ed8;
    font-size: clamp(20px, 2vw, 23px);
}

.chart-summary {
    margin-top: clamp(18px, 2vw, 22px);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.chart-summary > div {
    padding: 9px 12px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.chart-summary span {
    display: block;
    margin-bottom: 2px;
    color: var(--text-muted);
    font-size: 10px;
}

.chart-summary strong {
    color: var(--text-dark);
    font-size: 14px;
}

.chart-image {
    height: clamp(205px, 23vw, 255px);
    margin-top: clamp(16px, 2vw, 22px);
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
}

.growth-chart {
    width: 100%;
    height: 100%;
    display: block;
}

.chart-grid-line {
    stroke: #e2e8f0;
    stroke-width: 1;
}

.chart-area {
    fill: rgba(37, 99, 235, 0.07);
}

.chart-line {
    fill: none;
    stroke: #2563eb;
    stroke-width: 3;
    stroke-linecap: round;
}

.chart-contribution-line {
    fill: none;
    stroke: #94a3b8;
    stroke-width: 2.25;
    stroke-linecap: round;
    stroke-dasharray: 7 7;
}

.chart-point {
    fill: #2563eb;
    stroke: #ffffff;
    stroke-width: 3;
}

.chart-axis-label {
    fill: #94a3b8;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 11px;
}

.chart-legend {
    margin-top: 4px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    color: var(--text-muted);
    font-size: 11px;
}

.chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.chart-legend-line {
    width: 22px;
    height: 0;
    display: inline-block;
    border-top: 2px solid;
}

.chart-legend-line-growth {
    border-color: #2563eb;
}

.chart-legend-line-contributions {
    border-color: #94a3b8;
    border-top-style: dashed;
}


/* ========================================
   PAGE HEADER
======================================== */

.page-header {
    width: min(94%, 1320px);

    margin-inline: auto;

    padding-block:
        clamp(50px, 6vw, 80px)
        clamp(35px, 4vw, 50px);
}

.page-header h1 {
    margin-bottom: 15px;

    color: var(--text-dark);

    font-size: clamp(34px, 4.5vw, 48px);
}

.page-header p {
    max-width: 650px;

    color: #475569;

    font-size: clamp(16px, 1.6vw, 18px);
    line-height: 1.6;
}


/* ========================================
   EXPLORE SECTION
======================================== */

.explore {
    padding-block: clamp(52px, 6vw, 76px);

    background-color: #f1f5f9;
}

.section-heading {
    width: min(94%, 1320px);

    margin-inline: auto;
    margin-bottom: clamp(30px, 4vw, 40px);
	text-align: center;
}

.section-heading > span {
    display: block;

    margin-bottom: 10px;

    color: var(--action-blue);

    font-size: 12px;
    font-weight: 700;

    letter-spacing: 1.5px;
}

.section-heading h2 {
    margin-bottom: 12px;

    color: var(--text-dark);

    font-size: clamp(28px, 3.5vw, 36px);
}

.section-heading p {
    max-width: 650px;

    margin-inline: auto;

    color: var(--text-muted);

    font-size: clamp(15px, 1.4vw, 16px);
    line-height: 1.6;
}


/* ========================================
   EXPLORE CARDS
======================================== */

.explore-cards {
    width: min(94%, 1000px);
    margin-inline: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(18px, 2vw, 24px);
}

.explore-card {
    min-height: 185px;
    padding: clamp(26px, 3vw, 34px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease,
        background-color 0.2s ease;
}

.explore-card:hover {
    transform: translateY(-3px);
    background-color: #ffffff;
    border-color: #93c5fd;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.explore-card:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.28);
    outline-offset: 3px;
}

.explore-card h3 {
    margin-bottom: 12px;
    color: var(--text-dark);
    font-size: clamp(20px, 2vw, 23px);
}

.explore-card p {
    max-width: 520px;
    margin: 0;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.65;
}


/* ========================================
   FOOTER
======================================== */

.site-footer {
    background-color: #0f172a;
    color: #ffffff;
}

.footer-container {
    width: min(94%, 1320px);

    margin-inline: auto;

    padding-block: clamp(35px, 4vw, 45px);

    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;

    gap: clamp(30px, 4vw, 40px);
}

.footer-brand {
    max-width: 420px;
}

.footer-brand strong {
    display: block;

    margin-bottom: 10px;

    font-size: 18px;
}

.footer-brand p {
    color: #94a3b8;

    font-size: 14px;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;

    gap: clamp(18px, 2.5vw, 28px);
}

.footer-links a {
    color: #cbd5e1;

    text-decoration: none;

    font-size: 14px;

    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-bottom {
    width: min(94%, 1320px);

    margin-inline: auto;

    padding-block: 18px;

    border-top: 1px solid #1e293b;
}

.footer-bottom p {
    color: #64748b;

    font-size: 12px;
}


/* ========================================
   CALCULATOR HUB
======================================== */

.calculator-hub-header {
    width: min(90%, 760px);

    margin-inline: auto;

    padding-block:
        clamp(45px, 5vw, 65px)
        clamp(25px, 3vw, 35px);

    text-align: center;
}

.calculator-hub-header h1 {
    margin-bottom: 15px;

    color: var(--brand-navy);

    font-size: clamp(32px, 4vw, 44px);
    line-height: 1.15;
}

.calculator-hub-header > p:last-child {
    max-width: 620px;

    margin-inline: auto;

    color: var(--text-muted);

    font-size: clamp(15px, 1.5vw, 17px);
    line-height: 1.6;
}

.calculator-hub {
    width: min(94%, 1100px);

    margin-inline: auto;

    padding-block:
        clamp(15px, 2vw, 20px)
        clamp(55px, 6vw, 80px);

    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(280px, 1fr));

    gap: clamp(18px, 2vw, 22px);
}


/* ========================================
   CALCULATOR CARDS
======================================== */

.calculator-card {
    min-height: 190px;

    padding: clamp(22px, 2.5vw, 26px);

    background-color: #ffffff;

    border: 1px solid #e2e8f0;
    border-radius: 12px;

    text-decoration: none;
}

.calculator-card-active {
    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.calculator-card-active:hover {
    transform: translateY(-3px);

    border-color: #bfdbfe;

    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.calculator-card-top {
    margin-bottom: 16px;

    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;

    gap: 15px;
}

.calculator-card h2 {
    color: var(--text-dark);

    font-size: clamp(18px, 2vw, 21px);
}

.calculator-card p {
    max-width: 450px;

    color: var(--text-muted);

    font-size: 14px;
    line-height: 1.6;
}


/* ========================================
   CALCULATOR CARD LINK
======================================== */

.calculator-card-link {
    display: inline-block;

    margin-top: 22px;

    color: var(--action-blue);

    font-size: 14px;
    font-weight: 700;
}

/* ========================================
   RESPONSIVE - STRUCTURAL CHANGES ONLY
======================================== */

@media (max-width: 800px) {

    /* HERO CHANGES FROM TWO COLUMNS TO ONE */

    .hero {
        grid-template-columns: 1fr;
    }


    /* MOBILE NAVIGATION */

    .site-nav {
        position: relative;

        flex-direction: row;
        align-items: center;

        padding-block: 12px;
    }

    .mobile-menu-toggle {
        width: 44px;
        height: 44px;

        margin-left: auto;

        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;

        gap: 5px;

        border: 0;
        border-radius: 8px;

        background: transparent;

        cursor: pointer;
    }

    .mobile-menu-toggle span {
        width: 22px;
        height: 2px;

        display: block;

        background-color: #334155;

        border-radius: 999px;

        transition:
            transform 0.2s ease,
            opacity 0.2s ease;
    }

    .site-nav.mobile-menu-open .mobile-menu-toggle span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .site-nav.mobile-menu-open .mobile-menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    .site-nav.mobile-menu-open .mobile-menu-toggle span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .nav-menu {
        position: absolute;
        z-index: 10001;

        top: 100%;
        right: 0;
        left: 0;

        width: 100%;

        padding: 10px 0 14px;

        display: none;

        background-color: #ffffff;

        border-top: 1px solid #e5e7eb;
        border-bottom: 1px solid #e5e7eb;

        box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    }

    .site-nav.mobile-menu-open .nav-menu {
        display: block;
    }

    .nav-item {
        width: 100%;

        display: block;
    }

    .nav-item > a,
    .nav-parent {
        width: 100%;
        min-height: 48px;

        padding: 12px 16px;
    }

    .nav-item > a {
        display: flex;
        align-items: center;

        /* Keep Home and About aligned with Learn and Calculators */
        justify-content: flex-start;
    }

.nav-parent {
    justify-content: space-between;
    gap: 12px;
}

.nav-parent > a {
    flex: 1;
}

.nav-toggle {
    width: 44px;
    height: 44px;

    flex: 0 0 44px;
}

    .nav-dropdown {
        position: static;

        width: 100%;
        min-width: 0;

        padding: 4px 12px 10px 24px;

        transform: none;

        background-color: #f8fafc;

        border: 0;
        border-radius: 0;

        box-shadow: none;
    }

    .nav-dropdown::before {
        display: none;
    }

    .nav-mobile-overview {
        display: block;
    }

    .nav-mobile-overview > a {
        color: var(--action-blue) !important;
        font-weight: 600 !important;
    }

    .nav-dropdown > li > a,
    .nav-subparent {
        min-height: 46px;

        padding: 10px 12px;
    }

    .nav-submenu {
        margin: 0 0 6px 10px;
        padding: 2px 0 4px 12px;
    }

    .nav-submenu a {
        min-height: 42px;

        padding: 10px;

        display: flex;
        align-items: center;
    }

    .nav-chevron {
        font-size: 18px;
    }


    /* EXPLORE CARDS */

    .explore-cards {
        width: min(92%, 680px);
        grid-template-columns: 1fr;
    }

}

.calculator-hub-layout {
    width: min(96%, 1600px);
    margin-inline: auto;

    display: grid;

    grid-template-columns:
        minmax(120px, 200px)
        minmax(0, 1100px)
        minmax(120px, 200px);

    justify-content: center;
    align-items: start;

    gap: clamp(20px, 3vw, 40px);
}

.hub-side-ad {
    min-height: 500px;

    display: flex;
    justify-content: center;
    align-items: flex-start;

    padding-top: 10px;

    color: #94a3b8;

    font-size: 10px;
    letter-spacing: 0.5px;
}

@media (max-width: 1200px) {

    .calculator-hub-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .hub-side-ad {
        display: none;
    }


@media (max-width: 520px) {

    .chart-summary {
        grid-template-columns: 1fr;
    }

    .chart-value {
        width: 100%;
    }

}
