﻿@font-face {
  font-family: "Benzin";
  src: url("assets/fonts/benzin-bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #000000;
  --bg-card: #080808;
  --line: rgba(255,255,255,0.09);
  --line-strong: rgba(255,255,255,0.16);
  --text: #f5f1ea;
  --muted: #5e5a55;
  --accent: #b3915f;
  --accent-soft: rgba(255, 0, 0, 0.12);
  --topbar-h: 60px;
  --pad-x: 32px;
  --radius: 14px;
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: "Manrope", sans-serif;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul { list-style: none; }

/* TOPBAR */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad-x);
  background: linear-gradient(to bottom, rgba(7,7,7,0.95) 60%, transparent);
}

.brand {
  display: flex;
  align-items: center;
}

.brand-logo {
  height: 44px;
  width: auto;
  display: block;
}

.topnav {
  display: flex;
  gap: 28px;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-label {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* CONTACT FAB */
.contact-fab {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 30;
  padding: 13px 24px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(10,10,10,0.94);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

/* MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.78);
  opacity: 0;
  pointer-events: none;
}

.modal-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.modal-panel {
  position: relative;
  width: min(90vw, 380px);
  padding: 38px 32px 32px;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: #0d0d0d;
  display: flex;
  flex-direction: column;
}

.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 30px; height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: none;
  color: var(--muted);
  font-size: 0.8rem;
}

.modal-label {
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.modal-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-link {
  display: block;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
}

.modal-phone {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  background: none;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.modal-phone-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.modal-phone-number {
  font-size: 0.95rem;
  font-weight: 500;
}

.modal-phone.copied {
  border-color: var(--accent);
  color: var(--accent);
}

.modal-phone.copied .modal-phone-label {
  color: var(--accent);
}

/* HERO */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 0 var(--pad-x);
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(7,7,7,0.55);
  z-index: 1;
  pointer-events: none;
}

.hero-eyebrow,
.hero-title {
  position: relative;
  z-index: 2;
}

.hero-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-title {
  font-family: "Benzin", sans-serif;
  font-weight: 700;
  font-size: clamp(3rem, 10vw, 10rem);
  line-height: 0.82;
  letter-spacing: 0.03em;
  color: #FF1717;
}

/* REELS SECTION - 10 cards in 2 rows, 16:9 aspect ratio */
.reels-section {
  padding: var(--topbar-h) var(--pad-x) 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: filter 0.35s cubic-bezier(0.25,0.46,0.45,0.94);
}

.reels-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.reel-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  aspect-ratio: 9 / 16;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.25,0.46,0.45,0.94),
              filter 0.35s cubic-bezier(0.25,0.46,0.45,0.94),
              border-color 0.25s;
  position: relative;
  z-index: 1;
}

/* соседние карточки замыливаются при наведении */
.reels-grid:has(.reel-card:hover) .reel-card:not(:hover) {
  filter: blur(3px) brightness(0.45);
  transform: scale(0.97);
}

/* всё остальное на странице затемняется при наведении на рилс */
main:has(.reel-card:hover) .cases-section,
main:has(.reel-card:hover) .content-section,
main:has(.reel-card:hover) .footer,
main:has(.reel-card:hover) .reels-section .section-label {
  filter: blur(2px) brightness(0.35);
  transition: filter 0.35s cubic-bezier(0.25,0.46,0.45,0.94);
  pointer-events: none;
}

.reel-card:hover {
  transform: scale(1.06);
  z-index: 2;
  border-color: var(--line-strong);
}

.reel-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.reel-placeholder {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    135deg,
    rgba(255,255,255,0.022) 0,
    rgba(255,255,255,0.022) 8px,
    transparent 8px,
    transparent 16px
  );
}

.reel-placeholder span {
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  color: rgba(245,241,234,0.18);
}

/* CASES SECTION - cinematic large-card slider */
.cases-section {
  padding: 72px 0 80px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: hidden;
  transition: filter 0.35s cubic-bezier(0.25,0.46,0.45,0.94);
}

.cases-section .section-label {
  padding-left: var(--pad-x);
}

.cases-wrapper {
  position: relative;
}

