:root {
  --bg: #0b0b0c;
  --bg-2: #141416;
  --line: #26262a;
  --text: #f2f2f0;
  --muted: #8d8d93;
  --accent: #ff3b2f; /* REC-красный */
  --radius: 18px;
  --font-head: "Unbounded", system-ui, sans-serif;
  --font: "Manrope", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
ul { list-style: none; }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.muted, .dim { color: var(--muted); }

/* ---------- NAV ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(11, 11, 12, .8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-in { display: flex; align-items: center; gap: 32px; height: 64px; }
.logo { font: 700 18px var(--font-head); display: flex; align-items: center; gap: 10px; }
.nav-links { display: flex; gap: 28px; white-space: nowrap; margin-left: auto; color: var(--muted); font-size: 15px; }
.nav-links a:hover { color: var(--text); }

.rec {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); display: inline-block; flex: none;
  box-shadow: 0 0 12px var(--accent);
  animation: blink 1.6s infinite;
}
@keyframes blink { 50% { opacity: .25; } }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 16px 28px; border-radius: 999px;
  background: var(--text); color: var(--bg);
  font-weight: 700; font-size: 16px;
  transition: transform .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); background: #fff; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--bg-2); border-color: var(--muted); }
.btn-sm { padding: 10px 20px; font-size: 14px; }

/* ---------- HERO ---------- */
.hero { padding: 110px 0 80px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 28px;
}
h1 {
  font: 800 clamp(34px, 6.4vw, 80px)/1.05 var(--font-head);
  letter-spacing: -.02em; max-width: 15ch;
}
h1 .accent { color: var(--muted); }
.lead { font-size: clamp(18px, 2vw, 21px); color: var(--muted); max-width: 640px; margin-top: 28px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 40px; }

.facts {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line); margin-top: 80px;
}
.facts li { padding: 24px 20px 0 0; display: flex; flex-direction: column; gap: 4px; }
.facts b { font: 700 20px var(--font-head); }
.facts span { color: var(--muted); font-size: 15px; }

/* ---------- SECTIONS ---------- */
.section { padding: 90px 0; }
.h2 {
  font: 700 clamp(30px, 4.4vw, 52px)/1.1 var(--font-head);
  letter-spacing: -.02em; margin-bottom: 48px;
  display: flex; align-items: baseline; gap: 18px;
}
.num { font: 500 14px var(--font); color: var(--accent); letter-spacing: .1em; }
.label {
  font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin: 56px 0 20px;
}
.big-text { font-size: clamp(18px, 1.8vw, 21px); line-height: 1.55; margin-bottom: 16px; }

.list li { position: relative; padding-left: 20px; margin-bottom: 10px; color: #cfcfd2; }
.list li::before {
  content: ""; position: absolute; left: 0; top: .7em;
  width: 8px; height: 1px; background: var(--muted);
}

/* ---------- SERVICES ---------- */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 36px;
  transition: border-color .2s;
}
.card:hover { border-color: #3a3a40; }
.card h3 { font: 700 22px var(--font-head); margin-bottom: 22px; }

/* ---------- CASES ---------- */
.section-lead { margin: -24px 0 40px; }
.case { border-top: 1px solid var(--line); padding-top: 56px; margin-top: 72px; }
.case:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.case-body { display: grid; grid-template-columns: 1fr; gap: 40px; margin: 40px 0 36px; }
.case-text .big-text { max-width: 860px; }
.list.cols { columns: 2; column-gap: 40px; margin-top: 24px; }
.list.cols li { break-inside: avoid; }
/* анимация слева: ширину подгоняет скрипт, чтобы её высота = высоте текста */
.case-body.has-video { grid-template-columns: 220px 1fr; align-items: start; }
.case-body.has-video .list.cols { columns: 1; }  /* выше текст — крупнее анимация */
.tag { color: var(--accent); font-weight: 600; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; }
.case-title { font: 800 clamp(40px, 7vw, 96px)/1 var(--font-head); letter-spacing: -.03em; margin: 12px 0 8px; }
.case-sub { color: var(--muted); font-size: 20px; }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; align-items: center; }
.links a {
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; font-size: 14px;
}
.links a:hover { border-color: var(--muted); }



