/* ============================================================
   TRADE THE MECHANICS — home.css
   Learning-first homepage
   ============================================================ */

.home-page {
    padding-top: var(--total-header);
}

.home-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(4.5rem, 8vw, 7.5rem) 0 clamp(4rem, 7vw, 6rem);
    background:
        radial-gradient(circle at 78% 24%, rgba(59, 130, 246, .12), transparent 34%),
        radial-gradient(circle at 20% 80%, rgba(34, 197, 94, .07), transparent 32%),
        linear-gradient(180deg, #07111b 0%, #060c13 100%);
    border-bottom: 1px solid var(--border);
}

.home-hero::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59,130,246,.45), transparent);
}

.home-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.03fr) minmax(420px, .97fr);
    gap: clamp(3rem, 6vw, 6rem);
    align-items: center;
}

.home-hero-copy h1 {
    max-width: 700px;
    font-size: clamp(3.8rem, 6.3vw, 6.5rem);
    line-height: .95;
    letter-spacing: .01em;
    margin-bottom: 1.5rem;
}

.home-hero-copy h1 span {
    color: var(--blue);
}

.hero-rule {
    width: 52px;
    height: 2px;
    background: var(--blue);
    margin: 1.6rem 0 1.4rem;
}

.home-hero-lead {
    max-width: 650px;
    color: #c7d6e1;
    font-family: 'Source Serif 4', serif;
    font-size: clamp(1.08rem, 1.6vw, 1.25rem);
    line-height: 1.8;
}

.hero-learning-link {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    margin-top: 2rem;
    color: var(--text);
    font-size: .9rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.hero-learning-link span {
    color: var(--green);
    font-size: 1.1rem;
}

.home-chart-comparison {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.mechanics-example {
    position: relative;
    min-width: 0;
    padding: 1rem;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    background: rgba(10, 21, 32, .72);
    box-shadow: 0 18px 60px rgba(0,0,0,.18);
}

.mechanics-example-label {
    display: inline-block;
    margin-bottom: .8rem;
    padding: .25rem .55rem;
    border-radius: 4px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.mechanics-example-label.positive {
    color: var(--green);
    background: var(--green-dim);
    border: 1px solid var(--green-border);
}

.mechanics-example-label.negative {
    color: #8fb6ff;
    background: var(--blue-dim);
    border: 1px solid var(--blue-border);
}

/* Fixed image containers. Replace only the image src paths later. */
.mechanics-chart-frame {
    width: 100%;
    height: 250px;
    overflow: hidden;
    border-radius: 8px;
    background: #08111b;
    border: 1px solid var(--border);
}

.mechanics-chart-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mechanics-example-result {
    margin-top: 1rem;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.positive-text { color: var(--green); }
.negative-text { color: var(--blue); }

.mechanics-example p {
    margin-top: .25rem;
    color: var(--text-muted);
    font-size: .94rem;
}

.home-why {
    padding: clamp(5rem, 8vw, 7rem) 0;
    background: #f3f0e9;
    color: #142238;
}

.home-section-heading {
    max-width: 760px;
    margin: 0 auto 3.5rem;
    text-align: center;
}

.home-section-heading .section-label {
    color: #64748b;
}

.home-section-heading h2 {
    color: #10233e;
    font-family: 'Source Serif 4', serif;
    font-size: clamp(2.4rem, 4vw, 3.6rem);
    letter-spacing: -.02em;
    line-height: 1.1;
    margin-bottom: .9rem;
}

.home-section-heading p {
    color: #526176;
    font-size: 1.05rem;
}

.home-benefit-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border-top: 1px solid rgba(15,35,62,.12);
    border-bottom: 1px solid rgba(15,35,62,.12);
}

.home-benefit {
    position: relative;
    padding: 2.2rem 1.4rem 2.4rem;
    border-right: 1px solid rgba(15,35,62,.12);
}

.home-benefit:last-child { border-right: none; }

.benefit-number {
    color: #3b82f6;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .14em;
    margin-bottom: 1rem;
}

.home-benefit h3 {
    color: #10233e;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: none;
    margin-bottom: .65rem;
}

.home-benefit p {
    color: #526176;
    font-size: .94rem;
    line-height: 1.65;
}

.home-foundation {
    padding: clamp(4.5rem, 8vw, 7rem) 0;
    background: #ebe7df;
    color: #142238;
}

.foundation-card {
    padding: clamp(2rem, 4vw, 3.4rem);
    background: #f8f6f1;
    border: 1px solid rgba(15,35,62,.12);
    border-radius: 12px;
    box-shadow: 0 24px 70px rgba(15,35,62,.08);
}

.foundation-heading {
    margin-bottom: 2.5rem;
}

.foundation-table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(15,35,62,.12);
    border-radius: 8px;
}

.foundation-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    background: #fff;
}

.foundation-table th {
    padding: .9rem 1rem;
    background: #0b203b;
    color: #fff;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-align: left;
    text-transform: uppercase;
}

.foundation-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(15,35,62,.1);
    vertical-align: middle;
}

