/* style.css — Lazutkina Premium Art: Optimized & Polished */

:root {
  --bg-main: #d9cebf; 
  --bg-secondary: #c9bca9; 
  --accent-gold: #b38d4f; 
  --text-dark: #2d241f;
  --text-muted: #5e544f;
  --white: #ffffff;
  --glass: rgba(255, 255, 255, 0.5);
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-soft: 0 20px 40px rgba(0, 0, 0, 0.08);
  --shadow-modal: 0 30px 100px rgba(0, 0, 0, 0.5);
  --dur: 0.5s;
  --bezier: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Глобальные стили */
* { box-sizing: border-box; scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; width: 100%; overflow-x: hidden; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Playfair Display', serif;
  background: radial-gradient(circle at top, var(--bg-main), var(--bg-secondary));
  background-attachment: fixed;
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; width: 100%; }

/* === Обновленная Шапка === */
.site-header {
  position: sticky; top: 0; z-index: 500;
  background: rgba(217, 206, 191, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; }
.brand { display: flex; align-items: center; gap: 15px; text-decoration: none; color: inherit; flex-shrink: 1; }
.brand-logo { width: 50px; height: 50px; object-fit: contain; border-radius: 8px; transition: 0.4s var(--bezier); flex-shrink: 0; }
.brand:hover .brand-logo { transform: rotate(5deg) scale(1.1); }

.brand-text { display: flex; flex-direction: column; }
.brand-name { font-family: 'Montserrat', sans-serif; font-weight: 700; text-transform: uppercase; font-size: 14px; letter-spacing: 0.5px; line-height: 1.2; }
.brand-sub { font-size: 10px; opacity: 0.7; font-family: 'Montserrat', sans-serif; }

.nav-list { list-style: none; display: flex; gap: 10px; margin: 0; padding: 0; }
.nav-list a { 
  font-family: 'Montserrat', sans-serif; text-decoration: none; color: var(--text-dark); 
  font-size: 12px; font-weight: 600; padding: 8px 15px; transition: var(--dur);
  border-radius: 20px;
  white-space: nowrap; /* Важно: запрещает перенос текста кнопок меню */
}
.nav-list a:hover { background: rgba(255,255,255,0.3); color: var(--accent-gold); }

/* === Hero Секция === */
.hero { padding: 80px 0; display: grid; grid-template-columns: 1fr 380px; gap: 40px; align-items: center; }
.hero-title { font-size: clamp(32px, 5vw, 52px); margin-bottom: 25px; font-weight: 700; line-height: 1.1; }
.hero-sub { font-size: 18px; color: var(--text-muted); margin-bottom: 40px; max-width: 600px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-card {
  background: var(--glass); padding: 30px; border-radius: var(--radius-lg);
  backdrop-filter: blur(15px); border: 1px solid rgba(255,255,255,0.4); box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease-out;
}

/* === Кнопки === */
.btn {
  padding: 14px 28px; border-radius: 50px; text-decoration: none; font-weight: 700;
  font-family: 'Montserrat', sans-serif; transition: 0.4s var(--bezier); 
  display: inline-block; font-size: 13px; text-align: center; border: 2px solid transparent;
}
.btn-primary { background: var(--text-dark); color: #fff; }
.btn-primary:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.2); background: #000; }
.btn-outline { color: var(--text-dark); border: 1px solid var(--text-dark); }
.btn-outline:hover { background: var(--text-dark); color: #fff; transform: translateY(-3px); }

/* === Обо мне === */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-img { width: 100%; border-radius: 30px; box-shadow: var(--shadow-soft); transition: 0.8s var(--bezier); }
.about-img:hover { transform: scale(1.02); }
.about-title { font-size: 36px; margin-bottom: 20px; }
.location { font-weight: 700; color: var(--accent-gold); }

/* === Галерея === */
.works-section { padding: 80px 0; background: rgba(0,0,0,0.02); }
.section-title { text-align: center; font-size: 32px; margin-bottom: 50px; font-family: 'Montserrat'; text-transform: uppercase; letter-spacing: 2px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 30px; }
.work-item { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-soft); transition: 0.6s var(--bezier); cursor: pointer; display: flex; flex-direction: column; }
.work-item:hover { transform: translateY(-10px); box-shadow: 0 30px 60px rgba(0,0,0,0.12); }
.work-thumb-wrap { width: 100%; aspect-ratio: 1 / 1.25; overflow: hidden; background: #eee; }
.work-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; transition: 1s var(--bezier); display: block; }
.work-item:hover .work-thumb-wrap img { transform: scale(1.08); }
.work-info { padding: 20px; text-align: center; background: white; }
.work-title { font-family: 'Montserrat'; font-weight: 700; font-size: 16px; margin: 0; color: var(--text-dark); }

/* === Модальное окно === */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 2000; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.92); backdrop-filter: blur(15px); opacity: 0; pointer-events: none; transition: 0.5s; }
.modal.open { opacity: 1; pointer-events: auto; }
.modal-content { width: 95%; max-width: 1150px; height: 85vh; background: #fff; border-radius: var(--radius-lg); overflow: hidden; position: relative; display: flex; flex-direction: column; box-shadow: var(--shadow-modal); }
.modal-layout { display: grid; grid-template-columns: 1.2fr 0.8fr; height: 100%; }
.modal-main-zone { background: #0a0a0a; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.modal-media { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-img, .modal-video { max-width: 100%; max-height: 100%; object-fit: contain; }
.modal-side-zone { display: flex; flex-direction: column; padding: 40px; overflow-y: auto; background: #fdfaf7; }
.modal-thumbs { display: flex; gap: 12px; margin-bottom: 25px; overflow-x: auto; padding-bottom: 10px; flex-shrink: 0; }
.modal-thumb { width: 65px; height: 65px; border-radius: 10px; cursor: pointer; opacity: 0.5; transition: 0.3s; flex-shrink: 0; overflow: hidden; border: 2px solid transparent; }
.modal-thumb.active { opacity: 1; border-color: var(--accent-gold); transform: scale(1.05); }
.modal-thumb img, .video-placeholder { width: 100%; height: 100%; object-fit: cover; }
.video-placeholder { background: #333; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.modal-description { font-size: 15px; color: var(--text-muted); line-height: 1.7; white-space: pre-wrap; margin-top: 15px; }
.modal-btn { position: absolute; background: rgba(255,255,255,0.1); color: #fff; border: none; width: 45px; height: 45px; border-radius: 50%; cursor: pointer; font-size: 20px; transition: 0.3s; top: 50%; transform: translateY(-50%); z-index: 10; }
.modal-btn:hover { background: #fff; color: #000; }
#modal-prev { left: 15px; }
#modal-next { right: 15px; }
.modal-close { position: absolute; top: 20px; right: 20px; z-index: 100; background: #fff; border: none; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; box-shadow: 0 5px 15px rgba(0,0,0,0.1); transition: 0.3s; }
.modal-close:hover { transform: rotate(90deg); background: var(--text-dark); color: #fff; }

/* === Анимации === */
.fade-up { opacity: 0; transform: translateY(30px); transition: opacity 0.8s var(--bezier), transform 0.8s var(--bezier); }
.fade-up.in-view { opacity: 1; transform: translateY(0); }

/* === Адаптивность === */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding: 40px 0; }
  .hero-actions { justify-content: center; }
  .hero-card { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 30px; text-align: center; }
  
  /* Telegram-Style Mobile Modal */
  .modal { padding: 0; }
  .modal-content {
    width: 100%;
    height: 100dvh;
    border-radius: 0;
    background: #000; 
  }
  .modal-layout { 
    display: block;
    height: 100%;
    overflow-y: auto; /* Allows scrolling the glass sheet up */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* Smooth iOS scroll */
  }
  .modal-main-zone { 
    height: 100dvh; /* Full screen initial view */
    width: 100%;
    position: sticky;
    top: 0;
    left: 0;
    z-index: 1;
    background: #000;
  }
  .modal-media {
    padding: 0; 
    height: 100%;
  }
  .modal-img, .modal-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding-bottom: 90px; /* Ensures the image isn't covered by the initial 90px of the overlay */
  }

  .modal-btn {
    top: 45%; 
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(5px);
  }
  
  .modal-side-zone { 
    position: relative;
    width: 100%;
    min-height: 40vh; /* Expands dynamically if text is long */
    margin-top: -90px; /* Overlaps precisely the padded area of the image */
    padding: 30px 20px 60px 20px;
    background: rgba(18, 18, 18, 0.75);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 20px 20px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 2; /* Slides over the sticky image and arrows */
    box-shadow: 0 -10px 30px rgba(0,0,0,0.5);
  }

  /* Add an iOS-style drag handle pill */
  .modal-side-zone::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.3);
  }
  
  /* Text adjustments for dark overlay */
  .modal-title { color: #fff !important; font-size: 18px !important; margin-top: 5px; margin-bottom: 12px !important; text-align: center; letter-spacing: 0.5px; }
  .modal-description { color: rgba(255, 255, 255, 0.9) !important; font-size: 15px; }
  .modal-thumb { opacity: 0.5; border-radius: 8px; }
  .modal-thumb.active { opacity: 1; border-color: rgba(255,255,255,0.9); }

  .modal-close {
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
  }
}

@media (max-width: 480px) {
  .container { padding: 0 15px; }
  
  /* Исправления шапки для мобильных */
  .brand { gap: 8px; }
  .brand-logo { width: 35px; height: 35px; }
  .brand-name { font-size: 11px; }
  .brand-sub { display: none; } /* Скрываем подзаголовок на очень маленьких экранах */
  
  .nav-list { gap: 5px; }
  .nav-list a { font-size: 11px; padding: 6px 10px; }

  .gallery-grid { grid-template-columns: 1fr; }
  .section-title { font-size: 24px; }
}

.site-footer { padding: 40px 0; text-align: center; opacity: 0.6; font-size: 13px; font-family: 'Montserrat'; }