/* 
    =========================================================================
    FILE: site.css  —  Swallet.inc Premium Design System v2.0
    PURPOSE: Global HSL color tokens, glassmorphism panels, spring animations,
             bento grid cards, micro-interactions, and full device responsiveness.
    =========================================================================
*/

/* ─────────────────────────────────────────────────────────────────────────────
   1. GOOGLE FONTS — Outfit (headings) + Inter (body)
   ───────────────────────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800;900&family=Inter:wght@400;500;600;700;800&display=swap');

/* ─────────────────────────────────────────────────────────────────────────────
   2. LIGHT MODE CSS DESIGN TOKENS
   ───────────────────────────────────────────────────────────────────────────── */
:root {
    /* Accent (user-overridable) */
    --accent-color: #000000;
    --accent-color-dark: #000000;
    --on-accent: #FFFFFF;

    /* HSL Zinc Neutral Scale */
    --zinc-50:  hsl(0, 0%, 98%);
    --zinc-100: hsl(240, 5%, 96%);
    --zinc-200: hsl(240, 6%, 90%);
    --zinc-300: hsl(240, 5%, 84%);
    --zinc-400: hsl(240, 5%, 58%);
    --zinc-500: hsl(240, 4%, 46%);
    --zinc-600: hsl(240, 5%, 34%);
    --zinc-700: hsl(240, 5%, 22%);
    --zinc-800: hsl(240, 4%, 16%);
    --zinc-900: hsl(240, 6%, 10%);

    /* Semantic Colors */
    --primary-black: hsl(240, 6%, 10%);
    --primary-white: hsl(0, 0%, 100%);

    /* Glass & Panels */
    --glass-bg:      rgba(255, 255, 255, 0.72);
    --glass-border:  rgba(255, 255, 255, 0.55);
    --glass-shadow:  0 8px 40px rgba(0, 0, 0, 0.10), 0 1.5px 0 rgba(255,255,255,0.6) inset;
    --card-shadow:   0 4px 24px rgba(0, 0, 0, 0.07), 0 1px 4px rgba(0,0,0,0.04);
    --card-shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.14), 0 4px 16px rgba(0,0,0,0.06);

    /* Border Radii */
    --radius-sm:  0.75rem;
    --radius-md:  1rem;
    --radius-lg:  1.5rem;
    --radius-xl:  2rem;
    --radius-2xl: 2.5rem;
    --radius-3xl: 3rem;

    /* Motion */
    --spring:  cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out: cubic-bezier(0.4, 0, 0.2, 1);
    --duration-fast:   0.18s;
    --duration-normal: 0.36s;
    --duration-slow:   0.55s;
}

/* ─────────────────────────────────────────────────────────────────────────────
   3. DARK MODE TOKENS
   ───────────────────────────────────────────────────────────────────────────── */
[data-theme='dark'] {
    --zinc-50:  hsl(240, 6%, 10%);
    --zinc-100: hsl(240, 5%, 14%);
    --zinc-200: hsl(240, 5%, 19%);
    --zinc-300: hsl(240, 5%, 26%);
    --zinc-400: hsl(240, 5%, 55%);
    --zinc-500: hsl(240, 5%, 68%);
    --zinc-600: hsl(240, 5%, 78%);
    --zinc-700: hsl(240, 5%, 86%);
    --zinc-800: hsl(240, 5%, 92%);
    --zinc-900: hsl(0, 0%, 98%);

    --primary-black: hsl(0, 0%, 95%);
    --primary-white: hsl(240, 6%, 10%);

    --glass-bg:     rgba(20, 20, 30, 0.75);
    --glass-border: rgba(255, 255, 255, 0.10);
    --glass-shadow: 0 8px 40px rgba(0, 0, 0, 0.45), 0 1px 0 rgba(255,255,255,0.05) inset;
    --card-shadow:  0 4px 24px rgba(0, 0, 0, 0.30);
    --card-shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.50);
}

/* ─────────────────────────────────────────────────────────────────────────────
   4. BASE RESET & TYPOGRAPHY
   ───────────────────────────────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--zinc-50);
    color: var(--primary-black);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    letter-spacing: -0.011em;
    transition: background-color var(--duration-normal) var(--ease-out),
                color var(--duration-normal) var(--ease-out);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Premium heading typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--accent-color);
    transition: color var(--duration-slow) var(--ease-out);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }

p { color: var(--zinc-600); line-height: 1.7; }
a { transition: all var(--duration-fast) var(--ease-out); }

/* ─────────────────────────────────────────────────────────────────────────────
   5. GLASSMORPHISM COMPONENTS
   ───────────────────────────────────────────────────────────────────────────── */
