/*
|--------------------------------------------------------------------------
| COLOR SYSTEM
|--------------------------------------------------------------------------
*/
:root {
    --dark: #111111;
    --red: #b21f24;
    --red-dark: #8f171b;
    --gold: #c9a24d;
    --cream: #f8f4eb;
    --text: #2b2b2b;
    --muted: #666666;
    --white: #ffffff;
    --border: #eadfca;
    --shadow: 0 8px 22px rgba(0,0,0,0.06);
}

/*
|--------------------------------------------------------------------------
| GLOBAL RESET
|--------------------------------------------------------------------------
*/
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text);
    background: var(--cream);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/*
|--------------------------------------------------------------------------
| TOP NAVIGATION BAR
|--------------------------------------------------------------------------
*/
.topbar {
    background: var(--dark);
    color: var(--white);
    padding: 14px 6%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid rgba(178,31,36,0.35);
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--red);
}

.brand img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-name {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.brand-subtitle {
    font-size: 12px;
    color: #d8d8d8;
    letter-spacing: 0.5px;
    margin-top: 3px;
}

.nav {
    display: flex;
    gap: 22px;
    font-size: 14px;
    font-weight: 600;
}

.nav a:hover {
    color: var(--red);
}

/*
|--------------------------------------------------------------------------
| HERO SECTION
|--------------------------------------------------------------------------
*/
.hero {
    background: linear-gradient(135deg, #111111 0%, #301315 100%);
    color: var(--white);
    padding: 90px 6% 80px;
}

.hero-inner {
    max-width: 1150px;
    margin: auto;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 50px;
    align-items: center;
}

.hero-balance,
.hero-split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-left {
    max-width: 520px;
}

.hero-score-wrap {
    margin-right: 120px;
    text-align: right;
}

.hero-right {
    text-align: right;
}

.hero-score {
    font-size: 72px;
    font-weight: 900;
    line-height: 1;
}

.hero-grade {
    font-size: 22px;
    font-weight: 700;
    margin-top: 10px;
}

.tag {
    color: var(--red);
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-size: 13px;
    margin-bottom: 16px;
}

h1 {
    font-size: 52px;
    line-height: 1.1;
    margin: 0 0 22px;
    letter-spacing: -1px;
}

.hero p {
    font-size: 18px;
    color: #f0dddd;
    max-width: 680px;
}

.hero-card {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(178,31,36,0.5);
    padding: 34px;
    border-radius: 24px;
}

.hero-card h3 {
    color: var(--red);
    margin-top: 0;
    font-size: 22px;
}

/*
|--------------------------------------------------------------------------
| BUTTONS
|--------------------------------------------------------------------------
*/
.buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.btn {
    display: inline-block;
    padding: 13px 24px;
    border-radius: 999px;
    font-weight: 800;
    transition: 0.2s;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--red);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--red-dark);
}

.btn-outline {
    border: 1px solid var(--red);
    color: var(--red);
}

.btn-outline:hover {
    background: var(--red);
    color: var(--white);
}

/*
|--------------------------------------------------------------------------
| COMMON SECTION STYLE
|--------------------------------------------------------------------------
*/
section {
    padding: 75px 6%;
}

.container {
    max-width: 1150px;
    margin: auto;
}

.section-title {
    text-align: center;
    margin-bottom: 45px;
}

.section-title h2 {
    font-size: 36px;
    margin: 0 0 10px;
    line-height: 1.2;
}

.section-title p {
    color: var(--muted);
    margin: 0;
}

/*
|--------------------------------------------------------------------------
| GRID SYSTEM
|--------------------------------------------------------------------------
*/
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

/*
|--------------------------------------------------------------------------
| CARD STYLE
|--------------------------------------------------------------------------
*/
.card {
    background: var(--white);
    padding: 30px;
    border-radius: 22px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.08);
}

.card h3 {
    margin-top: 0;
    color: #1e1e1e;
    font-size: 22px;
}

.card p {
    margin-bottom: 18px;
}

.small-label {
    display: inline-block;
    background: #f7dddd;
    color: var(--red-dark);
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 12px;
}

/*
|--------------------------------------------------------------------------
| FORM STYLE
|--------------------------------------------------------------------------
*/
.card label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 6px;
}

.card input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #ddd;
    background: #fafafa;
    font-size: 15px;
    transition: all 0.2s ease;
}

.card input:focus {
    outline: none;
    border-color: var(--red);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(178,31,36,0.08);
}

.card input[type="number"] {
    text-align: right;
    font-weight: 600;
}

.card input[type="number"]::-webkit-inner-spin-button,
.card input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/*
|--------------------------------------------------------------------------
| FINANCIAL HEALTH FORM GRID
|--------------------------------------------------------------------------
*/
.fh-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    align-items: stretch;
}

