﻿/* ==========================================================================
   OctaCalculator - Homepage
   ========================================================================== */

@import url('https://cdn.jsdelivr.net/npm/dseg@0.46.0/css/dseg7-classic.min.css');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap');

body.home-page .main-content {
    padding-top: 0.25rem;
}

/* ---- Hero ---- */
.home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
    gap: clamp(1.5rem, 3vw, 2.5rem);
    align-items: start;
    max-width: 1160px;
    margin: 0 auto 4rem;
    padding: 0.5rem clamp(0.5rem, 2vw, 1.25rem) 2rem;
    min-height: auto;
}

.home-hero-copy {
    text-align: left;
    min-width: 0;
    padding-top: clamp(1.25rem, 3.5vw, 2.75rem);
}

.home-hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    line-height: 1.1;
    letter-spacing: -0.035em;
    color: var(--color-secondary);
    margin: 0 0 1.25rem;
}

.home-hero-lead {
    font-size: clamp(1.05rem, 1.75vw, 1.2rem);
    line-height: 1.65;
    color: var(--color-text-muted);
    margin: 0 0 0.85rem;
    max-width: 36rem;
}

.home-hero-trust {
    font-size: clamp(0.92rem, 1.4vw, 1rem);
    line-height: 1.55;
    color: var(--color-text-light);
    margin: 0 0 1.85rem;
    max-width: 34rem;
}

.home-hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* ---- Hero formula ticker ---- */
.home-hero-formula-ticker {
    margin-top: clamp(1.75rem, 3.5vw, 2.5rem);
    max-width: 36rem;
    border: 1px solid color-mix(in srgb, var(--color-primary) 22%, var(--color-border));
    border-radius: var(--radius-md);
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--color-primary) 4%, var(--color-bg-card)) 0%, var(--color-bg-card) 100%),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 11px,
            color-mix(in srgb, var(--color-primary) 7%, transparent) 11px,
            color-mix(in srgb, var(--color-primary) 7%, transparent) 12px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 11px,
            color-mix(in srgb, var(--color-primary) 7%, transparent) 11px,
            color-mix(in srgb, var(--color-primary) 7%, transparent) 12px
        );
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        var(--shadow-sm);
    overflow: hidden;
    position: relative;
}

.home-hero-formula-ticker::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 0%,
        color-mix(in srgb, var(--color-primary) 6%, transparent) 50%,
        transparent 100%
    );
    background-size: 100% 3px;
    opacity: 0.35;
    pointer-events: none;
    animation: hero-formula-scan 4.5s linear infinite;
}

.hero-formula-ticker-head {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.85rem;
    border-bottom: 1px solid color-mix(in srgb, var(--color-primary) 16%, var(--color-border));
    background: color-mix(in srgb, var(--color-surface-inverse) 6%, var(--color-bg-card));
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-light);
}

.hero-formula-ticker-led {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 2px color-mix(in srgb, #22c55e 25%, transparent), 0 0 8px #22c55e;
    animation: hero-formula-led 2s ease-in-out infinite;
    flex-shrink: 0;
}

.hero-formula-ticker-label {
    color: var(--color-text-muted);
    font-weight: 500;
}

.hero-formula-ticker-tag {
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--color-primary) 35%, var(--color-border));
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-size: 0.58rem;
    font-weight: 500;
}

.hero-formula-ticker-coords {
    margin-left: auto;
    color: color-mix(in srgb, var(--color-primary) 55%, var(--color-text-light));
    font-size: 0.58rem;
    opacity: 0.85;
}

.hero-formula-ticker-viewport {
    position: relative;
    overflow: hidden;
    padding: 0.7rem 0;
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.hero-formula-ticker-track {
    display: flex;
    width: max-content;
    animation: hero-formula-scroll 55s linear infinite;
}

.hero-formula-ticker-list {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    flex-shrink: 0;
}

.hero-formula-item {
    display: inline-flex;
    align-items: baseline;
    gap: 0.55rem;
    padding: 0 1.35rem;
    border-right: 1px solid color-mix(in srgb, var(--color-primary) 14%, var(--color-border));
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    white-space: nowrap;
}

.hero-formula-code {
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: color-mix(in srgb, var(--color-primary) 70%, var(--color-text-light));
    opacity: 0.9;
}

.hero-formula-expr {
    font-size: clamp(0.82rem, 1.35vw, 0.95rem);
    font-weight: 400;
    color: var(--color-secondary);
    letter-spacing: 0.02em;
}

.hero-formula-expr sup {
    font-size: 0.72em;
    vertical-align: super;
    line-height: 0;
}

@keyframes hero-formula-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes hero-formula-led {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

@keyframes hero-formula-scan {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

[data-theme="dark"] .home-hero-formula-ticker {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--color-primary) 8%, var(--color-bg-card)) 0%, var(--color-bg-card) 100%),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 11px,
            color-mix(in srgb, var(--color-primary) 12%, transparent) 11px,
            color-mix(in srgb, var(--color-primary) 12%, transparent) 12px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 11px,
            color-mix(in srgb, var(--color-primary) 12%, transparent) 11px,
            color-mix(in srgb, var(--color-primary) 12%, transparent) 12px
        );
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        var(--shadow-sm);
}

[data-theme="dark"] .hero-formula-ticker-head {
    background: color-mix(in srgb, var(--color-surface-inverse) 35%, var(--color-bg-card));
}

[data-theme="dark"] .hero-formula-expr {
    color: var(--color-text-main);
}

