/* Richiest Home + Connected Marketing Pages */

/* ── TOKENS ──────────────────────────────────────────── */
:root {
    --dark: #393b44;
    --slate: #8d93ab;
    --mist: #d6e0f0;
    --offwhite: #f1f3f8;
    --white: #ffffff;
    --green: #4c9a6a;
    --accent: #8d93ab;
    --ink: #1a1c22;
}

/* ── RESET / BASE ────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: "DM Sans", sans-serif;
    color: var(--ink);
    background: var(--white);
    margin: 0;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: "Playfair Display", serif;
    line-height: 1.15;
    margin: 0;
}

/* Prevent Bootstrap from overriding section heading sizes */
.guides-section h2,
.guides-section h3,
.pillars h2,
.pillars h3,
.news-section h2,
.subscribe-section h2 {
    font-size: inherit;
}

.card-featured-body h3 {
    font-size: 1.7rem;
}
.card-small-body h3 {
    font-size: 1.05rem;
}

p {
    margin: 0;
}
a {
    color: inherit;
}
img {
    display: block;
}

/* ── BACKWARD COMPAT ─────────────────────────────────── */
.dark-div.py-5 {
    background: var(--dark) !important;
    position: relative;
    overflow: hidden;
}
.dark-div.py-5::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(
        circle,
        rgba(141, 147, 171, 0.18) 1px,
        transparent 1px
    );
    background-size: 28px 28px;
    pointer-events: none;
}
.dark-div.py-5 > * {
    position: relative;
    z-index: 1;
}

.row.dark-div,
.site-footer {
    background: var(--dark) !important;
    color: rgba(255, 255, 255, 0.8);
}
.row.dark-div a,
.site-footer a {
    color: rgba(255, 255, 255, 0.8);
}
.row.dark-div a:hover,
.site-footer a:hover {
    color: #fff;
}

/* ── UTILITY ─────────────────────────────────────────── */
.container-1280 {
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
    padding: 0 24px;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: "DM Sans", sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 4px;
}
.tag-green {
    background: #d4edda;
    color: #1a5c32;
}
.tag-red {
    background: #fde8e8;
    color: #8c1c1c;
}
.tag-blue {
    background: var(--mist);
    color: var(--dark);
}
.tag-dark {
    background: var(--dark);
    color: var(--white);
}

/* ── NAV ─────────────────────────────────────────────── */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white);
    border-bottom: 1px solid #e2e5ec;
}

/* ── HERO ────────────────────────────────────────────── */
.hero {
    background: var(--dark) !important;
    padding: 0;
    overflow: hidden;
    position: relative;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(
        circle,
        rgba(141, 147, 171, 0.18) 1px,
        transparent 1px
    );
    background-size: 28px 28px;
    pointer-events: none;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 0;
    min-height: 520px;
    position: relative;
    z-index: 1;
}

.hero-copy {
    padding: 80px 60px 80px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-eyebrow {
    font-family: "DM Sans", sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--slate);
    margin-bottom: 20px;
    animation: fadeUp 0.5s ease both;
    animation-delay: 0.1s;
    opacity: 0;
}

.hero h1 {
    font-size: clamp(2.4rem, 4vw, 3.6rem);
    color: var(--white);
    font-weight: 900;
    line-height: 1.08;
    margin-bottom: 24px;
    animation: fadeUp 0.5s ease both;
    animation-delay: 0.22s;
    opacity: 0;
}
.hero h1 em {
    font-style: italic;
    color: var(--mist);
}

.hero-sub {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.6;
    max-width: 500px;
    margin-bottom: 36px;
    font-weight: 300;
    animation: fadeUp 0.5s ease both;
    animation-delay: 0.34s;
    opacity: 0;
}

.hero-ctas {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    animation: fadeUp 0.5s ease both;
    animation-delay: 0.46s;
    opacity: 0;
}

.btn-primary-hero {
    background: var(--white);
    color: var(--dark);
    font-family: "DM Sans", sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 14px 28px;
    border-radius: 6px;
    border: none;
    text-decoration: none;
    transition:
        background 0.2s,
        transform 0.15s;
    display: inline-block;
}
.btn-primary-hero:hover {
    background: var(--offwhite);
    color: var(--dark);
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-ghost-hero {
    background: transparent;
    color: rgba(255, 255, 255, 0.82);
    font-family: "DM Sans", sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 14px 28px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-decoration: none;
    transition:
        border-color 0.2s,
        color 0.2s;
    display: inline-block;
}
.btn-ghost-hero:hover {
    border-color: rgba(255, 255, 255, 0.7);
    color: var(--white);
    text-decoration: none;
}

.hero-panel {
    background: rgba(255, 255, 255, 0.06);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 40px;
    gap: 32px;
}

.stat-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--slate);
    margin-bottom: 6px;
}
.stat-value {
    font-family: "Playfair Display", serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1;
}
.stat-note {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
}
.stat-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

