/* ===================================================================
   FundOra — Homepage styles (loaded only on /)
   Depends on tokens from style.css
   =================================================================== */

/* ── Hero ──────────────────────────────────────────────────────── */
.hero {
    position: relative;
    overflow: hidden;
    padding: calc(var(--header-h) + 30px) 0 40px;
    background:
        radial-gradient(90% 60% at 100% 0%, rgba(0,168,107,.13) 0%, transparent 62%),
        radial-gradient(70% 55% at 0% 30%, rgba(34,190,133,.10) 0%, transparent 60%),
        linear-gradient(180deg, #f2fbf6 0%, #ffffff 78%);
}
.hero::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--line), transparent);
}
.hero-grid { display: grid; gap: 30px; align-items: center; }
@media (min-width: 1024px) {
    .hero { padding: calc(var(--header-h) + 56px) 0 64px; }
    .hero-grid { grid-template-columns: 1.02fr .98fr; gap: 48px; }
}

.hero h1 { margin-bottom: 14px; }
.hero h1 em { font-style: normal; color: var(--fo-600); }
.hero-sub {
    font-size: clamp(14.5px, 2.4vw, 17px);
    color: var(--muted);
    max-width: 480px;
    margin-bottom: 24px;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
@media (max-width: 419px) { .hero-cta .btn { flex: 1 1 100%; } }

.hero-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: center;
    margin-bottom: 28px;
}
.hero-trust span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-soft);
}
.hero-trust svg { width: 15px; height: 15px; fill: var(--fo-500); flex-shrink: 0; }

/* Live funds card */
.fundcard {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    box-shadow: var(--sh-lg);
    overflow: hidden;
}
.fundcard-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 15px 18px;
    border-bottom: 1px solid var(--line-soft);
}
.fundcard-head strong {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
}
.fundcard-head strong svg { width: 16px; height: 16px; fill: var(--fo-500); }

.fundtabs {
    display: flex;
    gap: 4px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line-soft);
    background: var(--surface);
}
.fundtab {
    flex: 1;
    padding: 8px 6px;
    border: none;
    border-radius: var(--r-pill);
    background: transparent;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
    transition: background .18s, color .18s, box-shadow .18s;
}
.fundtab:hover { color: var(--fo-600); }
.fundtab[aria-selected="true"] { background: #fff; color: var(--fo-600); box-shadow: var(--sh-xs); }

.fundtable { width: 100%; border-collapse: collapse; }
.fundtable th {
    padding: 10px 16px 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--faint);
    text-align: left;
    border-bottom: 1px solid var(--line-soft);
}
.fundtable th:last-child, .fundtable td:last-child { text-align: right; }
.fundtable td { padding: 11px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.fundtable tbody tr:last-child td { border-bottom: none; }
.fundtable tbody tr:hover { background: var(--fo-50); }
.fund-name { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.fund-cat  { font-size: 11px; color: var(--faint); margin-top: 2px; }
.fund-stars { color: var(--amber); font-size: 11px; letter-spacing: .5px; white-space: nowrap; }
.fund-ret {
    display: inline-block;
    padding: 4px 9px;
    border-radius: var(--r-pill);
    background: var(--fo-50);
    color: var(--fo-600);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}
.fundcard-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface);
    border-top: 1px solid var(--line-soft);
}
.fundcard-foot small { font-size: 10.5px; color: var(--faint); line-height: 1.45; }
.fund-empty { padding: 26px 16px; text-align: center; color: var(--faint); font-size: 13px; }

@media (max-width: 460px) {
    .fundtable th:nth-child(2), .fundtable td:nth-child(2) { display: none; }
}

/* ── Calculator ────────────────────────────────────────────────── */
.calc-grid { display: grid; gap: 18px; }
@media (min-width: 900px) { .calc-grid { grid-template-columns: 1fr 1fr; align-items: start; gap: 24px; } }

.calc-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 20px;
    box-shadow: var(--sh-sm);
}
.calc-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    background: var(--surface-2);
    border-radius: var(--r-pill);
    margin-bottom: 22px;
}
.calc-toggle button {
    padding: 10px;
    border: none;
    border-radius: var(--r-pill);
    background: transparent;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
    transition: background .2s, color .2s, box-shadow .2s;
}
.calc-toggle button[aria-pressed="true"] { background: var(--fo-500); color: #fff; box-shadow: var(--sh-brand); }

.calc-field { margin-bottom: 20px; }
.calc-field:last-child { margin-bottom: 0; }
.calc-label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 9px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
}
.calc-label output { font-size: 14.5px; font-weight: 800; color: var(--fo-600); }
.calc-input {
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1.5px solid var(--line);
    background: var(--surface);
    border-radius: var(--r-md);
    padding: 10px 14px;
    margin-bottom: 10px;
    transition: border-color .18s, background .18s;
}
.calc-input:focus-within { border-color: var(--fo-400); background: #fff; }
.calc-input span { font-size: 14px; font-weight: 700; color: var(--faint); }
.calc-input input {
    width: 100%;
    border: none;
    background: transparent;
    outline: none;
    font-family: inherit;
    font-size: 17px;
    font-weight: 700;
    color: var(--ink);
}

input[type="range"].calc-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 6px;
    background: var(--surface-2);
    outline: none;
    margin: 6px 0;
}
input[type="range"].calc-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--fo-500);
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,168,107,.45);
    cursor: pointer;
}
input[type="range"].calc-range::-moz-range-thumb {
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--fo-500);
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,168,107,.45);
    cursor: pointer;
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip {
    padding: 6px 12px;
    border: 1.5px solid var(--line);
    border-radius: var(--r-pill);
    background: #fff;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    transition: all .15s;
}
.chip:hover { border-color: var(--fo-300); color: var(--fo-600); }
.chip.is-active { border-color: var(--fo-500); background: var(--fo-50); color: var(--fo-700); }

.calc-result {
    position: relative;
    overflow: hidden;
    border-radius: var(--r-lg);
    padding: 24px;
    margin-bottom: 14px;
    color: #fff;
    background: radial-gradient(120% 120% at 85% 0%, #0e6f4c 0%, var(--fo-900) 70%);
}
.calc-result::before {
    content: '';
    position: absolute;
    top: -60px; right: -40px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(0,168,107,.35) 0%, transparent 70%);
}
.calc-result-label {
    position: relative;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: rgba(255,255,255,.6);
    margin-bottom: 6px;
}
.calc-result-value {
    position: relative;
    font-size: clamp(30px, 7vw, 40px);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.1;
}
.calc-result-gain { position: relative; font-size: 13px; color: var(--fo-300); font-weight: 600; margin-top: 4px; }
.calc-result-split {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,.14);
}
.calc-result-split small { display: block; font-size: 10.5px; color: rgba(255,255,255,.55); margin-bottom: 3px; }
.calc-result-split strong { font-size: 16px; font-weight: 700; color: #fff; }

.compare-row { margin-bottom: 13px; }
.compare-row:last-of-type { margin-bottom: 0; }
.compare-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 13px;
}
.compare-top b { font-weight: 600; color: var(--ink); }
.compare-top i { font-style: normal; font-size: 11.5px; color: var(--faint); }
.compare-top em { font-style: normal; font-weight: 800; color: var(--ink); }
.compare-bar { height: 8px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.compare-bar > i {
    display: block;
    height: 100%;
    border-radius: 6px;
    transition: width .5s cubic-bezier(.4,0,.2,1);
}

