/* ============================================
   JPTrust Financing — Design System
   Inspired by Melio fintech branding
   ============================================ */

:root {
    --brand-primary: #1A56DB;
    --brand-primary-dark: #1443AB;
    --brand-primary-light: #EBF1FF;
    --brand-primary-muted: #D6E2FF;
    --brand-secondary: #6590E6;
    --brand-rgb: 26, 86, 219;
    --brand-ink: #0B1B3F;
    --brand-ink-soft: #233152;
    --brand-accent: #0FB57E;
    --brand-accent-light: #E7F8F2;
    --brand-accent-rgb: 15, 181, 126;

    --color-text: #0F172A;
    --color-text-secondary: #475569;
    --color-text-muted: #94A3B8;
    --color-border: #E2E8F0;
    --color-border-light: #F1F5F9;
    --color-bg: #FFFFFF;
    --color-bg-subtle: #F8FAFC;
    --color-bg-muted: #F1F5F9;
    --color-success: #10B981;
    --color-warning: #F59E0B;
    --color-danger: #EF4444;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    --shadow-brand: 0 8px 24px rgba(var(--brand-rgb), 0.25);

    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --header-height: 72px;
    --sidebar-width: 260px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    overflow-x: hidden;
}

body.nav-open {
    overflow: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: inherit; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow {
    max-width: 960px;
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5 {
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; font-weight: 600; }

.text-gradient {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--brand-primary);
    margin-bottom: 16px;
}

.section-label::before {
    content: '';
    width: 24px;
    height: 2px;
    background: var(--brand-primary);
    border-radius: 2px;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--brand-primary);
    color: white;
    box-shadow: var(--shadow-brand);
}

.btn-primary:hover {
    background: var(--brand-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(var(--brand-rgb), 0.35);
}

.btn-secondary {
    background: var(--color-bg);
    color: var(--color-text);
    border-color: var(--color-border);
}

.btn-secondary:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    background: var(--brand-primary-light);
}

.btn-ghost {
    background: transparent;
    color: var(--color-text-secondary);
    padding: 12px 16px;
}

.btn-ghost:hover {
    color: var(--brand-primary);
    background: var(--brand-primary-light);
}

.btn-outline {
    background: transparent;
    color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.btn-outline:hover {
    background: var(--brand-primary);
    color: white;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1rem;
    border-radius: var(--radius-lg);
}

.btn-block { width: 100%; }

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-md);
}

/* ---- Header ---- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.site-header.scrolled {
    border-bottom-color: var(--color-border);
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    gap: 16px;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: -0.02em;
    flex-shrink: 0;
    z-index: 1002;
}

.logo-text {
    white-space: nowrap;
}

.logo-mark { flex-shrink: 0; }

.nav-desktop {
    display: flex;
    align-items: center;
    gap: clamp(16px, 3vw, 32px);
}

.nav-desktop a {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    transition: color var(--transition);
    white-space: nowrap;
}

.nav-desktop a:hover { color: var(--brand-primary); }

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: var(--radius-md);
    z-index: 1002;
    transition: background var(--transition);
}

.mobile-toggle:hover {
    background: var(--color-bg-subtle);
}

.mobile-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
    transform-origin: center;
}

.mobile-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav overlay */
.nav-mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    top: var(--header-height);
    background: rgba(15, 23, 42, 0.4);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-mobile-overlay.is-open {
    display: block;
    opacity: 1;
}

.nav-mobile {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    padding: 8px 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    z-index: 1001;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.nav-mobile.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.nav-mobile a {
    display: block;
    padding: 14px 12px;
    font-weight: 500;
    font-size: 1rem;
    color: var(--color-text-secondary);
    border-radius: var(--radius-md);
    transition: background var(--transition), color var(--transition);
}

.nav-mobile a:hover,
.nav-mobile a:active {
    background: var(--brand-primary-light);
    color: var(--brand-primary);
}

.nav-mobile hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 12px 0;
}

.nav-mobile .btn {
    margin-top: 8px;
}

