*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0b0b0d;
  --bg-soft: #141418;
  --text: #f2f2f2;
  --muted: #a0a0a8;
  --accent: #ff5b2e;
  --radius: 14px;
  --maxw: 1400px;
}
html { scroll-behavior: smooth; }

@font-face {
  font-family: 'Montserrat';
  src: url('./style/montserrat/Montserrat-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}


body {
  font-family: 'Montserrat', 'Inter', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll { overflow: hidden; }

img, video { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

/* ===== NAV ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(11,11,13,0.6);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 18px 28px;
  display: flex; justify-content: space-between; align-items: center;
}

.logo {
    background: url("style/Lavsky logo.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100%;
    width: 150px;
    height: 30px;
}
.nav ul { 
  display: flex; 
  gap: 8pt; 
  list-style: none; 
  font-size: 12pt; 
  font-weight: 500;
}
.nav ul li {
  color: #000;
}
.nav ul a { 
  color: var(--text); 
  display: block;
  border-left: 1px solid #3d3d3d;
  padding-left: 8pt;
  /* width: 130px; */
  transition: color .2s; 
}
.nav ul a:hover { 
  color: var(--accent); 
  /* text-decoration: underline; */
  text-underline-offset: 0.4em;
}

.nav ul a span {
  color: var(--muted);
  display: block;
  font-size: 8pt;
  font-weight: 600;
  letter-spacing: 0.5pt;
  text-transform: uppercase;
}
.nav-cta {
  padding: 8px 18px; 
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 100px; font-size: 13px; 
  transition: all .6s;
}
.nav-cta:hover { 
  background: var(--accent); color: var(--text); }

/* Burger */
.burger {
  display: none;
  width: 32px; height: 32px;
  position: relative;
  z-index: 60;
}
.burger span {
  position: absolute; left: 4px; right: 4px; height: 2px;
  background: var(--text);
  transition: transform .3s, opacity .3s, top .3s;
}
.burger span:nth-child(1) { top: 10px; }
.burger span:nth-child(2) { top: 15px; }
.burger span:nth-child(3) { top: 20px; }
.burger.active span:nth-child(1) { top: 15px; transform: rotate(45deg); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { top: 15px; transform: rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 55;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
}
.mobile-menu.active { 
  opacity: 1; 
  pointer-events: auto; 
}
.mobile-menu ul {
  list-style: none;
  display: flex; flex-direction: column;
  gap: 28px; text-align: center;
}
.mobile-menu a {
  font-size: 28px; font-weight: 600;
  color: var(--text);
  transition: color .2s;
}
.mobile-menu ul a span {
  color: var(--muted);
  display: block;
  font-size: 8pt;
  font-weight: 600;
  letter-spacing: 0.5pt;
  text-transform: uppercase;
}
.mobile-menu a:hover { 
  color: var(--accent); 
}
.mobile-menu .nav-cta {
  margin-top: 32px;
  padding: 14px 32px;
  font-size: 15px;
}

/* ===== About ===== */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex; align-items: flex-end;
  padding: 120px 28px 60px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: url('style/lavsky-com_header_background.jpg');
  background-size: cover; background-position: center;
  /* filter: brightness(0.95) saturate(1.5); */
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, var(--bg) 100%);
}
.hero-content {
  position: relative; z-index: 2;
  max-width: var(--maxw); margin: 0 auto; width: 100%;
}
.hero-tag {
  display: inline-block; padding: 6px 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px; font-size: 13px;
  margin-bottom: 24px; letter-spacing: 0.5px;
}
.hero h1 {
  font-size: clamp(40px, 7vw, 96px);
  font-weight: 500; line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}
.hero h1 span { 
  color: var(--accent); 
}
.hero p {
  font-size: clamp(16px, 1.4vw, 20px);
  color: var(--muted); 
  max-width: 640px;
}

/* ===== Sections ===== */
section.block {
  padding: 60px 28px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  flex-wrap: wrap; gap: 20px;
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.section-head h2 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: normal;
}
.section-quote {
    padding: 10px 32px;
    border-left: 3px solid var(--accent);
    background: var(--bg-soft);
    border-radius: 0 var(--radius) var(--radius) 0;
    /* font-size: 18px; */
    /* font-style: italic; */
    /* color: var(--text); */
    max-width:480px; 
    color:var(--muted);
    /* max-width: 700px; */
}
.section-num {
  font-size: 13px; 
  color: var(--muted);
  letter-spacing: 2px; 
  text-transform: uppercase;
}

/* ===== Gallery ===== */
.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(230px, auto);
  gap: 16px;
  /* grid-auto-flow: column dense; */
  grid-auto-flow: dense;
}
.card {
  position: relative;
  scale: .8;
  border-radius: var(--radius);
  overflow: hidden;
  grid-column: span 4;
  cursor: pointer;
  transition: transform .4s ease, 
              scale .3s ease;
  background: var(--bg-soft);
}
.card:hover { 
  transform: translateY(-4px);
}
.card.visible {scale: 1.0}

/* Slides */
.slides {
  position: absolute; inset: 0;
}
.slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity .5s ease;
}
.slide.active { opacity: 1; }
.slide img {
  width: 100%; height: 100%; object-fit: cover;
}

