/* ==========================================================================
   Godofredo Möllendorff Foundation - Website Styles
   ========================================================================== */

/* CSS Variables - Calmer, academic palette */
:root {
    --color-primary: #2D7D90;        /* Teal - calm, psychological */
    --color-secondary: #1A365D;      /* Deep navy */
    --color-accent-1: #48BB78;       /* Soft green - growth, healing */
    --color-accent-2: #9F7AEA;       /* Lavender - mind, consciousness */
    --color-accent-3: #ED8936;       /* Warm amber - warmth, humanity */
    --color-bg-dark: #0F1B2A;        /* Deep blue-black */
    --color-bg-darker: #0A1220;      /* Even darker */
    --color-text-primary: #F7FAFC;
    --color-text-muted: #A0AEC0;
    --color-text-highlight: #68D391; /* Soft green highlight */

    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;

    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background: var(--color-bg-dark);
    color: var(--color-text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ==========================================================================
   Language Toggle
   ========================================================================== */

.lang-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 0.5rem 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.lang-toggle-btn {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    transition: var(--transition-smooth);
}

.lang-toggle-btn:hover {
    color: var(--color-text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.lang-toggle-btn.active {
    color: var(--color-primary);
    background: rgba(45, 125, 144, 0.15);
}

.lang-separator {
    color: var(--color-text-muted);
    opacity: 0.3;
    font-size: 0.8rem;
}

/* ==========================================================================
   Animated Background
   ========================================================================== */

.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-bg-darker) 0%, var(--color-bg-dark) 50%, #0D1B2A 100%);
}

.shape {
    position: absolute;
    opacity: 0.06;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    filter: blur(80px);
    animation: float 25s infinite ease-in-out;
}

.shape-1 {
    width: 600px;
    height: 600px;
    background: var(--color-primary);
    top: -150px;
    left: -150px;
    animation-delay: 0s;
    animation-duration: 30s;
}

.shape-2 {
    width: 500px;
    height: 500px;
    background: var(--color-accent-2);
    top: 40%;
    right: -200px;
    animation-delay: 5s;
    animation-duration: 35s;
}

.shape-3 {
    width: 700px;
    height: 700px;
    background: var(--color-accent-1);
    bottom: -250px;
    left: 30%;
    animation-delay: 10s;
    animation-duration: 40s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(20px, -40px) rotate(90deg);
    }
    50% {
        transform: translate(-30px, -60px) rotate(180deg);
    }
    75% {
        transform: translate(40px, -20px) rotate(270deg);
    }
}

/* ==========================================================================
   Container & Layout
   ========================================================================== */

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
    position: relative;
}

.hero {
    text-align: center;
}

/* ==========================================================================
   Typography
   ========================================================================== */