/* ---- Hero ---- */
.hero {
    padding: calc(var(--header-height) + 64px) 0 80px;
    background: linear-gradient(180deg, var(--brand-primary-light) 0%, var(--color-bg) 60%);
    overflow: hidden;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(var(--brand-rgb), 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.hero-content { position: relative; z-index: 1; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 6px 8px;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: 24px;
    box-shadow: var(--shadow-xs);
}

.hero-badge-dot {
    width: 8px;
    height: 8px;
    background: var(--brand-accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero h1 {
    margin-bottom: 20px;
    color: var(--color-text);
}

.hero-description {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    margin-bottom: 32px;
    max-width: 520px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

.hero-trust {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.hero-trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.hero-trust-item svg { color: var(--brand-accent); }

.hero-visual {
    position: relative;
    z-index: 1;
}

.hero-card {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--color-border-light);
    overflow: hidden;
}

.hero-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-card-dots {
    display: flex;
    gap: 6px;
}

.hero-card-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-border);
}

.hero-card-dots span:first-child { background: #FF5F57; }
.hero-card-dots span:nth-child(2) { background: #FFBD2E; }
.hero-card-dots span:nth-child(3) { background: #28CA41; }

.hero-card-body { padding: 24px; }

.balance-display {
    margin-bottom: 24px;
}

.balance-label {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin-bottom: 4px;
}

.balance-amount {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.hero-preview-muted {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-muted);
    letter-spacing: -0.02em;
}

.hero-preview-empty {
    padding: 16px;
    background: var(--color-bg-subtle);
    border-radius: var(--radius-md);
    text-align: center;
}

.hero-preview-empty p {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.balance-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-success);
    margin-top: 4px;
}

.hero-quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    background: var(--color-bg-subtle);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    transition: all var(--transition);
    cursor: pointer;
}

.quick-action:hover {
    background: var(--brand-primary-light);
    color: var(--brand-primary);
}

.quick-action-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    color: var(--brand-primary);
}

.recent-tx {
    border-top: 1px solid var(--color-border-light);
    padding-top: 20px;
}

.recent-tx h4 {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin-bottom: 12px;
    font-weight: 500;
}

.tx-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
}

.tx-item + .tx-item { border-top: 1px solid var(--color-border-light); }

.tx-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tx-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.tx-icon.deposit { background: var(--brand-accent-light); color: var(--brand-accent); }
.tx-icon.withdraw { background: #FEF3C7; color: #D97706; }

.tx-name { font-size: 0.875rem; font-weight: 500; }
.tx-date { font-size: 0.75rem; color: var(--color-text-muted); }
.tx-amount { font-size: 0.875rem; font-weight: 600; }
.tx-amount.positive { color: var(--color-success); }
.tx-amount.negative { color: var(--color-text); }

/* ---- Stats Bar ---- */
.stats-bar {
    padding: 48px 0;
    background: var(--color-bg-subtle);
    border-top: 1px solid var(--color-border-light);
    border-bottom: 1px solid var(--color-border-light);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--brand-primary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

/* ---- Sections ---- */
.section {
    padding: 96px 0;
}

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 64px;
}

.section-header p {
    font-size: 1.0625rem;
    color: var(--color-text-secondary);
    margin-top: 16px;
    line-height: 1.7;
}

.section-alt { background: var(--color-bg-subtle); }

/* ---- Financing Cards ---- */
.financing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.financing-card {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 32px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.financing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
    opacity: 0;
    transition: opacity var(--transition);
}

.financing-card:hover {
    border-color: var(--brand-primary-muted);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.financing-card:hover::before { opacity: 1; }

.financing-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-primary-light);
    border-radius: var(--radius-lg);
    color: var(--brand-primary);
    margin-bottom: 20px;
}

.financing-card h3 { margin-bottom: 12px; }

.financing-card p {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.financing-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.financing-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.financing-features svg { color: var(--brand-accent); flex-shrink: 0; }

.financing-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--brand-primary);
    transition: gap var(--transition);
}

.financing-link:hover { gap: 10px; }

/* ---- How It Works ---- */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    position: relative;
}

.steps-grid::before {
    content: '';
    position: absolute;
    top: 36px;
    left: 12.5%;
    right: 12.5%;
    height: 2px;
    background: linear-gradient(90deg, var(--brand-primary-muted), var(--brand-primary), var(--brand-primary-muted));
    z-index: 0;
}