.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(24px) saturate(1.6);
    -webkit-backdrop-filter: blur(24px) saturate(1.6);
    box-shadow: var(--glass-shadow);
    border-radius: var(--radius-2xl);
    transition: all var(--duration-normal) var(--spring);
}

.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    box-shadow: var(--card-shadow);
    border-radius: var(--radius-xl);
    padding: 1.75rem;
    transition: all var(--duration-normal) var(--spring);
}

.glass-card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.75);
}

/* ─────────────────────────────────────────────────────────────────────────────
   6. PREMIUM BENTO CARD SYSTEM
   ───────────────────────────────────────────────────────────────────────────── */
.bento-card {
    background: var(--zinc-100);
    border: 1px solid var(--zinc-200);
    border-radius: var(--radius-2xl);
    padding: 2rem;
    color: var(--primary-black);
    box-shadow: var(--card-shadow);
    transition: all var(--duration-normal) var(--spring);
    position: relative;
    overflow: hidden;
}

/* Inner shimmer line at top */
.bento-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.7), transparent);
    border-radius: inherit;
}

.bento-card:hover {
    transform: translateY(-6px) scale(1.005);
    box-shadow: var(--card-shadow-hover);
    border-color: var(--zinc-300);
}

.bento-card:active {
    transform: translateY(-2px) scale(0.998);
}

/* Dark accent card variant */
.bento-card-black {
    background: var(--primary-black) !important;
    color: var(--primary-white) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4) !important;
}

.bento-card-black h1,
.bento-card-black h2,
.bento-card-black h3,
.bento-card-black p {
    color: var(--primary-white) !important;
}

/* Premium card variant */
.card-premium {
    background: var(--zinc-100);
    border: 1px solid var(--zinc-200);
    border-radius: var(--radius-xl);
    padding: 1.75rem;
    box-shadow: var(--card-shadow);
    transition: all var(--duration-normal) var(--spring);
}

.card-premium:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-3px);
}

/* ─────────────────────────────────────────────────────────────────────────────
   7. BUTTONS
   ───────────────────────────────────────────────────────────────────────────── */

/* Primary CTA */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--accent-color);
    color: var(--on-accent);
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-lg);
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    border: none;
    cursor: pointer;
    transition: all var(--duration-fast) var(--spring);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    filter: brightness(1.12);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.btn-primary:active {
    transform: scale(0.97);
    filter: brightness(0.95);
}

/* Secondary / Ghost */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--primary-black);
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-lg);
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    border: 1.5px solid var(--zinc-200);
    cursor: pointer;
    transition: all var(--duration-fast) var(--spring);
    text-decoration: none;
    white-space: nowrap;
}

.btn-secondary:hover {
    background: var(--zinc-100);
    border-color: var(--zinc-300);
    transform: translateY(-1px);
}

.btn-secondary:active {
    transform: scale(0.97);
}

/* Floating Action Button */
.btn-fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3.75rem;
    height: 3.75rem;
    background: var(--accent-color);
    color: var(--on-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0,0,0,0.15);
    border: 3px solid var(--zinc-50);
    z-index: 100;
    transition: all var(--duration-fast) var(--spring);
    cursor: pointer;
    text-decoration: none;
}

.btn-fab:hover {
    transform: scale(1.1) rotate(8deg);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
}

.btn-fab:active {
    transform: scale(0.95);
}

/* ─────────────────────────────────────────────────────────────────────────────
   8. FORM ELEMENTS — Premium inputs with animated focus rings
   ───────────────────────────────────────────────────────────────────────────── */
input, select, textarea {
    background: var(--zinc-100) !important;
    border: 1.5px solid var(--zinc-200) !important;
    color: var(--primary-black) !important;
    border-radius: var(--radius-lg);
    padding: 0.875rem 1.125rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: border-color var(--duration-fast) var(--ease-out),
                box-shadow var(--duration-fast) var(--ease-out),
                background var(--duration-fast) var(--ease-out);
    outline: none;
    width: 100%;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--accent-color) !important;
    background: var(--primary-white) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-color) 15%, transparent) !important;
}

