/**
 * AS-PRO Luxury Glass — лендинг, CTA, вход/регистрация
 * Подключать после aspro-silver.css
 */

:root {
  --lux-gold: #c9ab7a;
  --lux-gold-light: #edd9a8;
  --lux-gold-deep: #9a7d4a;
  --lux-champagne: rgba(201, 169, 98, 0.35);
  --lux-blur: 22px;
  --lux-ease-spring: cubic-bezier(0.34, 1.45, 0.64, 1);
  --lux-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Фоновые сферы (лендинг + auth) --- */
.lux-orb-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.lux-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.55;
  will-change: transform;
}

.lux-orb--silver {
  background: radial-gradient(circle at 30% 30%, rgba(220, 228, 235, 0.5), rgba(120, 130, 140, 0.08) 55%, transparent 70%);
  animation: lux-orb-drift 26s ease-in-out infinite;
}

.lux-orb--gold {
  background: radial-gradient(circle at 40% 35%, rgba(232, 213, 168, 0.55), var(--lux-champagne) 45%, transparent 68%);
  animation: lux-orb-drift 32s ease-in-out infinite reverse;
}

.lux-orb--1 { width: min(520px, 55vw); height: min(520px, 55vw); top: -8%; left: -6%; }
.lux-orb--2 { width: min(420px, 48vw); height: min(420px, 48vw); bottom: 5%; right: -4%; animation-delay: -8s; }
.lux-orb--3 { width: min(280px, 36vw); height: min(280px, 36vw); top: 42%; left: 38%; opacity: 0.35; animation-duration: 38s; }
.lux-orb--4 { width: min(200px, 28vw); height: min(200px, 28vw); top: 18%; right: 22%; opacity: 0.4; }

@keyframes lux-orb-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(3%, -2%) scale(1.04); }
  66% { transform: translate(-2%, 3%) scale(0.98); }
}

/* --- Кнопки: технологичный клик --- */
.btn-lux,
a.btn-lux {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  overflow: hidden;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
  transition:
    transform 0.18s var(--lux-ease-out),
    box-shadow 0.22s var(--lux-ease-out),
    border-color 0.2s ease,
    color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.btn-lux > .btn-lux__shine {
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent,
    rgba(255, 255, 255, 0.25) 45%,
    rgba(255, 255, 255, 0.5) 50%,
    rgba(255, 255, 255, 0.2) 55%,
    transparent
  );
  pointer-events: none;
  z-index: 1;
}

.btn-lux:hover > .btn-lux__shine {
  animation: lux-btn-shine 0.65s var(--lux-ease-out);
}

.btn-lux:active {
  transform: scale(0.97);
  transition-duration: 0.08s;
}

.btn-lux:active > .btn-lux__shine {
  animation: lux-btn-shine 0.35s ease;
}

.btn-lux:focus-visible {
  outline: 2px solid var(--lux-gold-light);
  outline-offset: 3px;
}

@keyframes lux-btn-shine {
  from { left: -100%; }
  to { left: 140%; }
}

