/* =================================================================
   Finance Tools Pro - Homepage-only styles
   Loaded ONLY on index.html. All selectors scoped under body.home
   to guarantee zero impact on other pages.
   ================================================================= */

body.home {
    /* Homepage accent palette (alongside existing brand blue) */
    --home-blue: #0078D4;
    --home-blue-dark: #005BA1;
    --home-blue-deep: #002F5F;
    --home-coral: #FF6B6B;
    --home-amber: #F5A524;
    --home-green: #10B981;
    --home-violet: #7C3AED;
    --home-ink: #0F172A;
    --home-slate: #475569;
    --home-mist: #F1F5F9;
    --home-cloud: #F8FAFC;
    --home-line: #E2E8F0;

    background: var(--home-cloud);
}

body.home .home-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* =========================================================
   TRANSPARENT-OVER-HERO HEADER (desktop only)
   On the homepage, when the page is at the top, the fixed
   header overlays the gradient hero with white type. Once
   the user scrolls, the global `body.scrolled` rules kick in
   and the header reverts to the solid-white default.
   ========================================================= */
@media (min-width: 768px) {
    body.home {
        padding-top: 0;
    }

    body.home .home-hero {
        padding-top: calc(70px + 4rem);
    }

    body.home:not(.scrolled) .header {
        background-color: transparent;
        border-bottom-color: transparent;
        box-shadow: none;
    }

    body.home:not(.scrolled) .logo,
    body.home:not(.scrolled) .nav-link {
        color: #fff;
    }

    body.home:not(.scrolled) .nav-link:hover,
    body.home:not(.scrolled) .nav-link:active {
        background-color: rgba(255, 255, 255, 0.14);
        color: #fff;
    }

    body.home:not(.scrolled) .nav-link[aria-current="page"] {
        color: #fff;
    }

    body.home:not(.scrolled) .nav-link[aria-current="page"]::after {
        background: #fff;
    }
}

/* =========================================================
   HERO
   ========================================================= */
body.home .home-hero {
    position: relative;
    overflow: hidden;
    padding: 4rem 0 5rem;
    background:
        radial-gradient(1200px 600px at 85% -10%, rgba(124, 58, 237, 0.35) 0%, transparent 60%),
        radial-gradient(900px 500px at -10% 110%, rgba(16, 185, 129, 0.25) 0%, transparent 55%),
        linear-gradient(135deg, #0B2A52 0%, #0078D4 55%, #1E63D7 100%);
    color: #fff;
}

body.home .home-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent 70%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent 70%);
    pointer-events: none;
}

body.home .home-hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3rem;
    align-items: center;
}

body.home .home-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.875rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 1.25rem;
}

body.home .home-eyebrow-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--home-green);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.25);
}

body.home .home-hero h1 {
    color: #fff;
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
    margin: 0 0 1rem;
    font-weight: 800;
}

body.home .home-hero h1 .home-accent {
    background: linear-gradient(135deg, #FFD27A 0%, #FF8FB1 50%, #B6F0FF 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

body.home .home-hero-sub {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.125rem;
    line-height: 1.6;
    margin: 0 0 1.75rem;
    max-width: 38ch;
}

body.home .home-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}

body.home .home-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.375rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    border: 1px solid transparent;
    cursor: pointer;
}

body.home .home-btn-primary {
    background: #fff;
    color: var(--home-blue-deep);
    box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.35);
}

body.home .home-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px -10px rgba(0, 0, 0, 0.45);
    color: var(--home-blue-deep);
}

body.home .home-btn-ghost {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

body.home .home-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

body.home .home-hero-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

body.home .home-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8125rem;
    font-weight: 500;
}

body.home .home-pill svg {
    width: 14px;
    height: 14px;
    stroke: var(--home-green);
}

/* Hero EMI card */
body.home .home-emi-card {
    position: relative;
    background: rgba(255, 255, 255, 0.98);
    color: var(--home-ink);
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow:
        0 30px 60px -20px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

body.home .home-emi-card::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255, 211, 122, 0.6), rgba(124, 58, 237, 0.4));
    z-index: -1;
    filter: blur(20px);
    opacity: 0.5;
}

body.home .home-emi-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

body.home .home-emi-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--home-slate);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0;
}

body.home .home-emi-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--home-green);
    background: rgba(16, 185, 129, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
}

body.home .home-emi-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.875rem;
    margin-bottom: 1.25rem;
}

body.home .home-emi-field {
    grid-column: span 1;
}

body.home .home-emi-field.full {
    grid-column: 1 / -1;
}

body.home .home-emi-label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.8125rem;
    color: var(--home-slate);
    font-weight: 600;
    margin-bottom: 0.375rem;
}

body.home .home-emi-label .home-emi-value {
    color: var(--home-ink);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

body.home .home-emi-input {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--home-line);
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--home-ink);
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    font-variant-numeric: tabular-nums;
}