/* Arrows */
.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  opacity: 0;
  transition: opacity .3s, background .2s;
  z-index: 3;
}
.card:hover .arrow { opacity: 1; }
.arrow:hover { background: var(--accent); }
.arrow.prev { left: 12px; }
.arrow.next { right: 12px; }

/* Dots */
.dots {
  position: absolute;
  bottom: 12px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 6px;
  z-index: 3;
  padding: 6px 10px;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  border-radius: 999px;
}
.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  transition: all .2s;
  cursor: pointer;
}
.dot.active {
  background: var(--accent);
  width: 18px;
  border-radius: 3px;
}

/* Overlay */
.card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.85) 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 24px;
  z-index: 2;
  pointer-events: none;
}

.card-overlay h3 {
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.card-overlay p {
  font-size: 14px; color: rgba(255,255,255,0.8);
}
.card-overlay .tag {
  position: absolute; top: 16px; left: 16px;
  padding: 4px 10px; background: rgba(0,0,0,0.5);
  border-radius: 999px; font-size: 11px;
  letter-spacing: 1px; text-transform: uppercase;
  backdrop-filter: blur(6px);
}

.card.doublesize{ 
  grid-row: 1 / 3; 
}

/* ===== МОДАЛЬНОЕ ОКНО ===== */
.modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.95);
  backdrop-filter: blur(20px);
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
}
.modal.active { opacity: 1; pointer-events: auto; }

.modal-close {
  position: absolute; top: 24px; right: 24px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 24px;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
  z-index: 10;
}
.modal-close:hover { background: var(--accent); }

