/* ------------------------- */
/* --- DESIGN SYSTEM VARS -- */
/* ------------------------- */
:root {
    /* Color Palette */
    --primary: #6366f1;
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --background: #0c0a1a;
    --surface: rgba(255, 255, 255, 0.05);
    --card: rgba(255, 255, 255, 0.06);
    --card-border: rgba(255, 255, 255, 0.12);
    --text: #f1f5f9;
    --muted: #94a3b8;
    
    /* Gradients & Glows */
    --gradient-1: linear-gradient(135deg, #6366f1, #8b5cf6, #06b6d4);
    --gradient-2: linear-gradient(45deg, #0ea5e9, #8b5cf6);
    --glow-indigo: 0 0 40px rgba(99, 102, 241, 0.3);
    --glow-cyan: 0 0 40px rgba(6, 182, 212, 0.3);
    --glow-violet: 0 0 40px rgba(139, 92, 246, 0.3);

    /* Typography */
    --font-headings: 'Sora', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing & Layout */
    --container-width: 1140px;
    --section-padding: 6rem 0;
}


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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Offset for sticky header */
}

body {
    background-color: var(--background);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.8;
    overflow-x: hidden;
    position: relative;
}

/* Animated Aurora Background */
.aurora-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    filter: blur(100px);
}

.orb {
    position: absolute;
    border-radius: 50%;
    mix-blend-mode: screen;
    opacity: 0.6;
    animation: move 30s infinite alternate;
}

.orb-1 {
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--primary), transparent 60%);
    top: -10%;
    left: -15%;
    animation-duration: 40s;
}

.orb-2 {
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, var(--secondary), transparent 60%);
    bottom: -20%;
    right: -10%;
    animation-duration: 35s;
    animation-delay: -10s;
}

.orb-3 {
    width: 35vw;
    height: 35vw;
    background: radial-gradient(circle, var(--accent), transparent 60%);
    top: 20%;
    right: 20%;
    animation-duration: 30s;
    animation-delay: -5s;
}

@keyframes move {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(100px, -150px) rotate(360deg); }
}

/* ------------------------- */
/* --- LAYOUT & HELPERS ---- */
/* ------------------------- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.content-section {
    padding: var(--section-padding);
}

.text-center { text-align: center; }
.two-column-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.card-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 3rem; }
.card-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-top: 3rem; }
.card-grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.5rem; margin-top: 3rem; }

/* ------------------------- */
/* --- TYPOGRAPHY ---------- */
/* ------------------------- */
h1, h2, h3, h4 {
    font-family: var(--font-headings);
    color: var(--text);
    line-height: 1.2;
}

h1 {
    font-size: 3.25rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
    text-align: center;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.5rem;
    color: var(--muted);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover { color: var(--text); }

.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-fill-color: transparent;
}

/* ------------------------- */
/* --- COMPONENTS ---------- */
/* ------------------------- */

/* Glass Cards */
.glass-card {
    background: var(--card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--glow-indigo);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-family: var(--font-headings);
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: var(--glow-violet);
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text);
}
.btn-secondary:hover {
    background: var(--surface);
    box-shadow: var(--glow-cyan);
}

/* Tables */
.table-container {
    background: var(--card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 1rem;
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--card-border);
}
th {
    font-family: var(--font-headings);
    color: var(--text);
    font-weight: 500;
}
tbody tr {
    transition: background-color 0.3s ease;
}
tbody tr:hover {
    background-color: var(--surface);
}
tbody tr:last-child td {
    border-bottom: none;
}
td { color: var(--muted); }
td:first-child { color: var(--text); font-weight: 500; }

/* Forms */
.contact-form {
    background: var(--card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 2rem;
}
.form-group { margin-bottom: 1.5rem; }
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--muted);
    font-size: 0.9rem;
}
input[type="text"], input[type="email"], select, textarea {
    width: 100%;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    color: var(--text);
    font-family: var(--font-body);
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--glow-indigo);
}
select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; }


/* ------------------------- */
/* --- HEADER & FOOTER ----- */
/* ------------------------- */
#main-header {
    position: sticky;
    top: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease, border-bottom 0.3s ease;
}
#main-header.scrolled {
    background: rgba(12, 10, 26, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--card-border);
}
#main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo { display: flex; align-items: center; gap: 0.75rem; font-family: var(--font-headings); font-weight: 700; font-size: 1.5rem; }
nav ul { list-style: none; display: flex; gap: 2rem; }
nav a { color: var(--muted); font-weight: 500; position: relative; padding: 0.5rem; }
nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s ease;
}
nav a:hover { color: var(--text); }
nav a:hover::after { width: 100%; }

#main-footer {
    padding: 4rem 0 2rem;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid;
    border-image-slice: 1;
    border-image-source: var(--gradient-1);
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}
.footer-col h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text);
}
.footer-col p, .footer-col li {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
}
.footer-col ul { list-style: none; }
.footer-col .slogan { font-style: italic; }