input:hover:not(:focus), select:hover:not(:focus), textarea:hover:not(:focus) {
    border-color: var(--zinc-300) !important;
}

::placeholder {
    color: var(--zinc-400) !important;
    opacity: 1;
}

label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--zinc-400);
    display: block;
    margin-bottom: 0.4rem;
}

/* ─────────────────────────────────────────────────────────────────────────────
   9. TABLES — Premium borderless with hover states
   ───────────────────────────────────────────────────────────────────────────── */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

thead th {
    font-family: 'Outfit', sans-serif;
    text-align: left;
    color: var(--zinc-400);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.875rem 1rem;
    border-bottom: 1.5px solid var(--zinc-200);
}

td {
    padding: 1.1rem 1rem;
    border-bottom: 1px solid var(--zinc-200);
    color: var(--primary-black);
    font-size: 0.9rem;
    transition: background var(--duration-fast) var(--ease-out);
}

tbody tr {
    transition: background var(--duration-fast) var(--ease-out);
}

tbody tr:hover td {
    background: var(--zinc-100);
}

tr:last-child td {
    border-bottom: none;
}

/* ─────────────────────────────────────────────────────────────────────────────
   10. PROGRESS BAR
   ───────────────────────────────────────────────────────────────────────────── */
.progress-bar-container {
    height: 7px;
    background: var(--zinc-200);
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), color-mix(in srgb, var(--accent-color) 70%, transparent));
    border-radius: 999px;
    transition: width 1.2s var(--spring);
    position: relative;
    overflow: hidden;
}

/* Shimmer effect on progress bar */
.progress-bar-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.35) 50%, transparent 100%);
    animation: progress-shimmer 2s infinite;
}

@keyframes progress-shimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

/* ─────────────────────────────────────────────────────────────────────────────
   11. CUSTOM CONFIRM MODAL
   ───────────────────────────────────────────────────────────────────────────── */
#customConfirmModal {
    transition: all var(--duration-normal) var(--ease-out);
}

#customConfirmModal .modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    z-index: -1;
}

.modal-box {
    background: var(--zinc-50);
    border: 1px solid var(--zinc-200);
    border-radius: var(--radius-2xl);
    padding: 2.5rem;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(255,255,255,0.7) inset;
    max-width: 420px;
    width: 90%;
    transform: scale(0.88) translateY(24px);
    opacity: 0;
    transition: all var(--duration-normal) var(--spring);
}

#customConfirmModal.active .modal-box {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-btn-confirm {
    background: var(--primary-black);
    color: var(--primary-white);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 0.9rem;
    flex: 1;
    border: none;
    cursor: pointer;
    transition: all var(--duration-fast) var(--spring);
}

.modal-btn-confirm:hover {
    transform: translateY(-2px) scale(1.03);
    filter: brightness(1.15);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.modal-btn-confirm:active { transform: scale(0.97); }

.modal-btn-cancel {
    background: transparent;
    color: var(--primary-black);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 0.9rem;
    border: 1.5px solid var(--zinc-200);
    flex: 1;
    cursor: pointer;
    transition: all var(--duration-fast) var(--spring);
}

.modal-btn-cancel:hover {
    background: var(--zinc-100);
    border-color: var(--zinc-300);
    transform: translateY(-1px);
}

/* ─────────────────────────────────────────────────────────────────────────────
   12. DASHED EMPTY STATE CONTAINER
   ───────────────────────────────────────────────────────────────────────────── */
.dashed-container {
    border: 2px dashed var(--zinc-200);
    border-radius: var(--radius-2xl);
    padding: 4rem 2rem;
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all var(--duration-normal) var(--ease-out);
}

.dashed-container:hover {
    border-color: var(--zinc-300);
    background: var(--zinc-100);
}

/* ─────────────────────────────────────────────────────────────────────────────
   13. SKELETON SHIMMER LOADER
   ───────────────────────────────────────────────────────────────────────────── */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--zinc-200) 25%,
        var(--zinc-100) 50%,
        var(--zinc-200) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.6s ease-in-out infinite;
    border-radius: var(--radius-md);
}

@keyframes skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text       { height: 1em; margin-bottom: 0.5em; }
.skeleton-text.wide  { width: 100%; }
.skeleton-text.mid   { width: 65%; }
.skeleton-text.short { width: 40%; }
.skeleton-card       { height: 120px; width: 100%; }
.skeleton-row        { height: 56px; width: 100%; margin-bottom: 8px; }

