/* Poppins font TTF */
@font-face {
    font-family: 'Poppins';
    src: url('../fonts/poppins/Poppins-Light.ttf') format('truetype');
    font-display: swap;
    font-weight: 300;
}
@font-face {
    font-family: 'Poppins';
    src: url('../fonts/poppins/Poppins-Regular.ttf') format('truetype');
    font-display: swap;
    font-weight: 400;
}
@font-face {
    font-family: 'Poppins';
    src: url('../fonts/poppins/Poppins-Medium.ttf') format('truetype');
    font-display: swap;
    font-weight: 500;
}
@font-face {
    font-family: 'Poppins';
    src: url('../fonts/poppins/Poppins-SemiBold.ttf') format('truetype');
    font-display: swap;
    font-weight: 600;
}
@font-face {
    font-family: 'Poppins';
    src: url('../fonts/poppins/Poppins-Bold.ttf') format('truetype');
    font-display: swap;
    font-weight: 700;
}
@font-face {
    font-family: 'Poppins';
    src: url('../fonts/poppins/Poppins-ExtraBold.ttf') format('truetype');
    font-display: swap;
    font-weight: 800;
}

/* Instrument Serif font TTF */
@font-face {
    font-family: 'Instrument Serif';
    src: url('../fonts/instrument-serif/InstrumentSerif-Regular.ttf') format('truetype');
    font-display: swap;
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Instrument Serif';
    src: url('../fonts/instrument-serif/InstrumentSerif-Italic.ttf') format('truetype');
    font-display: swap;
    font-weight: 400;
    font-style: italic;
}
@font-face {
    font-family: 'Instrument Serif';
    src: url('../fonts/instrument-serif/InstrumentSerif-Regular.ttf') format('truetype');
    font-display: swap;
    font-weight: 500;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --night: #000F1F;
    --navy: #012547;
    --panel: #061C33;
    --panel2: #0A2744;
    --line: rgba(160, 200, 230, .14);
    --ink: #F3F7FA;
    --mist: #A9BCCD;
    --soft: #D4E0EA;
    --teal: #01848F;
    --green: #21A12D;
    --glow: #5FE26B;
    --warn: #FFB4AB;
    --grad: linear-gradient(90deg, #01848F, #21A12D);
    --display: "Poppins", ui-sans-serif, system-ui, sans-serif;
    --serif: "Instrument Serif", "Times New Roman", serif;
    color-scheme: dark;
}

html {
    scroll-behavior: smooth;
}

html, body {
    overflow-x: clip;
}

body {
    font-size: 15px;
    font-weight: 400;
}

.font-poppins {
    font-family: 'Poppins', sans-serif !important;
}
.font-instrument-serif {
    font-family: 'Instrument Serif', sans-serif !important;
}

a.bg-green-gradient {
    font-weight: 600;
}

.bg-green-gradient {
    background: linear-gradient(90deg, #01848F, #21A12D);
    color: #ffffff;
}
.text-green-gradient {
    background: linear-gradient(90deg, #01848F, #21A12D);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-fill-color: transparent;
}

.text-mist {
    color: #A9BCCD;
}
.text-soft {
    color: #D4E0EA;
}
.text-ink {
    color: #F3F7FA;
}
.text-night {
    color: #000F1F;
}
.text-navy {
    color: #012547;
}
.text-panel {
    color: #061C33;
}
.text-panel2 {
    color: #0A2744;
}

.border-customgray {
    border-top: rgba(160, 200, 230, .14) !important;
}

.hero .bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    background: url(../images/hero.jpg);
    background-repeat: no-repeat;
    background-position: center 70%;
    background-size: cover;
    opacity: .55;
    animation: drift 26s ease-in-out infinite alternate;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(0, 15, 31, .85), rgba(0, 15, 31, .55) 50%, var(--night)), linear-gradient(90deg, rgba(0, 15, 31, .9), rgba(0, 15, 31, .2) 100%);
}
.hero .arc {
    position: absolute;
    z-index: -1;
    left: 50%;
    bottom: -860px;
    width: 1700px;
    height: 1000px;
    transform: translateX(-50%);
    border-radius: 50%;
    box-shadow: 0 -2px 0 rgba(95, 226, 107, .6), 0 -14px 60px 6px rgba(33, 161, 45, .5), 0 -50px 140px 30px rgba(1, 132, 143, .3);
    animation: breathe 6s ease-in-out infinite;
}

/* Loan card motion. Layout stays in Tailwind; these rules only drive the sequence. */
.loan-ring {
    stroke-dasharray: 263.9;
    stroke-dashoffset: 263.9;
}

.loan-card.is-animating .loan-ring {
    transition: stroke-dashoffset 1.2s cubic-bezier(0.22, 0.8, 0.28, 1);
}

.loan-ring.is-filled,
.loan-card.is-complete .loan-ring {
    stroke-dashoffset: 58;
}

.loan-check {
    opacity: 0;
    transform: translateY(8px);
}

.loan-card.is-animating .loan-check {
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.loan-check.is-in,
.loan-card.is-complete .loan-check {
    opacity: 1;
    transform: none;
}

.loan-tick {
    transform: scale(0);
}

.loan-card.is-animating .loan-tick {
    transition: transform 0.35s cubic-bezier(0.2, 1.45, 0.4, 1);
}

.loan-check.is-in .loan-tick,
.loan-card.is-complete .loan-tick {
    transform: scale(1);
}

.loan-bar {
    width: 0;
}

.loan-card.is-animating .loan-bar {
    transition: width 0.85s cubic-bezier(0.22, 0.8, 0.28, 1);
}

.loan-bar.is-filled,
.loan-card.is-complete .loan-bar {
    width: var(--bar, 0%);
}

.loan-badge {
    opacity: 0;
    transform: translateY(8px);
}

.loan-card.is-animating .loan-badge {
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.loan-badge.is-in,
.loan-card.is-complete .loan-badge {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .loan-ring {
        stroke-dashoffset: 58;
    }

    .loan-check,
    .loan-badge {
        opacity: 1;
        transform: none;
    }

    .loan-tick {
        transform: scale(1);
    }

    .loan-bar {
        width: var(--bar, 0%);
    }
}

/* MAS timeline. The line draws once, then the marker travels from SFF to the effective date. */
.mas-line {
    width: 0;
}

.mas-card.is-playing .mas-line,
.mas-card.is-complete .mas-line {
    width: calc(100% - 14px);
    transition: width 1.5s cubic-bezier(0.22, 0.8, 0.28, 1);
}

.mas-traveler {
    left: 7px;
    opacity: 0;
}

.mas-card.is-looping .mas-traveler {
    animation: mas-travel 2.8s ease-in-out infinite;
}

.mas-end {
    transform: scale(0.85);
}

.mas-caption {
    opacity: 0;
}

.mas-card.is-looping .mas-end,
.mas-card.is-complete .mas-end {
    transform: scale(1);
    border-color: #5CDC68;
    background: #5CDC68;
    box-shadow: 0 0 14px rgba(92, 220, 104, 0.75);
    transition: transform 0.4s cubic-bezier(0.2, 1.4, 0.4, 1), background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.mas-card.is-looping .mas-caption,
.mas-card.is-complete .mas-caption {
    opacity: 1;
    transition: opacity 0.4s ease;
}

.net-svg {
    position: relative;
    container-type: inline-size;
    background: radial-gradient(70% 70% at 50% 50%, rgba(1, 132, 143, .22), transparent 70%), var(--panel);
    overflow: hidden;
}

.net-svg img {
    position: relative;
    z-index: 1;
}

.partner-links {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.partner-link {
    stroke-width: 2;
    opacity: 0.35;
    transition: opacity 0.3s ease, stroke-width 0.3s ease;
}

.partner-link.is-selected {
    stroke-width: 4;
    opacity: 1;
}

.partner-labels {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.partner-label {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18.333333%;
    height: 8.636364%;
    border: 0.34cqi solid transparent;
    border-radius: 999px;
    background:
        linear-gradient(#012547, #012547) padding-box,
        linear-gradient(90deg, #01848F, #21A12D) border-box;
    color: #F3F7FA;
    font-size: 2.333cqi;
    font-weight: 600;
    line-height: 1;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.partner-label.is-selected {
    opacity: 1;
}

.partner-label[data-partner-label="0"] {
    left: 40.833333%;
    top: 15.909091%;
}

.partner-label[data-partner-label="1"] {
    left: 25%;
    top: 63.636364%;
}

.partner-label[data-partner-label="2"] {
    left: 56.666667%;
    top: 63.636364%;
}

.platform-orbit {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.platform-orbit-dash,
.platform-orbit-line {
    fill: none;
    transform-box: fill-box;
    transform-origin: center;
}

.platform-orbit-dash {
    stroke: rgba(169, 188, 205, 0.45);
    stroke-width: 0.28;
}

.platform-orbit-line {
    stroke: #5FE26B;
    stroke-width: 0.38;
    stroke-linecap: round;
    stroke-dasharray: 26.17 187.46;
    animation: platform-spin 10s linear infinite;
}

.platform-node {
    position: absolute;
    z-index: 1;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.platform-node:focus-visible {
    outline: 2px solid #5CDC68;
    outline-offset: 4px;
    border-radius: 999px;
}

.platform-center {
    z-index: 1;
    transform: translate(-50%, -50%);
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.platform-center.is-leaving {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 8px));
}

.platform-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    border: 1px solid rgba(92, 220, 104, 0.7);
    background: #071C31;
    color: #5CDC68;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}

.platform-mark.is-active {
    border-color: transparent;
    background: linear-gradient(135deg, #1AA34A, #5CDC68);
    color: #ffffff;
    box-shadow: 0 0 16px rgba(92, 220, 104, 0.45);
    animation: platform-pulse 2.4s ease-in-out infinite;
}

@media (min-width: 640px) {
    .platform-mark {
        width: 2.5rem;
        height: 2.5rem;
    }
}

.wheel {
    position: relative;
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
    aspect-ratio: 1;
}
.wheel .wcenter {
    position: absolute;
    inset: 28%;
    border-radius: 50%;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 6px;
}
.book::before {
    content: "";
    position: absolute;
    right: -30%;
    top: -60%;
    width: 90%;
    height: 120%;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(33, 161, 45, .28), transparent);
    pointer-events: none;
}

.ask-fintly-pulse {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    border: 2px solid rgba(95, 226, 107, 0.75);
    opacity: 0;
    pointer-events: none;
    animation: ask-fintly-pulse 2.4s ease-out infinite;
}

.ask-fintly-pulse-delay {
    animation-delay: 1.2s;
}

.ask-fintly-panel.is-open {
    animation: ask-fintly-in 0.22s ease;
}

@keyframes ask-fintly-pulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }

    100% {
        transform: scale(1.85);
        opacity: 0;
    }
}

@keyframes ask-fintly-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes platform-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes platform-pulse {
    0%,
    100% {
        box-shadow: 0 0 10px rgba(92, 220, 104, 0.35);
    }

    50% {
        box-shadow: 0 0 20px rgba(92, 220, 104, 0.75);
    }
}

@keyframes mas-travel {
    0% {
        left: 7px;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    82% {
        left: calc(100% - 12px);
        opacity: 1;
    }
    100% {
        left: calc(100% - 12px);
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mas-line {
        width: calc(100% - 14px);
    }

    .mas-traveler {
        display: none;
    }

    .mas-end {
        transform: none;
        border-color: #5CDC68;
        background: #5CDC68;
        box-shadow: 0 0 14px rgba(92, 220, 104, 0.75);
    }

    .mas-caption {
        opacity: 1;
    }

    .platform-center,
    .platform-mark,
    .platform-orbit-line,
    .ask-fintly-pulse,
    .ask-fintly-panel.is-open {
        transition: none;
        animation: none;
    }
}