/* =========================================================
   LoanWise — Global Stylesheet
   Design: navy/gold trust-banking identity, serif+mono pairing
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700;9..144,900&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
    --navy: #0F2545;
    --navy-deep: #0A1B33;
    --navy-light: #1B3A66;
    --gold: #E8A33D;
    --gold-dark: #C8842A;
    --paper: #F7F5F0;
    --paper-dim: #EFEBE2;
    --white: #FFFFFF;
    --ink: #1C2430;
    --slate: #5B6678;
    --line: #E4E1D8;
    --line-dark: rgba(255,255,255,0.12);
    --success: #2E7D5B;
    --danger: #C0392B;

    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

    --radius: 6px;
    --radius-lg: 10px;
    --shadow-sm: 0 1px 3px rgba(15,37,69,0.08);
    --shadow-md: 0 8px 24px rgba(15,37,69,0.12);
    --shadow-lg: 0 20px 50px rgba(15,37,69,0.18);
    --container: 1160px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

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

ul { list-style: none; }

button { font-family: inherit; cursor: pointer; }

input, select, textarea {
    font-family: inherit;
    font-size: 15px;
}

:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Typography ---------- */

h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--navy);
    line-height: 1.15;
    font-weight: 600;
}

h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: 1.4rem; font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }

p { color: var(--slate); }

.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold-dark);
    font-weight: 600;
    display: inline-block;
    margin-bottom: 12px;
}

.section-head {
    max-width: 640px;
    margin-bottom: 48px;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { margin-top: 14px; font-size: 1.05rem; }

.mono { font-family: var(--font-mono); }

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    border: 1.5px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}
.btn-gold {
    background: var(--gold);
    color: var(--navy-deep);
}
.btn-gold:hover { background: var(--gold-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-outline {
    background: transparent;
    border-color: rgba(255,255,255,0.4);
    color: var(--white);
}
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: var(--white); }

.btn-navy {
    background: var(--navy);
    color: var(--white);
}
.btn-navy:hover { background: var(--navy-light); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-ghost {
    background: transparent;
    border-color: var(--line);
    color: var(--navy);
}
.btn-ghost:hover { border-color: var(--navy); }

.btn-block { width: 100%; }
.btn-sm { padding: 9px 18px; font-size: 0.85rem; }

/* ---------- Header / Nav ---------- */

.site-header {
    background: var(--navy);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}
.topbar {
    background: var(--navy-deep);
    color: rgba(255,255,255,0.65);
    font-size: 0.82rem;
}
.topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    padding-bottom: 8px;
}
.topbar a { color: rgba(255,255,255,0.8); }
.topbar a:hover { color: var(--gold); }
.topbar-links { display: flex; gap: 20px; }

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
}
.logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--white);
    display: flex;
    align-items: baseline;
    gap: 2px;
}
.logo span { color: var(--gold); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}
.nav-links a {
    color: rgba(255,255,255,0.85);
    font-size: 0.94rem;
    font-weight: 500;
    position: relative;
    padding: 6px 0;
}
.nav-links a:hover, .nav-links a.active { color: var(--white); }
.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0; right: 0;
    height: 2px;
    background: var(--gold);
}
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-cta a.login-link { color: rgba(255,255,255,0.85); font-size: 0.9rem; font-weight: 500; }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.6rem;
}

@media (max-width: 920px) {
    .nav-links { display: none; }
    .nav-toggle { display: block; }
    .topbar-links { display: none; }
}

/* ---------- Hero ---------- */

.hero {
    background: var(--navy);
    color: var(--white);
    position: relative;
    overflow: hidden;
    padding: 76px 0 0;
}
.hero::before {
    content: '';
    position: absolute;
    top: -120px; right: -120px;
    width: 480px; height: 480px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(232,163,61,0.16), transparent 70%);
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
    position: relative;
    z-index: 1;
}
.hero h1 { color: var(--white); }
.hero h1 em { color: var(--gold); font-style: normal; }
.hero p.lead {
    color: rgba(255,255,255,0.72);
    font-size: 1.12rem;
    max-width: 480px;
    margin: 20px 0 32px;
}
.hero-actions { display: flex; gap: 14px; margin-bottom: 56px; flex-wrap: wrap; }

/* Ledger strip — signature element */
.ledger-strip {
    display: flex;
    border-top: 1px solid var(--line-dark);
}
.ledger-item {
    flex: 1;
    padding: 22px 24px;
    border-right: 1px solid var(--line-dark);
}
.ledger-item:last-child { border-right: none; }
.ledger-value {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gold);
    display: block;
}
.ledger-label {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.55);
    margin-top: 4px;
}
.ledger-strip.on-paper { border-top: 1px solid var(--line); background: var(--white); }
.ledger-strip.on-paper .ledger-item { border-right: 1px solid var(--line); }
.ledger-strip.on-paper .ledger-value { color: var(--navy); }
.ledger-strip.on-paper .ledger-label { color: var(--slate); }