/* ── THREE PILLARS ───────────────────────────────────── */
.pillars {
    padding: 80px 0;
    background: var(--white) !important;
}

.section-label {
    font-family: "DM Sans", sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--slate);
    margin-bottom: 12px;
}
.section-title {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    color: var(--dark);
    margin-bottom: 8px;
}
.section-sub {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
    font-weight: 300;
    max-width: 560px;
}

.pillars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    margin-top: 48px;
    border: 2px solid var(--dark);
    border-radius: 10px;
    overflow: hidden;
}

.pillar {
    padding: 40px 32px;
    background: var(--white);
    border-right: 2px solid var(--dark);
    transition: background 0.25s;
}
.pillar:last-child {
    border-right: none;
}
.pillar:hover {
    background: var(--offwhite);
}

.pillar-number {
    font-family: "Playfair Display", serif;
    font-size: 3rem;
    font-weight: 900;
    color: var(--mist);
    line-height: 1;
    margin-bottom: 16px;
}
.pillar h3 {
    font-size: 1.25rem;
    color: var(--dark);
    margin-bottom: 14px;
}
.pillar p {
    font-size: 0.92rem;
    color: #555;
    line-height: 1.65;
    font-weight: 300;
}

/* ── MARKET SECTION ──────────────────────────────────── */
.market-section {
    padding: 80px 0;
    background: var(--white) !important;
    border-top: 1px solid #e2e5ec;
}

.chart-frame {
    margin-top: 28px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e5ec;
    background: white;
}

/* ── FEATURED GUIDES ─────────────────────────────────── */
.guides-section {
    padding: 80px 0;
    background: var(--white) !important;
    border-top: 1px solid #e2e5ec;
}

.guides-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 16px;
}

.btn-see-all {
    font-family: "DM Sans", sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark);
    border: 2px solid var(--dark);
    padding: 10px 22px;
    border-radius: 6px;
    text-decoration: none;
    transition:
        background 0.2s,
        color 0.2s;
    white-space: nowrap;
}
.btn-see-all:hover {
    background: var(--dark);
    color: var(--white);
    text-decoration: none;
}

.card-featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 2px solid var(--dark);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 24px;
    text-decoration: none;
    transition: box-shadow 0.2s;
}
.card-featured:hover {
    box-shadow: 6px 6px 0 var(--dark);
}

.card-featured-img {
    width: 100%;
    height: 340px;
    object-fit: cover;
}

.card-featured-body {
    padding: 40px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--white);
}
.card-featured-body h3 {
    font-size: 1.7rem;
    color: var(--dark);
    margin: 12px 0 16px;
}
.card-featured-body p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.65;
    font-weight: 300;
    margin-bottom: 24px;
}

.card-meta {
    font-size: 0.78rem;
    color: #999;
    font-weight: 400;
}

.btn-card {
    display: inline-block;
    background: var(--dark);
    color: var(--white);
    font-family: "DM Sans", sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    transition: opacity 0.2s;
    align-self: flex-start;
}
.btn-card:hover {
    opacity: 0.85;
    color: var(--white);
    text-decoration: none;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 24px;
}

.card-small {
    border: 1.5px solid #e2e5ec;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    transition:
        border-color 0.2s,
        box-shadow 0.2s,
        transform 0.15s;
    display: flex;
    flex-direction: column;
    background: var(--white);
}
.card-small:hover {
    border-color: var(--dark);
    box-shadow: 4px 4px 0 var(--dark);
    transform: translate(-2px, -2px);
    text-decoration: none;
}

.card-small-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.card-small-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.card-small-body h3 {
    font-size: 1.05rem;
    color: var(--dark);
    margin: 10px 0;
    line-height: 1.3;
}
.card-small-body p {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.6;
    font-weight: 300;
    flex: 1;
    margin-bottom: 16px;
}

/* ── NEWS SECTION ────────────────────────────────────── */
.news-section {
    padding: 80px 0;
    background: var(--white) !important;
    border-top: 1px solid #e2e5ec;
}

