/* =========================================================
   DESIGN SYSTEM & VARIABLES
   ========================================================= */
:root {
  --bg-color: #f2f2ef;
  --text-main: #1d1d1f;
  --text-muted: #86868b;
  --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

textarea {
  font-family: inherit;
  resize: none;
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  height: 100%;
  color: #333;
  font-size: 0.95rem;
}

/* NAVIGATION */
.nav-container {
  position: fixed;
  top: 24px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 1000;
  padding: 0 10px;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 780px;
  height: 56px;
  padding: 6px 8px 6px 28px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.brand {
  font-weight: 800;
  font-size: 1.05rem;
  color: #5D5D5D;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
  margin-right: 24px;
}

.nav-links a {
  font-size: 0.8rem;
  color: #5D5D5D;
  font-weight: 400;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #1d1d1f;
}

.pill-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 500;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pill-btn.dark {
  background-color: #5D5D5D;
  color: #ffffff;
}

.glow-effect {
  z-index: 1;
}

.glow-effect::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.25) 0%, transparent 30%);
  opacity: 0;
  transform: scale(1);
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: none;
  z-index: -1;
}

.glow-effect:hover {
  background-color: #5D5D5D;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.25);
  transform: translateY(-1px);
}

.glow-effect:hover::before {
  opacity: 1;
  transform: scale(2);
}

.nav-btn {
  padding: 10px 22px;
  font-size: 0.88rem;
}

/* HERO SECTION */
.hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 140px;
  padding-bottom: 120px;
  min-height: 100vh;
  text-align: center;
  overflow: visible;
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  opacity: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 680px;
  z-index: 2;
  margin-bottom: 48px;
}

.eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #a1a1a6;
}

.title {
  font-size: clamp(2.5rem, 4.5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #1d1d1f;
  margin-bottom: 16px;
}

.subtitle {
    font-size: 18px;
    color: #a1a1a6;
  line-height: 1.45;
  margin-bottom: 28px;
  font-weight: 400;
}

.spaces-title {
  font-size: 42px !important;
  font-weight: 600;
  margin: 10px 0;
  color: #fff !important;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.hero-btn {
  padding: 12px 24px;
  font-size: 0.9rem;
}

.text-link {
  font-size: 0.88rem;
  font-weight: 500;
  color: #4a4a4d;
}

/* MAC MOCKUP */
.mac-mockup {
  position: relative;
  width: 100%;
  max-width: 1180px;
  height: 700px;
  background: rgba(238, 238, 240, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.12), 0 10px 25px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  z-index: 2;
  margin: 0 auto;
}

.mac-menubar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #5D5D5D;
}

.mac-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mac-left span:first-child {
  font-size: 1.4rem;
}