.fh-grid .card {
    margin: 0;
    min-height: 360px;
    height: 100%;
}

.fh-grid .card h3 {
    min-height: 36px;
}

.fh-submit-card {
    grid-column: 1 / -1;
}

/*
|--------------------------------------------------------------------------
| FINANCIAL HEALTH RESULT VISUALS
|--------------------------------------------------------------------------
*/
.fh-visual {
    margin-top: 18px;
}

.fh-visual-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.fh-visual-note {
    font-size: 13px;
    color: var(--muted);
    margin-top: 8px;
}

.fh-bar-wrap {
    background: #f3eee5;
    border-radius: 999px;
    overflow: hidden;
    height: 18px;
    margin: 8px 0 18px;
}

.fh-bar {
    height: 100%;
    border-radius: 999px;
}

.fh-bar-income {
    background: #2e7d32;
}

.fh-bar-expense {
    background: var(--red);
}

.fh-bar-survival {
    background: var(--gold);
}

.fh-bar-jar {
    background: var(--red-dark);
}

/*
|--------------------------------------------------------------------------
| FINANCIAL HEALTH RESULT TEXT STYLE
|--------------------------------------------------------------------------
*/
.fh-mini-title {
    font-size: 12px;
    font-weight: 800;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 16px 0 6px;
}

.fh-big-number {
    font-size: 38px;
    font-weight: 900;
    margin: 10px 0;
}

.fh-big-percent {
    font-size: 26px;
    font-weight: 900;
    margin: 12px 0;
}

.fh-result-badge {
    display: inline-block;
    font-size: 24px;
    font-weight: 900;
    margin: 10px 0;
}

.fh-muted {
    color: var(--muted);
    margin-top: -5px;
}

/*
|--------------------------------------------------------------------------
| CASH FLOW IN / OUT VISUAL
|--------------------------------------------------------------------------
*/
.fh-flow-card {
    margin-bottom: 30px;
}

.fh-flow-layout {
    display: grid;
    grid-template-columns: 1fr 220px 1fr;
    gap: 24px;
    align-items: stretch;
    margin-top: 24px;
}

.fh-flow-box {
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    background: #fff;
}

.fh-flow-in {
    border-top: 5px solid #2e7d32;
}

.fh-flow-out {
    border-top: 5px solid var(--red);
}

.fh-flow-label {
    font-size: 13px;
    font-weight: 900;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.fh-flow-amount {
    font-size: 30px;
    font-weight: 900;
    margin: 8px 0 18px;
}

.fh-flow-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fh-flow-items div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    border-bottom: 1px dashed var(--border);
    padding-bottom: 8px;
}

.fh-flow-items span {
    color: var(--muted);
}

.fh-flow-items strong {
    white-space: nowrap;
}

.fh-flow-bar-wrap {
    margin-top: 18px;
    height: 14px;
    border-radius: 999px;
    background: #f1eadf;
    overflow: hidden;
}

.fh-flow-bar {
    height: 100%;
    border-radius: 999px;
}

.fh-flow-bar-in {
    background: #2e7d32;
}

.fh-flow-bar-out {
    background: var(--red);
}