/* ─────────────────────────────────────────────────────────────────────────────
   14. BADGE PILLS
   ───────────────────────────────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.badge-accent {
    background: color-mix(in srgb, var(--accent-color) 12%, transparent);
    color: var(--accent-color);
    border: 1px solid color-mix(in srgb, var(--accent-color) 20%, transparent);
}

.badge-success {
    background: hsl(142, 72%, 94%);
    color: hsl(142, 70%, 30%);
    border: 1px solid hsl(142, 60%, 82%);
}

.badge-danger {
    background: hsl(0, 86%, 96%);
    color: hsl(0, 72%, 46%);
    border: 1px solid hsl(0, 80%, 88%);
}

.badge-neutral {
    background: var(--zinc-100);
    color: var(--zinc-500);
    border: 1px solid var(--zinc-200);
}

/* ─────────────────────────────────────────────────────────────────────────────
   15. NAVIGATION PREMIUM OVERRIDES
   ───────────────────────────────────────────────────────────────────────────── */
nav.swallet-nav {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(28px) saturate(1.8);
    -webkit-backdrop-filter: blur(28px) saturate(1.8);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 1px 0 rgba(255,255,255,0.5), 0 4px 20px rgba(0,0,0,0.05);
    transition: all var(--duration-normal) var(--ease-out);
}

/* Nav link hover spring */
.nav-link {
    position: relative;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.875rem;
    text-decoration: none;
    padding: 0.35rem 0;
    transition: color var(--duration-fast) var(--ease-out);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    border-radius: 999px;
    transition: width var(--duration-normal) var(--spring);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* Icon buttons in nav */
.nav-icon-btn {
    width: 2.625rem;
    height: 2.625rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--zinc-100);
    color: var(--primary-black);
    border: 1px solid var(--zinc-200);
    cursor: pointer;
    transition: all var(--duration-fast) var(--spring);
}

.nav-icon-btn:hover {
    background: var(--zinc-200);
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(0,0,0,0.10);
}

.nav-icon-btn:active {
    transform: scale(0.93);
}

/* ─────────────────────────────────────────────────────────────────────────────
   16. SOCIAL AUTH BUTTONS
   ───────────────────────────────────────────────────────────────────────────── */
.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: var(--primary-white);
    border: 1.5px solid var(--zinc-200);
    border-radius: var(--radius-lg);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--duration-fast) var(--spring);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.social-btn:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
    border-color: var(--zinc-300);
    background: var(--zinc-50);
}

.social-btn:active {
    transform: scale(0.96);
}

/* ─────────────────────────────────────────────────────────────────────────────
   17. PAGE-LEVEL ANIMATIONS
   ───────────────────────────────────────────────────────────────────────────── */

/* Fade-up on page load */
@keyframes fade-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: none; }
}

.animate-fade-up {
    animation: fade-up 0.6s var(--spring) both;
}

.animate-fade-up-delay-1 { animation-delay: 0.08s; }
.animate-fade-up-delay-2 { animation-delay: 0.16s; }
.animate-fade-up-delay-3 { animation-delay: 0.24s; }
.animate-fade-up-delay-4 { animation-delay: 0.32s; }
.animate-fade-up-delay-5 { animation-delay: 0.40s; }

/* Scale pop-in */
@keyframes pop-in {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}

.animate-pop-in {
    animation: pop-in 0.4s var(--spring) both;
}

/* Float for decorative elements */
@keyframes float-slow {
    0%, 100% { transform: translateY(0)   rotate(0deg); }
    50%       { transform: translateY(-28px) rotate(8deg); }
}

@keyframes float-medium {
    0%, 100% { transform: translateY(0)   rotate(0deg); }
    50%       { transform: translateY(-38px) rotate(-8deg); }
}

@keyframes float-fast {
    0%, 100% { transform: translateY(0)   rotate(0deg); }
    50%       { transform: translateY(-18px) rotate(5deg); }
}

/* Gradient shimmer for accent text */
@keyframes gradient-shift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.text-gradient {
    background: linear-gradient(135deg, var(--accent-color), hsl(220, 80%, 60%), var(--accent-color));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 4s ease infinite;
}

/* Pulse glow for accent badges */
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-color) 35%, transparent); }
    50%       { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent-color) 0%, transparent); }
}

.pulse-glow {
    animation: pulse-glow 2.5s ease-in-out infinite;
}

