﻿/* CSS Variables */
:root {
    --color-bg: #0a0a0a;
    --color-bg-secondary: #111111;
    --color-bg-card: #161616;
    --color-text: #ffffff;
    --color-text-secondary: #888888;
    --color-accent: #ff4d4d;
    --color-border: rgba(255, 255, 255, 0.08);
    --font-display: 'Meddon', cursive;
    --font-body: 'Manrope', sans-serif;
    --header-height: 80px;
    --transition-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* Custom Cursor */
.cursor {
    position: fixed; width: 8px; height: 8px;
    background-color: var(--color-accent); border-radius: 50%;
    pointer-events: none; z-index: 9999;
    transform: translate(-50%, -50%); transition: transform 0.1s ease;
}
.cursor-follower {
    position: fixed; width: 40px; height: 40px;
    border: 1px solid var(--color-accent); border-radius: 50%;
    pointer-events: none; z-index: 9998;
    transform: translate(-50%, -50%);
    transition: transform 0.3s var(--transition-smooth), width 0.3s var(--transition-smooth), height 0.3s var(--transition-smooth);
}
.cursor-follower.hovering { width: 60px; height: 60px; border-color: var(--color-text); }

/* Loader */
.loader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--color-bg); display: flex;
    align-items: center; justify-content: center; z-index: 10000;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
.loader.hidden { opacity: 0; visibility: hidden; }
.loader__content { display: flex; gap: 5px; }
.loader__letter {
    font-family: var(--font-display); font-size: clamp(30px, 5vw, 60px);
    color: var(--color-text); opacity: 0; transform: translateY(30px);
    animation: loaderLetter 0.5s ease forwards;
}
.loader__letter:nth-child(1) { animation-delay: 0.1s; }
.loader__letter:nth-child(2) { animation-delay: 0.15s; }
.loader__letter:nth-child(3) { animation-delay: 0.2s; }
.loader__letter:nth-child(4) { animation-delay: 0.25s; }
.loader__letter:nth-child(5) { animation-delay: 0.3s; }
.loader__letter:nth-child(6) { animation-delay: 0.35s; }
.loader__letter:nth-child(7) { animation-delay: 0.4s; }
.loader__letter:nth-child(8) { animation-delay: 0.45s; }
@keyframes loaderLetter { to { opacity: 1; transform: translateY(0); } }

/* Header */
.header {
    position: fixed; top: 0; left: 0; width: 100%; height: var(--header-height);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 clamp(20px, 4vw, 60px); z-index: 100; mix-blend-mode: difference;
}
.header__logo { font-family: var(--font-body); font-size: 14px; font-weight: 700; letter-spacing: 0.2em; }
.menu-toggle {
    width: 40px; height: 40px; background: transparent; border: none;
    cursor: none; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 8px; z-index: 1001;
}
.menu-toggle__line {
    width: 30px; height: 1px; background-color: var(--color-text);
    transition: transform 0.4s var(--transition-smooth), opacity 0.3s ease;
}
.menu-toggle.active .menu-toggle__line:first-child { transform: translateY(4.5px) rotate(45deg); }
.menu-toggle.active .menu-toggle__line:last-child { transform: translateY(-4.5px) rotate(-45deg); }

/* Menu Fullscreen */
.menu {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 999; pointer-events: none; visibility: hidden;
}
.menu.active { pointer-events: all; visibility: visible; }
.menu__bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--color-bg); transform: scaleY(0);
    transform-origin: bottom; transition: transform 0.8s var(--transition-smooth);
}
.menu.active .menu__bg { transform: scaleY(1); }
.menu__content {
    position: relative; width: 100%; height: 100%;
    display: flex; flex-direction: column; justify-content: center;
    padding: 0 clamp(20px, 8vw, 120px); opacity: 0;
    transition: opacity 0.4s ease 0.4s;
}
.menu.active .menu__content { opacity: 1; }
.menu__list { list-style: none; }
.menu__item { overflow: hidden; }
.menu__link {
    display: flex; align-items: baseline; gap: 20px; padding: 15px 0;
    font-size: clamp(40px, 8vw, 100px); font-weight: 700;
    text-transform: uppercase; transform: translateY(100%);
    transition: transform 0.8s var(--transition-smooth);
}
.menu.active .menu__link { transform: translateY(0); }
.menu.active .menu__item:nth-child(1) .menu__link { transition-delay: 0.5s; }
.menu.active .menu__item:nth-child(2) .menu__link { transition-delay: 0.55s; }
.menu.active .menu__item:nth-child(3) .menu__link { transition-delay: 0.6s; }
.menu.active .menu__item:nth-child(4) .menu__link { transition-delay: 0.65s; }
.menu__link-number { font-size: clamp(12px, 1.5vw, 16px); font-weight: 400; color: var(--color-accent); }
.menu__link-text { transition: color 0.3s ease; }
.menu__link:hover .menu__link-text { color: var(--color-accent); }
.menu__footer {
    position: absolute; bottom: 40px; left: clamp(20px, 8vw, 120px);
    display: flex; gap: 30px; font-size: 12px; color: var(--color-text-secondary);
    text-transform: uppercase; letter-spacing: 0.1em; opacity: 0;
    transition: opacity 0.4s ease 0.8s;
}
.menu.active .menu__footer { opacity: 1; }

