/* Gen Z Fresh Design System */

/* 1. SETUP & VARIABLES */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700&display=swap');

:root {
    --primary: #8b5cf6;
    --secondary: #06b6d4;
    --accent: #f97316;
    --gradient-1: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
    --background: #faf5ff;
    --surface: #ffffff;
    --card: #f5f3ff;
    --text: #1e1b4b;
    --muted: #64748b;

    --font-headings: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;

    --border-radius-large: 20px;
    --border-radius-pill: 999px;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
    --background: #1e1b4b;
    --surface: #282560;
    --card: #312e75;
    --text: #e0e7ff;
    --muted: #94a3b8;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.75;
    background-color: var(--background);
    color: var(--text);
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* 2. TYPOGRAPHY & GENERAL STYLES */
h1, h2, h3, h4 {
    font-family: var(--font-headings);
    font-weight: 700;
    line-height: 1.2;
}
h1 { font-size: 3rem; }
h2 { font-size: 2rem; margin-bottom: 1.5rem; text-align: center; }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; }
a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--secondary); }
strong { color: var(--primary); }
img { max-width: 100%; height: auto; display: block; }
section { padding: 4rem 0; }

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

/* 3. UNIQUE UI ELEMENTS */
.btn {
    display: inline-block;
    font-family: var(--font-headings);
    font-weight: 600;
    padding: 0.75rem 1.75rem;
    border-radius: var(--border-radius-pill);
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease-out, box-shadow 0.2s ease;
    text-align: center;
}
.btn-primary {
    background: var(--gradient-1);
    color: white;
}
.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.3);
}

.card {
    background-color: var(--card);
    border-radius: var(--border-radius-large);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, background-color 0.3s ease;
    position: relative;
    overflow: hidden;
}
.card::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    background: var(--gradient-1);
    z-index: -1;
    border-radius: calc(var(--border-radius-large) + 2px);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.card:hover {
    transform: translateY(-5px);
}
.card:hover::before {
    opacity: 1;
}
.card .inner-content { /* Use if needed to mask gradient border */
    background-color: var(--card);
    border-radius: var(--border-radius-large);
    padding: 1.5rem;
    height: 100%;
}


/* 4. HEADER & NAVIGATION */
.site-header {
    background-color: rgba(250, 245, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    border-bottom: 1px solid rgba(30, 27, 75, 0.05);
    transition: background-color 0.3s ease;
}
[data-theme="dark"] .site-header {
    background-color: rgba(30, 27, 75, 0.8);
    border-bottom: 1px solid rgba(224, 231, 255, 0.1);
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-family: var(--font-headings);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text);
}
.logo:hover { color: var(--text); }
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}
.main-nav a {
    font-weight: 600;
    color: var(--muted);
    position: relative;
    padding-bottom: 0.5rem;
}
.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease-out;
}
.main-nav a:hover {
    color: var(--text);
}
.main-nav a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Dark Mode Toggle */
.theme-switcher {
    position: relative;
}
#dark-mode-toggle {
    opacity: 0;
    position: absolute;
}
.slider-label {
    background-color: var(--card);
    border: 2px solid var(--primary);
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px;
    position: relative;
    height: 34px;
    width: 65px;
    transition: background-color 0.3s ease;
}
.slider-label::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gradient-1);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
#dark-mode-toggle:checked + .slider-label::after {
    transform: translateX(30px);
}
.sun, .moon {
    font-size: 1.1rem;
    line-height: 1;
}

/* 5. SECTIONS */