.cases-track {
  display: flex;
  gap: 14px;
  overflow-x: scroll;
  scrollbar-width: none;
  padding: 8px var(--pad-x) 8px;
  scroll-snap-type: x mandatory;
}

.cases-track::-webkit-scrollbar { display: none; }

.case-card {
  flex: 0 0 clamp(300px, 54vw, 920px);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: var(--bg-card);
  cursor: pointer;
  scroll-snap-align: start;
  position: relative;
  z-index: 1;
  transition: border-color 0.25s,
              transform 0.35s cubic-bezier(0.25,0.46,0.45,0.94),
              filter 0.35s cubic-bezier(0.25,0.46,0.45,0.94);
}

.cases-track:has(.case-card:hover) .case-card:not(:hover) {
  filter: blur(3px) brightness(0.45);
  transform: scale(0.97);
}

/* всё остальное на странице затемняется при наведении на кейс */
main:has(.case-card:hover) .reels-section,
main:has(.case-card:hover) .content-section,
main:has(.case-card:hover) .footer,
main:has(.case-card:hover) .cases-section .section-label {
  filter: blur(2px) brightness(0.35);
  transition: filter 0.35s cubic-bezier(0.25,0.46,0.45,0.94);
  pointer-events: none;
}

.case-card:hover {
  border-color: var(--line-strong);
  transform: scale(1.03);
  z-index: 2;
}

.case-frame {
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
}

.case-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.case-placeholder {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    135deg,
    rgba(255,255,255,0.022) 0,
    rgba(255,255,255,0.022) 8px,
    transparent 8px,
    transparent 16px
  );
}

.case-placeholder span {
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  color: rgba(245,241,234,0.18);
}

/* overlaid arrows */
.cases-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(7,7,7,0.86);
  color: var(--text);
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.cases-arrow:hover {
  background: rgba(30,30,30,0.96);
  border-color: var(--accent);
  color: var(--accent);
}

.cases-arrow--prev { left: 14px; }
.cases-arrow--next { right: 14px; }

/* VIDEO FULLSCREEN OVERLAY */
.video-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0,0,0,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.video-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.video-overlay-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(20,20,20,0.9);
  color: var(--text);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1;
  transition: border-color 0.2s;
}

.video-overlay-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.video-overlay-player {
  max-width: min(92vw, calc(92vh * 9 / 16));
  max-height: 92vh;
  width: auto;
  height: auto;
  border-radius: 16px;
  outline: none;
  box-shadow: 0 0 80px rgba(0,0,0,0.8);
}

/* CONTENT SECTIONS */
.content-section {
  padding: 72px var(--pad-x);
  max-width: 1360px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
  transition: filter 0.35s cubic-bezier(0.25,0.46,0.45,0.94);
}

/* CLIENTS */
.clients-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
}

.client-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.client-button {
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-size: 0.85rem;
}

.client-button.is-active {
  border-color: var(--accent);
  color: var(--text);
  background: var(--accent-soft);
}

.client-detail {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,0.018);
}

.client-detail h2 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 0.95;
  margin-bottom: 22px;
}

.client-stats {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.client-stats li {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.client-stats li:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.client-stats span {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 3px;
}

.client-stats strong {
  font-weight: 500;
  font-size: 0.9rem;
  line-height: 1.65;
}

/* STACK */
.stack-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.stack-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px 12px 14px;
  border-radius: 16px;
  background: var(--b-bg);
  border: 1px solid var(--b-border);
  cursor: default;
  transition: transform 0.2s, border-color 0.2s;
}

.stack-badge:hover {
  transform: translateY(-2px);
  border-color: var(--b-color);
}

.badge-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.badge-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--b-color);
  white-space: nowrap;
  line-height: 1.3;
}

.badge-dir {
  font-size: 0.7rem;
  color: var(--b-color);
  opacity: 0.65;
  white-space: nowrap;
  line-height: 1.3;
}

/* PROCESS */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.process-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.02);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.process-card b {
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  color: var(--accent);
  font-weight: 600;
}

.process-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
}

.process-card p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
}

/* FOOTER */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--pad-x);
  border-top: 1px solid var(--line);
  font-size: 0.76rem;
  color: var(--muted);
  transition: filter 0.35s cubic-bezier(0.25,0.46,0.45,0.94);
}