body.home .home-emi-input:focus {
    outline: none;
    border-color: var(--home-blue);
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.15);
}

body.home .home-emi-slider-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

body.home .home-emi-step {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid var(--home-line);
    background: #fff;
    color: var(--home-blue);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.05s ease;
}

body.home .home-emi-step:hover:not(:disabled) {
    background: var(--home-mist);
    border-color: var(--home-blue);
}

body.home .home-emi-step:active:not(:disabled) {
    transform: translateY(1px);
}

body.home .home-emi-step:disabled {
    color: #CBD5E1;
    background: var(--home-cloud);
    cursor: not-allowed;
}

body.home .home-emi-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: var(--home-line);
    border-radius: 999px;
    outline: none;
    cursor: pointer;
    flex: 1 1 auto;
    min-width: 0;
}

body.home .home-emi-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--home-blue);
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 120, 212, 0.4);
    cursor: pointer;
}

body.home .home-emi-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--home-blue);
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 120, 212, 0.4);
    cursor: pointer;
}

body.home .home-emi-result {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    color: #fff;
    border-radius: 14px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

body.home .home-emi-result-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.125rem;
}

body.home .home-emi-result-value {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

body.home .home-emi-result-sub {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.125rem;
}

body.home .home-emi-cta {
    display: block;
    text-align: center;
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--home-blue);
    color: #fff;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: background 0.15s ease;
}

body.home .home-emi-cta:hover {
    background: var(--home-blue-dark);
    color: #fff;
}

/* =========================================================
   TRUST STRIP
   ========================================================= */
body.home .home-trust-strip {
    background: #fff;
    border-bottom: 1px solid var(--home-line);
    padding: 1rem 0;
}

body.home .home-trust-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1.25rem 2rem;
    color: var(--home-slate);
    font-size: 0.875rem;
    font-weight: 500;
}

body.home .home-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

body.home .home-trust-check {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.12);
    color: var(--home-green);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

body.home .home-trust-check svg {
    width: 12px;
    height: 12px;
}

/* =========================================================
   CALCULATOR GRID (12 cards)
   ========================================================= */
body.home .home-calcs {
    padding: 4rem 0 3rem;
}

body.home .home-section-head {
    text-align: center;
    margin-bottom: 2.5rem;
}

body.home .home-section-eyebrow {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--home-blue);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

body.home .home-section-head h2 {
    font-size: clamp(1.625rem, 2.5vw, 2.25rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--home-ink);
    margin: 0 0 0.5rem;
}

body.home .home-section-head p {
    color: var(--home-slate);
    max-width: 56ch;
    margin: 0 auto;
    font-size: 1rem;
}

body.home .home-calc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

body.home .home-calc-card {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--home-line);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

body.home .home-calc-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: var(--card-accent, var(--home-blue));
    opacity: 0.9;
}

body.home .home-calc-card:hover {
    transform: translateY(-4px);
    border-color: transparent;
    box-shadow:
        0 18px 36px -12px rgba(15, 23, 42, 0.18),
        0 6px 12px -6px rgba(15, 23, 42, 0.1);
}

body.home .home-calc-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    font-size: 1.625rem;
    background: var(--card-accent-soft, rgba(0, 120, 212, 0.1));
    margin-bottom: 1rem;
    line-height: 1;
}

body.home .home-calc-card h3 {
    color: var(--home-ink);
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    letter-spacing: -0.01em;
    text-align: left;
}

body.home .home-calc-card p {
    color: var(--home-slate);
    font-size: 0.9375rem;
    line-height: 1.55;
    margin: 0 0 1.25rem;
    flex-grow: 1;
    text-align: left;
}

body.home .home-calc-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--card-accent, var(--home-blue));
    font-weight: 700;
    font-size: 0.9375rem;
    margin-top: auto;
}

body.home .home-calc-link svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

body.home .home-calc-card:hover .home-calc-link svg {
    transform: translateX(3px);
}

