/* ============ БАЗА ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --gold: #c9a227;
  --gold-light: #e6c866;
  --dark: #0b0b0b;
  --text: #f5f1e8;
  --font-serif: "Playfair Display", "Times New Roman", serif;
  --font-sans: "Inter", "Helvetica Neue", Arial, sans-serif;
}

html, body {
  height: 100%;
  background: var(--dark);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ============ ЛОГОТИП ============ */
.brand {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 24px 40px;
  z-index: 100;
  pointer-events: none;
  mix-blend-mode: difference;
}

.brand__logo {
  pointer-events: auto;
  font-family: var(--font-serif);
  font-size: 22px;
  letter-spacing: 0.4em;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

/* ============ КОНТЕЙНЕР ============ */
.showcase {
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* ============ ПАНЕЛЬ ============ */
.panel {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
}

.panel__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.panel:hover .panel__video {
  transform: scale(1.06);
}

.panel__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.25) 45%, rgba(0,0,0,0.55) 100%);
}

/* ============ КОНТЕНТ ============ */
.panel__content {
  position: relative;
  z-index: 2;
  padding: 0 40px 80px;
  max-width: 640px;
  transform: translateY(30px);
  opacity: 0;
  animation: fadeUp 1.2s ease forwards;
}

.panel:nth-child(2) .panel__content { animation-delay: 0.15s; }
.panel:nth-child(3) .panel__content { animation-delay: 0.3s; }

@keyframes fadeUp {
  to { transform: translateY(0); opacity: 1; }
}

.panel__kicker {
  font-size: 13px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 18px;
}

.panel__title {
  font-family: var(--font-serif);
  font-size: clamp(48px, 8vw, 110px);
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
}

.panel__text {
  font-size: 17px;
  line-height: 1.6;
  color: rgba(245, 241, 232, 0.75);
  max-width: 440px;
  margin-bottom: 36px;
}

/* ============ КНОПКА ============ */
.panel__btn {
  display: inline-block;
  padding: 18px 42px;
  border: 1px solid var(--gold);
  color: var(--gold-light);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  transition: color 0.4s ease, border-color 0.4s ease;
}

.panel__btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: -1;
}

.panel__btn:hover {
  color: #0b0b0b;
}

.panel__btn:hover::before {
  transform: scaleX(1);
}

/* ============================================================
   ДЕСКТОП: три панели в РЯД, каждая на 1/3 ширины
   ============================================================ */
@media (min-width: 1024px) {

  .showcase {
    flex-direction: row;
    height: 100vh;
  }

  .panel {
    height: 100vh;
    flex: 1;
    transition: flex 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  }

  /* Эффект "раскрытия" панели при наведении */
  .panel:hover {
    flex: 1.6;
  }

  .panel__content {
    padding: 0 48px 64px;
    max-width: 520px;
  }

  .panel__text {
    font-size: 15px;
  }

  .panel__title {
    font-size: clamp(40px, 4.5vw, 72px);
  }
}

/* ============================================================
   ПЛАНШЕТ: две колонки сверху, одна снизу
   ============================================================ */
@media (min-width: 640px) and (max-width: 1023px) {

  .showcase {
    flex-direction: row;
    flex-wrap: wrap;
    height: auto;
  }

  .panel {
    flex: 1 1 50%;
    height: 60vh;
  }

  .panel:nth-child(3) {
    flex: 1 1 100%;
    height: 60vh;
  }

  .panel__content {
    padding: 0 32px 48px;
  }
}

/* ============================================================
   МОБИЛЬНЫЙ: вертикальный скролл, крупные кнопки,
   видео-панели на всю высоту экрана
   ============================================================ */
@media (max-width: 639px) {

  .brand {
    padding: 18px 20px;
  }

  .brand__logo {
    font-size: 18px;
  }

  .panel {
    height: 100svh; /* svh — корректная высота на мобильных с адресной строкой */
    align-items: flex-end;
  }

  .panel__content {
    padding: 0 22px 56px;
    max-width: 100%;
  }

  .panel__kicker {
    font-size: 11px;
    margin-bottom: 12px;
  }

  .panel__title {
    font-size: clamp(40px, 14vw, 64px);
    margin-bottom: 14px;
  }

  .panel__text {
    font-size: 15px;
    margin-bottom: 28px;
  }

  .panel__btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 20px 24px;
    font-size: 12px;
  }

  /* На мобильном убираем hover-эффекты, чтобы не мешали */
  .panel:hover .panel__video { transform: none; }
}

/* ============================================================
   ПРЕЛОАДЕР
   ============================================================ */
   .preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #0b0b0b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
  }
  
  .preloader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
  
  .preloader__inner {
    text-align: center;
  }
  
  .preloader__logo {
    font-family: var(--font-serif);
    font-size: clamp(32px, 6vw, 56px);
    letter-spacing: 0.5em;
    color: var(--gold-light);
    font-weight: 500;
    /* Лёгкое "дыхание" логотипа */
    animation: preloaderPulse 1.8s ease-in-out infinite;
  }
  
  @keyframes preloaderPulse {
    0%, 100% { opacity: 0.65; letter-spacing: 0.5em; }
    50%      { opacity: 1;    letter-spacing: 0.55em; }
  }
  
  /* Тонкая золотая линия под логотипом, которая "растёт" */
  .preloader__line {
    width: 0;
    height: 1px;
    background: linear-gradient(to right,
      transparent, var(--gold), transparent);
    margin: 24px auto 0;
    animation: preloaderLine 2s cubic-bezier(0.65, 0, 0.35, 1) infinite;
  }
  
  @keyframes preloaderLine {
    0%   { width: 0; opacity: 0; }
    50%  { width: 140px; opacity: 1; }
    100% { width: 0; opacity: 0; }
  }
  
  /* Подпись разработчика */
.dev-credit {
  position: fixed;
  right: 20px;
  bottom: 18px;
  z-index: 50;

  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;

  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.12);

  transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.dev-credit span {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 400;
}

.dev-credit:hover {
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  border-color: rgba(255, 255, 255, 0.3);
}

/* На мобильных — чуть меньше */
@media (max-width: 600px) {
  .dev-credit {
    right: 12px;
    bottom: 12px;
    font-size: 10px;
    padding: 5px 10px;
  }
}