.mac-notch {
  width: 180px;
  height: 38px;
  background: #5D5D5D;
  border-radius: 0 0 14px 14px;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

.mac-notch::before,
.mac-notch::after {
  content: '';
  position: absolute;
  top: 0;
  width: 12px;
  height: 12px;
}

.mac-notch::before {
  right: 100%;
  background: radial-gradient(circle at bottom left, transparent 11.5px, #5D5D5D 12px);
}

.mac-notch::after {
  left: 100%;
  background: radial-gradient(circle at bottom right, transparent 11.5px, #5D5D5D 12px);
}

.mac-screen {
  position: relative;
  width: 100%;
  height: calc(100% - 46px);
}

/* CARDS BASE */
.interactive-card {
  position: absolute;
  width: 260px;
  height: 160px;
  background: #AEAEAE;
  border-radius: 24px;
  padding: 20px;
  cursor: grab;
  user-select: none;
  box-shadow: 0 10px 25px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.interactive-card.square {
  width: 160px;
  height: 160px;
}

.interactive-card.large {
  width: 320px;
  height: 200px;
}

.interactive-card textarea {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.5;
  color: #fff;
  resize: none;
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  height: 100%;
  padding-top: 6px;
}

.interactive-card textarea::placeholder {
  color: #fff;
  opacity: 0.6;
  font-weight: 400;
  font-style: italic;
}

.interactive-card:active {
  cursor: grabbing;
  animation: none !important;
  transform: scale(0.95) rotate(var(--rot, 0deg)) !important;
}

.close-btn {
  position: absolute;
  top: 10px;
  left: 14px;
  background: transparent;
  color: #fff;
  border: none;
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  z-index: 10;
  padding: 0px;
}

.interactive-card:hover .close-btn {
  opacity: 0.5;
}

.close-btn:hover {
  opacity: 1 !important;
  transform: scale(1.3);
}

/* =========================================================
   SCENE 2: SCROLLETYLLING & STAGE
   ========================================================= */
.product-section {
  position: relative;
  height: 1300vh; /* Возвращаем оптимальный запас для плавности скролла */
  padding: 0;
  display: block;
}

.desktop-stage {
  position: sticky;
  top: calc(50vh - 325px);
  width: 100%;
  max-width: 1180px;
  height: 650px;
  margin: 0 auto;
  overflow: hidden !important;
  border-radius: 24px;
  z-index: 20;
}

/* Жесткое отключение липкости и лишней высоты после разлета */
.product-section.is-completed {
  height: auto !important;
  min-height: 100vh !important;
  padding-bottom: 50px;
  padding-top: 150px;
}

.product-section.is-completed .desktop-stage {
  position: relative !important;
  top: 0 !important;
  transform: none !important;
}

.dark-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #373737;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
  z-index: 2;
}

.cards-track {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-140px, -50%);
  display: flex;
  align-items: center;
  gap: 24px;
  width: max-content;
  transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: 15;
  will-change: transform;
}

.cards-track .step-card,
.cards-track .morph-box {
  cursor: default !important;
  user-select: none !important;
}

.morph-box {
  position: relative;
  width: 450px;
  height: 50px;
  background: #f4f4f5;
  border-radius: 25px;
  border: 1px solid #e4e4e7;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  overflow: hidden;
  transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.morph-box.is-card,
.interactive-card.step-card {
  width: 280px !important;
  height: 200px !important;
  background: #ffffff !important;
  border-radius: 20px !important;
  border: none !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08), 0 5px 15px rgba(0, 0, 0, 0.04) !important;
  padding: 28px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: flex-start !important;
  position: relative !important;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.messenger-ui {
  display: flex;
  width: 100%;
  align-items: center;
  padding: 0 10px;
  transition: opacity 0.3s ease;
}

.attach-icon {
  color: #a1a1aa;
  padding: 8px;
  display: flex;
}

.input-area {
  flex: 1;
  font-family: -apple-system, sans-serif;
  font-size: 1rem;
  color: #3f3f46;
  padding: 0 10px;
  white-space: nowrap;
  overflow: hidden;
}

.send-icon {
  width: 30px;
  height: 30px;
  background: #007aff;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.send-icon.hidden {
  transform: scale(0) rotate(45deg);
  opacity: 0;
}

.morph-box.is-card .messenger-ui {
  opacity: 0;
  pointer-events: none;
  position: absolute;
}

.float-card-ui {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  width: 100% !important;
  height: 100% !important;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transition: opacity 0.5s ease 0.3s;
}

.morph-box.is-card .float-card-ui {
  opacity: 1;
  pointer-events: auto;
}

.card-content,
.card-content-static {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: inherit;
  line-height: 1.35;
  letter-spacing: -0.02em;
  margin: 0;
  padding: 0;
  text-align: left;
  width: 100%;
  word-wrap: break-word;
}

.cursor, .card-cursor {
  color: #007aff;
  animation: blink 1s step-end infinite;
}

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.desktop-stage .delayed-popup {
  position: relative !important;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.desktop-stage .delayed-popup.show {
  opacity: 1;
  transform: scale(1);
}

.blue-dot {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 14px !important;
  height: 14px !important;
  background-color: #0088ff !important;
  border-radius: 50% !important;
  display: block !important;
  z-index: 10 !important;
}

.static-close-icon {
  position: absolute !important;
  top: 10px !important;
  left: 14px !important;
  color: #c7c7cc !important;
  font-size: 22px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  user-select: none !important;
  pointer-events: none !important;
  z-index: 10 !important;
}

/* LOCKED CARD (Общие стили + Glow для трека и для финальной карточки) */
div#cards-track div#card-locked.dark-card,
.interactive-card.spawned.dark-card {
  background-color: #464646 !important;
  background-image: none !important;
  border: none !important;
  color: #a1a1a6 !important;
  font-weight: 400 !important;
  overflow: hidden !important;
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  z-index: 20;
}

/* Оверлей (автоматически работает везде, где есть класс .secure-overlay) */
.secure-overlay {
  position: absolute !important;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #464646 !important;
  z-index: 10 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important; /* ВАЖНО: обрезаем частицы по скругленным углам */
}

/* Слой 1: Мелкие частицы */
.secure-overlay::before {
  content: '';
  position: absolute;
  top: -150px; left: -150px; right: -150px; bottom: -150px;
  pointer-events: none;
  z-index: 1; /* Кладем частицы ПОД иконки */
  
  background-image:
    radial-gradient(1.5px 1.5px at 20px 30px, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(2px 2px at 50px 70px, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 90px 20px, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(2.5px 2.5px at 140px 90px, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1.5px 1.5px at 170px 40px, rgba(255, 255, 255, 0.7), transparent);
  background-size: 120px 120px;
  animation: floatDust1 15s linear infinite;
}

/* Слой 2: Чуть крупнее (эффект параллакса) */
.secure-overlay::after {
  content: '';
  position: absolute;
  top: -150px; left: -150px; right: -150px; bottom: -150px;
  pointer-events: none;
  z-index: 1;
  
  background-image:
    radial-gradient(1px 1px at 10px 80px, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(2px 2px at 60px 10px, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1.5px 1.5px at 110px 110px, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(2px 2px at 180px 60px, rgba(255, 255, 255, 0.6), transparent);
  background-size: 150px 150px;
  animation: floatDust2 20s linear infinite;
  opacity: 0.6;
}

/* Сама анимация движения */
@keyframes floatDust1 {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-120px, -120px); }
}

@keyframes floatDust2 {
  0% { transform: translate(0, 0); }
  100% { transform: translate(150px, -150px); }
}

.secure-overlay .lock-state,
.secure-overlay .touch-state {
  position: absolute; /* Добавили, чтобы они не сдвигали друг друга при смене */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
  /* УДАЛИЛИ transition */
}

.secure-overlay .lock-icon {
  width: 32px !important;
  height: 32px !important;
  margin-bottom: 12px !important;
  display: block !important;
  object-fit: contain !important;
}

.secure-overlay .tap-me {
  background: transparent !important;
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 500 !important;
}

@keyframes scan {
  0% { color: #ccc; }
  50% { color: #ff3b30; filter: drop-shadow(0 0 8px rgba(255,59,48,0.6)); }
  100% { color: #007aff; filter: drop-shadow(0 0 8px rgba(0,122,255,0.6)); }
}

.stars-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px;
  height: 3px;
  background: transparent;
  border-radius: 50%;
  box-shadow:
    -80px -40px 0 #fff, 60px -50px 0 #fff,
    -40px 60px 0 #fff, 90px 40px 0 #fff,
    -100px 10px 0 #fff, 30px 70px 0 #fff;
  opacity: 0.5;
}

/* FLOATING ANIMATIONS */
@keyframes cardAppear {
  0% {
    opacity: 0;
    transform: scale(0.85) rotate(var(--rot, 0deg));
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(var(--rot, 0deg));
  }
}

@keyframes floatSpace {
  0%, 100% {
    transform: translate(0, 0) rotate(var(--rot, 0deg));
  }
  33% {
    transform: translate(6px, -10px) rotate(var(--rot, 0deg));
  }
  66% {
    transform: translate(-4px, 8px) rotate(var(--rot, 0deg));
  }
}

.interactive-card.floating {
  position: absolute !important;
  z-index: 15;
  cursor: default !important;
  pointer-events: none;
}

.stage-center-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 680px;
  text-align: center;
  z-index: 5;
  pointer-events: none;
  user-select: none;
}

.stage-center-text .caption {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 16px;
}

.stage-center-text h2 {
  font-size: 32px;
  line-height: 1.25;
  font-weight: 600;
  color: #FFFFFF;
  letter-spacing: -0.02em;
  margin: 0;
}

/* Общий контейнер блока */
.spaces-section {
    display: none; /* Убираем из потока страницы */
      opacity: 0;
      transition: opacity 0.8s ease;
  flex-direction: column;
  align-items: center;
  padding: 100px 0;
  background-color: #373737; /* Темный фон из макета */
  color: #ffffff;
  overflow: hidden;
  width: 100%;
}

/* Класс для плавного появления */
.spaces-section.is-visible {
  display: flex; /* Возвращаем в поток */
  opacity: 1;
}

/* Тексты */
.spaces-header {
  text-align: center;
  margin-bottom: 40px;
}

/* Таб-бар */
.spaces-tabs-container {
  display: inline-flex;
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  padding: 4px;
  margin-bottom: 60px;
}

.spaces-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tab {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #a1a1a6;
  border-radius: 20px;
}

.tab.active {
  background-color: #555555;
  color: #ffffff;
}

.tab.dashed {
  border: 1px dashed rgba(255, 255, 255, 0.4);
}

/* ==========================================
   ОСНОВНАЯ СЕТКА ГАЛЕРЕИ (ВАШ КОД + ФИКСЫ)
   ========================================== */
.spaces-gallery {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  width: 100%;
  position: relative;
}

.gallery-item {
  background-color: #464646;
  border-radius: 24px;
  position: relative; /* Критично важно для позиционирования контента внутри */
  transition: all 0.4s ease;
  overflow: hidden; /* Чтобы контент не вылезал за скругленные края карточки */
  box-sizing: border-box;
}

.center-item {
  width: 1180px;
  height: 500px;
  z-index: 10;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  opacity: 1;
}

.side-item {
  width: 600px;
  height: 400px;
  z-index: 5;
  transform: scale(0.9);
  opacity: 0.6;
}

/* Маски для боковых блоков */
.side-item:first-child {
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 80%);
  mask-image: linear-gradient(to right, transparent 0%, black 80%);
}
.side-item:last-child {
  -webkit-mask-image: linear-gradient(to left, transparent 0%, black 80%);
  mask-image: linear-gradient(to left, transparent 0%, black 80%);
}


/* ==========================================
   ВНУТРЕННИЕ НАДПИСИ (ВВЕРХУ ПО ЦЕНТРУ КАРТОЧЕК)
   ========================================== */
.gallery-item::before {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #aaa;
  font-size: 16px;
  font-weight: 800;
  z-index: 5; /* Надписи всегда поверх контента карточки */
  white-space: nowrap;
  pointer-events: none;
}
.left-item::before { content: "Desktop"; }
.center-item::before { content: "Project"; font-size: 18px; } /* Поменял на Project как на скрине */
.right-item::before { content: "Temporary"; }


/* ==========================================
   КОНТЕНТ ДЛЯ DESKTOP (ЛЕВАЯ КАРТОЧКА)
   ========================================== */
.desktop-area {
  position: absolute;
  top: 60px; /* Отступ сверху, чтобы не перекрыть заголовок Desktop */
  left: 20px;
  right: 20px;
  bottom: 20px;
}

.desktop-icon {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: rgba(255, 255, 255, 0.75);
  width: 80px;
  cursor: pointer;
  transition: transform 0.2s ease, color 0.2s ease;
}

.desktop-icon svg {
  margin-bottom: 6px;
  stroke: #ffffff;
  opacity: 0.8;
}

.desktop-icon span {
  font-size: 11px;
  word-break: break-word;
  line-height: 1.2;
}

.desktop-icon:hover {
  color: #ffffff;
  transform: scale(1.05);
}

/* Хаотичные координаты для иконок на Десктопе */
.icon-folder-1 {
  top: 20px;
  left: 30px;
}
.icon-folder-2 {
  top: 130px;
  left: 60px;
}
.icon-file {
  bottom: 30px;
  right: 40px;
}


/* ==========================================
   КОНТЕНТ ДЛЯ TEMPORARY (ПРАВАЯ КАРТОЧКА)
   ========================================== */
.right-item {
  display: flex;
  justify-content: center;
  align-items: center;
}

.temporary-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 85%;
  padding-top: 50px; /* Сдвигаем контент ниже центральной надписи Temporary */
  box-sizing: border-box;
}

.temp-clock-icon {
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 12px;
}

.temporary-content h3 {
  color: rgba(255, 255, 255, 0.85);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
  margin: 0 0 16px 0;
  word-wrap: break-word;
}

.timer-pill {
  background-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  padding: 4px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ==========================================
   КОМПАКТНЫЕ СТАТИЧНЫЕ КАРТОЧКИ ПРОЕКТА
   ========================================== */

/* Базовый класс для всех новых заметок */
.project-note {
  position: absolute;
  width: 220px; /* Уменьшенная ширина для компактности */
  background: rgba(50, 50, 50); /* Тёмный благородный фон */
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
  pointer-events: none; /* Не перехватывают клики */
}

/* Заголовок внутри карточки */
.note-heading {
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

/* Текст внутри карточки */
.note-text {
  color: #a1a1a6;
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.35;
  text-align: left;
}

/* ТОЧНОЕ РАССТАВЛЕНИЕ КАРТОЧЕК ВНУТРИ ЦЕНТРАЛЬНОГО ОКНА */

/* Левая верхняя карточка */
.note-concept {
  top: 75px;
  left: 8%;
}

/* Левая нижняя карточка */
.note-references {
  bottom: 65px;
  left: 14%;
}

/* Правая верхняя карточка */
.note-tasks {
  top: 85px;
  right: 10%;
}

/* Правая нижняя карточка */
.note-important {
  bottom: 75px;
  right: 15%;
}

/* Переопределяем размеры и отступы blue-dot только для этой компактной карточки */
.note-important .blue-dot {
  width: 8px !important;       /* Уменьшаем ширину */
  height: 8px !important;      /* Уменьшаем высоту */
  min-width: 8px !important;   /* Защита от сжатия во flexbox */
  border-radius: 50% !important; /* Сохраняем идеальный круг */
  background-color: #FF383C !important;
}

.bento-section {
  background-color: #373737;
  padding: 40px 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
  color: #ffffff;
}

.bento-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* Общий квадрат сетки */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  width: 100%;
  max-width: 860px;
}

/* Базовая карточка */
.bento-card {
  background-color: #414141;
  border-radius: 24px;
  padding: 24px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  box-sizing: border-box;
  overflow: hidden;
}

/* Единый стиль заголовков */
.card-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 6px 0;
  color: #ffffff;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

/* Единый стиль описания */
.card-content p {
  font-size: 0.85rem;
  color: #9e9e9e;
  line-height: 1.35;
  margin: 0;
}

/* 1. Instant Search */
.card-spotlight {
  grid-column: span 2;
  justify-content: space-between;
  align-items: flex-start;
  text-align: left;
  gap: 26px;
}

.spotlight-visual {
  width: 100%;
  display: flex;
  justify-content: center;
}

.spotlight-bar {
  background: #2b2b2b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 80%;
  height: 64px;
  color: #a1a1a6;
  font-size: 1.15rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
}

.spotlight-bar svg {
  width: 22px;
  height: 22px;
}

/* 2. Крупные иконки (96px) */
.icon-wrapper {
  margin-top: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-wrapper img {
  width: 86px;
  height: 86px;
}

/* ------------------------------------------------------------- */
/* ОБНОВЛЕННЫЙ БЛОК: System Shortcuts (Высокая карточка справа)  */
/* ------------------------------------------------------------- */
/* Вертикальная карточка System Shortcuts */
.card-shortcuts {
  grid-column: 3;
  grid-row: span 2;
  position: relative;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  padding: 0 20px 28px 20px;
  overflow: hidden;
}

/* Общий контейнер для визуального блока */
.shortcuts-visual {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-top: 80px;
}

/* Одиночный ряд цифровых клавиш (1-4) */
.num-keys-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  width: 125%; /* Вылезает за края карточки, срезаясь по overflow */
}

/* Цифровая клавиша */
.num-key {
  width: 80px;
  height: 80px;
  background: #2b2b2b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.6rem;
  font-weight: 500;
  flex-shrink: 0;
}

/* Обертка и сама клавиша Option */
.option-key-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
}

.key-option {
  width: 80px;
  height: 80px;
  background: #2b2b2b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 2.2rem;
}

/* Текстовая область снизу */
.card-shortcuts .card-content {
  margin-top: 40px;
}

/* ------------------------------------------------------------- */
/* ОБНОВЛЕННЫЙ БЛОК: Smart Resource (Широкая карточка снизу)    */
/* ------------------------------------------------------------- */
.card-smart {
  grid-column: span 2;
  grid-row: auto;
  position: relative;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  text-align: left;
  padding: 24px 24px;
  min-height: 180px;
  overflow: hidden; /* Обрезает боковые блоки ровно по радиусу карточки */
}

.smart-visual {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%); /* Центрируем широкую ленту */
  width: 140%;                 /* Шире родителя, чтобы боковые блоки вылезали за края */
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  gap: 16px;
  pointer-events: none;
}

.dashed-box {
  width: 160px;               /* Сделать их шире, чтобы они гарантированно уходили в края */
  height: 120px;
  border: 6px dashed #3B3B3B;
  border-radius: 16px;
  flex-shrink: 0;
}

/* Центральный активный экран */
.solid-box {
  width: 240px;
  height: 140px;
  background-color: #4a4a4a;
  border-radius: 16px;
  flex-shrink: 0;
}

/* Общие настройки секции */
.roadmap-section {
  background-color: #373737;
  padding: 80px 0; /* Убрали боковые отступы, чтобы лента уходила за края экрана */
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
  color: #ffffff;
  overflow: hidden;
}

/* Заголовки (используем твои классы) */
.roadmap-header {
  text-align: center;
  margin-bottom: 56px;
  padding: 0 24px;
}

/* Контейнер для бегущей строки */
.marquee-container {
  width: 100vw;
  overflow: hidden;
  display: flex;
  padding: 20px 0; /* Добавлен padding 20px сверху и снизу */
    margin-top: -20px; /* Компенсируем верхний padding, чтобы не сдвигать секцию */
  /* Плавное растворение карточек по краям экрана */
  -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 20px;
}

.marquee-content {
  display: flex;
  gap: 20px;
  padding-right: 20px; /* Зазор между оригиналом и дубликатом */
}

/* Дизайн самих карточек */
.roadmap-card {
  background-color: #414141;
  border-radius: 24px;
  padding: 32px 32px;
  width: 280px;
  height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: flex; /* Прижимаем контент к нижнему краю */
  flex-shrink: 0;
  box-sizing: border-box;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  will-change: transform;
}

.roadmap-card:hover {
  transform: translateY(-6px); /* Легкий прыжок карточки при наведении */
}

.roadmap-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 24px 0 8px 0;
  color: #ffffff;
  line-height: 1.2;
}

.roadmap-card p {
  font-size: 0.9rem;
  color: #9e9e9e;
  line-height: 1.4;
  margin: 0;
}

/* Иконки с цветными подложками */
.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.card-icon svg {
  display: block;
}

.card-icon img {
  width: 24px;
  height: 24px;
  display: block;
  object-fit: contain;
}

.icon-ai { background: rgba(203, 48, 224, 0.15); color: #CB30E0; border: 1px solid rgba(203, 48, 224, 0.3); }
.icon-apple { background: rgba(255, 255, 255, 0.2); border: 1px solid rgba(255, 255, 255, 0.3); }
.icon-shortcuts { background: rgba(255, 204, 0, 0.15); color: #FFCC00; border: 1px solid rgba(255, 204, 0, 0.3); }
.icon-plugins { background: rgba(48, 209, 88, 0.15); border: 1px solid rgba(48, 209, 88, 0.3); }
.icon-cloud { background: rgba(97, 85, 245, 0.15); color: #6155F5; border: 1px solid rgba(97, 85, 245, 0.3); }
.icon-swift { background: rgba(255, 141, 40, 0.15); border: 1px solid rgba(255, 141, 40, 0.3); }
.icon-multiplayer { background: rgba(255, 56, 60, 0.15); color: #FF383C; border: 1px solid rgba(255, 56, 60, 0.3); }
.icon-themes { background: rgba(0, 136, 255, 0.15); color: #0088FF; border: 1px solid rgba(0, 136, 255, 0.3); }

/* --- FAQ Section: Нативный macOS Dark Aesthetic --- */
.faq-section {
  background-color: #373737; /* Принудительно задаем глубокий темный фон */
  padding: 100px 20px;
  width: 100%;
  box-sizing: border-box;
}

.faq-container {
  max-width: 760px;
  margin: 0 auto;
}

.faq-header {
  text-align: center;
  margin-bottom: 48px;
}

/* Единый «стеклянный» контейнер плашки */
.faq-accordion {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 8px 24px;
}

.faq-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  font-size: 1.05rem;
  font-weight: 500;
  color: #f5f5f7 !important; /* Четкий белый текст вопросов */
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  user-select: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question:hover {
  color: #2997ff !important; /* Синий акцент Apple при наведении */
}

.faq-icon {
  stroke: #86868b;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.2s ease;
  flex-shrink: 0;
}

.faq-item[open] .faq-question {
  color: #2997ff !important;
}

.faq-item[open] .faq-icon {
  transform: rotate(180deg);
  stroke: #2997ff;
}

.faq-answer {
  margin-top: 12px;
  color: #a1a1a6 !important;
  font-size: 0.95rem;
  line-height: 1.6;
  padding-right: 20px;
}

.faq-answer strong {
  color: #ffffff;
}

/* Кнопка поддержки */
.donate-note {
  margin-top: 14px !important;
  font-size: 0.88rem;
  color: #86868b !important;
}

.donate-links {
  margin-top: 10px;
}

.donate-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 980px;
  color: #f5f5f7 !important;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.donate-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Кнопка с адресом крипты */
.donate-btn.crypto-btn {
  font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.82rem;
  cursor: pointer;
  outline: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #f5f5f7;
  padding: 8px 16px;
  border-radius: 980px;
  transition: all 0.2s ease;
}

.donate-btn.crypto-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

/* Состояние после скопирования */
.donate-btn.crypto-btn.copied {
  background: rgba(52, 199, 89, 0.2) !important; /* Зеленый акцент Apple */
  border-color: rgba(52, 199, 89, 0.5) !important;
  color: #34c759 !important;
}

/* --- Final CTA Section: Ambient Dots --- */
.cta-section {
  position: relative;
  background-color: #373737;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 20px 160px;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  overflow: hidden;
}

.cta-bg-elements {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.cta-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse at center, rgba(1, 131, 255, 0.12) 0%, rgba(142, 45, 226, 0.06) 50%, transparent 70%);
  filter: blur(80px);
}

/* Базовый стиль точки */
.ambient-dot {
  position: absolute;
  border-radius: 50%;
  animation: floatDots 12s ease-in-out infinite alternate;
}

/* Цветовые вариации и свечения */
.dot-blue {
  background-color: #0088FF;
  box-shadow: 0 0 12px rgba(41, 151, 255, 0.8), 0 0 24px rgba(41, 151, 255, 0.4);
}

.dot-orange {
  background-color: #FF8D28;
  box-shadow: 0 0 12px rgba(255, 149, 0, 0.8), 0 0 24px rgba(255, 149, 0, 0.4);
}

.dot-purple {
  background-color: #CB30E0;
  box-shadow: 0 0 12px rgba(175, 82, 222, 0.8), 0 0 24px rgba(175, 82, 222, 0.4);
}

.dot-white {
  background-color: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.9), 0 0 20px rgba(255, 255, 255, 0.5);
}

/* Позиционирование, размеры и задержки анимаций */
.d1  { width: 8px;  height: 8px;  top: 15%; left: 15%; animation-duration: 14s; animation-delay: 0s; }
.d2  { width: 12px; height: 12px; top: 25%; right: 18%; animation-duration: 18s; animation-delay: -3s; }
.d3  { width: 6px;  height: 6px;  top: 40%; left: 8%;  animation-duration: 10s; animation-delay: -5s; }
.d4  { width: 10px; height: 10px; top: 70%; left: 20%; animation-duration: 16s; animation-delay: -2s; }
.d5  { width: 7px;  height: 7px;  top: 75%; right: 12%; animation-duration: 13s; animation-delay: -7s; }
.d6  { width: 14px; height: 14px; top: 20%; left: 45%; animation-duration: 20s; animation-delay: -1s; opacity: 0.7; }
.d7  { width: 5px;  height: 5px;  bottom: 15%; left: 40%; animation-duration: 11s; animation-delay: -4s; }
.d8  { width: 9px;  height: 9px;  top: 60%; right: 28%; animation-duration: 15s; animation-delay: -8s; }
.d9  { width: 6px;  height: 6px;  top: 30%; left: 28%; animation-duration: 12s; animation-delay: -6s; }
.d10 { width: 11px; height: 11px; bottom: 25%; right: 38%; animation-duration: 17s; animation-delay: -9s; }

/* Плавный хаотичный полет */
@keyframes floatDots {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.4;
  }
  50% {
    transform: translate(25px, -35px) scale(1.2);
    opacity: 0.9;
  }
  100% {
    transform: translate(-20px, 25px) scale(0.8);
    opacity: 0.5;
  }
}

/* Контент поверх фона */
.cta-container {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cta-section .eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: #86868b;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: block;
}

.cta-title {
  font-size: 3.5rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #f5f5f7;
  margin: 0 0 20px 0;
}

.cta-subtitle {
  font-size: 1.15rem;
  line-height: 1.5;
  color: #86868b;
  max-width: 540px;
  margin: 0 0 44px 0;
}

.cta-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background-color: #ffffff;
  color: #000000;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 16px 36px;
  border-radius: 980px;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 30px rgba(255, 255, 255, 0.15);
}

.download-btn:hover {
  transform: translateY(-2px) scale(1.03);
  background-color: #f5f5f7;
  box-shadow: 0 10px 40px rgba(255, 255, 255, 0.3);
}

.download-btn svg {
  stroke: #000000;
  transition: transform 0.2s ease;
}

.download-btn:hover svg {
  transform: translateY(2px);
}

.system-reqs {
  font-size: 0.82rem;
  color: #6e6e73;
}

/* --- Site Footer --- */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 48px 20px 32px;
  width: 100%;
  box-sizing: border-box;
  background: #303030;
}

.footer-container {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

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

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-logo {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #f5f5f7;
}

.footer-tagline {
  font-size: 0.85rem;
  color: #86868b;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #86868b;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: #2997ff;
}

.footer-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
  /* Если иконки черные — делаем их светлыми в тон тексту */
  filter: brightness(0) invert(0.7);
  transition: filter 0.2s ease;
}

.footer-link:hover .footer-icon {
  /* При наведении подсвечиваем иконку ярко-белым */
  filter: brightness(0) invert(1);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.8rem;
  color: #6e6e73;
}

.copyright {
  margin: 0;
}

.back-to-top {
  color: #86868b;
  text-decoration: none;
  transition: color 0.2s ease;
}

.back-to-top:hover {
  color: #f5f5f7;
}

/* Выравнивание кнопки и ссылки по горизонтали */
.hero-actions {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

/* Колонка для кнопки и подписи под ней */
.download-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* Ссылка "How does it work?" выравнивается по высоте кнопки */
.hero-actions .text-link {
  margin-top: 12px;
}

/* Плашка beta + иконка */
.beta-notice {
  display: flex;
  align-items: center;
  gap: 5px;
}

.beta-tag {
  font-size: 12px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.45);
  letter-spacing: 0.02em;
}

/* Иконка восклицательного знака */
.tooltip-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: help;
}

.info-icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.3);
  color: rgba(0, 0, 0, 0.5);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.2s ease;
}

.tooltip-wrapper:hover .info-icon {
  border-color: rgba(0, 0, 0, 0.7);
  color: rgba(0, 0, 0, 0.9);
  background-color: rgba(0, 0, 0, 0.05);
}

/* Всплывающий тултип — теперь всплывает НАВЕРХ */
.tooltip-popup {
  position: absolute;
  /* Переносим позиционирование наверх: */
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  
  width: 260px;
  padding: 12px 14px;
  background: #303030;
  color: #f5f5f7;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.45;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  
  /* Скрытие по умолчанию */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  
  /* Поднимаем слой выше всех соседних секций сайта */
  z-index: 9999;
  text-align: left;
}

.tooltip-popup p {
  margin: 0 0 6px 0;
  opacity: 0.85;
}

.tooltip-popup p:last-child {
  margin-bottom: 0;
}

.tooltip-popup .warning-title {
  color: #ff9f0a;
  font-weight: 600;
  margin: 8px 0 6px 0;
  opacity: 1;
}

/* Показ тултипа при наведении */
.tooltip-wrapper:hover .tooltip-popup {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