/* ─────────────────────────────────────────────────────────────────────────────
   18. RESPONSIVE UTILITIES
   ───────────────────────────────────────────────────────────────────────────── */

/* Responsive bento grid */
.bento-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

@media (min-width: 768px) {
    .bento-grid { gap: 1.5rem; }
    .bento-card { padding: 2.25rem; }
}

@media (min-width: 1024px) {
    .bento-grid { gap: 1.75rem; }
    .bento-card { padding: 2.5rem; }
}

/* Responsive padding adjustments */
@media (max-width: 640px) {
    .bento-card { padding: 1.5rem; border-radius: var(--radius-xl); }
    .glass-card { padding: 1.25rem; border-radius: var(--radius-lg); }
    .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
    .btn-fab { bottom: 1.25rem; right: 1.25rem; width: 3.25rem; height: 3.25rem; }
}

/* ─────────────────────────────────────────────────────────────────────────────
   19. SCROLLBAR CUSTOMIZATION
   ───────────────────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--zinc-300);
    border-radius: 999px;
    transition: background var(--duration-fast) var(--ease-out);
}
::-webkit-scrollbar-thumb:hover { background: var(--zinc-400); }

/* ─────────────────────────────────────────────────────────────────────────────
   20. SELECTION COLOR
   ───────────────────────────────────────────────────────────────────────────── */
::selection {
    background: color-mix(in srgb, var(--accent-color) 20%, transparent);
    color: var(--primary-black);
}

/* ─────────────────────────────────────────────────────────────────────────────
   21. UTILITY HELPERS
   ───────────────────────────────────────────────────────────────────────────── */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--zinc-200), transparent);
    margin: 1.5rem 0;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--zinc-100);
    color: var(--zinc-600);
    border: 1px solid var(--zinc-200);
    transition: all var(--duration-fast) var(--ease-out);
}

/* Stat number styling */
.stat-number {
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: 2rem;
    letter-spacing: -0.04em;
    line-height: 1;
}

.stat-label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--zinc-400);
}

/* Currency amount display */
.amount-display {
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.1;
}

/* ─────────────────────────────────────────────────────────────────────────────
   22. PREMIUM GLOBAL LOADER & PAGE TRANSITION
   ───────────────────────────────────────────────────────────────────────────── */
#page-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background-color: var(--zinc-50);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity var(--duration-normal) var(--ease-out), visibility var(--duration-normal);
}
#page-loader.fade-out {
    opacity: 0;
    visibility: hidden;
}
.loader-logo {
    animation: scale-up-pulse 1.8s var(--spring) infinite;
}
@keyframes scale-up-pulse {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.08); opacity: 1; }
}

/* ─────────────────────────────────────────────────────────────────────────────
   23. GLOWING HOVER CARDS & REVEAL ANIMATIONS
   ───────────────────────────────────────────────────────────────────────────── */
.glow-card {
    position: relative;
    overflow: hidden;
}
.glow-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: radial-gradient(circle 120px at var(--mouse-x, 0) var(--mouse-y, 0), var(--accent-color), transparent 80%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-out);
}
.glow-card:hover::after {
    opacity: 0.85;
}

.reveal-fade {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity var(--duration-normal) var(--spring), transform var(--duration-normal) var(--spring);
}
.reveal-fade.active {
    opacity: 1;
    transform: translateY(0);
}

/* ─────────────────────────────────────────────────────────────────────────────
   24. WHITE PAPER EDITORIAL DESIGN SYSTEM (FT / Bloomberg Modern Print Fintech)
   ───────────────────────────────────────────────────────────────────────────── */
:root {
    --paper:             #F7F5EF;
    --surface:           #FFFFFF;
    --text-primary:      #111111;
    --text-secondary:    #444444;
    --text-muted:        #666666;
    --editorial-border:  rgba(0, 0, 0, 0.08);
    --accent-red:        #FF3B30;
    --accent-green:      #22C55E;
    --duration-slow:     0.8s;
}

/* Hard Fix for Empty Footer Space & Overflow protection */
html, body {
    overflow-x: hidden;
    height: auto;
    min-height: 100%;
    margin: 0;
    padding: 0;
}

body {
    overflow-y: auto;
}

.landing-body {
    background-color: var(--paper);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    /* CRITICAL: kill body-level transform that converts position:fixed to
       position:absolute — this was causing .grain-overlay (height:200%)
       to stretch relative to body scroll height → massive blank space */
    transform: none !important;
    animation: none !important;
}

