/* 
 * Towarzystwo Custom Theme - Main Stylesheet
 * Organized, Responsive & Clean
 */

/* ==========================================================================
   1. CSS Variables & Design System
   ========================================================================== */
:root {
    /* Colors */
    --color-bg: #f8f9fa;
    --color-text: #212529;
    --color-primary: #343a40;
    --color-accent: #6c757d;
    --color-white: #ffffff;
    --color-black: #000000;

    /* Typography */
    --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-heading: 'Georgia', serif;
    /* Retro feel */

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;

    /* Transitions */
    --transition-speed: 0.3s;
}

/* ==========================================================================
   2. Reset & Base Styles
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Strona główna – księżycowe tło z nakładką */
body.home {
    background: linear-gradient(rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.84)),
        url('../images/moon.png') no-repeat center center fixed;
    background-size: cover;
    color: var(--color-white);
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
    transition: opacity var(--transition-speed);
}

a:hover {
    opacity: 0.8;
}

/* ==========================================================================
   3. Layout Containers
   ========================================================================== */
.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* ==========================================================================
   4. Splash Screen (Interactive)
   ========================================================================== */
.splash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--color-black);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 1.5s;
    cursor: pointer;
}

.splash-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-content {
    width: 60vw;
    /* Zawsze 50% szerokości ekranu */
    max-width: 400px;
    /* Ale nie więcej niż 400px na dużych ekranach */
    padding: var(--spacing-md);
    animation: fadeIn 1.2s ease-out;
}

.splash-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.98);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==========================================================================
   5. Home Menu (Triangle)
   ========================================================================== */
.home-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    padding: 0 0 var(--spacing-lg) 0;
    /* Większy padding na dole dla poświaty */
}

.home-menu__triangle {
    width: 70vw;
    max-width: 550px;
    height: auto;
    display: block;
    opacity: 0;
    /* Pojawianie się */
    animation: fadeIn 2.5s ease-out 0.5s forwards;
    /* Biały/srebrny glow zamiast złotego */
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4));
}

.triangle-part__base {
    stroke: #ffffff;
    /* stroke: #D4AF37; Złoty kontur - zakomentowane */
    stroke-width: 6px;
    fill: rgba(255, 255, 255, 0.001);
    /* Domyślny delikatny biały glass */
    paint-order: stroke fill;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    transform-origin: center;
    transform-box: fill-box;
    backdrop-filter: blur(12px);
    /* Silniejszy blur dla lepszego efektu szkła */
}

.triangle-part__glass {
    pointer-events: none;
    fill-opacity: 0.7;
    /* Większe krycie dla widoczności tekstury */
    stroke: none;
    filter: url(#liquid-glass-filter);
    /* Dodanie efektu oświetlenia i połysku */
}

.triangle-part:hover .triangle-part__base {
    animation: liquid-shimmer 3s ease-in-out infinite;
}

@keyframes liquid-shimmer {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.01);
    }
}

.triangle-part text {
    font-family: var(--font-heading);
    font-size: 55px;
    font-weight: normal;
    letter-spacing: 2px;
    fill: #ffffff;
    /* Białe napisy */
    transition: all 0.4s ease;
    pointer-events: none;
    /* Klikanie przelatuje do poligonu */
    animation: text-pulse 3s ease-in-out infinite;
}

@keyframes text-pulse {

    0%,
    100% {
        filter: drop-shadow(0 0 2px rgba(212, 175, 55, 0.3));
    }

    50% {
        filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.9));
    }
}

/* Zakomentowane kolory sekcji dla efektu monochromatycznego
/* Wizja: biały glass -> na hover odwrócenie * /
.triangle-part--wizja .triangle-part__base {
    fill: rgba(255, 255, 255, 0.5);
}

.triangle-part--wizja text {
    fill: #000000;
}

.triangle-part--wizja:hover .triangle-part__base {
    fill: rgba(0, 0, 0, 0.8);
}

.triangle-part--wizja:hover text {
    fill: #ffffff;
}

/* Słowo: czarny glass -> na hover odwrócenie * /
.triangle-part--słowo .triangle-part__base {
    fill: rgba(0, 0, 0, 0.5);
}

.triangle-part--słowo text {
    fill: #ffffff;
}

.triangle-part--słowo:hover .triangle-part__base {
    fill: rgba(255, 255, 255, 0.8);
}

.triangle-part--słowo:hover text {
    fill: #000000;
}

/* Głos: czerwony glass -> na hover odwrócenie * /
.triangle-part--głos .triangle-part__base {
    fill: rgba(158, 0, 0, 0.5);
}

.triangle-part--głos text {
    fill: #D4AF37;
}

.triangle-part--głos:hover .triangle-part__base {
    fill: rgba(212, 175, 55, 0.8);
}

.triangle-part--głos:hover text {
    fill: #9e0000;
}

/* Środek - zielony glass * /
.triangle-part--center .triangle-part__base {
    fill: rgba(6, 64, 33, 0.6);
    stroke-width: 23px;
}
*/

/* Nowe style hover dla monochromatycznego trójkąta */
.triangle-part:hover .triangle-part__base {
    fill: rgba(255, 255, 255, 0.3);
}

.triangle-part--center .triangle-part__base {
    stroke-width: 23px;
    stroke-opacity: 0.8;
    fill: rgba(255, 255, 255, 0.05);
    filter: blur(6px) drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
    /* Środek jeszcze lżejszy */
}

.home-menu__circle {
    stroke: #ffffff;
    /* Biały kontur koła */
    /* stroke: #D4AF37; Złoty kontur - zakomentowane */
    stroke-width: 3px;
    fill: none;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.5));
    animation: circle-glow-white 4s ease-in-out infinite;
    transform-origin: center;
    transform-box: fill-box;
}

@keyframes circle-glow-white {

    0%,
    100% {
        filter: blur(1px) drop-shadow(0 0 10px rgba(255, 255, 255, 0.8));
        transform: scale(1);
    }

    50% {
        filter: blur(1px) drop-shadow(0 0 25px rgba(255, 255, 255, 0.8));
        transform: scale(1.05);
    }
}


/* Na stronie głównej chowamy header i footer */
body.home header#header,
body.home footer#footer {
    display: none;
}

body.home #body {
    padding: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   6. Header & Navigation
   ========================================================================== */
header#header {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: var(--spacing-sm) 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    letter-spacing: 1px;
}

/* ==========================================================================
   6. Main Content Area
   ========================================================================== */
#body {
    padding: var(--spacing-lg) 0;
    min-height: 70vh;
}

#body h1 {
    font-family: var(--font-heading);
    margin-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--color-primary);
    display: inline-block;
    padding-bottom: var(--spacing-xs);
}

/* ==========================================================================
   7. Footer
   ========================================================================== */
footer#footer {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: var(--spacing-md) 0;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ==========================================================================
   8. Responsive Design (Media Queries)
   ========================================================================== */

/* Mobile Devices */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .container {
        width: 100%;
        padding: 0 var(--spacing-md);
    }

    #body {
        padding: var(--spacing-md) 0;
    }

    .splash-content {
        padding: var(--spacing-sm);
    }
}

/* Tablets & Small Laptops */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        width: 85%;
    }
}

/* Large Screens */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
}