/* =====================
   CSS переменные
   ===================== */
:root {
  --black: #0e0e0e;
  --white: #fafaf8;
  --accent: #c9a84c;
  --accent-light: #f0dfa0;
  --gray: #6b6b6b;
  --light-bg: #f4f2ee;
  --card-bg: #ffffff;
  --radius: 12px;
  --font-display: 'Oswald', sans-serif;
  --font-dream: 'Bebas Neue', cursive;
  --font-body: 'Mulish', sans-serif;
}

/* =====================
   СБРОС И БАЗОВЫЕ Стили
   ===================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--black);
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =====================
   НАВИГАЦИЯ
   ===================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 250, 248, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-dream);
  font-size: 1.8rem;
  font-weight: 400;
  letter-spacing: 0.05em;
}

.logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 36px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--gray);
  transition: color 0.2s;
  text-transform: uppercase;
}

.nav-links a:hover {
  color: var(--black);
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--black);
  border-radius: 2px;
  transition: 0.3s;
}

/* =====================
   Шапка (Hero)
   ===================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: var(--black);
  padding-top: 64px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, #2a1f0a 0%, #0e0e0e 60%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 24px;
}

.hero-label {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.hero-title {
  font-family: var(--font-dream);
  font-size: clamp(6rem, 18vw, 13rem);
  font-weight: 400;
  line-height: 0.9;
  color: var(--white);
  letter-spacing: 0.02em;
  margin-bottom: 32px;
}

.hero-title span {
  color: var(--accent);
}

.hero-desc {
  max-width: 520px;
  font-size: 1.2rem;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(250,250,248,0.65);
  margin-bottom: 44px;
}

.btn {
  display: inline-block;
  padding: 14px 36px;
  background: var(--accent);
  color: var(--black);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.btn:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
}

.hero-deco {
  position: absolute;
  right: -100px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
}

.circle {
  border-radius: 50%;
  position: absolute;
  border: 1px solid rgba(201,168,76,0.2);
}

.c1 {
  width: 500px;
  height: 500px;
  top: -250px;
  right: 0;
}

.c2 {
  width: 300px;
  height: 300px;
  top: -150px;
  right: 100px;
  border-color: rgba(201,168,76,0.1);
}

/* =====================
   СЕКЦИОННЫЕ ЗАГОЛОВКИ
   ===================== */
.section-label {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 48px;
  line-height: 1.1;
}

/* =====================
   РАБОТЫ СТУДИИ
   ===================== */
.works {
  padding: 100px 0;
  background: var(--light-bg);
  text-align: center;
}

.works .section-label,
.works .section-title {
  text-align: center;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  justify-items: center;
}

.work-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform 0.25s, box-shadow 0.25s;
  cursor: pointer;
  width: 100%;
}

.work-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}

.work-img {
  width: 100%;
  aspect-ratio: 4/3;
  transition: opacity 0.2s;
  object-fit: cover;
  display: block;
}

.work-card:hover .work-img {
  opacity: 0.85;
}

.work-info {
  padding: 20px;
  text-align: left;
}

.work-info h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}

.work-info p {
  font-size: 0.9rem;
  color: var(--gray);
  line-height: 1.5;
}

/* =====================
   ВАКАНСИИ
   ===================== */
.vacancies {
  padding: 100px 0;
  background: var(--white);
}

.vacancies-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.vacancy-card {
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.vacancy-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(201,168,76,0.1);
}

.vacancy-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}

.vacancy-card p {
  font-size: 0.88rem;
  color: var(--gray);
  line-height: 1.5;
  margin-bottom: 16px;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--light-bg);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray);
}

/* =====================
   КОНТАКТЫ
   ===================== */
.contacts {
  padding: 100px 0;
  background: var(--black);
  color: var(--white);
}

.contacts-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contacts .section-title {
  color: var(--white);
}

.contacts-desc {
  font-size: 0.95rem;
  color: rgba(250,250,248,0.6);
  line-height: 1.7;
  margin-bottom: 28px;
  margin-top: -24px;
}

.contacts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contacts-list li {
  font-size: 0.9rem;
  color: rgba(250,250,248,0.75);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-form input,
.contact-form textarea {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: 14px 16px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(255,255,255,0.35);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
}

/* =====================
   ФУТЕР
   ===================== */
.footer {
  background: #080808;
  color: rgba(250,250,248,0.35);
  text-align: center;
  padding: 20px;
  font-size: 0.8rem;
}


/* =====================
   Лайтбокс (Изменённый)
   ===================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: flex-start; /* Изменено с center, чтобы контент прокручивался сверху вниз */
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  pointer-events: none;
  transition: background 0.35s ease, backdrop-filter 0.35s ease;
  overflow-y: auto; /* Включаем скролл, если окно больше высоты экрана */
  padding: 64px 24px 40px 24px; /* Оставляем безопасное пространство для крестика сверху */
}

.lightbox.active {
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  pointer-events: all;
}

.lightbox-inner {
  position: relative;
  max-width: 860px;
  width: 100%;
  margin: auto 0; /* Магия CSS: центрирует по вертикали, если влезает, и сохраняет скролл, если нет */
  opacity: 0;
  transform: scale(0.88) translateY(24px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.lightbox.active .lightbox-inner {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.lightbox-img {
  max-width: 100%;
  max-height: 65vh; /* Ограничиваем картинку по высоте, чтобы всё влезало без прокрутки на большинстве экранов */
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 16px;
  display: block;
  margin: 0 auto;
  box-shadow: 0 32px 80px rgba(0,0,0,0.5);
}

.lightbox-img-placeholder {
  max-width: 100%;
  max-height: 65vh;
  width: auto;
  height: auto;
  aspect-ratio: 4/3;
  border-radius: 16px;
  display: block;
  margin: 0 auto;
  box-shadow: 0 32px 80px rgba(0,0,0,0.5);
}

.lightbox-caption {
  margin-top: 18px;
  text-align: center;
  color: rgba(255,255,255,0.85);
  font-family: var(--font-body);
}

.lightbox-caption h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.lightbox-caption p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
}

.lightbox-close {
  position: absolute;
  top: -46px; /* Крестик аккуратно сидит в верхнем паддинге */
  right: 0;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.lightbox-close:hover {
  background: rgba(255,255,255,0.25);
}

/* Адаптивность медиа-запросов */
@media (max-width: 900px) {
  .works-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .contacts-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 600px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 20px 24px;
    gap: 20px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
  }
  .nav-links.open {
    display: flex;
  }
  .burger {
    display: flex;
  }
  .works-grid {
    grid-template-columns: 1fr;
  }
}