/* Per-card accent colors */
body.home .home-calc-card[data-accent="blue"]   { --card-accent: #0078D4; --card-accent-soft: rgba(0, 120, 212, 0.10); }
body.home .home-calc-card[data-accent="violet"] { --card-accent: #7C3AED; --card-accent-soft: rgba(124, 58, 237, 0.10); }
body.home .home-calc-card[data-accent="amber"]  { --card-accent: #F59E0B; --card-accent-soft: rgba(245, 158, 11, 0.12); }
body.home .home-calc-card[data-accent="coral"]  { --card-accent: #F43F5E; --card-accent-soft: rgba(244, 63, 94, 0.10); }
body.home .home-calc-card[data-accent="green"]  { --card-accent: #10B981; --card-accent-soft: rgba(16, 185, 129, 0.12); }
body.home .home-calc-card[data-accent="teal"]   { --card-accent: #0EA5E9; --card-accent-soft: rgba(14, 165, 233, 0.10); }
body.home .home-calc-card[data-accent="pink"]   { --card-accent: #EC4899; --card-accent-soft: rgba(236, 72, 153, 0.10); }
body.home .home-calc-card[data-accent="indigo"] { --card-accent: #6366F1; --card-accent-soft: rgba(99, 102, 241, 0.10); }

/* =========================================================
   SCENARIOS
   ========================================================= */
body.home .home-scenarios {
    padding: 3rem 0 4rem;
}

body.home .home-scenarios-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

body.home .home-scenario-col {
    background: #fff;
    border: 1px solid var(--home-line);
    border-radius: 16px;
    padding: 1.5rem;
}

body.home .home-scenario-col h3 {
    font-size: 0.9375rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--home-slate);
    margin: 0 0 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--home-line);
    text-align: left;
}

body.home .home-scenario-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

body.home .home-scenario-list li {
    border-bottom: 1px solid var(--home-mist);
}

body.home .home-scenario-list li:last-child {
    border-bottom: none;
}

body.home .home-scenario-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    color: var(--home-ink);
    font-size: 0.9375rem;
    text-decoration: none;
    transition: color 0.15s ease, padding 0.15s ease;
}

body.home .home-scenario-list a:hover {
    color: var(--home-blue);
    padding-left: 0.375rem;
}

body.home .home-scenario-list a::after {
    content: "→";
    color: var(--home-line);
    transition: transform 0.15s ease, color 0.15s ease;
}

body.home .home-scenario-list a:hover::after {
    color: var(--home-blue);
    transform: translateX(3px);
}

body.home .home-scenario-all {
    font-weight: 700;
    color: var(--home-blue) !important;
}

/* =========================================================
   LONG-FORM CONTENT (about, why use, how to use)
   ========================================================= */
body.home .home-content {
    padding: 3rem 0;
    background: #fff;
    border-top: 1px solid var(--home-line);
}

body.home .home-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem 3rem;
}

body.home .home-content-block h2 {
    font-size: 1.5rem;
    color: var(--home-ink);
    margin: 0 0 0.75rem;
    letter-spacing: -0.01em;
}

body.home .home-content-block h3 {
    font-size: 1.0625rem;
    color: var(--home-ink);
    margin: 1.25rem 0 0.375rem;
    letter-spacing: -0.005em;
}

body.home .home-content-block p,
body.home .home-content-block li {
    color: var(--home-slate);
    font-size: 0.9375rem;
    line-height: 1.65;
}

body.home .home-content-block ul {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
}

body.home .home-content-block li {
    margin-bottom: 0.375rem;
}

body.home .home-content-block li strong {
    color: var(--home-ink);
}

/* =========================================================
   CTA BANNER
   ========================================================= */
body.home .home-cta-banner {
    margin: 3rem 0;
    padding: 2.5rem 2rem;
    border-radius: 20px;
    background:
        radial-gradient(800px 300px at 80% 50%, rgba(255, 211, 122, 0.25) 0%, transparent 60%),
        linear-gradient(135deg, #0078D4 0%, #002F5F 100%);
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
}

body.home .home-cta-banner h3 {
    color: #fff;
    font-size: clamp(1.25rem, 2vw, 1.625rem);
    margin: 0 0 0.5rem;
    letter-spacing: -0.01em;
}

body.home .home-cta-banner p {
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 1.5rem;
    font-size: 0.9375rem;
}

body.home .home-cta-banner-row {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* =========================================================
   DISCLAIMER
   ========================================================= */
body.home .home-disclaimer {
    padding: 1.5rem 0 3rem;
    color: var(--home-slate);
    font-size: 0.8125rem;
    text-align: center;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

body.home .home-disclaimer strong {
    color: var(--home-ink);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 960px) {
    body.home .home-hero {
        padding: 3rem 0 3.5rem;
    }
    body.home .home-hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    body.home .home-calc-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    body.home .home-scenarios-grid {
        grid-template-columns: 1fr;
    }
    body.home .home-content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 560px) {
    body.home .home-hero {
        padding: 2.5rem 0 3rem;
    }
    body.home .home-hero h1 {
        font-size: 2rem;
    }
    body.home .home-hero-sub {
        font-size: 1rem;
    }
    body.home .home-emi-card {
        padding: 1.25rem;
    }
    body.home .home-emi-fields {
        grid-template-columns: 1fr;
    }
    body.home .home-calc-grid {
        grid-template-columns: 1fr;
    }
    body.home .home-cta-row {
        flex-direction: column;
        align-items: stretch;
    }
    body.home .home-btn {
        justify-content: center;
    }
    body.home .home-trust-row {
        gap: 0.75rem 1.25rem;
        font-size: 0.8125rem;
    }
}