/* ------------------------- */
/* --- SECTION SPECIFICS --- */
/* ------------------------- */

/* Hero */
.hero-section {
    padding: 8rem 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-section .subtitle {
    font-size: 1.25rem;
    max-width: 650px;
    margin: 0 auto 2.5rem;
}
.hero-cta { display: flex; justify-content: center; gap: 1rem; margin-bottom: 4rem; }
.hero-stats { display: flex; justify-content: center; gap: 1.5rem; }
.stat-card {
    background: var(--card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
}
.hero-image-container { margin-top: 4rem; }
.hero-image { max-width: 100%; height: auto; }

/* Glow Cards */
.glow-card:hover { box-shadow: var(--glow-violet); }
.crypto-card { border-radius: 16px; text-align: center; }
.crypto-card h3 { font-size: 1.75rem; margin-bottom: 0.5rem; }
.crypto-card:nth-child(1):hover { box-shadow: 0 0 40px rgba(247, 147, 26, 0.4); } /* Bitcoin Orange */
.crypto-card:nth-child(2):hover { box-shadow: 0 0 40px rgba(98, 126, 234, 0.4); } /* Ethereum Blue */
.crypto-card:nth-child(3):hover { box-shadow: 0 0 40px rgba(220, 31, 255, 0.4); } /* Solana Purple */

/* Budgeting Apps */
.app-card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}
.app-card:hover { transform: translateX(5px); }
.app-card h3 { margin: 0 0 0.5rem 0.5rem; display: inline-block; }
.content-image { max-width: 100%; border-radius: 20px; }

/* Open Banking Hub Diagram */
.hub-diagram {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 4rem auto 0;
}
.hub-center {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 120px; height: 120px;
    border-radius: 50%;
    background: var(--gradient-2);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    box-shadow: var(--glow-violet);
}
.hub-item {
    position: absolute;
    width: 80px; height: 80px;
    background: var(--card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 1rem;
    border: 1px solid var(--card-border);
}
.hub-item.item-1 { top: 0; left: 50%; transform: translateX(-50%); }
.hub-item.item-2 { top: 50%; right: 0; transform: translateY(-50%); }
.hub-item.item-3 { bottom: 0; left: 50%; transform: translateX(-50%); }
.hub-item.item-4 { top: 50%; left: 0; transform: translateY(-50%); }

/* Trends Cards */
.card-grid-5.vertical { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.trend-card { display: flex; flex-direction: column; }
.trend-card h3 { font-size: 1.2rem; }

/* Starter Guide */
.steps-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 3rem;
}
.step-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.5rem;
}
.step-number {
    font-size: 2.5rem;
    font-family: var(--font-headings);
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}
.step-card h3 { margin-bottom: 0.25rem; }
.step-card p { margin-bottom: 0; }

/* Warning Box */
.warning-box {
    background: rgba(255, 0, 0, 0.05);
    border: 1px solid rgba(255, 0, 0, 0.2);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.1);
}
.warning-box ul { list-style: none; margin-top: 1rem; }
.warning-box li { display: flex; gap: 0.75rem; margin-bottom: 0.5rem; }
.warning-box span { color: #f87171; }

/* FAQ Accordion */
.faq-accordion { max-width: 800px; margin: 3rem auto 0; }
details {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    margin-bottom: 1rem;
    padding: 1rem 1.5rem;
    transition: background-color 0.3s ease;
}
details[open] { background: var(--surface); }
summary {
    cursor: pointer;
    font-family: var(--font-headings);
    font-weight: 500;
    font-size: 1.1rem;
    list-style: none; /* Remove default marker */
    display: flex;
    justify-content: space-between;
    align-items: center;
}
summary::-webkit-details-marker { display: none; } /* Chrome/Safari */
summary::after {
    content: '+';
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}
details[open] summary::after { transform: rotate(45deg); }
details p { padding: 1rem 0 0; }


/* ------------------------- */
/* --- ANIMATIONS ---------- */
/* ------------------------- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }
.animate-on-scroll:nth-child(5) { transition-delay: 0.4s; }

/* ------------------------- */
/* --- RESPONSIVENESS ------ */
/* ------------------------- */
@media (max-width: 992px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    .two-column-layout, .card-grid-3, .card-grid-4, .card-grid-5 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    :root { --section-padding: 4rem 0; }
    #main-header nav { display: none; } /* Simple hide for demo, would use burger menu */
    .two-column-layout, .card-grid-3, .card-grid-4, .card-grid-5 {
        grid-template-columns: 1fr;
    }
    .hero-section { padding: 6rem 0 4rem; text-align: center; }
    .hero-stats { flex-direction: column; }
    .two-column-layout .column:last-child { grid-row: 1; } /* Image on top on mobile */
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
}