/* RESET & GLOBAL STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --base-color: #F7F5F2;
    --text-color: #2B2A29;
    --accent-coral: #F8836F;
    --accent-mint: #D5EAE3;
    --accent-lavender: #E8E6F8;
    --accent-teal: #D6EAE8;
    --accent-amber: #FCF0D4;
    --card-radius: 20px;
    --shadow-default: 0 8px 16px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 12px 24px rgba(0, 0, 0, 0.1);
    --text-dark: #333;
    --text-light: #666;
    --accent-primary: #4A69E0;
    --accent-secondary: #6E89F8;
    --bg-light: #F9F9F9;
    --bakule-color-01: #693f94;
    --bakule-color-02: #8d4a7e;
    --bakule-color-03: #b15967;
    --bakule-color-04: #bc5c3d;
    --bakule-color-05: #a97f36;
    --bakule-color-06: #7a8033;
    --bakule-color-07: #3a8354;
    --bakule-color-08: #328473;
    --bakule-color-09: #2e7ca3;
    --bakule-color-10: #3c62c6;
    --text-on-dark: #ffffff;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    background-color: var(--base-color);
    line-height: 1.6;
}

h1, h2, h3 {
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 2rem;
}

h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    margin-bottom: 1.5rem;
    text-align: center;
}

h3 {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    margin-bottom: 0.5rem;
}

p {
    font-family: 'Merriweather', serif;
    margin-bottom: 1rem;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphenate-limit-chars: 6 3 2;
    hyphenate-limit-lines: 2;
    hyphenate-limit-zone: 8%;
}

section {
    padding: 4rem 1rem;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* HERO SECTION */
.hero {
    height: 100vh;
    background-color: #f6f6f8; /* Lighter background */
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    padding: 0 5rem;
    overflow: hidden;
}

/* Noise overlay to help reduce color banding on transparent blobs */
.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/subtle-noise-200.png');
    background-repeat: repeat;
    background-size: auto;
    opacity: 0.15;
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2; /* Above noise overlay */
    max-width: 800px;
    text-align: left;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.85));
    backdrop-filter: blur(5px);
    padding: 2.5rem;
    border-left: 5px solid var(--bakule-color-03);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.hero-tagline {
    text-transform: uppercase;
    font-size: 1.2rem;
    letter-spacing: 0.12em;
    font-weight: 500;
    color: var(--bakule-color-03);
    margin-bottom: 1rem;
}

/* Specific h1 styling for hero, distinct from global h1 */
.hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 4rem); /* Matches global h1 but can be overridden */
    margin-bottom: 2rem;
    text-align: left;
    line-height: 1.1;
    color: #222; /* Darker for better contrast */
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

/* Text logo for small viewports */
.hero-watermark-logo-text {
    display: none;
    position: absolute;
    opacity: 0.2;
    z-index: 1;
    pointer-events: none;
}

/* Notext logo for large viewports */
.hero-watermark-logo-notext {
    position: absolute;
    opacity: 0.05;
    z-index: 1;
    pointer-events: none;
    height: 80vh;
    width: auto;
    bottom: 0;
    right: 0;
    transform: translate(30%, 30%);
}

.cta-button {
    display: inline-block;
    background-color: var(--bakule-color-03);
    color: white;
    padding: 1rem 2rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    margin-top: 1.5rem;
    box-shadow: var(--shadow-default);
}

.cta-button:hover {
    background-color: var(--bakule-color-04);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.scroll-arrow {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1; /* Same as noise, will be visually behind hero-content */
    animation: bounce 2s infinite;
}

.scroll-arrow a {
    display: block;
    color: var(--text-color);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Keyframes for blob animations (used by baustein.css) */
@keyframes floatBlob {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -30px) rotate(5deg);
    }
    66% {
        transform: translate(-25px, 40px) rotate(-5deg);
    }
    100% {
        transform: translate(15px, -15px) rotate(0deg);
    }
}

/* WHY BAKULE STAT STRIP */
.stat-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 4rem 2rem;
    background-color: white;
}

