/* === PP Production — Main Styles === */

:root {
  --black: #0a0a0a;
  --white: #ffffff;
  --gray-100: #f5f5f5;
  --gray-200: #e5e5e5;
  --gray-300: #d4d4d4;
  --gray-500: #737373;
  --gray-700: #404040;
  --gray-900: #171717;
  --accent: #c8102e;
  --accent-hover: #a00d24;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Inter', sans-serif;
  --transition: 0.3s ease;
  --max-width: 1280px;
  --section-pad: 100px 0;
  --radius: 8px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-main);
  background: var(--black);
  color: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

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

ul { list-style: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* === HEADER === */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 0;
  transition: background var(--transition), padding var(--transition);
}

.header.scrolled {
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(12px);
  padding: 12px 0;
}

.header.scrolled .logo img {
  height: 50px;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  height: 100px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav a {
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-300);
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav a:hover,
.nav a.active {
  color: var(--white);
}

.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}

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

.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: var(--transition);
}

/* === HERO === */

.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-video-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-video-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.hero-video-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.6s ease;
}

.hero-video-bg video.fading {
  opacity: 0;
}

.hero-nav {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-arrow {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-arrow:hover {
  background: rgba(255,255,255,0.3);
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: var(--transition);
}

.hero-dots span.active {
  background: var(--white);
  transform: scale(1.2);
}

@media (max-width: 768px) {
  .hero-arrow {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--gray-300);
  max-width: 600px;
  margin-bottom: 40px;
}

.btn {
  display: inline-block;
  padding: 14px 36px;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 2px solid var(--accent);
  color: var(--white);
  background: var(--accent);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-outline {
  background: transparent;
}

.btn-outline:hover {
  background: var(--accent);
}

/* === SECTION COMMON === */

section {
  padding: var(--section-pad);
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--gray-500);
  margin-bottom: 48px;
  max-width: 560px;
}

/* (Directions merged into Portfolio filters) */

/* === PORTFOLIO GRID === */

.portfolio-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.portfolio-filters button {
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: transparent;
  border: 1px solid var(--gray-700);
  color: var(--gray-300);
  border-radius: 100px;
  cursor: pointer;
  transition: var(--transition);
}

.portfolio-filters button:hover,
.portfolio-filters button.active {
  border-color: var(--accent);
  color: var(--white);
  background: var(--accent);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
}

.portfolio-grid.collapsed .portfolio-card:nth-child(n+7) {
  display: none;
}

.show-more-wrap {
  text-align: center;
  margin-top: 32px;
}

.show-more-btn {
  display: inline-block;
  padding: 12px 32px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-main);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: transparent;
  border: 1px solid var(--gray-700);
  color: var(--gray-300);
  border-radius: 100px;
  cursor: pointer;
  transition: var(--transition);
}

.show-more-btn:hover {
  border-color: var(--accent);
  color: var(--white);
}

.portfolio-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--gray-900);
  cursor: pointer;
}

.portfolio-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.portfolio-card:hover img {
  transform: scale(1.05);
}

.portfolio-card .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  opacity: 0;
  transition: opacity var(--transition);
}

.portfolio-card:hover .overlay {
  opacity: 1;
}

.portfolio-card .overlay h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.portfolio-card .overlay span {
  font-size: 0.85rem;
  color: var(--gray-300);
}

/* === TEAM === */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

.team-card {
  text-align: center;
}

.team-card .photo {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  background: var(--gray-900);
}

.team-card .photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.team-card .role {
  font-size: 0.85rem;
  color: var(--gray-500);
}

/* === CONTACTS === */

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

.contact-info h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.contact-info .item {
  margin-bottom: 20px;
}

.contact-info .label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-500);
  margin-bottom: 4px;
}

.contact-info .value {
  font-size: 1rem;
}

.contact-info .value a:hover {
  color: var(--accent);
}

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

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 16px;
  font-size: 0.95rem;
  font-family: var(--font-main);
  background: var(--gray-900);
  border: 1px solid var(--gray-700);
  border-radius: var(--radius);
  color: var(--white);
  transition: border-color var(--transition);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--gray-500);
}

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

.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

/* === FOOTER === */

.footer {
  border-top: 1px solid var(--gray-700);
  padding: 40px 0;
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-left {
  font-size: 0.85rem;
  color: var(--gray-500);
}

.footer-left a:hover {
  color: var(--white);
}

.social-links {
  display: flex;
  gap: 16px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--gray-700);
  border-radius: 50%;
  color: var(--gray-300);
  font-size: 0.8rem;
  font-weight: 600;
  transition: var(--transition);
}

.social-links a:hover {
  border-color: var(--accent);
  color: var(--white);
  background: var(--accent);
}

/* === VIDEO MODAL === */

.video-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
}

.video-modal.active {
  display: flex;
}

.video-modal .close-modal {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

.video-modal .video-wrap {
  width: 90%;
  max-width: 960px;
  aspect-ratio: 16/9;
}

.video-modal .video-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: var(--radius);
}

/* === RESPONSIVE === */

@media (max-width: 768px) {
  :root {
    --section-pad: 60px 0;
  }

  .nav {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.98);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    z-index: 99;
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    font-size: 1.2rem;
  }

  .burger {
    display: flex;
    z-index: 101;
  }

  .burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .burger.active span:nth-child(2) {
    opacity: 0;
  }

  .burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .contacts-grid {
    grid-template-columns: 1fr;
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer .container {
    flex-direction: column;
    text-align: center;
  }
}