/* HERO */
.hero-section {
    padding-top: 5rem;
    padding-bottom: 5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero-content { position: relative; z-index: 2; }
.hero-section h1 {
    max-width: 700px;
    margin: 0 auto 1rem;
}
.hero-section .subtitle {
    max-width: 600px;
    margin: 0 auto 2rem;
    font-size: 1.125rem;
    color: var(--muted);
}
.hero-image { display: none; /* Mobile first, let's keep it clean */ }

/* Blobs */
.blob {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.4;
    z-index: 1;
}
[data-theme="dark"] .blob { opacity: 0.2; }
.blob1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    left: -100px;
    animation: blob-move 15s infinite alternate;
}
.blob2 {
    width: 300px;
    height: 300px;
    background: var(--secondary);
    bottom: -50px;
    right: -50px;
    animation: blob-move 20s infinite alternate-reverse;
}
@keyframes blob-move {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(50px, 80px) scale(1.2); }
}

/* REALITY CHECK */
.reality-check-section { background-color: var(--surface); }
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}
.stat-card {
    background-color: var(--card);
    padding: 2rem 1.5rem;
    border-radius: var(--border-radius-large);
    text-align: center;
    border: 2px solid transparent;
    transition: border-color 0.3s, transform 0.3s;
}
.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}
.stat-card .emoji { font-size: 2.5rem; display: block; margin-bottom: 0.5rem; }
.stat-card .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: var(--font-headings);
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
}
.stat-card p {
    font-size: 0.95rem;
    color: var(--muted);
    margin: 0.5rem 0 0;
}

/* BASICS CAROUSEL */
.basics-section { background-color: var(--card); }
.carousel-container { position: relative; }
.carousel-track {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}
.carousel-track::-webkit-scrollbar { display: none; /* Chrome/Safari */ }
.basic-card {
    flex: 0 0 80%; /* Show 80% width cards on mobile */
    scroll-snap-align: center;
    background: var(--surface);
}
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--surface);
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.carousel-btn.prev { left: -22px; }
.carousel-btn.next { right: -22px; }

/* ERSTES GEHALT */
.two-column-section { background: var(--surface); }
.two-column-section .image-content img {
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow);
}
.two-column-section .text-content p {
    color: var(--muted);
}
.two-column-section .text-content p strong {
    color: var(--text);
    font-weight: 600;
}

/* SPAR HACKS */
.spar-hacks-section { background-color: var(--card); }
.stories-grid {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}
.story-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}
.story-card span {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 2rem;
    background: var(--surface);
    border: 3px solid transparent;
    background-clip: padding-box;
    position: relative;
    transition: transform 0.2s;
}
.story-card span::before {
    content: '';
    position: absolute;
    inset: -3px;
    background: var(--gradient-1);
    border-radius: 50%;
    z-index: -1;
}
.story-card:hover span { transform: scale(1.1); }
.story-card p {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--muted);
    margin: 0;
}
.section-description {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    color: var(--muted);
}

/* INVEST SECTION */
.invest-section { background-color: var(--surface); }
.chart-content {
    display: flex;
    align-items: center;
    justify-content: center;
}
.invest-chart {
    background: var(--card);
    text-align: center;
    padding: 2rem;
    border: 2px solid var(--primary);
    position: relative;
}
.chart-value {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 1rem 0;
    display: block;
    font-family: var(--font-headings);
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.sticker-badge {
    position: absolute;
    top: -15px;
    right: -15px;
    background-color: var(--accent);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--border-radius-pill);
    font-size: 0.8rem;
    font-weight: 600;
    transform: rotate(10deg);
}

/* KI TOOLS */
.ki-tools-section { background-color: var(--card); }
.features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}
.feature-item {
    background-color: var(--surface);
    padding: 1rem;
    border-radius: 12px;
    font-weight: 600;
    border-left: 4px solid var(--secondary);
}