.stat-card {
    position: relative;
    height: 280px;
    background-color: white;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
    perspective: 1000px;
    transform-style: preserve-3d;
}

.stat-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.stat-card-surface-container {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.stat-card-front,
.stat-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    transition: transform 0.6s;
}

.stat-card-front {
    transform: rotateY(0deg);
}

.stat-card-back {
    transform: rotateY(180deg);
}

.stat-card:hover .stat-card-front {
    transform: rotateY(180deg);
}

.stat-card:hover .stat-card-back {
    transform: rotateY(0deg);
}

.stat-number {
    font-size: 4.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #222; /* Enhanced contrast */
    font-family: 'Merriweather', serif;
}

.stat-unit {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #888;
    margin-bottom: 0.75rem;
}

.stat-card h3 { /* Applies to h3 in both front and back if not overridden */
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.stat-card p { /* Applies to p in both front and back if not overridden */
    font-size: 1rem;
    color: #444; /* Enhanced contrast */
    font-weight: 400;
}

.stat-card-back h3 {
    margin-bottom: 1.5rem;
    position: relative;
}

.stat-card-back p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #666;
    max-width: 92%;
}

/* MEASURES GRID (Bausteine Overview on index.html) */
.measures-grid {
    padding: 4rem 2rem;
}

.measures-grid h2 {
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 2rem;
}

.measure-card {
    position: relative;
    height: 220px;
    padding: 0;
    border-radius: var(--card-radius);
    overflow: hidden;
    transition: transform 0.5s ease, box-shadow 0.3s ease;
    cursor: pointer;
    perspective: 1000px;
    transform-style: preserve-3d;
    box-shadow: var(--shadow-default);
}

.measure-card-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    position: relative;
    transform-style: preserve-3d;
}

.measure-card-front,
.measure-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    padding: 1.5rem;
    backface-visibility: hidden;
    transition: transform 0.6s ease;
    display: flex;
    flex-direction: column;
}

.measure-card-front {
    transform: rotateY(0deg);
}

.measure-card-back {
    transform: rotateY(180deg);
    justify-content: center;
}

.measure-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.measure-card p {
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 0;
}

.measure-card-back h3 {
    margin-bottom: 0.6rem;
    font-size: 1.25rem;
}

.measure-card-back p {
    font-size: 0.9rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 7;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ap-number {
    font-weight: bold;
    font-size: 1.8rem;
    margin-bottom: 0.6rem;
    opacity: 0.9;
}

/* Color variants for measure cards */
.measure-card.ap-01 { background-color: var(--bakule-color-01); color: var(--text-on-dark); }
.measure-card.ap-02 { background-color: var(--bakule-color-02); color: var(--text-on-dark); }
.measure-card.ap-03 { background-color: var(--bakule-color-03); color: var(--text-on-dark); }
.measure-card.ap-04 { background-color: var(--bakule-color-04); color: var(--text-on-dark); }
.measure-card.ap-05 { background-color: var(--bakule-color-05); color: var(--text-on-dark); }
.measure-card.ap-06 { background-color: var(--bakule-color-06); color: var(--text-on-dark); }
.measure-card.ap-07 { background-color: var(--bakule-color-07); color: var(--text-on-dark); }
.measure-card.ap-08 { background-color: var(--bakule-color-08); color: var(--text-on-dark); }
.measure-card.ap-09 { background-color: var(--bakule-color-09); color: var(--text-on-dark); }
.measure-card.ap-10 { background-color: var(--bakule-color-10); color: var(--text-on-dark); }


/* SCROLL ANIMATION UTILITIES (used by JS) */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.animate-on-scroll.animate {
    opacity: 1;
    transform: translateY(0);
}

.stagger-group {
    position: relative; /* Context for stagger items if needed */
}

.stagger-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out 0.2s;
}

.stagger-item.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Other animation types if used by animate-on-scroll or stagger items */
.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.fade-in-left.animate { opacity: 1; transform: translateX(0); }

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.fade-in-right.animate { opacity: 1; transform: translateX(0); }

