/* Fuse v1 — сторис-лендинг: layout only (тема из landing-theme + локальные vars) */

.fuse-page {
  --accent: #4da3ff;
  --accent-rgb: 77, 163, 255;
  --primary-gradient: linear-gradient(135deg, #4da3ff 0%, #7f5cff 50%, #00e0ff 100%);
  --accent-glow: rgba(77, 163, 255, 0.5);
  --card-bg: rgba(255, 255, 255, 0.05);
  --card-border: rgba(255, 255, 255, 0.1);
  --text-primary: #e6e9ff;
  --text-muted: #94a3b8;
  --modal-content-bg: rgba(12, 18, 45, 0.95);
  --fuse-orange: #e89b2c;
  --fuse-orange-rgb: 232, 155, 44;
  --fuse-orange-gradient: linear-gradient(135deg, #e89b2c 0%, #d4770a 50%, #f0b429 100%);

  margin: 0;
  min-height: 100dvh;
  overflow: hidden;
  background: #0a0e1a;
  color: var(--text-primary);
  font-family: "Exo 2", system-ui, sans-serif;
  touch-action: none;
  overscroll-behavior: none;
}

.fuse-page .btn-primary {
  background: var(--primary-gradient);
  border: none;
  box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.6);
  font-family: "Tektur", sans-serif;
  font-weight: 600;
  padding: 0.75rem 1.25rem;
  transition: box-shadow 0.3s ease, transform 0.2s ease;
  color: #fff;
}

.fuse-page .btn-primary:hover {
  box-shadow: 0 0 40px rgba(var(--accent-rgb), 0.9);
  color: #fff;
}

.fuse-page .btn-outline-primary {
  border: 2px solid var(--accent);
  color: var(--accent);
  background: transparent;
  font-family: "Tektur", sans-serif;
  font-weight: 600;
}

.fuse-page .btn-outline-primary:hover {
  background: rgba(var(--accent-rgb), 0.15);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 20px var(--accent-glow);
}

.fuse-btn-next {
  background: var(--fuse-orange-gradient) !important;
  border: none !important;
  box-shadow: 0 0 20px rgba(var(--fuse-orange-rgb), 0.55) !important;
  font-family: "Tektur", sans-serif;
  font-weight: 600;
  padding: 0.75rem 1.25rem;
  color: #fff !important;
  transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.fuse-btn-next:hover {
  box-shadow: 0 0 36px rgba(var(--fuse-orange-rgb), 0.85) !important;
  color: #fff !important;
}

.fuse-stage {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  height: 100svh;
  max-height: 100dvh;
  overflow: hidden;
  padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0)
    env(safe-area-inset-left, 0);
}

.fuse-card-zone {
  flex: 0 0 80%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 0.75rem 1rem 0.25rem;
  position: relative;
}

.fuse-loading.is-hidden,
.fuse-error.is-hidden,
.fuse-loading.d-none,
.fuse-error.d-none {
  display: none !important;
}

.fuse-slides {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.fuse-slides.is-hidden {
  display: none !important;
}

.fuse-preview-layer {
  display: none;
  position: absolute;
  inset: 0.75rem 1rem 0.25rem;
  z-index: 3;
  flex-direction: column;
  min-height: 0;
}

.fuse-preview-layer.is-open {
  display: flex;
}

.fuse-preview-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  flex: 1 1 auto;
  min-height: 0;
  background: #f8f9fa;
  border-radius: 1.25rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 28px rgba(var(--accent-rgb), 0.2);
}

.fuse-card-zone.is-preview {
  padding-bottom: 0.25rem;
}

.fuse-dots.is-hidden {
  visibility: hidden;
  pointer-events: none;
}

.fuse-entry-modal .modal-header {
  padding-bottom: 0;
}

.fuse-page .modal-backdrop.show {
  opacity: 0.92;
  background-color: #05070f;
}

.fuse-card {
  position: relative;
  aspect-ratio: 3 / 4;
  max-width: 100%;
  max-height: 100%;
  width: min(100%, calc(80dvh * 0.75));
  height: auto;
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid var(--card-border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 28px rgba(var(--accent-rgb), 0.2);
  background: var(--card-bg);
}

.fuse-card__media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: top;
  background-repeat: no-repeat;
}

.fuse-card__corner-btn {
  position: absolute;
  bottom: 1.15rem;
  z-index: 3;
  width: 2.75rem;
  height: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(8, 12, 28, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #e6e9ff;
  font-family: "Tektur", sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.fuse-card__about-btn {
  right: 1.15rem;
}

.fuse-card__share-btn {
  left: 1.15rem;
  font-size: 1.25rem;
}

.fuse-card__share-btn .bi {
  display: block;
  transform: scaleX(-1);
  line-height: 1;
}

.fuse-card__corner-btn:hover,
.fuse-card__corner-btn:focus-visible {
  color: #fff;
  border-color: rgba(var(--accent-rgb), 0.65);
  background: rgba(12, 18, 45, 0.88);
  outline: none;
}

.fuse-share-toast {
  position: fixed;
  left: 50%;
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0));
  z-index: 1090;
  transform: translateX(-50%) translateY(0.5rem);
  padding: 0.55rem 1rem;
  border-radius: 0.65rem;
  border: 1px solid var(--card-border);
  background: rgba(12, 18, 45, 0.94);
  color: var(--text-primary);
  font-size: 0.9rem;
  line-height: 1.3;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.fuse-share-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.fuse-about-modal .fuse-about-h1 {
  font-family: "Tektur", sans-serif;
  font-weight: 700;
  font-size: clamp(1.15rem, 4vw, 1.45rem);
  line-height: 1.3;
  margin: 0 0 0.75rem;
  color: var(--text-primary);
}

.fuse-about-modal .fuse-about-intro {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.fuse-about-modal .fuse-about-sections {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.fuse-about-modal .fuse-about-section h2 {
  font-family: "Tektur", sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.3;
  margin: 0 0 0.4rem;
  color: var(--text-primary);
}

.fuse-about-modal .fuse-about-section p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.fuse-card__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.fuse-card__media--placeholder {
  background-image: linear-gradient(160deg, rgba(var(--accent-rgb), 0.35) 0%, rgba(12, 18, 45, 0.95) 55%, #0a0e1a 100%),
    linear-gradient(rgba(var(--accent-rgb), 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.08) 1px, transparent 1px);
  background-size: cover, 24px 24px, 24px 24px;
}

.fuse-card[data-accent="orange"] .fuse-card__media--placeholder {
  --accent-rgb: 232, 155, 44;
}

.fuse-card[data-accent="purple"] .fuse-card__media--placeholder {
  --accent-rgb: 127, 92, 255;
}

.fuse-card[data-accent="cyan"] .fuse-card__media--placeholder {
  --accent-rgb: 0, 224, 255;
}

.fuse-card__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.35) 42%, transparent 70%);
  pointer-events: none;
}

.fuse-card__copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.25rem 1.15rem 1.35rem;
  z-index: 1;
}

.fuse-card__title {
  font-family: "Tektur", sans-serif;
  font-weight: 700;
  font-size: clamp(1.15rem, 4.2vw, 1.65rem);
  line-height: 1.25;
  margin: 0 0 0.4rem;
  color: #fff;
}

.fuse-card__subtitle {
  margin: 0;
  font-size: clamp(0.85rem, 3vw, 1rem);
  line-height: 1.4;
  color: rgba(230, 233, 255, 0.85);
}

.fuse-bar {
  flex: 0 0 20%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.65rem;
  min-height: 0;
  padding: 0.5rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0));
  background: rgba(8, 12, 28, 0.92);
  border-top: 1px solid var(--card-border);
}