.foundation-name {
    font-size: clamp(1.8rem, 6vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
    color: var(--color-text-primary);
    animation: fadeInUp 1s ease-out 0.2s both;
}

.tagline {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    color: var(--color-text-muted);
    margin-bottom: 2rem;
    font-weight: 400;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.memorial {
    font-size: 1.1rem;
    color: var(--color-accent-1);
    font-style: italic;
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--color-text-primary);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
    line-height: 1.8;
}

/* ==========================================================================
   Status Badge
   ========================================================================== */

.status-badge {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: rgba(45, 125, 144, 0.15);
    border: 1px solid rgba(45, 125, 144, 0.3);
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--color-primary);
    font-weight: 500;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out 0.8s both;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.card {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(45, 125, 144, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: var(--color-primary);
}

.card p {
    font-size: 1rem;
    color: var(--color-text-muted);
    line-height: 1.7;
}

.card-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.card-links a {
    font-size: 0.9rem;
    color: var(--color-primary);
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--color-primary);
    border-radius: 20px;
    transition: var(--transition-smooth);
}

.card-links a:hover {
    background: var(--color-primary);
    color: var(--color-text-primary);
}

.card-tag {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.3rem 0.8rem;
    background: rgba(159, 122, 234, 0.15);
    color: var(--color-accent-2);
    border-radius: 20px;
    margin-top: 1rem;
    font-family: var(--font-mono);
}

/* ==========================================================================
   Quote Block
   ========================================================================== */

.quote-block {
    max-width: 700px;
    margin: 3rem auto;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-left: 4px solid var(--color-primary);
    border-radius: 0 16px 16px 0;
}

.quote-block blockquote {
    font-size: 1.3rem;
    font-style: italic;
    color: var(--color-text-primary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.quote-block cite {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    font-style: normal;
}

/* ==========================================================================
   Scroll Indicator
   ========================================================================== */

.scroll-indicator {
    margin-top: 3rem;
    text-align: center;
    animation: fadeIn 1s ease-out 1.5s both;
}

.scroll-indicator span {
    display: block;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.scroll-arrow {
    font-size: 1.5rem;
    color: var(--color-primary);
    animation: bounce 2s infinite;
}

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

/* ==========================================================================
   About Section
   ========================================================================== */

.about {
    min-height: auto;
    padding: 6rem 0;
    text-align: center;
}

.about-content {
    max-width: 700px;
    margin: 0 auto;
}

.about-content p {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--color-bg-darker);
}

.footer p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin: 0.4rem 0;
}

.footer-tagline {
    font-style: italic;
    opacity: 0.6;
}

/* ==========================================================================
   Language Support (EN, FR, PT-BR)

   Strategy: EN content renders naturally (no CSS needed).
   We only hide FR/PT by default, then swap visibility on lang change.
   ========================================================================== */

/* Default: Hide FR and PT (EN shows naturally) */
p[lang="fr"], p[lang="pt"],
h2[lang="fr"], h2[lang="pt"],
h3[lang="fr"], h3[lang="pt"],
blockquote[lang="fr"], blockquote[lang="pt"],
span[lang="fr"], span[lang="pt"],
div[lang="fr"], div[lang="pt"] {
    display: none;
}

/* French mode: show FR, hide EN and PT */
html[lang="fr"] p[lang="fr"],
html[lang="fr"] h2[lang="fr"],
html[lang="fr"] h3[lang="fr"],
html[lang="fr"] blockquote[lang="fr"],
html[lang="fr"] div[lang="fr"] {
    display: block;
}
html[lang="fr"] span[lang="fr"] {
    display: inline;
}
html[lang="fr"] p[lang="en"], html[lang="fr"] p[lang="pt"],
html[lang="fr"] h2[lang="en"], html[lang="fr"] h2[lang="pt"],
html[lang="fr"] h3[lang="en"], html[lang="fr"] h3[lang="pt"],
html[lang="fr"] blockquote[lang="en"], html[lang="fr"] blockquote[lang="pt"],
html[lang="fr"] span[lang="en"], html[lang="fr"] span[lang="pt"],
html[lang="fr"] div[lang="en"], html[lang="fr"] div[lang="pt"] {
    display: none;
}

/* Portuguese mode: show PT, hide EN and FR */
html[lang="pt"] p[lang="pt"],
html[lang="pt"] h2[lang="pt"],
html[lang="pt"] h3[lang="pt"],
html[lang="pt"] blockquote[lang="pt"],
html[lang="pt"] div[lang="pt"] {
    display: block;
}
html[lang="pt"] span[lang="pt"] {
    display: inline;
}
html[lang="pt"] p[lang="en"], html[lang="pt"] p[lang="fr"],
html[lang="pt"] h2[lang="en"], html[lang="pt"] h2[lang="fr"],
html[lang="pt"] h3[lang="en"], html[lang="pt"] h3[lang="fr"],
html[lang="pt"] blockquote[lang="en"], html[lang="pt"] blockquote[lang="fr"],
html[lang="pt"] span[lang="en"], html[lang="pt"] span[lang="fr"],
html[lang="pt"] div[lang="en"], html[lang="pt"] div[lang="fr"] {
    display: none;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .lang-toggle {
        top: 1rem;
        right: 1rem;
    }

    .container {
        padding: 0 1.5rem;
    }

    section {
        min-height: auto;
        padding: 3rem 0;
    }

    .hero {
        padding: 4rem 0 3rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .quote-block {
        padding: 1.5rem;
    }

    .shape {
        display: none;
    }
}

@media print {
    .background-animation,
    .scroll-indicator,
    .lang-toggle {
        display: none;
    }
}