/* Kill ghost pseudo-elements that could occupy layout height */
body::after,
main::after,
.landing-main-wrap::after {
    display: none !important;
    content: none !important;
    height: 0 !important;
}

main,
.landing-main-wrap {
    position: relative;
    overflow: hidden;
}

/* Footer: no trailing space */
footer {
    margin: 0;
    padding-bottom: 0;
    min-height: auto;
    position: relative;
    z-index: 20;
}

/* Kill trailing margins/padding on last section before footer */
section:last-of-type {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Constrain hero & collage background layers from leaking height */
.hero-background,
.collage-layer,
.section-collage-wrap {
    position: relative;
    overflow: hidden;
    max-height: 100%;
}

/* Footer divider: clean 1px editorial separator */
.footer-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
    margin: 0;
    padding: 0;
}

/* ─────────────────────────────────────────────────────────────────────────────
   25. GRAIN TEXTURE & LAYER STACK (Subtle Multiplied Grain)
   ───────────────────────────────────────────────────────────────────────────── */
.grain-overlay {
    position: fixed;
    /* Use viewport units — immune to ancestor transform contexts */
    top: -50vh;
    left: -50vw;
    width: 200vw;
    height: 200vh;
    background: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%" height="100%" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
    opacity: 0.02;
    mix-blend-mode: multiply;
    animation: grainMove 8s steps(10) infinite;
    pointer-events: none;
    z-index: 9999;
}

@keyframes grainMove {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-5%, -10%); }
    20% { transform: translate(-15%, 5%); }
    30% { transform: translate(7%, -25%); }
    40% { transform: translate(-5%, 25%); }
    50% { transform: translate(-15%, 10%); }
    60% { transform: translate(15%, 0%); }
    70% { transform: translate(0%, 15%); }
    80% { transform: translate(3%, 35%); }
    90% { transform: translate(-10%, 10%); }
}

.paper-texture {
    position: absolute;
    inset: 0;
    opacity: 0.04;
    pointer-events: none;
    background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="paper"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.04" numOctaves="4" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%" height="100%" filter="url(%23paper)"/%3E%3C/svg%3E');
    z-index: 1;
}

.grid-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.06;
    pointer-events: none;
    background-size: 48px 48px;
    background-image: linear-gradient(to right, rgba(0,0,0,0.06) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(0,0,0,0.06) 1px, transparent 1px);
    z-index: 2;
}

.collage-mask {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 30%, var(--paper) 95%),
                linear-gradient(to bottom, var(--paper) 0%, transparent 15%, transparent 85%, var(--paper) 100%);
    pointer-events: none;
    z-index: 4;
}

/* ─────────────────────────────────────────────────────────────────────────────
   26. COLLAGE FILTER & CONTAINER STACK (Visible High Contrast)
   ───────────────────────────────────────────────────────────────────────────── */
.section-collage {
    opacity: 0.40;
    filter: grayscale(100%) contrast(1.15) brightness(0.95);
    transition: transform var(--duration-slow) cubic-bezier(0.16, 1, 0.3, 1);
    mask-image: linear-gradient(to right, black, transparent);
    -webkit-mask-image: linear-gradient(to right, black, transparent);
    z-index: 3;
}

.section-collage-wrap:hover .section-collage {
    transform: scale(1.03);
}

/* ─────────────────────────────────────────────────────────────────────────────
   27. STICKY COLLAGE GRID & WIDGET CARDS
   ───────────────────────────────────────────────────────────────────────────── */
@media (min-width: 1024px) {
    .sticky-collage-panel {
        position: sticky;
        top: 120px;
        height: calc(100vh - 200px);
        overflow: hidden;
    }
}

/* Mobile/Tablet: disable sticky to prevent layout overflow */
@media (max-width: 991px) {
    .sticky-collage-panel {
        position: relative !important;
        top: auto !important;
        height: auto !important;
        overflow: hidden;
    }
}