/* Hero rate card */
.rate-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-lg);
    color: var(--ink);
}
.rate-card-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; }
.rate-card-head .tag {
    background: rgba(46,125,91,0.1);
    color: var(--success);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}
.rate-row {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.92rem;
}
.rate-row:last-of-type { border-bottom: none; }
.rate-row .label { color: var(--slate); }
.rate-row .value { font-family: var(--font-mono); font-weight: 600; color: var(--navy); }
.rate-card .big-number {
    font-family: var(--font-mono);
    font-size: 2.6rem;
    font-weight: 600;
    color: var(--navy);
    margin: 8px 0 2px;
}

/* ---------- Sections (general) ---------- */

.section { padding: 88px 0; }
.section-tight { padding: 56px 0; }
.bg-navy { background: var(--navy); color: var(--white); }
.bg-navy h2, .bg-navy h3, .bg-navy h4 { color: var(--white); }
.bg-navy p { color: rgba(255,255,255,0.68); }
.bg-paper-dim { background: var(--paper-dim); }
.bg-white { background: var(--white); }

/* ---------- Loan type cards ---------- */

.loan-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.loan-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.loan-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.loan-icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    background: var(--paper-dim);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 20px;
    color: var(--navy);
}
.loan-card h3 { margin-bottom: 6px; }
.loan-rate {
    font-family: var(--font-mono);
    font-size: 1.7rem;
    font-weight: 600;
    color: var(--gold-dark);
    margin: 14px 0;
}
.loan-rate span { font-size: 0.95rem; color: var(--slate); font-weight: 400; }
.loan-card p.desc { font-size: 0.92rem; margin-bottom: 20px; min-height: 64px; }
.loan-card-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    font-size: 0.85rem;
    color: var(--slate);
}

/* ---------- Steps ---------- */

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    counter-reset: step;
}
.step-card { position: relative; padding-left: 4px; }
.step-num {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--gold-dark);
    font-weight: 600;
    margin-bottom: 14px;
    display: block;
}
.step-card h4 { margin-bottom: 8px; }
.step-card p { font-size: 0.92rem; }

/* ---------- EMI Calculator ---------- */

.calc-panel {
    background: var(--navy);
    border-radius: var(--radius-lg);
    padding: 48px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    color: var(--white);
}
.calc-field { margin-bottom: 28px; }
.calc-field label {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.75);
    margin-bottom: 10px;
}
.calc-field .out {
    font-family: var(--font-mono);
    color: var(--gold);
    font-weight: 600;
}
input[type="range"] {
    width: 100%;
    accent-color: var(--gold);
    height: 4px;
}
.calc-results {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--line-dark);
    border-radius: var(--radius);
    padding: 28px;
}
.calc-result-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--line-dark);
    font-size: 0.9rem;
}
.calc-result-row:last-child { border-bottom: none; }
.calc-result-row .value { font-family: var(--font-mono); font-weight: 600; color: var(--gold); }
.calc-result-row.primary .value { font-size: 1.4rem; }

@media (max-width: 860px) {
    .calc-panel { grid-template-columns: 1fr; }
}

/* ---------- Testimonials ---------- */

.testi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
.testi-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--line-dark);
    border-radius: var(--radius-lg);
    padding: 30px;
}
.testi-quote { font-family: var(--font-display); font-size: 2.2rem; color: var(--gold); line-height: 1; margin-bottom: 12px; }
.testi-card p.msg { color: rgba(255,255,255,0.78); font-size: 0.96rem; margin-bottom: 20px; }
.testi-person { display: flex; align-items: center; gap: 12px; }
.testi-avatar {
    width: 42px; height: 42px; border-radius: 50%;
    background: var(--gold);
    color: var(--navy-deep);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-family: var(--font-display);
}
.testi-person .name { color: var(--white); font-weight: 600; font-size: 0.92rem; }
.testi-person .title { color: rgba(255,255,255,0.55); font-size: 0.82rem; }

/* ---------- Blog ---------- */

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.blog-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--line);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.blog-img {
    height: 170px;
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.4);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}
.blog-body { padding: 24px; }
.blog-date { font-family: var(--font-mono); font-size: 0.76rem; color: var(--gold-dark); letter-spacing: 0.06em; text-transform: uppercase; }
.blog-body h4 { margin: 10px 0 10px; line-height: 1.3; }
.blog-body p { font-size: 0.9rem; }
.blog-body .read-more { display: inline-block; margin-top: 14px; font-size: 0.85rem; font-weight: 600; color: var(--navy); border-bottom: 1.5px solid var(--gold); }