@media (prefers-reduced-motion: reduce) {
    .hero-formula-ticker-track,
    .hero-formula-ticker-led,
    .home-hero-formula-ticker::after {
        animation: none;
    }

    .hero-formula-ticker-viewport {
        overflow-x: auto;
        mask-image: none;
        scrollbar-width: thin;
    }

    .hero-formula-ticker-track {
        transform: none;
    }
}

/* ---- Hero exchange rates ticker ---- */
.home-hero-exchange-rates {
    margin-top: clamp(0.85rem, 1.8vw, 1.15rem);
    max-width: 36rem;
}

/* Shared FX ticker palette (hero + live banner) */
.exchange-rates-ticker {
    --fx-emerald: #10b981;
    --fx-emerald-bright: #34d399;
    --fx-emerald-dim: #059669;
    --fx-teal-deep: #022c22;
    --fx-teal-mid: #064e3b;
    --fx-teal-light: #0d9488;
    --fx-mint: #6ee7b7;
    --fx-glow: rgba(52, 211, 153, 0.55);
    --fx-glow-soft: rgba(16, 185, 129, 0.18);
}

.home-hero-exchange-rates .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hero-exchange-stripe {
    display: flex;
    align-items: stretch;
    min-height: 2.65rem;
    border-radius: var(--radius-md);
    border: 1px solid color-mix(in srgb, var(--fx-emerald) 42%, #065f46);
    background:
        repeating-linear-gradient(
            -55deg,
            transparent,
            transparent 6px,
            rgba(255, 255, 255, 0.018) 6px,
            rgba(255, 255, 255, 0.018) 7px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 3px,
            rgba(52, 211, 153, 0.04) 3px,
            rgba(52, 211, 153, 0.04) 4px
        ),
        linear-gradient(135deg, var(--fx-teal-deep) 0%, var(--fx-teal-mid) 52%, #047857 100%);
    box-shadow:
        inset 0 1px 0 rgba(110, 231, 183, 0.12),
        inset 0 -1px 0 rgba(0, 0, 0, 0.22),
        0 6px 20px var(--fx-glow-soft),
        0 0 0 1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    position: relative;
}

.hero-exchange-stripe::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(2, 44, 34, 0.92) 0%,
        transparent 14%,
        transparent 78%,
        rgba(2, 44, 34, 0.88) 100%
    );
    pointer-events: none;
    z-index: 1;
}

.hero-exchange-stripe::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(52, 211, 153, 0.14) 50%,
        transparent 100%
    );
    background-size: 100% 4px;
    opacity: 0.45;
    pointer-events: none;
    animation: hero-exchange-scan 5s linear infinite;
}

.hero-exchange-badge {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
    padding: 0 0.85rem 0 0.75rem;
    border-right: 1px solid rgba(52, 211, 153, 0.28);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, transparent 100%),
        rgba(0, 0, 0, 0.18);
}

.hero-exchange-live-led {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--fx-emerald-bright);
    box-shadow:
        0 0 0 2px rgba(52, 211, 153, 0.25),
        0 0 10px var(--fx-emerald-bright),
        0 0 18px var(--fx-glow);
    animation: hero-exchange-pulse 1.8s ease-in-out infinite;
    flex-shrink: 0;
}

.hero-exchange-live-text {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: clamp(0.82rem, 2vw, 0.95rem);
    font-weight: 700;
    letter-spacing: 0.22em;
    text-indent: 0.22em;
    color: var(--fx-mint);
    text-shadow:
        0 0 8px var(--fx-glow),
        0 0 16px rgba(52, 211, 153, 0.35);
    line-height: 1;
    animation: hero-exchange-live-glow 1.8s ease-in-out infinite;
}

.hero-exchange-live-sub {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.52rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    color: rgba(110, 231, 183, 0.55);
    padding: 0.15rem 0.35rem;
    border: 1px solid rgba(52, 211, 153, 0.22);
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.2);
}

.hero-exchange-ticker-viewport {
    position: relative;
    z-index: 2;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.hero-exchange-ticker-track {
    display: flex;
    width: max-content;
    animation: hero-exchange-scroll 38s linear infinite;
}

.hero-exchange-ticker-list {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
    flex-shrink: 0;
}

.hero-exchange-item {
    display: flex;
    align-items: center;
}

.hero-exchange-pair {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1.1rem;
    border-right: 1px dashed rgba(52, 211, 153, 0.2);
    text-decoration: none;
    color: inherit;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.hero-exchange-pair:hover,
.hero-exchange-pair:focus-visible {
    background: rgba(52, 211, 153, 0.08);
    outline: none;
}

.hero-exchange-flags {
    display: inline-flex;
    align-items: center;
    gap: 0.1rem;
    font-size: 0.78rem;
    line-height: 1;
    filter: saturate(1.05);
}

.hero-exchange-flag-sep {
    font-size: 0.55rem;
    color: rgba(110, 231, 183, 0.45);
    font-weight: 500;
}

.hero-exchange-code {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.07em;
    color: rgba(167, 243, 208, 0.72);
}

.hero-exchange-rate {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: clamp(0.78rem, 1.8vw, 0.88rem);
    font-weight: 500;
    letter-spacing: 0.03em;
    color: #ecfdf5;
    text-shadow: 0 0 12px rgba(52, 211, 153, 0.25);
}

.hero-exchange-change {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.58rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 0.1rem 0.35rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.22);
}

.hero-exchange-change--up {
    color: #4ade80;
}

.hero-exchange-change--down {
    color: #fca5a5;
}

.hero-exchange-change--flat {
    color: rgba(167, 243, 208, 0.55);
}

.hero-exchange-arrow {
    font-size: 0.48rem;
    line-height: 1;
}

.hero-exchange-meta {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 0.1rem;
    flex-shrink: 0;
    padding: 0.35rem 0.75rem;
    border-left: 1px solid rgba(52, 211, 153, 0.28);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, transparent 100%),
        rgba(0, 0, 0, 0.2);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
}