.fh-flow-center {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.fh-flow-circle {
    width: 120px;
    height: 120px;
    border-radius: 999px;
    border: 6px solid var(--gold);
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    box-shadow: var(--shadow);
}

.fh-flow-circle span {
    font-size: 22px;
    font-weight: 900;
}

.fh-flow-net {
    font-size: 26px;
    font-weight: 900;
}

.fh-flow-status {
    font-size: 14px;
    font-weight: 800;
    color: var(--muted);
}

.fh-flow-meaning {
    margin-top: 22px;
    padding: 16px 18px;
    border-radius: 16px;
    background: var(--cream);
    font-weight: 700;
}

.alert-box {
    margin-top: 18px;
    padding: 16px 20px;
    background: #fff4e5;
    border-left: 4px solid #e67e22;
    border-radius: 12px;
    font-weight: 600;
    line-height: 1.6;
}

/*
|--------------------------------------------------------------------------
| MONEY ALLOCATION DIAGNOSIS
|--------------------------------------------------------------------------
*/
.fh-allocation-card {
    margin-top: 30px;
}

.jar-visual-list {
    margin-top: 22px;
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    background: var(--white);
}

.jar-row {
    display: grid;
    grid-template-columns: 34% 36% 24%;
    gap: 24px;
    align-items: center;
    padding: 26px 28px;
    border-bottom: 1px solid var(--border);
}

.jar-row:last-child {
    border-bottom: none;
}

.jar-left {
    min-width: 0;
    font-size: 17px;
    font-weight: 800;
}

.jar-header {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 18px;
    align-items: center;
}

.jar-icon {
    width: 82px;
    height: 82px;
    object-fit: contain;
}

.jar-title {
    display: block;
}

.jar-title.over,
.jar-gap-main.over {
    color: #c62828;
}

.jar-title.short,
.jar-gap-main.short {
    color: #9a6a00;
}

.jar-title.ok,
.jar-gap-main.ok {
    color: #2e7d32;
}

.jar-desc {
    margin: 6px 0 0;
    font-size: 14px;
    color: var(--muted);
    line-height: 1.35;
}

.jar-bars {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bar-line {
    font-size: 13px;
    margin-bottom: 8px;
}

.bar-label {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 6px;
    color: var(--muted);
}

.bar-label strong {
    color: var(--text);
    white-space: nowrap;
}

.bar-bg {
    width: 100%;
    height: 8px;
    background: #f1eadf;
    border-radius: 999px;
    overflow: hidden;
}

.bar {
    height: 8px;
    border-radius: 999px;
}

.bar-rec {
    background: var(--gold);
}

.bar-actual.over {
    background: var(--red);
}

.bar-actual.short {
    background: #f2b84b;
}

.bar-actual.ok {
    background: #2e7d32;
}

.jar-gap {
    text-align: right;
    min-width: 0;
    overflow: hidden;
}

.jar-gap-main {
    font-size: 24px;
    font-weight: 900;
    white-space: nowrap;
}

.jar-gap-sub {
    font-size: 13px;
    color: var(--muted);
    margin: 4px 0 10px;
    white-space: normal;
}

.status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.status.over,
.fh-status-over {
    background: #fde2e2;
    color: #c62828;
}

.status.short,
.fh-status-short {
    background: #fff3cd;
    color: #9a6a00;
}

.status.ok,
.fh-status-ok {
    background: #e2f3e8;
    color: #2e7d32;
}

/*
|--------------------------------------------------------------------------
| OLD ALLOCATION TABLE SUPPORT
|--------------------------------------------------------------------------
*/
.fh-allocation-table {
    margin-top: 20px;
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
}

.fh-allocation-head,
.fh-allocation-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr 0.7fr;
    gap: 14px;
    align-items: center;
}

.fh-allocation-head {
    background: var(--dark);
    color: var(--white);
    font-size: 13px;
    font-weight: 800;
    padding: 14px 18px;
}

.fh-allocation-row {
    padding: 16px 18px;
    border-top: 1px solid var(--border);
    background: var(--white);
}

.fh-allocation-row p {
    margin: 5px 0 0;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.4;
}

.fh-mini-bar-wrap {
    width: 100%;
    height: 8px;
    background: #f3eee5;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 6px;
}

.fh-mini-bar {
    height: 100%;
    border-radius: 999px;
}

.fh-bar-target {
    background: var(--gold);
}

.fh-bar-actual {
    background: var(--red);
}

.fh-status {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

/*
|--------------------------------------------------------------------------
| VIDEO SECTION
|--------------------------------------------------------------------------
*/
.video-section {
    background: #fff;
}

.video-wrapper {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding-top: 56.25%;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-placeholder {
    background: var(--dark);
    color: var(--white);
    text-align: center;
    border-radius: 24px;
    padding: 60px 30px;
    border: 1px solid rgba(178,31,36,0.4);
}

.video-placeholder h3 {
    color: var(--red);
    font-size: 28px;
    margin-top: 0;
}

/*
|--------------------------------------------------------------------------
| PAGE-SPECIFIC SECTIONS
|--------------------------------------------------------------------------
*/
.solution-card {
    border-top: 5px solid var(--red);
}

.why-section {
    background: #fff;
}

.stat-card h3 {
    color: var(--red-dark);
}

.agency-cta {
    background: var(--dark);
    color: var(--white);
    text-align: center;
}

.agency-cta h2 {
    color: var(--red);
    font-size: 36px;
    margin-top: 0;
}

.agency-cta p {
    max-width: 760px;
    margin: 0 auto;
    color: #f0dddd;
}

.agency-cta .buttons {
    justify-content: center;
}

.ecosystem-section {
    background: var(--cream);
}

.ecosystem-card {
    border-top: 5px solid var(--red);
}

.ecosystem-card .btn {
    margin-top: 10px;
}

.contact {
    background: var(--white);
}

.contact-box {
    background: var(--cream);
    padding: 35px;
    border-radius: 22px;
    border: 1px solid var(--border);
}

.contact p {
    margin: 8px 0;
}

.contact a {
    color: var(--red-dark);
    font-weight: 700;
}

.contact .btn-primary {
    color: var(--white) !important;
}

.contact .btn-outline {
    color: var(--red-dark) !important;
}

.contact .btn-outline:hover {
    color: var(--white) !important;
}

/*
|--------------------------------------------------------------------------
| FOOTER
|--------------------------------------------------------------------------
*/
footer {
    background: var(--dark);
    color: #d8d8d8;
    text-align: center;
    padding: 38px 6%;
    font-size: 18px;
    line-height: 1.7;
}

footer strong {
    color: var(--red);
}

footer p {
    margin: 8px 0;
}

.footer-title {
    font-size: 22px;
    font-weight: 700;
}

/*
|--------------------------------------------------------------------------
| RESPONSIVE
|--------------------------------------------------------------------------
*/
@media (max-width: 900px) {
    .hero-inner,
    .grid-2,
    .grid-3,
    .fh-flow-layout,
    .fh-grid {
        grid-template-columns: 1fr;
    }

    .hero-balance,
    .hero-split {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-score-wrap,
    .hero-right {
        margin-right: 0;
        text-align: left;
    }

    .hero-score {
        font-size: 54px;
    }

    h1 {
        font-size: 40px;
    }

    .nav {
        display: none;
    }

    .brand img {
        width: 36px;
        height: 36px;
    }

    .brand-name {
        font-size: 18px;
    }

    .brand-subtitle {
        font-size: 11px;
    }

    .hero {
        padding: 70px 6% 60px;
    }

    section {
        padding: 60px 6%;
    }

    .section-title h2 {
        font-size: 30px;
    }

    footer {
        font-size: 16px;
    }

    .fh-submit-card {
        grid-column: auto;
    }

    .fh-flow-center {
        order: 3;
    }

    .jar-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .jar-gap {
        text-align: left;
    }

    .fh-allocation-head {
        display: none;
    }

    .fh-allocation-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 34px;
    }

    .hero p {
        font-size: 16px;
    }

    .hero-score {
        font-size: 46px;
    }

    .buttons {
        flex-direction: column;
    }

    .btn {
        text-align: center;
        width: 100%;
    }

    .jar-header {
        grid-template-columns: 58px 1fr;
        gap: 12px;
    }

    .jar-icon {
        width: 52px;
        height: 52px;
    }
}
/* =========================================================
   PRINT FINAL FIX - A4 PORTRAIT BALANCED
========================================================= */
@media print {

    @page {
        size: A4 portrait;
        margin: 6mm;
    }

    html,
    body {
        background: #fff !important;
        margin: 0 !important;
        padding: 0 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    body {
        zoom: 0.62 !important;
    }

    .topbar,
    .buttons,
    .btn {
        display: none !important;
    }

    section {
        padding: 14px 0 !important;
        margin: 0 !important;
    }

    .container,
    .hero-inner {
        width: 1150px !important;
        max-width: 1150px !important;
        margin: 0 auto !important;
        padding: 0 !important;
    }

    /* HERO */
    .hero {
        display: block !important;
        padding: 55px 0 !important;
        margin: 0 0 22px !important;
    }

    .hero-inner.hero-balance {
        display: grid !important;
        grid-template-columns: 1fr 0.7fr !important;
        align-items: center !important;
    }

    .hero-score-wrap {
        margin-right: 0 !important;
        text-align: right !important;
    }

    .hero-score {
        font-size: 68px !important;
    }

    .hero-grade {
        font-size: 22px !important;
    }

    /* MONEY FLOW */
    .fh-flow-card {
        margin-bottom: 24px !important;
    }

    .fh-flow-layout {
        display: grid !important;
        grid-template-columns: 1fr 180px 1fr !important;
        gap: 22px !important;
        align-items: center !important;
    }

    .fh-flow-box {
        height: 290px !important;
        min-height: 290px !important;
        padding: 22px !important;
    }

    .fh-flow-center {
        order: initial !important;
        grid-column: auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        height: 290px !important;
        margin: 0 !important;
    }

    .fh-flow-circle {
        width: 115px !important;
        height: 115px !important;
    }

    .fh-flow-net {
        font-size: 26px !important;
        white-space: nowrap !important;
    }

    .fh-flow-amount {
        font-size: 34px !important;
        line-height: 1.15 !important;
    }

    /* RESULT CARDS */
    .grid-3 {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 18px !important;
        align-items: stretch !important;
    }

    .grid-3 .card {
        height: 300px !important;
        min-height: 300px !important;
        overflow: hidden !important;
    }

    .card {
        box-shadow: none !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }

    .card:hover {
        transform: none !important;
        box-shadow: none !important;
    }

    .fh-big-number {
        font-size: 34px !important;
        line-height: 1.15 !important;
    }

    .fh-big-percent {
        font-size: 28px !important;
    }

    .fh-result-badge {
        font-size: 28px !important;
    }

    /* MONEY ALLOCATION */
    .fh-allocation-card {
        page-break-before: always !important;
    }

    .jar-row {
        grid-template-columns: 34% 38% 24% !important;
        gap: 18px !important;
    }

    /* HIDE EMPTY NEXT STEP IN PRINT */
    .card:has(.buttons) {
        display: none !important;
    }
}