.reels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.wide { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 28px; }
.wide .clip:last-child:nth-child(odd) { grid-column: 1 / -1; }  /* нечётное число — последний на всю ширину */

/* карусель Reels: всегда ровный ряд, без пустых мест */
.carousel { position: relative; }
.reels-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 4 * 12px) / 4.4);
  gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.reels-row::-webkit-scrollbar { display: none; }
.reels-row .clip { scroll-snap-align: start; }
.arrow {
  position: absolute; top: calc(50% - 40px); width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(11, 11, 12, .8); backdrop-filter: blur(8px);
  color: var(--text); font-size: 20px; cursor: pointer; transition: opacity .2s, border-color .2s;
}
.arrow:hover { border-color: var(--text); }
.arrow:disabled { opacity: 0; pointer-events: none; }
.prev { left: -18px; }
.next { right: -18px; }
.hint { text-transform: none; letter-spacing: 0; font-weight: 400; }

/* видео-карточка */
.clip-box { position: relative; border-radius: 14px; overflow: hidden; background: var(--bg-2); cursor: pointer; }
.clip.v .clip-box, .clip.v .media-empty { aspect-ratio: 9/16; }
.clip.h .clip-box, .clip.h .media-empty { aspect-ratio: 16/9; }
.clip video { width: 100%; height: 100%; object-fit: cover; }
.sound {
  position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px;
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(0, 0, 0, .55); backdrop-filter: blur(6px); font-size: 15px;
  transition: background .2s;
}
.clip.on .sound { background: var(--accent); }
.clip figcaption, .jrow figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }

/* галерея ровными рядами (раскладку считает app.justify) */
.jgallery { display: flex; flex-direction: column; gap: 16px; }
.jrow { display: flex; gap: 12px; }
.jrow figure { min-width: 0; }
.jrow img { width: 100%; height: auto; border-radius: 12px; background: var(--bg-2); transition: opacity .2s; }
.jrow a:hover img { opacity: .85; }
.jrow .clip-box { width: 100%; }
.jrow figcaption { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- CASES ---------- */
.section-lead { margin: -24px 0 40px; }
.case { border-top: 1px solid var(--line); padding-top: 56px; margin-top: 72px; }
.case:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.credits { margin-top: 16px; font-size: 15px; }
.tag { color: var(--accent); font-weight: 600; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; }
.case-title { font: 800 clamp(40px, 7vw, 96px)/1 var(--font-head); letter-spacing: -.03em; margin: 12px 0 8px; }
.case-sub { color: var(--muted); font-size: 20px; }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; align-items: center; }
.links a {
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; font-size: 14px;
}
.links a:hover { border-color: var(--muted); }



.reels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.wide { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 28px; }
.wide .clip:last-child:nth-child(odd) { grid-column: 1 / -1; }  /* нечётное число — последний на всю ширину */

/* карусель Reels: всегда ровный ряд, без пустых мест */
.carousel { position: relative; }
.reels-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 4 * 12px) / 4.4);
  gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.reels-row::-webkit-scrollbar { display: none; }
.reels-row .clip { scroll-snap-align: start; }
.arrow {
  position: absolute; top: calc(50% - 40px); width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(11, 11, 12, .8); backdrop-filter: blur(8px);
  color: var(--text); font-size: 20px; cursor: pointer; transition: opacity .2s, border-color .2s;
}
.arrow:hover { border-color: var(--text); }
.arrow:disabled { opacity: 0; pointer-events: none; }
.prev { left: -18px; }
.next { right: -18px; }
.hint { text-transform: none; letter-spacing: 0; font-weight: 400; }