.modal-content {
  position: relative;
  max-width: 90vw; max-height: 85vh;
  display: flex; flex-direction: column;
  align-items: center;
}
.modal-img-wrap {
  position: relative;
  max-width: 90vw; max-height: 75vh;
  display: flex; align-items: center; justify-content: center;
}
.modal-img-wrap img {
  max-width: 100%; max-height: 75vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
.modal-arrow {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.modal-arrow:hover { background: var(--accent); }
.modal-arrow.prev { left: -80px; }
.modal-arrow.next { right: -80px; }

.modal-info {
  margin-top: 24px;
  text-align: center;
  max-width: 600px;
}
.modal-info h3 {
  font-size: 24px; margin-bottom: 8px;
}
.modal-info p {
  color: var(--muted); font-size: 15px;
}
.modal-counter {
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 2px;
}
.modal-dots {
  display: flex; gap: 8px; justify-content: center;
  margin-top: 16px;
}
.modal-dots .dot {
  width: 8px; height: 8px;
  background: rgba(255,255,255,0.3);
}
.modal-dots .dot.active {
  background: var(--accent);
  width: 24px;
  border-radius: 4px;
}

/* ===== VIDEO ===== */

.video-container {
  display: grid;
  grid-template-columns: 1fr 2fr;
  /* grid-auto-rows: minmax(230px, auto); */
  gap: 16px;
  grid-auto-flow: column dense;
}
.video-wrap {
  position: relative;
  width: 30vw;
  aspect-ratio: 16/9;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  margin-bottom: 32px;
  
  cursor: pointer;
  transition: transform .4s ease; 
  transform: scale(1.0);
}
/* .video-wrap iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%; border: 0;
} */
 
.video-wrap[data-type="iframe"]::after {
  content: '▶';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 60px; height: 60px;
  background: rgba(0,0,0,0.6);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 48px;
  padding-bottom: 6px;
  pointer-events: none;
  z-index: 2;
  backdrop-filter: blur(8px);
}
.video-wrap[data-type="iframe"]:hover::after {
  background: var(--accent);
}



.video-wrap video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; border: 0;
}
.video-wrap:hover {
  transform: scale(1.03);
}
.video-meta {
  display: grid;
  grid-template-rows: repeat(2, 1fr);
  /* grid-template-columns: 2fr 1fr;
  gap: 40px;
  align-items: start; */
}
.video-meta h3 {
  font-size: clamp(22px, 2.4vw, 32px);
  margin-bottom: 12px;
}
.video-meta p { color: var(--muted); }
.video-stats { 
  display: flex; 
  /* gap: 24px;  */
  height: fit-content;
}
.stat { 
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  border-right: 1px solid rgb(255 255 255 / 8%);
  padding-left: 20px;
  padding-right: 20px;
}
.stat-num { font-size: 28px; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }

@media (max-width: 900px) {
  section.block {
    padding: 30px 18px;
  }
  .card-overlay {
    padding: 12px;
  }
  .card-overlay h3 {
    line-height: normal;
  }
  .video-container {
    grid-template-columns: unset;
    grid-auto-flow: dense;
  }
  .video-wrap {
    width: auto;
  }
}



/* ===== ТЕЗИСНЫЕ ПЛИТКИ ===== */
.thesis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 40px;
}
.thesis {
  padding: 24px;
  background: var(--bg-soft);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  display: grid;
  grid-auto-flow: column;
  justify-content: start;
}
.thesis-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  /* background: var(--accent); */
  background-color: #232323;
  border-radius: 10px;
  /* margin-bottom: 16px; */
  margin-right: 16px;
  font-weight: 700;
  /* float: inline-start; */
  padding: 3px;
}
.thesis h4 { 
  font-size: 16px; 
  margin-top: -4px;
  /* margin-bottom: 6px;  */
}
.thesis p { 
  font-size: 14px; 
  color: var(--muted); 
}

/* ===== CONTACT ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-top: 40px;
}

.contact-intro {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 32px;
}

.legal-block {
  background: var(--bg-soft);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 28px;
}
.legal-block h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--accent);
}
.legal-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}
.legal-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.6;
}
.legal-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  margin-top: 2px;
}
.legal-list strong {
  color: var(--text);
  font-weight: 600;
}
.legal-note {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* Правая колонка: контакты */
.contact-actions h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}
.contact-note {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 28px;
}

/* Кнопки соцсетей */
.social-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}
.social-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  background: var(--bg-soft);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  transition: all .3s ease;
  text-decoration: none;
  color: var(--text);
}
.social-btn:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(255,91,46,0.2);
}

.social-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  transition: transform .3s;
}
.social-btn:hover .social-icon {
  transform: scale(1.1);
}

.social-text {
  flex: 1;
}
.social-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
}
.social-handle {
  font-size: 13px;
  color: var(--muted);
}