.zoom-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.zoom-in.animate { opacity: 1; transform: scale(1); }

/* Parallax elements might still be used by baustein pages via js/parallax.js */
.parallax-element {
    will-change: transform;
    transition: transform 0.1s ease-out; /* Subtle transition for JS-driven parallax */
}

/* GET INVOLVED / NEWS & EVENTS (index.html) */
.get-involved {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 4rem 2rem;
    background-color: rgba(232, 230, 248, 0.3);
    position: relative;
    z-index: 5;
}

.get-involved h2 {
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.news-events,
.signup {
    background-color: rgba(255, 255, 255, 0.7);
    padding: 2rem;
    border-radius: var(--card-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.news-events h2,
.signup h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
}

.event-card {
    background-color: white;
    padding: 0;
    border-radius: var(--card-radius);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-default);
    display: flex;
    overflow: hidden;
}

.event-date {
    background-color: var(--bakule-color-03);
    color: white;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    position: relative;
}

.event-day { font-size: 2.5rem; font-weight: 700; line-height: 1; margin-bottom: 0.2rem; }
.event-month { font-size: 1.1rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
.event-year { font-size: 0.9rem; opacity: 0.9; margin-top: 0.2rem; }

.event-details {
    flex: 1;
    padding: 1.25rem 1.5rem 1.25rem 2rem;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.event-details h3 { margin-bottom: 0.5rem; font-size: 1.5rem; }
.event-location { color: var(--text-light); font-size: 0.95rem; margin-bottom: 0; }

.signup {
    background-color: var(--bakule-color-03);
    color: white;
    display: flex;
    flex-direction: column;
}

.signup h2 { color: white; }

.signup p {
    font-family: 'Inter', sans-serif;
    margin-bottom: 1.2rem;
    line-height: 1.5;
    font-size: 1.25rem;
}

.vc-link {
    display: inline-block;
    color: var(--bakule-color-03);
    font-weight: 500;
    padding: 0.5rem 1rem;
    background-color: white;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-default);
    margin-top: 0.5rem;
    align-self: flex-start;
}

.vc-link:hover {
    background-color: rgba(255, 255, 255, 0.8);
    color: var(--bakule-color-03);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

/* FOOTER */
footer {
    padding: 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: #6A6A6A;
    position: relative;
    z-index: 5; /* Ensure it's above absolutely positioned elements if necessary */
    background-color: var(--base-color);
}

footer p {
    max-width: 800px;
    margin: 0 auto 1rem auto;
    line-height: 1.5;
    font-family: 'Inter', sans-serif;
}

.footer-logo {
    margin-bottom: 1rem;
}

.footer-logo-img {
    height: 60px;
    width: auto;
}

.footer-funding {
    font-size: 0.8rem;
    color: #6A6A6A;
    font-style: italic;
    margin-top: 1rem;
    font-family: 'Inter', sans-serif;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.footer-links a {
    color: #F8836F;
    text-decoration: none;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #6A6A6A;
    text-decoration: underline;
}

/* General heading text transforms (already present, just grouped) */
.measures-grid h2, 
.roadmap h2, 
.get-involved h2 { /* ROADMAP section is in index.html */
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ACCESSIBILITY & UTILITIES */
.skip-link {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    background-color: white;
    color: var(--bakule-color-03);
    z-index: 1000;
    font-weight: 500;
    text-decoration: none;
}

.skip-link:focus {
    width: auto;
    height: auto;
    padding: 10px 15px;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    top: 0;
    left: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    outline: 3px solid var(--accent-primary);
}

/* Used by baustein.js for navigation arrows */
.nav-arrow.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* General focus indicators */
a:focus, 
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 3px solid var(--accent-primary);
    outline-offset: 2px;
}

.measure-card:focus-within {
    box-shadow: 0 0 0 3px var(--accent-primary), var(--shadow-hover);
}


/* RESPONSIVE STYLES */
@media (max-width: 768px) {
    .grid-container { /* For .measures-grid on index.html */
        grid-template-columns: 1fr;
    }
    
    .hero {
        padding: 0 1.5rem;
        align-items: center;
    }
    
    .hero-content {
        text-align: center;
        padding: 2rem;
        width: 100%;
        max-width: 90%;
        border-left: none;
        border-top: 5px solid var(--bakule-color-03);
    }
    
    /* Show text logo on small viewports */
    .hero-watermark-logo-text {
        display: block;
        top: 10%;
        left: 50%;
        transform: translateX(-50%);
        width: min(70vw, 400px);
        height: auto;
    }
    
    /* Hide notext logo on small viewports */
    .hero-watermark-logo-notext {
        display: none;
    }
    
    .hero-content h1 { /* Ensure hero h1 matches general h1 for clamp on mobile */
        text-align: center;
        font-size: clamp(2rem, 4vw, 3rem);
    }
    
    .hero-tagline {
        text-align: center;
    }
    
    .stat-strip {
        grid-template-columns: 1fr;
        padding: 2rem 1.5rem;
        gap: 1.5rem;
    }
        
    .stat-card {
        height: auto;
        min-height: 280px;
    }
    
    .stat-card-surface-container {
        padding: 1.5rem; /* If .stat-card-surface-container needs different mobile padding, add it */
    }
    
    .stat-number {
        font-size: 3.5rem;
    }
    
    .stat-unit {
        font-size: 1rem;
    }
    
    .stat-card-back p {
        font-size: 0.9rem;
    }

    .get-involved {
        grid-template-columns: 1fr;
    }
    
    .signup, .news-events {
        width: 100%;
    }
    
    .news-events h2, .signup h2 {
        font-size: 1.5rem;
    }
    
    .event-card {
        flex-direction: column;
    }
    
    .event-date {
        padding: 0.75rem;
        flex-direction: row;
        width: 100%;
        justify-content: flex-start;
        gap: 0.5rem;
        align-items: baseline;
    }
        
    .event-day {
        font-size: 2rem;
        margin-bottom: 0;
        margin-right: 0.25rem;
    }
    
    .event-month {
        font-size: 1rem;
    }
    
    .event-year {
        margin-top: 0;
        margin-left: 0.25rem;
    }
    
    .event-details {
        padding: 1rem;
    }
}

/* PROJECT INFO SECTION */
.project-info {
    padding: 5rem 2rem;
    background-color: var(--base-color);
    max-width: 1200px;
    margin: 0 auto;
}

.project-info h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text-color);
    letter-spacing: 0.08em;
}

.project-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.project-info-card {
    background: white;
    border-radius: var(--card-radius);
    padding: 2rem;
    box-shadow: var(--shadow-default);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.project-info-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    border-bottom: 2px solid var(--accent-coral);
    padding-bottom: 0.5rem;
}

.team-members {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.team-member h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.3rem;
}

.team-member h4 a {
    color: var(--accent-coral);
    text-decoration: none;
    transition: color 0.3s ease;
}

.team-member h4 a:hover {
    color: var(--text-color);
    text-decoration: underline;
}

.team-member p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin: 0;
}

@media (max-width: 768px) {
    .project-info {
        padding: 3rem 1rem;
    }
    
    .project-info-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .project-info-card {
        padding: 1.5rem;
    }
}

/* PRINT STYLES */
@media print {
    .hero::before, /* Hide noise overlay in print */
    .scroll-arrow,
    .cta-button,
    /* nav, /* Consider if baustein-nav should also be hidden or styled for print */
    .signup,
    footer {
        display: none !important;
    }
    
    body {
        color: black;
        background: white;
        font-size: 12pt;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
        color: black;
    }
    
    p, blockquote, ul, ol {
        page-break-inside: avoid;
    }
    
    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
    
    a:after {
        content: " (" attr(href) ")";
        font-size: 80%;
    }
    
    .hero, .stat-strip, .measures-grid, .roadmap {
        margin: 1cm 0;
        padding: 0;
    }
    
    .measure-card, .stat-card {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        color-adjust: exact;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}