/* Primary — серебро-металл */
.btn-lux-primary {
  color: var(--charcoal, #0d1114);
  background: linear-gradient(180deg, #f2f4f7 0%, #d0d8e0 48%, #a8b4c0 100%);
  border-radius: 999px;
  box-shadow:
    0 4px 24px rgba(255, 255, 255, 0.14),
    0 2px 8px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.btn-lux-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 32px rgba(255, 255, 255, 0.2),
    0 4px 16px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.btn-lux-primary:active {
  transform: scale(0.97) translateY(0);
  box-shadow:
    0 2px 12px rgba(255, 255, 255, 0.1),
    inset 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Gold CTA (auth) */
.btn-lux-gold {
  color: #1a1510;
  background: linear-gradient(180deg, var(--lux-gold-light) 0%, var(--lux-gold) 55%, var(--lux-gold-deep) 100%);
  border-radius: 14px;
  box-shadow:
    0 4px 28px rgba(201, 169, 98, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.btn-lux-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 36px rgba(201, 169, 98, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.btn-lux-gold:active {
  transform: scale(0.97);
}

/* Стеклянная вторичная */
.btn-lux-glass {
  color: var(--text-primary, #eef1f4);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.22));
  border-radius: 999px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.btn-lux-glass:hover {
  transform: translateY(-2px);
  border-color: var(--glass-highlight, rgba(255, 255, 255, 0.42));
  background: rgba(255, 255, 255, 0.11);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-lux-glass:active {
  transform: scale(0.98);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
}

.btn-lux-ghost {
  color: var(--text-muted, #a8b0b8);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}

.btn-lux-ghost:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.05);
}

/* Совместимость: старый glow-button на лендинге */
.silver-landing a.glow-button,
.silver-landing .glow-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  color: var(--charcoal);
  background: linear-gradient(180deg, #f2f4f7, #c8d0d8);
  border-radius: 999px;
  box-shadow: 0 4px 24px rgba(255, 255, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: transform 0.18s var(--lux-ease-out), box-shadow 0.22s ease;
}
.silver-landing a.glow-button:hover {
  transform: translateY(-2px);
}
.silver-landing a.glow-button:active {
  transform: scale(0.97);
}

/* --- Лендинг: стекло v2 --- */
.silver-landing .lux-nav-glass {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(var(--lux-blur)) saturate(1.35);
  -webkit-backdrop-filter: blur(var(--lux-blur)) saturate(1.35);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.silver-landing .lux-slang-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1.25rem;
}

@media (min-width: 1024px) {
  .silver-landing .lux-slang-row {
    justify-content: flex-start;
  }
}

.lux-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(232, 236, 239, 0.9);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.2s, background 0.2s, transform 0.2s var(--lux-ease-spring);
}

.lux-chip:hover {
  border-color: rgba(201, 169, 98, 0.35);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.lux-chip i {
  opacity: 0.75;
  font-size: 0.65rem;
}

.silver-landing .glass-card.lux-panel {
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 12px 48px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  position: relative;
  overflow: hidden;
}

.lux-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  opacity: 0.9;
}

.lux-hero-glass-frame {
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow:
    0 16px 56px rgba(0, 0, 0, 0.45),
    0 0 48px rgba(201, 169, 98, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lux-hero-glass-frame:hover {
  border-color: rgba(255, 255, 255, 0.32) !important;
  box-shadow:
    0 20px 64px rgba(0, 0, 0, 0.5),
    0 0 56px rgba(201, 169, 98, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
}

/* --- Auth modal: dark luxury --- */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(4, 6, 10, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.auth-modal-overlay.hidden {
  display: none !important;
}

.auth-modal-scene {
  position: relative;
  width: 100%;
  max-width: 440px;
  min-height: 320px;
}

.auth-modal-scene .lux-orb {
  filter: blur(64px);
  opacity: 0.7;
}

.auth-modal-scene .lux-orb--1 {
  top: -20%;
  left: -25%;
  width: 220px;
  height: 220px;
}

.auth-modal-scene .lux-orb--2 {
  bottom: -15%;
  right: -20%;
  width: 180px;
  height: 180px;
}

.auth-modal-scene .lux-orb--3 {
  top: 50%;
  left: 60%;
  width: 120px;
  height: 120px;
  opacity: 0.5;
}

.auth-glass-panel {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 1.75rem 1.65rem 1.5rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(var(--lux-blur)) saturate(1.4);
  -webkit-backdrop-filter: blur(var(--lux-blur)) saturate(1.4);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.auth-glass-panel__shine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    125deg,
    rgba(255, 255, 255, 0.12) 0%,
    transparent 42%,
    transparent 58%,
    rgba(201, 169, 98, 0.06) 100%
  );
  opacity: 0.9;
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 1.25rem;
}

.auth-brand__logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  margin-bottom: 0.65rem;
}

.auth-brand__title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #f4f6f8;
  letter-spacing: 0.02em;
}

.auth-brand__tagline {
  font-size: 0.75rem;
  color: rgba(168, 176, 184, 0.95);
  margin-top: 0.35rem;
  letter-spacing: 0.04em;
}

.auth-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
  padding: 0.25rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-tab {
  flex: 1;
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 11px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}

.auth-tab:hover {
  color: var(--text-primary);
}

.auth-tab.is-active {
  color: #1a1510;
  background: linear-gradient(180deg, var(--lux-gold-light), var(--lux-gold));
  box-shadow: 0 2px 12px rgba(201, 169, 98, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.auth-glass-input {
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-glass-input:focus {
  border-color: rgba(201, 169, 98, 0.55);
  box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.15);
}

.auth-glass-input::placeholder {
  color: rgba(148, 163, 184, 0.75);
}

.auth-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 3;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(168, 176, 184, 0.9);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, transform 0.15s var(--lux-ease-spring);
}

.auth-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.auth-close:active {
  transform: scale(0.92);
}

.auth-link-gold {
  color: var(--lux-gold-light);
}

.auth-link-gold:hover {
  color: #fff;
  text-decoration: underline;
}

.auth-inner-panel {
  margin-top: 0.75rem;
  padding: 0.85rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Workspace: auth uses same overlay when opened from /app */
.silver-workspace .auth-modal-overlay {
  z-index: 60;
}

/* Карточки проектов в /app — тоньше стекло */
.silver-workspace .glass-document-card,
.silver-workspace .project-card.glass-document-card {
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(20px) saturate(1.35);
  -webkit-backdrop-filter: blur(20px) saturate(1.35);
  border: 1px solid rgba(255, 255, 255, 0.17);
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.silver-workspace .glass-document-card:hover,
.silver-workspace .glass-document-card:focus-within {
  border-color: rgba(201, 169, 98, 0.28);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.42),
    0 0 32px rgba(201, 169, 98, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.silver-workspace .workspace-nav .workspace-col {
  transition: transform 0.18s var(--lux-ease-out), border-color 0.2s, box-shadow 0.2s;
}

.silver-workspace .workspace-nav .workspace-col:active {
  transform: scale(0.98);
}

@media (prefers-reduced-motion: reduce) {
  .lux-orb,
  .btn-lux:hover > .btn-lux__shine,
  .btn-lux:active > .btn-lux__shine {
    animation: none !important;
  }
  .btn-lux:hover,
  .btn-lux-primary:hover,
  .btn-lux-glass:hover,
  .btn-lux-gold:hover {
    transform: none;
  }
}