.step-card {
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    background: white;
    border: 2px solid var(--brand-primary-muted);
    border-radius: 50%;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--brand-primary);
    transition: all var(--transition);
}

.step-card:hover .step-number {
    background: var(--brand-primary);
    color: white;
    border-color: var(--brand-primary);
    box-shadow: var(--shadow-brand);
}

.step-card h3 { margin-bottom: 8px; font-size: 1.0625rem; }

.step-card p {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* ---- Features Grid ---- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.feature-card {
    display: flex;
    gap: 20px;
    padding: 28px;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
}

.feature-card:hover {
    border-color: var(--brand-primary-muted);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-primary-light);
    border-radius: var(--radius-md);
    color: var(--brand-primary);
}

.feature-card h3 { margin-bottom: 8px; font-size: 1.0625rem; }

.feature-card p {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* ---- Partner Banner ---- */
.partner-banner {
    padding: 64px 0;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    color: white;
    text-align: center;
}

.partner-banner h2 { margin-bottom: 12px; }

.partner-banner p {
    font-size: 1.0625rem;
    color: #94A3B8;
    max-width: 560px;
    margin: 0 auto 32px;
}

.partner-logo-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 32px;
}

.partner-logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.partner-divider {
    width: 1px;
    height: 32px;
    background: #475569;
}

/* ---- CTA ---- */
.cta-section {
    padding: 96px 0;
    text-align: center;
}

.cta-box {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
    border-radius: var(--radius-xl);
    padding: 64px 48px;
    color: white;
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.cta-box h2 { margin-bottom: 16px; position: relative; }

.cta-box p {
    font-size: 1.0625rem;
    opacity: 0.9;
    max-width: 480px;
    margin: 0 auto 32px;
    position: relative;
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    position: relative;
}

.cta-box .btn-primary {
    background: white;
    color: var(--brand-primary);
    box-shadow: var(--shadow-lg);
}

.cta-box .btn-primary:hover {
    background: var(--color-bg-subtle);
}

.cta-box .btn-secondary {
    background: transparent;
    color: white;
    border-color: rgba(255, 255, 255, 0.4);
}

.cta-box .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

/* ---- Shared forms ---- */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.form-input,
.form-select,
textarea.form-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.9375rem;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    background: white;
    color: var(--color-text);
    transition: all var(--transition);
}

.form-input:focus,
.form-select:focus,
textarea.form-input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.12);
}

.form-hint {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin-top: 6px;
}

.form-group .label-hint {
    font-weight: 400;
    color: var(--color-text-muted);
}

.form-error {
    font-size: 0.8125rem;
    color: var(--color-danger);
    margin-top: 6px;
    display: none;
}

.form-group.has-error .form-input,
.form-group.has-error .form-select,
.form-group.has-error textarea.form-input {
    border-color: var(--color-danger);
}

.form-group.has-error .form-error { display: block; }

.form-input.is-readonly,
.form-input:disabled {
    background: var(--color-bg-subtle);
    color: var(--color-text-secondary);
    cursor: not-allowed;
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--brand-primary);
    flex-shrink: 0;
}

.form-checkbox label {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.55;
    font-weight: 400;
}

