/* --- RESET & VARIABLES --- */
:root {
    --bg-color: #050505;
    --card-bg: #111111;
    --text-main: #f0f0f0;
    --text-muted: #888888;
    --accent: #ffffff;
    --border: #222222;
    --spacing: 2rem;
    --font-stack: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-stack);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; transition: opacity 0.2s ease; }
a:hover { opacity: 0.7; }
img { max-width: 100%; height: auto; display: block; background-color: var(--card-bg); }
ul { list-style: none; }

/* --- LAYOUT --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    padding: 2rem 0;
    border-bottom: 1px solid var(--border);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.05em;
    text-transform: uppercase;
}

.nav-links { display: flex; gap: 2rem; }
.nav-links a { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.nav-links a:hover, .nav-links a.active { color: var(--accent); }

/* --- HERO SECTION --- */
.hero {
    padding: 6rem 0;
    text-align: center;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.hero p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2rem;
    font-size: 1.1rem;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border: 1px solid var(--text-main);
    color: var(--text-main);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
}

.btn:hover { background: var(--text-main); color: var(--bg-color); opacity: 1; }

/* --- GALLERY GRID --- */
.gallery-section { padding: 4rem 0; }
.section-title { font-size: 2rem; margin-bottom: 2rem; font-weight: 400; }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.art-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    transition: transform 0.2s ease;
}

.art-card:hover { transform: translateY(-5px); }

.art-card figure {
    aspect-ratio: 4/5;
    overflow: hidden;
}

.art-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.art-card:hover img { transform: scale(1.05); }

.art-info { padding: 1.5rem; }
.art-info h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.art-info p { font-size: 0.85rem; color: var(--text-muted); }

/* --- LEGAL PAGES --- */
.legal-content { max-width: 800px; margin: 4rem auto; }
.legal-content h1 { margin-bottom: 2rem; font-size: 2.5rem; }
.legal-content h2 { margin: 2rem 0 1rem; font-size: 1.5rem; color: var(--text-main); }
.legal-content p { margin-bottom: 1rem; color: var(--text-muted); }

/* --- FOOTER --- */
footer {
    margin-top: auto;
    padding: 3rem 0;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-links { display: flex; gap: 1.5rem; }

/* --- COOKIE BANNER --- */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

#cookie-banner.show { transform: translateY(0); }
#cookie-banner p { font-size: 0.9rem; max-width: 80%; }
#cookie-banner button {
    background: var(--text-main);
    color: var(--bg-color);
    border: none;
    padding: 0.5rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    .nav-links { display: none; } /* Simplified for this snippet */
    .hero h1 { font-size: 2.5rem; }
    .footer-content { flex-direction: column; text-align: center; }
    .footer-links { justify-content: center; }
    #cookie-banner { flex-direction: column; gap: 1rem; text-align: center; }
    #cookie-banner p { max-width: 100%; }
}

/* --- MODERN LIGHTBOX (Premium Feel) --- */
#lightbox {
    display: flex;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 5, 5, 0.85); /* Полупрозрачный темный */
    backdrop-filter: blur(15px); /* Эффект матового стекла (Blur) - ТРЕНД */
    -webkit-backdrop-filter: blur(15px); /* Для Safari */
    justify-content: center;
    align-items: center;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); /* Очень плавная физика анимации */
}

#lightbox.active {
    opacity: 1;
    visibility: visible;
}

#lightbox img {
    max-width: 90vw;
    max-height: 80vh;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8); /* Глубокая тень для объема */
    border-radius: 4px; /* Легкое скругление */
    transform: scale(0.95) translateY(20px); /* Начальная позиция (чуть меньше и ниже) */
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    object-fit: contain;
}

#lightbox.active img {
    transform: scale(1) translateY(0); /* Финальная позиция */
}

/* Подпись под фото */
#lightbox-caption {
    margin-top: 1.5rem;
    color: var(--text-main);
    font-family: var(--font-stack);
    font-weight: 300;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease 0.1s, transform 0.3s ease 0.1s; /* Появляется чуть позже картинки */
}

#lightbox.active #lightbox-caption {
    opacity: 1;
    transform: translateY(0);
}

/* Убираем старую лупу, ставим аккуратный курсор */
.art-card img {
    cursor: pointer;
    transition: filter 0.3s ease, transform 0.5s ease;
}

/* При наведении на карточку в сетке - легкое затемнение */
.art-card:hover img {
    filter: brightness(1.1);
}