/* ---------- CTA banner ---------- */

.cta-banner {
    background: linear-gradient(120deg, var(--navy), var(--navy-light));
    border-radius: var(--radius-lg);
    padding: 56px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--white);
    gap: 24px;
    flex-wrap: wrap;
}
.cta-banner h2 { color: var(--white); margin-bottom: 6px; }
.cta-banner p { color: rgba(255,255,255,0.7); }

/* ---------- Footer ---------- */

.site-footer {
    background: var(--navy-deep);
    color: rgba(255,255,255,0.6);
    padding: 72px 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 40px;
    padding-bottom: 48px;
}
.footer-grid h4 { color: var(--white); font-size: 0.95rem; margin-bottom: 18px; }
.footer-grid ul li { margin-bottom: 10px; }
.footer-grid ul a:hover { color: var(--gold); }
.footer-about p { color: rgba(255,255,255,0.55); font-size: 0.9rem; margin: 16px 0 20px; max-width: 280px; }
.footer-logo { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: var(--white); }
.footer-logo span { color: var(--gold); }
.social-row { display: flex; gap: 10px; }
.social-row a {
    width: 36px; height: 36px;
    border: 1px solid var(--line-dark);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem;
}
.social-row a:hover { background: var(--gold); color: var(--navy-deep); border-color: var(--gold); }
.footer-bottom {
    border-top: 1px solid var(--line-dark);
    padding: 22px 0;
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    flex-wrap: wrap;
    gap: 10px;
}

/* ---------- Forms (shared: auth, apply, contact) ---------- */

.form-shell {
    max-width: 480px;
    margin: 0 auto;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-sm);
}
.form-shell.wide { max-width: 720px; }
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 7px;
}
.form-group .hint { font-size: 0.78rem; color: var(--slate); margin-top: 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    color: var(--ink);
    transition: border-color 0.15s ease;
}
.form-control:focus { border-color: var(--navy); outline: none; background: var(--white); }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235B6678' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
textarea.form-control { resize: vertical; min-height: 110px; }

.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    margin-bottom: 20px;
}
.alert-success { background: rgba(46,125,91,0.1); color: var(--success); border: 1px solid rgba(46,125,91,0.25); }
.alert-error { background: rgba(192,57,43,0.08); color: var(--danger); border: 1px solid rgba(192,57,43,0.22); }

.auth-meta { text-align: center; margin-top: 20px; font-size: 0.9rem; color: var(--slate); }
.auth-meta a { color: var(--navy); font-weight: 600; border-bottom: 1.5px solid var(--gold); }

/* ---------- Badges ---------- */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.76rem;
    font-weight: 600;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.badge-pending  { background: rgba(232,163,61,0.14); color: var(--gold-dark); }
.badge-approved { background: rgba(46,125,91,0.12); color: var(--success); }
.badge-rejected { background: rgba(192,57,43,0.1); color: var(--danger); }
.badge-active   { background: rgba(27,58,102,0.1); color: var(--navy-light); }
.badge-completed{ background: rgba(46,125,91,0.12); color: var(--success); }
.badge-due      { background: rgba(232,163,61,0.18); color: var(--gold-dark); }

/* ---------- Breadcrumb / page header ---------- */

.page-header {
    background: var(--navy);
    color: var(--white);
    padding: 56px 0;
    text-align: center;
}
.page-header h1 { color: var(--white); margin-bottom: 10px; }
.page-header .crumbs { color: rgba(255,255,255,0.55); font-size: 0.88rem; }
.page-header .crumbs a:hover { color: var(--gold); }

/* ---------- Misc ---------- */

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.divider { height: 1px; background: var(--line); margin: 48px 0; }
.tag-pill {
    display: inline-block;
    background: var(--paper-dim);
    color: var(--navy);
    font-size: 0.78rem;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 500;
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
    .hero-grid { grid-template-columns: 1fr; }
    .loan-grid, .steps-grid, .testi-grid, .blog-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .loan-grid, .steps-grid, .testi-grid, .blog-grid, .footer-grid { grid-template-columns: 1fr; }
    .ledger-strip { flex-wrap: wrap; }
    .ledger-item { flex: 1 1 50%; border-bottom: 1px solid var(--line-dark); }
    .form-row { grid-template-columns: 1fr; }
    .calc-panel { padding: 28px; }
    .cta-banner { padding: 36px; text-align: center; justify-content: center; }
    .section { padding: 56px 0; }
}