.form-checkbox label a {
    color: var(--brand-primary);
    font-weight: 500;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-grid .full { grid-column: 1 / -1; }

.empty-state {
    color: var(--color-text-muted);
    font-size: 0.9375rem;
    padding: 12px 0;
}

.legal-prose {
    max-width: 720px;
    margin: 0 auto;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

.legal-prose h1 { margin-bottom: 16px; color: var(--color-text); }
.legal-prose h2 { margin: 32px 0 12px; font-size: 1.25rem; color: var(--color-text); }
.legal-prose p { margin-bottom: 16px; }
.legal-prose ul { margin: 0 0 16px 1.15rem; list-style: disc; }
.legal-prose li { margin-bottom: 8px; }

.page-hero {
    padding: calc(var(--header-height) + 48px) 0 40px;
    background: linear-gradient(180deg, var(--brand-primary-light) 0%, var(--color-bg) 100%);
}

.page-hero h1 { max-width: 18em; margin-bottom: 16px; }
.page-hero-lead {
    max-width: 640px;
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
}
.page-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.content-section { padding: 24px 0 80px; }
.content-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 48px;
    align-items: start;
}
.content-prose { color: var(--color-text-secondary); line-height: 1.75; min-width: 0; }
.content-prose h2 {
    margin: 40px 0 12px;
    font-size: 1.5rem;
    color: var(--color-text);
}
.content-prose h2:first-child { margin-top: 0; }
.content-prose h3 { margin: 28px 0 8px; color: var(--color-text); }
.content-prose p { margin-bottom: 16px; }
.content-prose ul, .content-prose ol { margin: 0 0 16px 1.2rem; }
.content-prose li { margin-bottom: 8px; }
.content-prose a { color: var(--brand-primary); font-weight: 600; }

.content-aside {
    position: sticky;
    top: calc(var(--header-height) + 16px);
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.content-aside-card {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 18px;
}
.content-aside-card h2 {
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}
.content-aside-card a {
    display: block;
    padding: 8px 0;
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    border-top: 1px solid var(--color-border-light);
}
.content-aside-card a:first-of-type { border-top: none; }
.content-aside-card a:hover,
.content-aside-card a.is-current { color: var(--brand-primary); font-weight: 600; }

.guide-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 8px 0 24px;
}
.guide-card {
    background: var(--color-bg-subtle);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 20px;
}
.guide-card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.guide-card p { margin: 0; font-size: 0.9375rem; }

.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: white;
    padding: 0 18px;
}
.faq-item summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--color-text);
    padding: 16px 0;
    list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p { margin: 0; padding-bottom: 16px; }

.policy-updated {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .form-grid { grid-template-columns: 1fr; }
}

/* ---- Footer ---- */
.site-footer {
    background: var(--color-bg-subtle);
    border-top: 1px solid var(--color-border);
    padding: 64px 0 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-tagline {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    margin: 16px 0 12px;
    max-width: 280px;
}

.footer-partner {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.footer-partner a {
    color: var(--brand-primary);
    font-weight: 600;
}

.footer-col h4 {
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.footer-col ul { display: flex; flex-direction: column; gap: 10px; }

.footer-col a {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    transition: color var(--transition);
}

.footer-col a:hover { color: var(--brand-primary); }

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 32px;
    border-top: 1px solid var(--color-border);
    flex-wrap: wrap;
    gap: 16px;
}

.footer-bottom p {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.footer-badges {
    display: flex;
    gap: 12px;
}

.badge-trust {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 12px;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    color: var(--color-text-secondary);
}

/* ---- Animations ---- */
.fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Responsive ---- */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive .tx-table {
    min-width: 520px;
}

@media (max-width: 1100px) {
    .nav-desktop { display: none; }
    .header-actions { display: none; }
    .mobile-toggle { display: flex; }
}

@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; gap: 48px; }
    .hero-visual { max-width: 480px; margin: 0 auto; width: 100%; }
    .financing-grid { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
    .steps-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
    .steps-grid::before { display: none; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .content-shell { grid-template-columns: 1fr; }
    .content-aside { position: static; }
}

@media (max-width: 768px) {
    :root { --header-height: 64px; }

    .container { padding: 0 16px; }

    .hero {
        padding: calc(var(--header-height) + 40px) 0 56px;
    }

    .hero-description { font-size: 1rem; }

    .hero-trust {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .hero-quick-actions {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .quick-action { padding: 12px 4px; }

    .balance-amount { font-size: 1.75rem; }

    .features-grid { grid-template-columns: 1fr; }
    .guide-grid { grid-template-columns: 1fr; }
    .page-hero h1 { max-width: none; }
    .page-hero-lead { font-size: 1rem; }
    .page-hero-actions .btn { width: 100%; }
    .steps-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .footer-badges { flex-wrap: wrap; justify-content: center; }
    .cta-box { padding: 48px 24px; }
    .section { padding: 64px 0; }
    .section-header { margin-bottom: 40px; }

    .partner-logo-row {
        flex-direction: column;
        gap: 12px;
    }

    .partner-divider {
        width: 48px;
        height: 1px;
    }

    .logo-text {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; }
    .stats-grid { grid-template-columns: 1fr; }
    .stat-number { font-size: 1.75rem; }
    .financing-card { padding: 24px; }
    .feature-card { flex-direction: column; }
}