/* === PROJECT PAGE === */

.project-page {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--black);
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-page.active {
  transform: translateY(0);
}

.project-page__header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-700);
}

.project-page__close {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: var(--gray-300);
  font-size: 0.9rem;
  font-family: var(--font-main);
  cursor: pointer;
  transition: color var(--transition);
}

.project-page__close:hover {
  color: var(--white);
}

.project-page__close span {
  font-size: 1.2rem;
}

.project-page__nav {
  display: flex;
  gap: 8px;
}

.project-page__nav button {
  padding: 8px 16px;
  background: none;
  border: 1px solid var(--gray-700);
  color: var(--gray-300);
  font-size: 0.85rem;
  font-family: var(--font-main);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.project-page__nav button:hover {
  border-color: var(--accent);
  color: var(--white);
}

.project-page__content {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.project-page__player {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--gray-900);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 32px;
}

.project-page__player iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.project-page__poster {
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: 32px;
}

.project-page__info {
  margin-bottom: 48px;
}

.project-page__cat {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 100px;
  margin-bottom: 16px;
}

.project-page__title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 8px;
}

.project-page__type {
  font-size: 1.1rem;
  color: var(--gray-500);
}

.project-page__related h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--gray-300);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.related-card {
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--gray-900);
  transition: transform var(--transition);
}

.related-card:hover {
  transform: translateY(-4px);
}

.related-card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.related-info {
  padding: 12px;
}

.related-info strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.related-info span {
  font-size: 0.8rem;
  color: var(--gray-500);
}

/* === FILTER DESCRIPTION === */

.filter-desc {
  font-size: 0.9rem;
  color: var(--gray-500);
  margin-bottom: 32px;
  min-height: 1.4em;
  transition: opacity var(--transition);
}

/* === NEWS === */

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.news-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--gray-900);
  transition: transform var(--transition);
  cursor: pointer;
}

.news-card:hover {
  transform: translateY(-4px);
}

.news-card:hover .news-body h3 {
  color: var(--accent);
}

.news-card.expanded {
  grid-column: 1 / -1;
}

.news-card.expanded .news-img {
  height: 300px;
}

.news-full {
  margin-top: 12px;
}

.news-full p {
  font-size: 0.95rem;
  color: var(--gray-300);
  line-height: 1.7;
  margin-bottom: 12px;
}

.news-full img {
  max-width: 100%;
}

.news-img {
  height: 200px;
  background: center/cover no-repeat var(--gray-700);
}

.news-body {
  padding: 20px;
}

.news-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.news-body p {
  font-size: 0.9rem;
  color: var(--gray-500);
  line-height: 1.5;
}

/* === LIGHTBOX === */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.95);
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-img {
  max-width: 90%;
  max-height: 85vh;
  border-radius: var(--radius);
  object-fit: contain;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255,255,255,0.1);
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }

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

/* Blog article images */
.news-full img {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
  cursor: pointer;
  transition: opacity var(--transition);
}

.news-full img:hover {
  opacity: 0.85;
}

/* === MAP === */

.map-wrap {
  margin-top: 48px;
  border-radius: var(--radius);
  overflow: hidden;
}

/* === PROJECT META === */

.project-page__meta {
  margin-bottom: 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.project-meta-block {
  padding: 20px;
  background: var(--gray-900);
  border-radius: var(--radius);
}

.project-meta-block .meta-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-500);
  margin-bottom: 6px;
}

.project-meta-block .meta-value {
  font-size: 0.95rem;
}

.project-meta-block .meta-desc {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-top: 4px;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .project-page__meta {
    grid-template-columns: 1fr;
  }
  .news-grid {
    grid-template-columns: 1fr;
  }
}

/* === SCROLL ANIMATIONS === */

.fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children in grids */
.portfolio-grid.visible .portfolio-card,
.team-grid.visible .team-card,
.news-grid.visible .news-card {
  opacity: 0;
  transform: translateY(30px);
  animation: stagger-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.portfolio-grid.visible .portfolio-card:nth-child(1) { animation-delay: 0s; }
.portfolio-grid.visible .portfolio-card:nth-child(2) { animation-delay: 0.08s; }
.portfolio-grid.visible .portfolio-card:nth-child(3) { animation-delay: 0.16s; }
.portfolio-grid.visible .portfolio-card:nth-child(4) { animation-delay: 0.24s; }
.portfolio-grid.visible .portfolio-card:nth-child(5) { animation-delay: 0.32s; }
.portfolio-grid.visible .portfolio-card:nth-child(6) { animation-delay: 0.4s; }

.team-grid.visible .team-card:nth-child(1) { animation-delay: 0s; }
.team-grid.visible .team-card:nth-child(2) { animation-delay: 0.1s; }
.team-grid.visible .team-card:nth-child(3) { animation-delay: 0.2s; }
.team-grid.visible .team-card:nth-child(4) { animation-delay: 0.3s; }

.news-grid.visible .news-card:nth-child(1) { animation-delay: 0s; }
.news-grid.visible .news-card:nth-child(2) { animation-delay: 0.12s; }
.news-grid.visible .news-card:nth-child(3) { animation-delay: 0.24s; }

@keyframes stagger-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  .team-grid {
    grid-template-columns: 1fr;
  }

  .directions-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