.social-btn.telegram:hover { border-color: #0088cc; }
.social-btn.telegram:hover .social-icon { color: #0088cc; }

.social-btn.vk:hover { border-color: #0077FF; }
.social-btn.vk:hover .social-icon { color: #0077FF; }

.social-btn.max:hover { border-color: #e100ff; }
.social-btn.max:hover .social-icon { color: #8400ff; }

.social-btn.email:hover { border-color: var(--accent); }
.social-btn.email:hover .social-icon { color: var(--accent); }

.contact-footer {
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.contact-footer p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .social-btn { padding: 16px 20px; }
  .social-icon { width: 28px; height: 28px; }
  .social-name { font-size: 15px; }
}




/* ===== FOOTER ===== */
footer {
  padding: 40px 28px;
  border-top: 1px solid rgba(255,255,255,0.06);
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.socials { display: flex; gap: 20px; justify-content: center; margin-bottom: 16px; }
.socials a:hover { color: var(--accent); }


/* ===== STACK ===== */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stack-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--bg-soft);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  transition: all .3s ease;
  cursor: default;
  opacity: 0;
  transform: translateY(20px);
}
.stack-card.visible {
  opacity: 1;
  transform: translateY(0);
}
.stack-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(255,91,46,0.15);
}
.stack-card.hidden {
  display: none;
}

.stack-icon {
  /* flex-shrink: 0; */
  width: 52px; height: 52px;
  border-radius: 12px;
  /* display: flex; align-items: center; justify-content: center; */
  /* font-size: 26px; */
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: transform .3s;
  padding: 4px;
}
.stack-card:hover .stack-icon {
  transform: scale(1.08) rotate(-3deg);
}


.stack-info {
  flex: 1;
  min-width: 0;
}
.stack-name {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
}
.stack-role {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.3;
}

.stack-experience {
  display: flex;
  flex-direction: column;
  text-align: center;
  line-height: 1.0;
}
.stack-experience span:nth-child(1) {
  color: var(--accent);
  font-size: xx-large;
  font-weight: 700;
}
.stack-experience span:nth-child(1)::before {
  content: ">";
}
.stack-experience span:nth-child(2) {
  color: var(--muted);
  font-size: small;
  letter-spacing: -0.5px;
}

/* Фильтр */
.stack-filter {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 24px;
}
.filter-btn {
  padding: 8px 18px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.5px;
  transition: all .2s;
  cursor: pointer;
}
.filter-btn:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.3);
}
.filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}


/* ===== EMBEDE VIDEO IN SLIDES ===== */
.slide video {
  width: 100%; height: 100%;
  object-fit: cover;
  pointer-events: none; /* клики проходят сквозь видео к карточке */
}

.modal-video {
  max-width: 90vw;
  max-height: 75vh;
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  display: none; /* JS */
  background: #000;
}


/* ===== IFRAME IN SLIDES ===== */
.slide iframe {
  display: none;
}

.modal-iframe {
  width: 90vw;
  max-width: 1200px;
  height: 75vh;
  max-height: 675px;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  display: none; /* JS */
  background: #000;
}

/* Иконка play */
.slide[data-type="iframe"] {
  position: relative;
}
.slide[data-type="iframe"]::after {
  content: '▶';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 60px; height: 60px;
  background: rgba(0,0,0,0.6);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 48px;
  padding-bottom: 6px;
  pointer-events: none;
  z-index: 2;
  backdrop-filter: blur(8px);
}
.slide[data-type="iframe"]:hover::after {
  background: var(--accent);
}



@media (max-width: 600px) {
  .stack-card { padding: 16px; gap: 12px; }
  .stack-icon { width: 44px; height: 44px; font-size: 22px; }
  .stack-name { font-size: 15px; }
  .stack-role { font-size: 12px; }
}
@media (max-width: 900px) {
  .gallery {
    grid-auto-flow: dense;
  }
  .nav ul, .nav-cta { display: none; }
  .burger { display: block; }
  .card, .card:nth-child(n) { 
    grid-column: span 12 !important; 
    /* aspect-ratio: 4/3 !important;  */
  }
  .card.doublesize {grid-row: inherit;}
  .video-meta { grid-template-columns: 1fr; }
  .video-stats { flex-wrap: wrap; }

  .modal-arrow.prev { left: 8px; }
  .modal-arrow.next { right: 8px; }
  .modal-arrow { width: 44px; height: 44px; font-size: 18px; }
  .modal-close { top: 12px; right: 12px; width: 42px; height: 42px; }
  .modal-info h3 { font-size: 20px; }
}