.hero-exchange-meta--live {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 0 0.85rem;
}

.hero-exchange-meta--live .hero-exchange-convert {
    flex-shrink: 0;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(52, 211, 153, 0.35);
    background: rgba(0, 0, 0, 0.18);
    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

.hero-exchange-meta--live .hero-exchange-convert:hover,
.hero-exchange-meta--live .hero-exchange-convert:focus-visible {
    border-color: rgba(110, 231, 183, 0.55);
    background: rgba(16, 185, 129, 0.14);
}

.hero-exchange-updated {
    font-size: 0.52rem;
    letter-spacing: 0.04em;
    color: rgba(167, 243, 208, 0.55);
    white-space: nowrap;
}

.hero-exchange-updated::before {
    content: "Updated ";
    opacity: 0.75;
}

.hero-exchange-convert {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--fx-emerald-bright);
    text-decoration: none;
    transition: color 0.2s ease;
}

.hero-exchange-convert svg {
    width: 0.75rem;
    height: 0.75rem;
    transition: transform 0.2s ease;
}

.hero-exchange-convert:hover,
.hero-exchange-convert:focus-visible {
    color: var(--fx-mint);
    outline: none;
}

.hero-exchange-convert:hover svg,
.hero-exchange-convert:focus-visible svg {
    transform: translateX(2px);
}

@keyframes hero-exchange-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes hero-exchange-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.55;
        transform: scale(0.88);
    }
}

@keyframes hero-exchange-live-glow {
    0%, 100% {
        opacity: 1;
        text-shadow:
            0 0 8px var(--fx-glow),
            0 0 16px rgba(52, 211, 153, 0.35);
    }
    50% {
        opacity: 0.82;
        text-shadow:
            0 0 14px var(--fx-glow),
            0 0 28px rgba(52, 211, 153, 0.55),
            0 0 40px rgba(16, 185, 129, 0.25);
    }
}