/* видео-карточка */
.clip-box { position: relative; border-radius: 14px; overflow: hidden; background: var(--bg-2); cursor: pointer; }
.clip.v .clip-box, .clip.v .media-empty { aspect-ratio: 9/16; }
.clip.h .clip-box, .clip.h .media-empty { aspect-ratio: 16/9; }
.clip video { width: 100%; height: 100%; object-fit: cover; }
.sound {
  position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px;
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(0, 0, 0, .55); backdrop-filter: blur(6px); font-size: 15px;
  transition: background .2s;
}
.clip.on .sound { background: var(--accent); }
.clip figcaption, .jrow figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }

/* картинки в родных пропорциях */




/* ---------- PROCESS ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.steps li { background: var(--bg); padding: 32px; }
.step-n { font: 700 14px var(--font-head); color: var(--accent); }
.steps h4 { font: 700 20px var(--font-head); margin: 18px 0 10px; }
.steps p { color: var(--muted); font-size: 16px; }

/* ---------- PRICES ---------- */
.prices { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
.price {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column; gap: 12px;
}
.price h3 { font: 700 19px var(--font-head); }
.price p { color: var(--muted); font-size: 15px; flex: 1; }
.price-val { font: 700 22px var(--font-head); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.price.featured { background: var(--text); color: var(--bg); border-color: var(--text); }
.price.featured p, .price.featured .muted { color: #55555a; }

/* ---------- ABOUT ---------- */
.about { display: grid; grid-template-columns: 380px 1fr; gap: 64px; align-items: start; }
.photo { width: 100%; height: auto; border-radius: var(--radius); position: sticky; top: 100px; }
.photo .media-empty { height: 100%; border-radius: var(--radius); }
.gear { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.gear div { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.gear dt { font-size: 13px; color: var(--muted); }
.gear dd { font-weight: 600; margin-top: 4px; }

/* ---------- FAQ ---------- */
.faq { max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 24px 40px 24px 0;
  font: 600 clamp(17px, 2vw, 20px) var(--font-head); position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; translate: 0 -50%;
  font-size: 28px; color: var(--muted); transition: rotate .2s;
}
.faq details[open] summary::after { rotate: 45deg; }
.faq details p { color: #cfcfd2; padding-bottom: 24px; max-width: 700px; }

/* ---------- CONTACTS ---------- */
.contacts { text-align: center; border-top: 1px solid var(--line); padding: 120px 0; }
.cta { font: 800 clamp(36px, 6vw, 76px)/1.05 var(--font-head); letter-spacing: -.02em; }
.contacts .lead { margin-inline: auto; }
.socials {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  max-width: 1000px; margin: 56px auto 0; text-align: left;
}
.social {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; min-height: 230px; padding: 26px;
  border: 1px solid var(--line); border-radius: 24px;
  background: linear-gradient(160deg, #18181b 0%, #0e0e10 70%);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), border-color .35s, color .35s;
}
/* белая заливка, поднимающаяся снизу при наведении */
.social::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--text); transform: translateY(101%);
  transition: transform .45s cubic-bezier(.2,.8,.2,1);
}
.social:hover { transform: translateY(-4px); border-color: var(--text); color: var(--bg); }
.social:hover::before { transform: none; }
.s-top { display: flex; align-items: center; gap: 10px; }
.s-icon {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid #333338; background: #0b0b0c; color: var(--text);
  transition: background .35s, color .35s, border-color .35s;
}
.s-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.s-icon .dot { fill: currentColor; stroke: none; }
.s-icon b { font: 800 15px var(--font-head); letter-spacing: -.02em; }
.social:hover .s-icon { background: var(--bg); border-color: var(--bg); color: var(--text); }
.s-badge {
  font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px; background: var(--accent); color: #fff;
}
.s-arrow {
  margin-left: auto; font-size: 26px; line-height: 1; color: var(--muted);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), color .35s;
}
.social:hover .s-arrow { transform: rotate(45deg); color: var(--bg); }
.s-name {
  margin-top: auto; font-size: 12px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); transition: color .35s;
}
.social:hover .s-name { color: #55555a; }
.s-nick {
  margin-top: 6px; font: 800 clamp(22px, 2.6vw, 30px)/1.1 var(--font-head);
  letter-spacing: -.02em; overflow-wrap: anywhere;
}
/* основной канал — с красным свечением */
.social.main { border-color: #3a2321; }
.social.main::after {
  content: ""; position: absolute; z-index: -2; width: 260px; height: 260px; right: -90px; top: -110px;
  background: radial-gradient(circle, rgba(255, 59, 47, .28), transparent 65%); pointer-events: none;
}

.footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: 14px; }

/* ---------- DEV PLACEHOLDERS ---------- */
.todo {
  display: inline-block; font: 600 12px/1.3 var(--font); letter-spacing: .04em;
  color: #ffb020; border: 1px dashed #ffb020; border-radius: 6px;
  padding: 4px 8px; background: rgba(255, 176, 32, .06); vertical-align: middle;
}
.media-empty {
  display: flex; align-items: center; justify-content: center; text-align: center;
  border: 1px dashed #4a4a50; border-radius: 12px; padding: 12px;
  color: #6b6b72; font-size: 12px; word-break: break-all; background: var(--bg-2);
}
.media-empty.r169 { aspect-ratio: 16/9; }
.media-empty.r916 { aspect-ratio: 9/16; }
.media-empty.r45 { aspect-ratio: 4/5; }
.dev-badge {
  position: fixed; bottom: 16px; left: 16px; z-index: 20;
  background: #ffb020; color: #000; font-size: 13px; font-weight: 600;
  padding: 8px 14px; border-radius: 999px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1000px) {
  .prices { grid-template-columns: repeat(2, 1fr); }
  .reels { grid-template-columns: repeat(3, 1fr); }
  .reels-row { grid-auto-columns: calc((100% - 2 * 12px) / 2.6); }
  .prev { left: 4px; } .next { right: 4px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .about, .case-body { grid-template-columns: 1fr; }
  .case-body { gap: 20px; }
  .case-body.has-video { grid-template-columns: 200px 1fr; gap: 28px; }
  .list.cols { columns: 1; }
  .photo { position: static; max-width: 380px; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .nav-links { display: none; }
  .nav-in { justify-content: space-between; }
  .hero { padding: 64px 0 56px; }
  .facts { grid-template-columns: 1fr 1fr; margin-top: 56px; }
  .section { padding: 64px 0; }
  .cards, .prices, .steps { grid-template-columns: 1fr; }
  .card { padding: 26px; }
  .reels { grid-template-columns: repeat(2, 1fr); }
  .reels-row { grid-auto-columns: 62%; }
  .arrow { display: none; }
  .wide { grid-template-columns: 1fr; }
  /* телефон: анимация слева от описания, список на всю ширину под ними */
  .case-body.has-video { grid-template-columns: 140px 1fr; gap: 20px 18px; }
  .case-body.has-video > .case-text { display: contents; }
  .case-body.has-video > .clip { grid-row: 1; }
  .case-body.has-video .big-text { grid-column: 2; grid-row: 1; margin: 0; font-size: 17px; line-height: 1.5; }
  .case-body.has-video .list, .case-body.has-video .credits { grid-column: 1 / -1; margin-top: 0; }
  .jrow { flex-wrap: wrap; }
  .jrow figure { flex-basis: 40% !important; }
  .btn { width: 100%; }
  .socials { grid-template-columns: 1fr; gap: 10px; margin-top: 40px; }
  .social {
    min-height: 0; padding: 16px 18px; display: grid; align-items: center; gap: 2px 14px;
    grid-template-columns: 48px 1fr auto;
    grid-template-areas: "icon name arrow" "icon nick arrow";
  }
  .social .s-top { display: contents; }
  .s-icon { grid-area: icon; width: 48px; height: 48px; }
  .s-arrow { grid-area: arrow; margin: 0; }
  .s-name { grid-area: name; margin: 0; }
  .s-nick { grid-area: nick; margin: 0; font-size: 21px; }
  .s-badge { position: absolute; top: 12px; right: 48px; font-size: 9px; padding: 3px 7px; }
  .actions .todo { width: 100%; text-align: center; }
}