.footer-brand {
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text);
  font-size: 0.82rem;
}

.footer-links {
  display: flex;
  gap: 20px;
  letter-spacing: 0.1em;
}

.reels-swipe-hint { display: none; }
.reels-dots       { display: none; }

/* RESPONSIVE */
@media (max-width: 1100px) {
}

@media (max-width: 900px) {
  :root { --pad-x: 20px; }

  .reels-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .case-card {
    flex: 0 0 calc(50% - 5px);
  }

  .clients-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topnav { display: none; }

  /* compact horizontal carousel */
  .reels-section {
    height: auto;
    padding: var(--topbar-h) var(--pad-x) 20px;
    gap: 12px;
    overflow: visible;
  }

  .reels-section .section-label {
    padding-left: 0;
    display: block;
  }

  .reels-grid {
    display: flex;
    flex-direction: row;
    grid-template-columns: unset;
    grid-template-rows: unset;
    gap: 12px;
    overflow-x: scroll;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    /* bleed to screen edges while keeping first card aligned */
    margin-inline: calc(-1 * var(--pad-x));
    padding-inline: var(--pad-x);
    scroll-padding-left: var(--pad-x);
    min-height: 0;
  }

  .reels-grid::-webkit-scrollbar { display: none; }

  .reel-card {
    flex: 0 0 calc(100vw - var(--pad-x) * 2);
    height: 58dvh;
    min-height: 0;
    scroll-snap-align: start;
    border-radius: 16px;
    border: 1px solid var(--line);
    position: static;
  }

  .reel-card:first-child::after { display: none; }

  /* dot indicators */
  .reels-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    height: 14px;
    flex-shrink: 0;
  }

  .reels-dots span {
    display: block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--line-strong);
    transition: background 0.25s, width 0.25s, border-radius 0.25s;
    flex-shrink: 0;
  }

  .reels-dots span.is-active {
    background: var(--text);
    width: 18px;
    border-radius: 3px;
  }

  .case-card {
    flex: 0 0 calc(100% - 52px);
  }

  .stack-card {
    padding: 20px;
  }

  .stack-item {
    grid-template-columns: 32px 1fr 90px 28px;
    gap: 10px;
  }

  .stack-icon {
    width: 32px;
    height: 32px;
  }

  .hero-title {
    font-size: clamp(2rem, calc((100vw - var(--pad-x) * 4) / 6), 10rem);
    white-space: nowrap;
  }
}

@keyframes hint-up {
  0%   { opacity: 0;   transform: translateX(-50%) translateY(6px); }
  30%  { opacity: 1;   transform: translateX(-50%) translateY(0); }
  70%  { opacity: 1;   transform: translateX(-50%) translateY(0); }
  100% { opacity: 0;   transform: translateX(-50%) translateY(-6px); }
}

/* ===================== PRELOADER ===================== */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 48px;
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-logo {
  width: clamp(180px, 36vw, 320px);
  animation: preloader-logo-in 0.8s cubic-bezier(0.22, 1, 0.36, 1) both,
             preloader-star-glow 2.4s ease-in-out 0.8s infinite;
}

/* Звезда в логотипе пульсирует через filter на весь img */
@keyframes preloader-logo-in {
  from { opacity: 0; transform: scale(0.88) translateY(12px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

@keyframes preloader-star-glow {
  0%, 100% { filter: drop-shadow(0 0 0px #FF1717); }
  50%       { filter: drop-shadow(0 0 18px #FF1717); }
}

.preloader-bar {
  width: clamp(140px, 28vw, 240px);
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 1px;
  overflow: hidden;
}

.preloader-progress {
  height: 100%;
  width: 100%;
  background: #FF1717;
  transform: scaleX(0);
  transform-origin: left;
  animation: preloader-bar-fill 2s cubic-bezier(0.4, 0, 0.2, 1) 0.3s infinite;
}

@keyframes preloader-bar-fill {
  0%   { transform: scaleX(0); transform-origin: left; }
  45%  { transform: scaleX(1); transform-origin: left; }
  55%  { transform: scaleX(1); transform-origin: right; }
  100% { transform: scaleX(0); transform-origin: right; }
}