@keyframes hero-exchange-scan {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

[data-theme="dark"] .hero-exchange-stripe {
    border-color: color-mix(in srgb, var(--fx-emerald) 50%, #047857);
    box-shadow:
        inset 0 1px 0 rgba(110, 231, 183, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.35),
        0 8px 24px rgba(0, 0, 0, 0.35),
        0 0 24px var(--fx-glow-soft);
}

@media (max-width: 520px) {
    .hero-exchange-badge {
        padding: 0 0.55rem 0 0.6rem;
        gap: 0.3rem;
    }

    .hero-exchange-live-sub {
        display: none;
    }

    .hero-exchange-live-text {
        letter-spacing: 0.16em;
        text-indent: 0.16em;
        font-size: 0.78rem;
    }

    .hero-exchange-meta {
        padding: 0.3rem 0.5rem;
    }

    .hero-exchange-updated {
        display: none;
    }

    .hero-exchange-pair {
        padding: 0.5rem 0.85rem;
        gap: 0.35rem;
    }

    .hero-exchange-flags {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-exchange-ticker-track,
    .hero-exchange-live-led,
    .hero-exchange-live-text,
    .hero-exchange-stripe::after {
        animation: none;
    }

    .hero-exchange-ticker-viewport {
        overflow-x: auto;
        mask-image: none;
        scrollbar-width: thin;
        scrollbar-color: rgba(52, 211, 153, 0.35) transparent;
    }

    .hero-exchange-ticker-track {
        transform: none;
    }

    .hero-exchange-convert svg {
        transition: none;
    }
}

/* ---- Live exchange rates band (below hero) ---- */
.home-live-exchange-rates {
    width: 100vw;
    margin: -1.5rem calc(50% - 50vw) 2.75rem;
    padding: clamp(1.1rem, 2.5vw, 1.5rem) 0 clamp(1.25rem, 2.5vw, 1.65rem);
    background:
        radial-gradient(120% 80% at 50% 0%, rgba(16, 185, 129, 0.1) 0%, transparent 55%),
        linear-gradient(180deg, color-mix(in srgb, #064e3b 6%, var(--color-bg)) 0%, var(--color-bg) 100%);
}

.home-live-exchange-rates__inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 clamp(0.75rem, 2vw, 1.25rem);
}

.home-live-exchange-rates__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-bottom: 0.75rem;
}

.home-live-exchange-rates__title-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.65rem;
}

.home-live-exchange-rates__title {
    margin: 0;
    font-size: clamp(1rem, 2vw, 1.15rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-secondary);
}

.home-live-exchange-rates__badge {
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, #10b981 40%, var(--color-border));
    background: color-mix(in srgb, #10b981 10%, var(--color-bg-card));
    color: #059669;
    font-size: 0.62rem;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.home-live-exchange-rates__date {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.4rem 0.75rem 0.4rem 0.6rem;
    border-radius: var(--radius-md);
    border: 1px solid color-mix(in srgb, #10b981 28%, var(--color-border));
    background:
        linear-gradient(145deg, color-mix(in srgb, #10b981 8%, var(--color-bg-card)) 0%, var(--color-bg-card) 100%);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset;
}

.home-live-exchange-rates__date-icon {
    display: inline-flex;
    width: 1.65rem;
    height: 1.65rem;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: color-mix(in srgb, #10b981 14%, transparent);
    color: #059669;
    flex-shrink: 0;
}

.home-live-exchange-rates__date-icon svg {
    width: 0.95rem;
    height: 0.95rem;
}

.home-live-exchange-rates__date-copy {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.35rem;
    line-height: 1.2;
    white-space: nowrap;
}

.home-live-exchange-rates__date-label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--color-secondary);
}

.home-live-exchange-rates__date-sep {
    font-size: 0.78rem;
    color: var(--color-text-light);
}

.home-live-exchange-rates__date-value {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--color-text-muted);
}

.home-live-exchange-rates__ticker .hero-exchange-stripe {
    min-height: 3rem;
    border-radius: calc(var(--radius-md) + 2px);
}

.home-live-exchange-rates__ticker .hero-exchange-badge {
    border-right: none;
}

.home-live-exchange-rates__ticker .hero-exchange-pair {
    border-right: none;
}

.home-live-exchange-rates__ticker .hero-exchange-rate {
    font-size: clamp(0.95rem, 2.2vw, 1.08rem);
}

.home-live-exchange-rates__ticker .hero-exchange-meta {
    padding: 0.45rem 0.85rem;
    border-left: none;
}

[data-theme="dark"] .home-live-exchange-rates {
    background:
        radial-gradient(120% 80% at 50% 0%, rgba(16, 185, 129, 0.14) 0%, transparent 55%),
        linear-gradient(180deg, rgba(2, 44, 34, 0.45) 0%, var(--color-bg) 100%);
}

[data-theme="dark"] .home-live-exchange-rates__badge {
    color: var(--fx-mint, #6ee7b7);
}

[data-theme="dark"] .home-live-exchange-rates__date {
    border-color: color-mix(in srgb, #10b981 36%, var(--color-border));
    background:
        linear-gradient(145deg, rgba(2, 44, 34, 0.55) 0%, var(--color-bg-card) 100%);
}

[data-theme="dark"] .home-live-exchange-rates__date-icon {
    color: var(--fx-mint, #6ee7b7);
}

@media (max-width: 640px) {
    .home-live-exchange-rates__head {
        flex-direction: column;
        align-items: flex-start;
    }

    .home-live-exchange-rates__date {
        width: 100%;
    }

    .hero-exchange-meta--live {
        padding: 0 0.65rem;
    }

    .hero-exchange-meta--live .hero-exchange-convert {
        align-self: center;
    }
}


.home-hero-calc-wrap {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    overflow: visible;
    min-width: 0;
    padding: 0 clamp(1rem, 2.5vw, 1.75rem) 0;
}

@media (min-width: 768px) {
    .home-hero {
        padding-top: 0;
        padding-right: 0;
    }

    .home-hero-calc-wrap {
        justify-content: flex-end;
        align-self: start;
        padding: 0;
        margin-top: -0.15rem;
    }

    .home-hero-calc-stage {
        margin-left: auto;
        justify-content: flex-end;
        transform: translateX(1.5rem);
    }
}

/* ---- Hero calculator stage ---- */
.home-hero-calc-stage {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    max-width: 400px;
    padding: 0.5rem 0.75rem 1rem 1.25rem;
    min-height: auto;
    overflow: visible;
}

/* Ambient backdrop (blobs only) */
.hero-calc-ambient {
    position: absolute;
    inset: -32px -36px -32px -36px;
    z-index: 0;
    pointer-events: none;
    overflow: visible;
}

.hero-calc-blob {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.hero-calc-blob--purple {
    width: 560px;
    height: 560px;
    left: 50%;
    top: 42%;
    transform: translate(-48%, -50%);
    background: radial-gradient(circle, rgba(108, 92, 231, 0.12) 0%, transparent 68%);
}

.hero-calc-blob--coral {
    width: 300px;
    height: 300px;
    left: 68%;
    top: 62%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(255, 118, 117, 0.08) 0%, transparent 70%);
}

@media (prefers-reduced-motion: no-preference) {
    .hero-calc-blob--purple {
        animation: hero-blob-drift-a 20s ease-in-out infinite alternate;
    }

    .hero-calc-blob--coral {
        animation: hero-blob-drift-b 20s ease-in-out infinite alternate-reverse;
    }
}

@keyframes hero-blob-drift-a {
    from { transform: translate(-48%, -50%); }
    to { transform: translate(calc(-48% + 30px), calc(-50% - 24px)); }
}

@keyframes hero-blob-drift-b {
    from { transform: translate(-50%, -50%); }
    to { transform: translate(calc(-50% - 22px), calc(-50% + 30px)); }
}

/* ---- Hero calculator body (cartoon character) ---- */
.hero-calc-character {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    user-select: none;
    transform: rotate(-1.5deg);
    transition: transform 400ms ease;
    filter: drop-shadow(0 18px 28px rgba(108, 92, 231, 0.2));
}

[data-theme="dark"] .hero-calc-character {
    filter: none;
}

.home-hero-calc-stage:hover .hero-calc-character,
.hero-calc-character:focus-within {
    transform: rotate(0deg);
}

/* Cartoon limbs */
.hero-calc-hand {
    position: absolute;
    top: 42%;
    width: 38px;
    height: 74px;
    z-index: 1;
    pointer-events: none;
}

.hero-calc-hand::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 20px;
    height: 46px;
    margin-left: -10px;
    border-radius: 18px;
    background: linear-gradient(165deg, #E8E0FF 0%, #D6CBFF 100%);
    border: 1px solid rgba(108, 92, 231, 0.2);
    box-shadow:
        inset 2px 2px 4px rgba(255, 255, 255, 0.7),
        inset -1px -2px 4px rgba(108, 92, 231, 0.1),
        2px 6px 14px rgba(108, 92, 231, 0.18);
}

.hero-calc-hand::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 34px;
    height: 30px;
    margin-left: -17px;
    border-radius: 55% 55% 48% 48%;
    background: linear-gradient(180deg, #E4DCFF 0%, #D2C6FF 100%);
    border: 1px solid rgba(108, 92, 231, 0.18);
    box-shadow:
        inset 1px 2px 3px rgba(255, 255, 255, 0.75),
        0 5px 12px rgba(108, 92, 231, 0.16);
}

.hero-calc-hand--left {
    left: -30px;
    transform: rotate(18deg);
    transform-origin: top center;
}

.hero-calc-hand--right {
    right: -30px;
    transform: rotate(-18deg) scaleX(-1);
    transform-origin: top center;
}

.hero-calc-feet {
    display: flex;
    justify-content: center;
    gap: 3.5rem;
    margin-top: -6px;
    z-index: 1;
    pointer-events: none;
}

.hero-calc-foot {
    display: block;
    width: 38px;
    height: 24px;
    border-radius: 50% 50% 42% 42%;
    background: linear-gradient(180deg, #E4DCFF 0%, #D0C4FF 100%);
    border: 1px solid rgba(108, 92, 231, 0.18);
    box-shadow:
        inset 1px 2px 3px rgba(255, 255, 255, 0.7),
        0 6px 16px rgba(108, 92, 231, 0.18);
}

@media (prefers-reduced-motion: no-preference) {
    .hero-calc-hand--left {
        animation: hero-calc-hand-sway-l 4s ease-in-out infinite;
    }

    .hero-calc-hand--right {
        animation: hero-calc-hand-sway-r 4s ease-in-out infinite;
    }

    .home-hero-calc-stage:hover .hero-calc-hand--right,
    .hero-calc-character:focus-within .hero-calc-hand--right {
        animation: hero-calc-hand-wave 600ms ease-in-out;
    }
}

@keyframes hero-calc-hand-sway-l {
    0%, 100% { transform: rotate(14deg); }
    50% { transform: rotate(22deg); }
}

@keyframes hero-calc-hand-sway-r {
    0%, 100% { transform: rotate(-14deg) scaleX(-1); }
    50% { transform: rotate(-22deg) scaleX(-1); }
}

@keyframes hero-calc-hand-wave {
    0%, 100% { transform: rotate(-18deg) scaleX(-1); }
    30% { transform: rotate(-38deg) scaleX(-1); }
    60% { transform: rotate(-8deg) scaleX(-1); }
}

.hero-calc-body {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 300px;
    min-height: 480px;
    border-radius: 58px;
    background:
        radial-gradient(ellipse 90% 60% at 22% 6%, rgba(255, 255, 255, 0.85) 0%, transparent 55%),
        linear-gradient(175deg, #EDE6FF 0%, #E0D4FF 45%, #D4C4FF 100%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 4px 10px rgba(10, 37, 64, 0.07),
        0 14px 36px rgba(108, 92, 231, 0.22),
        0 28px 56px rgba(99, 91, 255, 0.16);
    padding: 1.65rem 1.2rem 1.1rem;
    border: 1.5px solid rgba(108, 92, 231, 0.24);
    overflow: visible;
}

[data-theme="dark"] .hero-calc-hand::before {
    border: none;
}

[data-theme="dark"] .hero-calc-hand::after,
[data-theme="dark"] .hero-calc-foot {
    border: none;
}

[data-theme="dark"] .hero-calc-body {
    background:
        radial-gradient(ellipse 90% 60% at 22% 6%, rgba(255, 255, 255, 0.08) 0%, transparent 55%),
        linear-gradient(175deg, #1E2640 0%, #181F35 42%, #141A2E 100%);
    border-color: rgba(124, 119, 255, 0.2);
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.35),
        0 28px 56px rgba(99, 91, 255, 0.14);
}

[data-theme="dark"] .hero-calc-hand::before {
    background: linear-gradient(165deg, #242D48 0%, #1A2238 100%);
    box-shadow:
        inset 1px 1px 3px rgba(255, 255, 255, 0.06),
        2px 4px 10px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .hero-calc-hand::after,
[data-theme="dark"] .hero-calc-foot {
    background: linear-gradient(180deg, #222B45 0%, #1A2238 100%);
    box-shadow:
        inset 1px 1px 2px rgba(255, 255, 255, 0.05),
        0 4px 10px rgba(0, 0, 0, 0.35);
}

.hero-calc-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.65rem;
    min-height: 24px;
    padding: 0 0.15rem;
}

.hero-calc-solar {
    display: flex;
    gap: 4px;
}

.hero-calc-solar span {
    width: 12px;
    height: 5px;
    border-radius: 3px;
    background: #CBD5E0;
    opacity: 0.7;
}

.hero-calc-status {
    display: flex;
    gap: 5px;
    align-items: center;
}

.hero-calc-status span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #6C5CE7;
    opacity: 0.55;
    box-shadow: 0 0 6px rgba(108, 92, 231, 0.35);
}

[data-theme="dark"] .hero-calc-solar span {
    background: #4A5568;
}

/* Display bezel + LCD face */
.hero-calc-screen {
    position: relative;
    background: #141E19;
    border-radius: 18px;
    padding: 0.5rem;
    margin-bottom: 1.15rem;
    box-shadow:
        inset 0 2px 6px rgba(0, 0, 0, 0.35),
        inset 0 -1px 0 rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .hero-calc-screen {
    background: #080F0C;
}

.hero-calc-screen-inset {
    position: relative;
    background: #1C2B22;
    border-radius: 22px 22px 16px 16px / 20px 20px 14px 14px;
    padding: 0.65rem 0.85rem 0.75rem;
    min-height: 108px;
    box-shadow: inset 0 3px 12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.hero-calc-screen-inset::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    border-radius: inherit;
}

[data-theme="dark"] .hero-calc-screen-inset {
    background: #0A1210;
}

.hero-calc-expr {
    position: relative;
    z-index: 2;
    font-family: 'DSEG7 Classic', 'Share Tech Mono', ui-monospace, monospace;
    font-size: 0.72rem;
    color: rgba(168, 230, 185, 0.75);
    text-align: right;
    min-height: 1rem;
    margin-bottom: 0.2rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hero-calc-screen-inset--idle .hero-calc-expr {
    display: none;
}

.hero-calc-lcd-face {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: transform 400ms ease, top 400ms ease, left 400ms ease;
}

.hero-calc-lcd-face-glyph,
.hero-calc-lcd-face-hint,
.hero-calc-display {
    font-family: 'DSEG7 Classic', 'Share Tech Mono', ui-monospace, monospace;
    color: #C8F7D8;
    text-shadow: 0 0 8px rgba(72, 187, 120, 0.4);
}

.hero-calc-lcd-face-glyph {
    display: block;
    line-height: 1;
    letter-spacing: 0.06em;
    white-space: nowrap;
    transition: font-size 400ms ease, transform 400ms ease;
}

.hero-calc-lcd-face-hint {
    display: block;
    margin-top: 0.85rem;
    font-size: 14px;
    line-height: 1.2;
    opacity: 0.85;
    letter-spacing: 0.04em;
}

.hero-calc-screen-inset--idle .hero-calc-lcd-face {
    min-height: 96px;
    padding-bottom: 0.15rem;
}

.hero-calc-screen-inset--idle .hero-calc-lcd-face-glyph {
    font-size: clamp(40px, 12vw, 56px);
    margin-bottom: 0.1rem;
}

.hero-calc-screen-inset--idle .hero-calc-display {
    display: none;
}

.hero-calc-screen-inset--active {
    min-height: 84px;
}

.hero-calc-screen-inset--active .hero-calc-lcd-face {
    position: absolute;
    top: 0.65rem;
    left: 0.85rem;
    align-items: flex-start;
    min-height: 0;
}

.hero-calc-screen-inset--active .hero-calc-lcd-face-glyph {
    font-size: clamp(16px, 4.5vw, 20px);
}

.hero-calc-screen-inset--active .hero-calc-lcd-face-hint {
    display: none;
}

.hero-calc-display {
    position: relative;
    z-index: 2;
    font-size: clamp(1.65rem, 5vw, 2rem);
    text-align: right;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-height: 2.2rem;
    padding-top: 0.15rem;
    transition: transform 0.15s ease, opacity 0.25s ease;
}

.hero-calc-screen-inset--active .hero-calc-display {
    padding-top: 1.35rem;
}

.hero-calc-bounce {
    transform: scale(1.04);
}

.hero-calc-glow-pulse {
    animation: hero-calc-glow-pulse 0.55s ease;
}

@keyframes hero-calc-glow-pulse {
    0%, 100% {
        text-shadow: 0 0 8px rgba(72, 187, 120, 0.4);
    }
    50% {
        text-shadow: 0 0 18px rgba(72, 187, 120, 0.78), 0 0 28px rgba(72, 187, 120, 0.35);
    }
}

.hero-calc-fade-out {
    opacity: 0;
}

.hero-calc-fade-in {
    opacity: 1;
}

@keyframes hero-calc-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
}

.hero-calc-screen-inset.hero-calc-shake {
    animation: hero-calc-shake 0.42s ease;
}

.hero-calc-screen-inset.hero-calc-shake .hero-calc-display {
    color: #F9A8A8;
    text-shadow: 0 0 8px rgba(248, 113, 113, 0.45);
}

/* Keypad */
.hero-calc-keypad {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 0 0.05rem;
}

.hero-calc-key {
    min-height: 44px;
    aspect-ratio: 1;
    border: none;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.08s ease, border-bottom-width 0.08s ease, box-shadow 0.08s ease, background-color 0.08s ease;
}

/* Number keys: soft neumorphic keycaps */
.hero-calc-key-num {
    background: linear-gradient(180deg, #FFFFFF 0%, #F3F0FA 100%);
    color: var(--color-secondary);
    border: 1px solid rgba(108, 92, 231, 0.1);
    border-bottom: 3px solid #D8D0E8;
    box-shadow:
        0 2px 5px rgba(10, 37, 64, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.hero-calc-key-num:active {
    transform: translateY(3px);
    border-bottom-width: 0;
}

[data-theme="dark"] .hero-calc-key-num {
    background: #1E2940;
    color: var(--color-text-main);
    border-color: rgba(255, 255, 255, 0.08);
    border-bottom-color: #12182A;
}

.hero-calc-key-zero {
    grid-column: span 2;
    aspect-ratio: auto;
    border-radius: 14px;
}

/* Top row: pill/circle function keys */
.hero-calc-key-fn {
    border-radius: 999px;
    background: linear-gradient(180deg, #FFF0EE 0%, #FEE8E6 100%);
    color: #C53030;
    border: 1px solid rgba(197, 48, 48, 0.1);
    border-bottom: 3px solid #F5C4C0;
    box-shadow:
        0 2px 4px rgba(197, 48, 48, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.hero-calc-key-fn:active {
    transform: translateY(3px);
    border-bottom-width: 0;
}

[data-theme="dark"] .hero-calc-key-fn {
    background: rgba(255, 94, 91, 0.18);
    color: #FCA5A5;
    border-bottom-color: rgba(0, 0, 0, 0.25);
}

.hero-calc-key-op {
    background: var(--color-primary-light);
    color: var(--color-primary);
    border: 1px solid rgba(99, 91, 255, 0.12);
    border-bottom: 3px solid rgba(99, 91, 255, 0.22);
    box-shadow: none;
    border-radius: 14px;
}

.hero-calc-key-op:active {
    transform: translateY(3px);
    border-bottom-width: 0;
}

[data-theme="dark"] .hero-calc-key-op {
    background: rgba(124, 119, 255, 0.2);
    color: #A5B4FC;
    border-bottom-color: rgba(0, 0, 0, 0.3);
}

/* Equals: hero circle */
.hero-calc-key-eq {
    width: 54px;
    height: 54px;
    min-height: 54px;
    aspect-ratio: 1;
    border-radius: 50%;
    justify-self: end;
    align-self: center;
    background: var(--color-primary);
    color: #FFFFFF;
    font-size: 1.35rem;
    font-weight: 700;
    border: none;
    border-bottom: 3px solid #4F46E5;
    box-shadow:
        0 0 22px rgba(99, 91, 255, 0.45),
        0 4px 0 #4F46E5;
}

.hero-calc-key-eq:active {
    transform: translateY(3px);
    border-bottom-width: 0;
    box-shadow: 0 0 18px rgba(99, 91, 255, 0.4);
    background: var(--color-primary-hover);
}

.hero-calc-brand {
    margin-top: 0.85rem;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    pointer-events: none;
    user-select: none;
}

.hero-calc-brand-octa {
    color: #2D3748;
}

.hero-calc-brand-calc {
    color: #6C5CE7;
}

[data-theme="dark"] .hero-calc-brand-octa {
    color: rgba(226, 232, 240, 0.85);
}

[data-theme="dark"] .hero-calc-brand-calc {
    color: #A29BFE;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .hero-calc-blob {
        animation: none !important;
    }

    .hero-calc-character {
        transform: none !important;
        transition: none;
    }

    .hero-calc-hand {
        animation: none !important;
    }

    .hero-calc-lcd-face,
    .hero-calc-lcd-face-glyph {
        transition: none;
    }
}

/* ---- Shared homepage sections ---- */
.home-section {
    margin-bottom: 4rem;
    content-visibility: auto;
    contain-intrinsic-size: auto 520px;
}

/* Pause decorative loops when scrolled out of view (see motion-pause.js) */
.is-offscreen,
.is-offscreen * {
    animation-play-state: paused !important;
}

.home-section-head {
    margin-bottom: 1.5rem;
}

.home-section-head h2 {
    margin: 0 0 0.35rem;
    font-size: clamp(1.35rem, 2.5vw, 1.65rem);
}

.home-section-head p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.home-section-head--cat {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.home-section-view-all {
    flex-shrink: 0;
    margin-top: 0.15rem;
    white-space: nowrap;
}

.home-personal-section .related-calc-grid {
    margin-bottom: 0;
}

.home-section-head--slider {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.home-section-head-copy {
    min-width: 0;
}

.home-cat-slider-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.home-cat-slider-btn {
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg-card);
    color: var(--color-text-muted);
    cursor: pointer;
    transition:
        border-color var(--transition-fast),
        color var(--transition-fast),
        background var(--transition-fast),
        box-shadow var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.home-cat-slider-btn svg {
    width: 1.1rem;
    height: 1.1rem;
}

.home-cat-slider-btn:hover {
    border-color: color-mix(in srgb, var(--color-primary) 40%, var(--color-border));
    color: var(--color-primary);
    background: var(--color-primary-light);
}

.home-cat-slider-btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ---- Category slider ---- */
.home-cat-slider-viewport {
    overflow: hidden;
    width: 100%;
}

.home-cat-slider-track {
    display: flex;
    gap: 1rem;
    contain: layout style paint;
}

.home-cat-slide {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-height: 13.5rem;
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    background: var(--color-bg-card);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        transform var(--transition-fast);
    position: relative;
    overflow: hidden;
}

a.home-cat-slide:hover {
    border-color: color-mix(in srgb, var(--cat-slide-accent, var(--color-primary)) 35%, var(--color-border));
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.home-cat-slide.is-soon {
    opacity: 0.78;
    cursor: default;
}

.home-cat-slide-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    align-self: flex-start;
    padding: 0.3rem 0.65rem 0.3rem 0.35rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--cat-slide-accent, var(--color-primary)) 22%, var(--color-border));
    background: color-mix(in srgb, var(--cat-slide-soft, var(--color-primary-light)) 80%, var(--color-bg-card));
}

.home-cat-slide-badge-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--cat-slide-soft, var(--color-primary-light));
    color: var(--cat-slide-accent, var(--color-primary));
    flex-shrink: 0;
}

.home-cat-slide-badge-icon .icon {
    width: 1.1rem;
    height: 1.1rem;
}

.home-cat-slide-badge-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--cat-slide-accent, var(--color-primary));
    white-space: nowrap;
}

.home-cat-slide-title {
    margin: 0;
    font-size: 1.12rem;
    line-height: 1.2;
    color: var(--color-secondary);
}

.home-cat-slide-text {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--color-text-muted);
    flex: 1;
}

.home-cat-slide-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: auto;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--cat-slide-accent, var(--color-primary));
}

.home-cat-slide-cta svg {
    width: 0.95rem;
    height: 0.95rem;
    transition: transform var(--transition-fast);
}

a.home-cat-slide:hover .home-cat-slide-cta svg {
    transform: translateX(3px);
}

.home-cat-slide--construction {
    --cat-slide-soft: var(--cat-construction-soft, rgba(245, 158, 11, 0.13));
    --cat-slide-accent: var(--cat-construction-accent, #D97706);
}

.home-cat-slide--finance {
    --cat-slide-soft: var(--cat-finance-soft, rgba(16, 185, 129, 0.13));
    --cat-slide-accent: var(--cat-finance-accent, #059669);
}

.home-cat-slide--currency-converter {
    --cat-slide-soft: var(--nav-currency-soft);
    --cat-slide-accent: var(--nav-currency);
}

.home-cat-slide--math {
    --cat-slide-soft: rgba(99, 102, 241, 0.13);
    --cat-slide-accent: #6366f1;
}

.home-cat-slide--health {
    --cat-slide-soft: rgba(236, 72, 153, 0.13);
    --cat-slide-accent: #db2777;
}

.home-cat-slide--real-estate {
    --cat-slide-soft: rgba(59, 130, 246, 0.13);
    --cat-slide-accent: #2563eb;
}

.home-cat-slide--conversion {
    --cat-slide-soft: rgba(139, 92, 246, 0.13);
    --cat-slide-accent: #7c3aed;
}

/* ---- Why choose us (bento) ---- */
.home-why-section {
    width: 100%;
    padding: clamp(2rem, 4vw, 3rem) 0;
    border-top: 1px solid var(--color-border);
}

.home-why-intro {
    max-width: 40rem;
    margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
}

.home-why-eyebrow {
    margin: 0 0 0.5rem;
    font-size: 0.78rem;
    font-weight: 650;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-primary);
}

.home-why-intro h2 {
    margin: 0 0 0.85rem;
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.home-why-lead {
    margin: 0;
    font-size: clamp(1rem, 1.6vw, 1.1rem);
    line-height: 1.65;
    color: var(--color-text-muted);
}

.home-why-bento {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr;
    grid-template-areas:
        "primary"
        "projects"
        "data"
        "device"
        "stats";
    gap: clamp(0.875rem, 2vw, 1.25rem);
    align-items: stretch;
}

.home-why-feature {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    padding: 1.35rem 1.4rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    background: var(--color-bg-card);
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.home-why-feature:hover {
    border-color: color-mix(in srgb, var(--color-primary) 28%, var(--color-border));
    box-shadow: var(--shadow-md);
}

.home-why-feature--primary {
    grid-area: primary;
    background: linear-gradient(145deg, var(--color-primary-light) 0%, var(--color-bg-card) 72%);
    border-color: color-mix(in srgb, var(--color-primary) 22%, var(--color-border));
}

.home-why-feature--projects {
    grid-area: projects;
}

.home-why-feature--data {
    grid-area: data;
}

.home-why-feature--device {
    grid-area: device;
}

.home-why-feature--wide {
    grid-area: stats;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    justify-content: center;
}

.home-why-feature-icon {
    display: inline-flex;
    width: 2.5rem;
    height: 2.5rem;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.85rem;
    color: var(--color-primary);
}

.home-why-feature-icon svg {
    width: 2rem;
    height: 2rem;
}

.home-why-feature h3 {
    margin: 0 0 0.45rem;
    font-size: 1.05rem;
    color: var(--color-secondary);
}

.home-why-feature p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--color-text-muted);
}

.home-why-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem clamp(1rem, 3vw, 2rem);
    width: 100%;
}

.home-why-stat {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.home-why-stat-value {
    font-size: 1.65rem;
    font-weight: 750;
    letter-spacing: -0.03em;
    color: var(--color-primary);
    line-height: 1;
}

.home-why-stat-label {
    font-size: 0.78rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.home-why-wide-copy {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--color-text-muted);
}

/* ---- Newest section ---- */
.home-newest-section .calc-tile-grid {
    margin-bottom: 0;
}

/* ---- Responsive ---- */
@media (max-width: 1100px) and (min-width: 768px) {
    .home-hero {
        grid-template-columns: minmax(0, 1fr) minmax(280px, 0.92fr);
        gap: 1.25rem;
    }
}

@media (min-width: 768px) {
    .home-why-bento {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas:
            "primary primary"
            "projects data"
            "device device"
            "stats stats";
    }
}

@media (min-width: 960px) {
    .home-why-bento {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-template-areas:
            "primary primary primary"
            "projects data device"
            "stats stats stats";
    }
}

@media (max-width: 767px) {
    .home-hero {
        grid-template-columns: 1fr;
        min-height: auto;
        text-align: center;
    }

    .home-hero-copy {
        text-align: center;
    }

    .home-hero-lead,
    .home-hero-trust {
        margin-left: auto;
        margin-right: auto;
    }

    .home-hero-ctas {
        justify-content: center;
    }

    .home-hero-formula-ticker {
        margin-left: auto;
        margin-right: auto;
    }

    .home-hero-exchange-rates {
        margin-left: auto;
        margin-right: auto;
    }

    .home-hero-calc-wrap {
        order: 2;
        justify-content: center;
        padding: 0.75rem 1rem 0;
    }

    .home-hero-calc-stage {
        margin-left: 0;
        transform: none;
    }

    .home-hero-copy {
        order: 1;
    }

    .hero-calc-character {
        transform: none;
        max-width: 320px;
    }

    .hero-calc-hand--left {
        left: -26px;
    }

    .hero-calc-hand--right {
        right: -26px;
    }

    .home-hero-calc-stage:hover .hero-calc-character,
    .hero-calc-character:focus-within {
        transform: none;
    }

    .home-section-head--slider {
        flex-wrap: wrap;
    }

    .home-cat-slider-controls {
        margin-left: auto;
    }

    .home-section-head--cat {
        flex-direction: column;
        align-items: stretch;
    }

    .home-section-view-all {
        width: 100%;
        text-align: center;
    }

    .home-why-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}
