/* ============================================================
   MATYÁŠ JANČÍ — style.css
   Sdílené styly pro index.html, about.html, life.html, dreams.html
   ============================================================ */

/* ── PROMĚNNÉ (světlý / tmavý režim) ── */
:root {
    --bg: #dbeafe;
    --text: #0c2a4a;
    --card: rgba(255,255,255,0.65);
}

body.dark {
    --bg: #0a1929;
    --text: #e0f2fe;
    --card: rgba(14,40,70,0.65);
}

/* ── ZÁKLADNÍ TĚLO ── */
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    transition: background 0.4s, color 0.4s;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ── BLOBS ── */
.blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.55;
    z-index: -1;
    pointer-events: none;
    transition: transform 1.6s cubic-bezier(0.22,1,0.36,1);
    will-change: transform;
}
.blob1 { width: 340px; height: 340px; background: #38bdf8; top: 10%; left: 10%; }
.blob2 { width: 440px; height: 440px; background: #0ea5e9; bottom: 10%; right: 10%; }
.blob3 { width: 240px; height: 240px; background: #7dd3fc; top: 55%; left: 45%; opacity: 0.35; }

/* ── LIGHTBOX ── */
#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9000;
    align-items: center;
    justify-content: center;
}
#lightbox.open { display: flex; }

#lightbox.closing #lightbox-backdrop { animation: lbFadeOut 0.28s ease both; }
#lightbox.closing #lightbox-img      { animation: lbZoomOut 0.28s cubic-bezier(0.4,0,1,1) both; }
#lightbox.closing .lb-arrow          { animation: lbFadeOut 0.2s ease both; }
#lightbox.closing #lightbox-close    { animation: lbFadeOut 0.2s ease both; }

#lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5,20,40,0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: lbFadeIn 0.3s ease both;
}

@keyframes lbFadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes lbFadeOut { from { opacity: 1; } to { opacity: 0; } }

#lightbox img {
    position: relative;
    z-index: 1;
    max-width: min(88vw, 900px);
    max-height: 84vh;
    border-radius: 20px;
    box-shadow: 0 32px 80px rgba(0,0,0,0.45);
    animation: lbZoomIn 0.38s cubic-bezier(0.22,1,0.36,1) both;
    object-fit: contain;
    transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.22,1,0.36,1);
    cursor: default;
}

@keyframes lbZoomIn  { from { opacity: 0; transform: scale(0.82); } to { opacity: 1; transform: scale(1); } }
@keyframes lbZoomOut { from { opacity: 1; transform: scale(1); }    to { opacity: 0; transform: scale(0.88); } }

#lightbox-close {
    position: absolute;
    top: 20px; right: 24px;
    z-index: 2;
    font-size: 22px;
    color: white;
    cursor: pointer;
    background: rgba(255,255,255,0.15);
    border: none;
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, transform 0.2s;
    animation: lbFadeIn 0.3s ease both;
}
#lightbox-close:hover { background: rgba(255,255,255,0.28); transform: scale(1.12); }

.lb-arrow {
    position: relative;
    z-index: 2;
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    font-size: 26px;
    width: 52px; height: 52px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    margin: 0 16px;
    transition: background 0.2s, transform 0.22s cubic-bezier(0.22,1,0.36,1);
    animation: lbFadeIn 0.3s ease 0.1s both;
    user-select: none;
}
.lb-arrow:hover  { background: rgba(255,255,255,0.28); transform: scale(1.14); }
.lb-arrow:active { transform: scale(0.95); }

/* ── NAVIGACE ── */
nav {
    position: fixed;
    top: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 1000;
}

.nav-box {
    display: flex;
    gap: 8px;
    background: var(--card);
    padding: 10px 20px;
    border-radius: 999px;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    align-items: center;
}

.nav-btn {
    border: none;
    padding: 8px 18px;
    border-radius: 999px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: 0.2s;
    opacity: 0.55;
    text-decoration: none;
    display: inline-block;
}
.nav-btn:hover { opacity: 1; transform: scale(1.05); }
.nav-btn.active {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: white;
    opacity: 1;
}