.fuse-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  min-height: 0.75rem;
}

.fuse-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.28);
  transition: transform 0.2s ease, background 0.2s ease, width 0.2s ease;
  cursor: pointer;
}

.fuse-dot[aria-current="true"] {
  background: var(--accent);
  width: 1.1rem;
  border-radius: 999px;
  box-shadow: 0 0 10px var(--accent-glow);
}

.fuse-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
}

.fuse-actions .btn {
  width: 100%;
  min-height: 2.75rem;
  font-size: clamp(0.95rem, 3.5vw, 1.05rem);
}

.fuse-page .modal-content {
  background: var(--modal-content-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
}

.fuse-page .modal-header {
  border-bottom-color: var(--card-border);
}

.fuse-page .modal-title {
  font-family: "Tektur", sans-serif;
}

.fuse-page .modal-body {
  max-height: min(78dvh, 640px);
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.fuse-page .form-control,
.fuse-page .form-select {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--card-border);
  color: var(--text-primary);
}

.fuse-page .form-control:focus,
.fuse-page .form-select:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent);
  color: var(--text-primary);
  box-shadow: 0 0 0 0.2rem rgba(var(--accent-rgb), 0.25);
}

.fuse-page .form-control::placeholder {
  color: var(--text-muted);
}

.fuse-page .btn-close {
  filter: invert(1) grayscale(1);
}

#lead-submit-btn.opacity-50 {
  pointer-events: auto;
}

.fuse-cookie {
  position: fixed;
  inset: 0;
  z-index: 1055;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(8, 12, 28, 0.72);
  touch-action: manipulation;
  transition: opacity 0.35s ease;
}

.fuse-cookie__panel {
  width: min(100%, 22rem);
  padding: 1.25rem 1.15rem;
  border-radius: 1rem;
  background: rgba(12, 18, 45, 0.96);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.fuse-cookie.hidden {
  opacity: 0;
  pointer-events: none;
}

.fuse-cookie p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.fuse-cookie #cookie-consent-accept {
  min-width: 8.5rem;
}

.fuse-loading,
.fuse-error {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  z-index: 2;
}

.fuse-error {
  color: #ff8a8a;
}

@media (min-width: 768px) {
  .fuse-card-zone {
    padding: 1rem 1.5rem 0.5rem;
  }

  .fuse-card__copy {
    padding: 1.75rem 1.5rem 1.75rem;
  }
}