.editorial-card {
    background: var(--surface);
    border: 1px solid var(--editorial-border);
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.editorial-card:hover {
    border-color: rgba(0, 0, 0, 0.16);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

/* ─────────────────────────────────────────────────────────────────────────────
   28. TYPOGRAPHY SCALES (Mobile First Responsive Scale)
   ───────────────────────────────────────────────────────────────────────────── */
.editorial-headline {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 0.9;
    text-transform: uppercase;
    color: var(--text-primary);
}

/* Exact typography constraints requested */
.editorial-headline-large {
    font-size: 2.625rem; /* 42px on Mobile */
}

@media (min-width: 768px) {
    .editorial-headline-large {
        font-size: 4rem; /* 64px on Tablet */
    }
}

@media (min-width: 1024px) {
    .editorial-headline-large {
        font-size: 5.25rem; /* 84px on Desktop */
    }
}

.section-separator {
    border-top: 1px solid var(--editorial-border);
}

.section-index-label {
    font-family: monospace;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--accent-red);
    text-transform: uppercase;
    font-weight: bold;
}

/* Giant background indicator */
.hero-giant-indicator {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 14vw;
    font-weight: 950;
    color: rgba(0, 0, 0, 0.015);
    -webkit-text-stroke: 1px rgba(0, 0, 0, 0.03);
    line-height: 1;
    pointer-events: none;
    letter-spacing: -0.05em;
    user-select: none;
}

/* ─────────────────────────────────────────────────────────────────────────────
   29. SCROLL PROGRESS & CURSOR UTILITIES
   ───────────────────────────────────────────────────────────────────────────── */
.scroll-progress-line {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--accent-red);
    z-index: 10000;
    width: 0%;
    transition: width 0.1s ease-out;
}

.scroll-percentage-badge {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--surface);
    border: 1px solid var(--editorial-border);
    padding: 0.5rem 0.75rem;
    font-family: monospace;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 4px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.cursor-follower {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 1px solid var(--accent-red);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 10000;
    transition: transform 0.08s ease-out, opacity 0.3s ease;
    opacity: 0;
}

/* ─────────────────────────────────────────────────────────────────────────────
   30. REVEAL AND ACCORDIANS
   ───────────────────────────────────────────────────────────────────────────── */
.reveal-fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-fade-up.revealed {
    opacity: 1;
    transform: translateY(0);
}

.stagger-1 { transition-delay: 0.05s; }
.stagger-2 { transition-delay: 0.1s; }
.stagger-3 { transition-delay: 0.15s; }
.stagger-4 { transition-delay: 0.2s; }

.editorial-accordion-item {
    border-bottom: 1px solid var(--editorial-border);
}

.editorial-accordion-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 0;
    background: none;
    border: none;
    text-align: left;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.editorial-accordion-trigger:hover {
    color: var(--accent-green);
}

.editorial-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0;
}

.editorial-accordion-item.active .editorial-accordion-content {
    max-height: 250px;
    padding-bottom: 1.5rem;
}

.editorial-accordion-icon {
    font-family: monospace;
    font-weight: bold;
    color: var(--text-muted);
    transition: transform 0.3s ease, color 0.3s ease;
}

.editorial-accordion-item.active .editorial-accordion-icon {
    transform: rotate(45deg);
    color: var(--accent-red);
}

/* ─────────────────────────────────────────────────────────────────────────────
   31. REALISTIC MARKET TICKERS
   ───────────────────────────────────────────────────────────────────────────── */
.market-ticker-wrap {
    overflow: hidden;
    white-space: nowrap;
    border-top: 1px solid var(--editorial-border);
    border-bottom: 1px solid var(--editorial-border);
    background: var(--surface);
    padding: 0.75rem 0;
    width: 100%;
}

.market-ticker-track {
    display: inline-block;
    padding-left: 100%;
    animation: ticker-slide 40s linear infinite;
    width: max-content;
}

.market-ticker-track:hover {
    animation-play-state: paused;
}

@keyframes ticker-slide {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

.ticker-symbol {
    display: inline-block;
    font-family: monospace;
    font-size: 0.8rem;
    margin-right: 3rem;
    color: var(--text-secondary);
}

.ticker-value-up {
    color: var(--accent-green);
    font-weight: bold;
}

.ticker-value-down {
    color: var(--accent-red);
    font-weight: bold;
}

/* ─────────────────────────────────────────────────────────────────────────────
   32. REDUCED MOTION ACCESSIBILITY OVERRIDES
   ───────────────────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .grain-overlay, 
    .scroll-progress-line, 
    .cursor-follower, 
    .section-collage, 
    .market-ticker-track {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}

/* Mobile: hide cursor follower (touch devices don't need it) */
@media (max-width: 991px) {
    .cursor-follower {
        display: none !important;
    }
}