.toggle {
    cursor: pointer;
    font-size: 18px;
    padding: 5px 10px;
    border-radius: 50%;
    background: transparent;
    border: none;
    transition: 0.2s;
}
.toggle:hover { transform: scale(1.2); }

/* ── HERO (index.html) ── */
.page-home {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 100vh;
    animation: fadeUp 0.6s cubic-bezier(0.22,1,0.36,1) both;
}

.hero-text h1 {
    font-size: clamp(40px, 8vw, 72px);
    font-weight: 800;
    margin: 0 0 16px;
    letter-spacing: -0.03em;
}

.hero-text p {
    font-size: 20px;
    opacity: 0.55;
    margin: 0;
}

.hero-btns {
    display: flex;
    gap: 12px;
    margin-top: 36px;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-btn {
    padding: 12px 28px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 15px;
    transition: 0.25s;
    text-decoration: none;
    display: inline-block;
}
.hero-btn.primary {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: white;
    box-shadow: 0 8px 24px rgba(14,165,233,0.35);
}
.hero-btn.secondary {
    background: var(--card);
    color: var(--text);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0,0,0,0.08);
}
.hero-btn:hover { transform: translateY(-3px) scale(1.03); }

/* ── OBSAH STRÁNEK ── */
.content {
    max-width: 860px;
    margin: 0 auto;
    padding: 100px 24px 60px;
}

/* ── KARTA ── */
.card {
    background: var(--card);
    backdrop-filter: blur(12px);
    padding: 32px 36px;
    border-radius: 22px;
    box-shadow: 0 10px 32px rgba(0,0,0,0.09);
    transition: 0.3s;
    margin-bottom: 28px;
    animation: fadeUp 0.5s cubic-bezier(0.22,1,0.36,1) both;
}
.card:hover { transform: translateY(-4px); }

.card h2 {
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 14px;
    letter-spacing: -0.02em;
}

.card p {
    font-size: 17px;
    line-height: 1.75;
    opacity: 0.75;
    margin: 0;
}

/* ── NADPIS STRÁNKY ── */
.page-title {
    font-size: clamp(28px, 5vw, 46px);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 0 32px;
}

.page-title span {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── MŘÍŽKA OBRÁZKŮ 2×2 ── */
.img-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 28px;
    animation: fadeUp 0.5s cubic-bezier(0.22,1,0.36,1) 0.1s both;
}

.img-grid img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 16px;
    display: block;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    transition: transform 0.4s cubic-bezier(0.22,1,0.36,1), box-shadow 0.4s;
    background: linear-gradient(135deg, #bae6fd, #93c5fd);
    cursor: zoom-in;
}
.img-grid img:hover {
    transform: scale(1.04);
    box-shadow: 0 20px 48px rgba(14,165,233,0.25);
}

/* ── ANIMACE ── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── SOCIAL BAR ── */
.social-bar {
    position: fixed;
    top: 20px;
    right: 28px;
    z-index: 1001;
    display: flex;
    gap: 6px;
    align-items: center;
    background: var(--card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 10px 16px;
    border-radius: 999px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    animation: fadeUp 0.6s cubic-bezier(0.22,1,0.36,1) 0.3s both;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    text-decoration: none;
    transition: transform 0.25s cubic-bezier(0.22,1,0.36,1), box-shadow 0.25s;
    position: relative;
    cursor: pointer;
}
.social-link:hover {
    transform: translateY(-4px) scale(1.15);
    box-shadow: 0 8px 20px rgba(0,0,0,0.22);
}
.social-link:active { transform: scale(0.93); }

.social-link svg {
    width: 19px; height: 19px;
    display: block;
    pointer-events: none;
}

.social-link.instagram { background: radial-gradient(circle at 30% 110%, #f9a825, #f44336 40%, #9c27b0 70%); }
.social-link.instagram svg { fill: white; }
.social-link.facebook { background: #1877f2; }
.social-link.facebook svg { fill: white; }
.social-link.tiktok { background: #010101; }
.social-link.tiktok svg { fill: white; }

/* Tooltip */
.social-link::after {
    content: attr(data-label);
    position: absolute;
    top: calc(100% + 9px);
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    background: rgba(10,25,45,0.88);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
}
.social-link:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