.foundation-table tbody tr:last-child td { border-bottom: none; }
.foundation-table tbody tr:hover { background: #f7faff; }

.chapter-number {
    width: 54px;
    color: #617086;
    text-align: center;
}

.chapter-title {
    width: 26%;
    color: #10233e;
    font-weight: 700;
}

.chapter-teaser {
    color: #526176;
    line-height: 1.55;
}

.chapter-read {
    width: 145px;
    text-align: right;
}

.chapter-read a {
    display: inline-block;
    min-width: 122px;
    padding: .48rem .72rem;
    color: #2563eb;
    border: 1px solid rgba(37,99,235,.35);
    border-radius: 4px;
    font-size: .82rem;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
}

.chapter-read a:hover {
    color: #1d4ed8;
    background: rgba(37,99,235,.05);
    border-color: rgba(37,99,235,.55);
}

.foundation-note {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    max-width: 720px;
    margin: 2.6rem auto 0;
    align-items: start;
}

.foundation-note-mark {
    color: var(--blue);
    font-size: 2rem;
    line-height: 1;
}

.foundation-note h3 {
    color: #10233e;
    font-family: 'Source Serif 4', serif;
    font-size: 1.35rem;
    letter-spacing: -.01em;
    margin-bottom: .2rem;
}

.foundation-note p {
    color: #526176;
}

.foundation-empty {
    padding: 2rem;
    background: #fff;
    border: 1px solid rgba(15,35,62,.12);
    border-radius: 8px;
    text-align: center;
    color: #526176;
}

@media (max-width: 1040px) {
    .home-hero-grid {
        grid-template-columns: 1fr;
    }

    .home-chart-comparison {
        max-width: 760px;
    }

    .home-benefit-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-benefit {
        border-bottom: 1px solid rgba(15,35,62,.12);
    }

    .home-benefit:nth-child(2n) { border-right: none; }
}

@media (max-width: 680px) {
    .home-hero {
        padding-top: 3.5rem;
    }

    .home-chart-comparison {
        grid-template-columns: 1fr;
    }

    .mechanics-chart-frame {
        height: 260px;
    }

    .home-benefit-grid {
        grid-template-columns: 1fr;
    }

    .home-benefit {
        border-right: none;
    }

    .foundation-card {
        padding: 1.25rem;
    }
}

/* Homepage foundation list using the site's existing section/chapter data */
.foundation-sections {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-2);
}
.foundation-section + .foundation-section {
    border-top: 1px solid var(--border);
}
.foundation-section-title {
    display: flex;
    gap: .75rem;
    align-items: center;
    padding: .85rem 1.25rem;
    background: var(--bg-3);
    color: var(--text);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.foundation-section-title span {
    color: var(--green);
    white-space: nowrap;
}
.foundation-row {
    display: grid;
    grid-template-columns: 3.25rem minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.25rem;
    color: inherit;
    text-decoration: none;
    border-top: 1px solid var(--border);
    transition: background .2s ease;
}
.foundation-row:hover {
    background: rgba(255,255,255,.03);
}
.foundation-number {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem;
    color: var(--text-muted);
}
.foundation-title {
    font-family: 'Source Serif 4', serif;
    color: var(--text);
    font-size: 1rem;
}
.foundation-read {
    color: var(--green);
    font-size: .82rem;
    font-weight: 700;
    white-space: nowrap;
}
.home-blog-cta {
    padding: 6rem 0;
}
.home-blog-cta .blog-inner {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}
.home-blog-cta .blog-inner h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    letter-spacing: .02em;
    color: var(--text);
}
.home-blog-cta .blog-inner p {
    font-family: 'Source Serif 4', serif;
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 520px;
}
@media (max-width: 768px) {
    .foundation-row {
        grid-template-columns: 2.5rem minmax(0,1fr);
    }
    .foundation-read {
        grid-column: 2;
    }
    .home-blog-cta {
        padding: 3rem 0;
    }
    .home-blog-cta .blog-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem;
        gap: 1.5rem;
    }
}
.mechanics-chart-frame {
    width: 360px;
    max-width: 100%;
    height: 300px;
    overflow: hidden;
}

.mechanics-chart-frame img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
}