/* Main Content */
.main { padding-top: var(--header-height); }
.section {
    min-height: calc(100vh - var(--header-height));
    padding: 60px clamp(20px, 4vw, 60px);
}
.section__inner {
    display: grid; grid-template-columns: repeat(12, 1fr);
    gap: 30px; align-items: center; height: 100%;
}
.section__inner--column { display: flex; flex-direction: column; align-items: stretch; }
.section__header {
    display: flex; justify-content: space-between;
    align-items: flex-end; margin-bottom: 50px;
}
.section__title { display: flex; align-items: baseline; gap: 15px; }
.section__title-number { font-size: 12px; color: var(--color-accent); font-weight: 400; }
.section__title-text { font-family: var(--font-display); font-size: clamp(30px, 5vw, 60px); }

/* Hero Section */
.section--hero .section__inner { align-items: center; }
.hero { grid-column: 1 / 7; display: flex; flex-direction: column; gap: 40px; }
.hero__label {
    display: flex; align-items: center; gap: 15px; font-size: 10px;
    text-transform: uppercase; letter-spacing: 0.3em; color: var(--color-text-secondary);
}
.hero__label-line { width: 40px; height: 1px; background-color: var(--color-accent); }
.hero__title { display: flex; flex-direction: column; gap: 10px; }
.hero__title-line {
    font-size: clamp(50px, 8vw, 100px); font-weight: 800;
    line-height: 1; text-transform: uppercase;
}
.hero__title-line--small { font-size: clamp(40px, 6vw, 80px); color: var(--color-text-secondary); }
.hero__title-decorative { font-family: var(--font-display); color: var(--color-accent); font-weight: 400; }
.hero__info { display: flex; gap: 50px; margin-top: 20px; }
.hero__info-item { display: flex; flex-direction: column; gap: 5px; }
.hero__info-label {
    font-size: 10px; text-transform: uppercase;
    letter-spacing: 0.2em; color: var(--color-text-secondary);
}
.hero__info-value { font-size: 16px; font-weight: 500; }
.hero__scroll {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 12px; text-transform: uppercase; letter-spacing: 0.2em;
    color: var(--color-accent); margin-top: 20px; transition: gap 0.3s ease;
}
.hero__scroll:hover { gap: 15px; }
.hero__image { grid-column: 8 / 13; height: 500px; overflow: hidden; }
.hero__image img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.8s var(--transition-smooth);
}
.hero__image:hover img { transform: scale(1.05); }

/* Gallery Section */
.gallery {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 20px; width: 100%;
}
.gallery__item {
    position: relative; overflow: hidden; cursor: none;
    background: var(--color-bg-card); border: 1px solid var(--color-border);
    transition: transform 0.5s var(--transition-smooth);
}
.gallery__item:hover { transform: translateY(-10px); }
.gallery__item.hidden { display: none; }
.gallery__item-image { height: 280px; overflow: hidden; }
.gallery__item-image img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.6s var(--transition-smooth);
}
.gallery__item:hover .gallery__item-image img { transform: scale(1.08); }
.gallery__item-info {
    padding: 15px 20px; display: flex; align-items: center; gap: 10px;
    border-top: 1px solid var(--color-border);
}
.gallery__item-number { font-size: 12px; color: var(--color-accent); font-weight: 400; }
.gallery__item-title { font-size: 14px; font-weight: 600; }
.gallery__filter { display: flex; gap: 10px; }
.gallery__filter-btn {
    width: 40px; height: 40px; background: transparent;
    border: 1px solid var(--color-border); color: var(--color-text);
    font-family: var(--font-body); font-size: 12px; font-weight: 500;
    cursor: none; transition: all 0.3s ease;
}
.gallery__filter-btn:hover { border-color: var(--color-accent); color: var(--color-accent); }
.gallery__filter-btn.active {
    background-color: var(--color-accent); border-color: var(--color-accent);
    color: var(--color-bg);
}