.news-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 28px;
    margin-top: 40px;
}

.news-frame {
    border-radius: 10px;
    overflow: hidden;
    border: 1.5px solid #e2e5ec;
    background: white;
}

/* ── SUBSCRIBE BANNER ────────────────────────────────── */
.subscribe-section {
    background: var(--dark) !important;
    padding: 72px 0;
    position: relative;
    overflow: hidden;
}
.subscribe-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(
        circle,
        rgba(141, 147, 171, 0.12) 1px,
        transparent 1px
    );
    background-size: 28px 28px;
    pointer-events: none;
}

.subscribe-inner {
    position: relative;
    z-index: 1;
    max-width: 580px;
}
.subscribe-inner h2 {
    color: var(--white);
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    margin-bottom: 14px;
}
.subscribe-inner p {
    color: rgba(255, 255, 255, 0.65);
    font-size: 1rem;
    line-height: 1.6;
    font-weight: 300;
    margin-bottom: 28px;
}

.subscribe-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.subscribe-form input[type="email"] {
    flex: 1;
    min-width: 220px;
    padding: 13px 18px;
    border-radius: 6px;
    border: none;
    font-family: "DM Sans", sans-serif;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.12);
    color: white;
    outline: none;
}
.subscribe-form input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}
.subscribe-form input:focus {
    background: rgba(255, 255, 255, 0.18);
}

.subscribe-form button {
    padding: 13px 24px;
    border-radius: 6px;
    border: none;
    background: var(--white);
    color: var(--dark);
    font-family: "DM Sans", sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: opacity 0.2s;
}
.subscribe-form button:hover {
    opacity: 0.88;
}

/* ── FOOTER ──────────────────────────────────────────── */
.site-footer {
    background: var(--ink);
    padding: 60px 0 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 200px repeat(5, 1fr);
    gap: 32px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand h4 {
    color: var(--white);
    font-size: 1.3rem;
    margin-bottom: 10px;
}
.footer-brand p {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.8rem;
    line-height: 1.6;
    font-weight: 300;
}

.footer-col h5 {
    font-family: "DM Sans", sans-serif;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.footer-col a {
    display: block;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.78rem;
    text-decoration: none;
    margin-bottom: 7px;
    transition: color 0.15s;
}
.footer-col a:hover {
    color: rgba(255, 255, 255, 0.85);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 28px;
    flex-wrap: wrap;
    gap: 12px;
}
.footer-bottom p {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.78rem;
}
.footer-bottom-links {
    display: flex;
    gap: 20px;
}
.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.78rem;
    text-decoration: none;
}
.footer-bottom-links a:hover {
    color: rgba(255, 255, 255, 0.7);
}

/* ── RETURN TO TOP ───────────────────────────────────── */
#return-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--dark);
    width: 44px;
    height: 44px;
    display: none;
    justify-content: center;
    align-items: center;
    color: white;
    cursor: pointer;
    border-radius: 8px;
    z-index: 1000;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
    text-decoration: none;
    transition: opacity 0.2s;
}
#return-to-top:hover {
    opacity: 0.85;
    color: white;
}

/* ── SECTION RESETS (Bootstrap interference) ─────────── */
.hero,
.pillars,
.market-section,
.guides-section,
.news-section,
.subscribe-section {
    border-top: none !important;
    border-bottom: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.hero h1,
.hero h2,
.pillars h2,
.pillars h3,
.guides-section h2,
.guides-section h3,
.news-section h2,
.subscribe-section h2 {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0 !important;
}

.hero p,
.pillars p,
.guides-section p,
.news-section p,
.subscribe-section p {
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;
}

/* ── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 992px) {
    .hero-inner {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .hero-copy {
        padding: 60px 0 40px;
    }
    .hero-panel {
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        flex-direction: row;
        flex-wrap: wrap;
        gap: 24px;
        padding: 32px 0;
    }
    .stat-divider {
        display: none;
    }
    .pillars-grid {
        grid-template-columns: 1fr;
    }
    .pillar {
        border-right: none;
        border-bottom: 2px solid var(--dark);
    }
    .pillar:last-child {
        border-bottom: none;
    }
    .card-featured {
        grid-template-columns: 1fr;
    }
    .card-featured-img {
        height: 260px;
    }
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .news-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .guides-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .hero h1 {
        font-size: 2rem;
    }
}

/* ── ANIMATIONS ──────────────────────────────────────── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(22px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