/* SCHULDEN */
.schulden-section { background-color: rgba(249, 115, 22, 0.05); }
[data-theme="dark"] .schulden-section { background-color: rgba(249, 115, 22, 0.1); }
.schulden-section h2 { color: var(--accent); }
.checklist-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
}
.check-item {
    background-color: var(--surface);
    padding: 1rem;
    border-radius: 12px;
    font-weight: 600;
}
.check-item.no { border-left: 4px solid #ef4444; }
.check-item.yes { border-left: 4px solid #22c55e; }

/* VERSICHERUNGEN */
.versicherung-section { background-color: var(--card); }
.versicherung-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}
.versicherung-card { background: var(--surface); }
.versicherung-card h3 {
    border-bottom: 2px solid;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}
.versicherung-card:nth-child(1) h3 { border-color: #22c55e; } /* Grün */
.versicherung-card:nth-child(2) h3 { border-color: #22c55e; } /* Grün */
.versicherung-card:nth-child(3) h3 { border-color: #f59e0b; } /* Gelb */
.versicherung-card:nth-child(4) h3 { border-color: #ef4444; } /* Rot */

/* TASCHENGELD */
.taschengeld-section { background-color: var(--surface); }
.taschengeld-section h4 {
    margin-top: 1.5rem;
    color: var(--primary);
}
.taschengeld-section .image-content img {
    max-width: 300px;
    margin: 0 auto;
}

/* RESSOURCEN */
.ressourcen-section { background-color: var(--card); }
.ressourcen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}
.ressource-card { background: var(--surface); }
.ressource-card ul {
    list-style: none;
    padding: 0;
}
.ressource-card li {
    padding: 0.25rem 0;
    color: var(--muted);
}

/* FAQ */
.faq-section { background: var(--surface); }
.accordion details {
    background: var(--card);
    margin-bottom: 0.5rem;
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}
.accordion summary {
    padding: 1rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none; /* remove default arrow */
    position: relative;
    padding-right: 2.5rem;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
    content: '+';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--primary);
    transition: transform 0.2s;
}
.accordion details[open] summary::after {
    transform: translateY(-50%) rotate(45deg);
}
.accordion details[open] {
    background: var(--surface);
}
.accordion p {
    padding: 0 1rem 1rem;
    margin: 0;
    color: var(--muted);
}

/* CONTACT */
.contact-section { background: var(--card); }
.contact-info p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}
.contact-form .form-group {
    margin-bottom: 1rem;
}
.contact-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 0.75rem;
    border-radius: 12px;
    border: 1px solid rgba(30, 27, 75, 0.2);
    background-color: var(--surface);
    color: var(--text);
    font-family: var(--font-body);
}
.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}
.form-group-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

/* FOOTER */
.site-footer-main {
    background: var(--gradient-1);
    color: white;
    padding: 4rem 0 2rem;
}
.site-footer-main a { color: white; }
.site-footer-main a:hover { opacity: 0.8; }
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.footer-col h4 {
    margin-bottom: 1rem;
    font-weight: 700;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.5rem; }
.social-icons { display: flex; gap: 1rem; }
.social-icons a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: grid;
    place-items: center;
}
.social-icons svg {
    width: 20px;
    height: 20px;
    fill: white;
}
.newsletter-form {
    display: flex;
    position: relative;
    margin-top: 1rem;
}
.newsletter-form input {
    width: 100%;
    padding: 0.75rem;
    border-radius: var(--border-radius-pill);
    border: none;
    padding-right: 40px;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}
.newsletter-form input::placeholder { color: rgba(255, 255, 255, 0.7); }
.newsletter-form button {
    position: absolute;
    right: 5px;
    top: 5px;
    bottom: 5px;
    background: white;
    color: var(--primary);
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    font-size: 1.5rem;
    cursor: pointer;
}
.footer-bottom {
    padding-top: 2rem;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.8;
}
.footer-bottom p { margin: 0; }

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

/* 7. RESPONSIVENESS */
@media (max-width: 900px) {
    .grid-2 { grid-template-columns: 1fr; }
    .two-column-section .image-content { grid-row: 1; }
    .header-container .main-nav { display: none; } /* Simplified nav for mobile */
}
@media (min-width: 600px) {
    .basic-card { flex-basis: 40%; }
}
@media (min-width: 900px) {
    h1 { font-size: 3.5rem; }
    .basic-card { flex-basis: calc(25% - 1.125rem); }
}