/* About Section */
.about__content { grid-column: 1 / 7; }
.about__text {
    font-size: clamp(16px, 1.5vw, 20px); line-height: 1.8;
    font-weight: 300; margin-bottom: 40px; max-width: 500px;
}
.about__credits {
    display: grid; grid-template-columns: 1fr 1fr; gap: 30px;
    padding-top: 30px; border-top: 1px solid var(--color-border);
}
.credit { display: flex; flex-direction: column; gap: 5px; }
.credit__label {
    font-size: 10px; text-transform: uppercase;
    letter-spacing: 0.2em; color: var(--color-accent);
}
.credit__name { font-size: 18px; font-weight: 500; }
.credit__list { list-style: none; padding: 0; margin: 0; }
.credit__list li {
    font-size: 14px; padding: 2px 0; color: var(--color-text-secondary);
}
.about__image {
    grid-column: 8 / 13; height: 500px; overflow: hidden;
}
.about__image img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.8s var(--transition-smooth);
}
.about__image:hover img { transform: scale(1.05); }

/* Info Section */
.info__grid {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 20px; width: 100%;
}
.info__card {
    background: var(--color-bg-card); border: 1px solid var(--color-border);
    padding: 30px; display: flex; flex-direction: column; gap: 8px;
    transition: border-color 0.3s ease;
}
.info__card:hover { border-color: var(--color-accent); }
.info__card--highlight { border-color: var(--color-accent); }
.info__card-label {
    font-size: 10px; text-transform: uppercase;
    letter-spacing: 0.2em; color: var(--color-text-secondary);
}
.info__card-value { font-size: clamp(18px, 2vw, 24px); font-weight: 600; }
.info__card-address { font-size: 14px; color: var(--color-text-secondary); margin-top: 5px; }
.info__realization {
    margin-top: 50px; padding-top: 30px;
    border-top: 1px solid var(--color-border);
}
.info__realization-label {
    font-size: 10px; text-transform: uppercase;
    letter-spacing: 0.2em; color: var(--color-text-secondary);
    display: block; margin-bottom: 15px;
}
.info__realization-logos { display: flex; gap: 30px; flex-wrap: wrap; }
.info__realization-logos span {
    font-size: 14px; font-weight: 500; color: var(--color-text);
    padding: 10px 20px; border: 1px solid var(--color-border);
}

/* Footer */
.footer {
    position: fixed; bottom: 0; left: 0; right: 0; height: 50px;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 clamp(20px, 4vw, 60px); z-index: 50;
    font-size: 11px; color: var(--color-text-secondary);
    border-top: 1px solid var(--color-border);
}

/* Lightbox */
.lightbox {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95); z-index: 10000;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.lightbox.active { opacity: 1; visibility: visible; }
.lightbox__image {
    max-width: 85vw; max-height: 85vh; object-fit: contain;
    opacity: 0; transform: scale(0.95);
    transition: opacity 0.4s ease 0.1s, transform 0.4s var(--transition-smooth) 0.1s;
}
.lightbox.active .lightbox__image { opacity: 1; transform: scale(1); }
.lightbox__close {
    position: absolute; top: 24px; right: 24px;
    width: 48px; height: 48px; background: transparent;
    border: 1px solid rgba(255,255,255,0.2); color: #fff;
    font-size: 24px; cursor: pointer; display: flex;
    align-items: center; justify-content: center;
    transition: border-color 0.3s ease, color 0.3s ease;
}
.lightbox__close:hover { border-color: var(--color-accent); color: var(--color-accent); }
.lightbox__nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 52px; height: 52px; background: transparent;
    border: 1px solid rgba(255,255,255,0.2); color: #fff;
    font-size: 20px; cursor: pointer; display: flex;
    align-items: center; justify-content: center;
    transition: border-color 0.3s ease, color 0.3s ease;
}
.lightbox__nav:hover { border-color: var(--color-accent); color: var(--color-accent); }
.lightbox__prev { left: 24px; }
.lightbox__next { right: 24px; }
.lightbox__counter {
    position: absolute; bottom: 24px; left: 50%;
    transform: translateX(-50%); font-size: 13px;
    color: rgba(255,255,255,0.5); letter-spacing: 0.1em;
}
body.lightbox-open { cursor: auto !important; }
body.lightbox-open .cursor,
body.lightbox-open .cursor-follower { display: none; }

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeInUp 0.8s ease forwards; }

/* Responsive */
@media (max-width: 1024px) {
    .gallery { grid-template-columns: repeat(2, 1fr); }
    .hero { grid-column: 1 / 13; }
    .hero__image { grid-column: 1 / 13; height: 400px; }
    .about__content { grid-column: 1 / 13; }
    .about__image { grid-column: 1 / 13; height: 400px; }
    .info__grid { grid-template-columns: 1fr; }
    body { cursor: auto; }
    .cursor, .cursor-follower { display: none; }
    .menu-toggle { cursor: pointer; }
    .gallery__filter-btn { cursor: pointer; }
    .gallery__item { cursor: pointer; }
}
@media (max-width: 768px) {
    .gallery { grid-template-columns: 1fr; }
    .gallery__item-image { height: 220px; }
    .about__credits { grid-template-columns: 1fr; }
    .hero__info { flex-direction: column; gap: 20px; }
    .menu__link { font-size: clamp(30px, 10vw, 60px); }
}
