/**
 * CONFUT Welcome — Premium Landing
 */

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

/* ── Base ── */
.welcome-premium {
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  color: #f5f7fa;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #071a33 0%, #0a2647 56%, #061429 100%);
}

/* ── Animated background orbs ── */
.welcome-premium::before,
.welcome-premium::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  pointer-events: none;
  will-change: transform;
}

.welcome-premium::before {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(214, 170, 64, 0.18) 0%, transparent 70%);
  top: -12%;
  left: -8%;
  animation: orbFloat 14s ease-in-out infinite alternate;
}

.welcome-premium::after {
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, rgba(78, 115, 223, 0.12) 0%, transparent 70%);
  bottom: -10%;
  right: -6%;
  animation: orbFloat 18s ease-in-out infinite alternate-reverse;
}

@keyframes orbFloat {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(30px, -20px) scale(1.08); }
  100% { transform: translate(-15px, 15px) scale(0.95); }
}

/* ── Noise overlay ── */
.noise-svg {
  display: none;
}

/* ── Layout ── */
.welcome-layout {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  padding: 40px 20px;
  gap: 8px;
}

/* ── Entrance animations ── */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeScale {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes glowPulse {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(214, 170, 64, 0.25)) drop-shadow(0 6px 20px rgba(255, 255, 255, 0.08)); }
  50%      { filter: drop-shadow(0 0 18px rgba(214, 170, 64, 0.40)) drop-shadow(0 6px 20px rgba(255, 255, 255, 0.12)); }
}

/* ── Hero ── */
.welcome-hero {
  text-align: center;
  margin-bottom: 10px;
  animation: fadeSlideUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.welcome-logo-stack {
  position: relative;
  display: inline-block;
  width: 210px;
  max-width: 60vw;
  margin: 0 auto 20px;
}

.welcome-logo {
  width: 100%;
  height: auto;
  display: block;
}

.welcome-logo-overlay {
  position: static;
  opacity: 1;
  animation: glowPulse 4s ease-in-out infinite;
  pointer-events: none;
}

.welcome-title {
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
  line-height: 1.15;
  background: linear-gradient(135deg, #ffffff 30%, #d6aa40 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.welcome-subtitle {
  font-size: clamp(15px, 1.6vw, 20px);
  font-weight: 400;
  color: rgba(211, 219, 234, 0.85);
  letter-spacing: 0.2px;
}

/* ── Decorative divider ── */
.welcome-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 6px 0 4px;
  animation: fadeSlideUp 0.7s 0.15s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.welcome-divider span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(214, 170, 64, 0.50);
}

.welcome-divider span:nth-child(2) {
  width: 32px;
  height: 3px;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(214, 170, 64, 0.5), rgba(214, 170, 64, 0.15));
}

/* ── Panel ── */
.welcome-panel {
  width: min(94vw, 720px);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow:
    0 24px 64px rgba(5, 18, 40, 0.40),
    0 0 0 1px rgba(214, 170, 64, 0.12) inset,
    0 1px 0 rgba(255, 255, 255, 0.5) inset;
  padding: 20px 20px 14px;
  animation: fadeScale 0.6s 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
  backdrop-filter: blur(2px);
}

/* ── Cards grid ── */
.welcome-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ── Card base ── */
.welcome-card {
  border-radius: 18px;
  padding: 26px 22px 22px;
  min-height: 180px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.welcome-card .card-arrow {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.welcome-card:hover .card-arrow {
  opacity: 1;
  transform: translateX(0);
}

.welcome-card .card-arrow svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.welcome-card:hover .card-arrow svg {
  transform: translateX(3px);
}

/* ── Light card ── */
.welcome-card.light {
  background: linear-gradient(168deg, #ffffff 0%, #f4f7fc 100%);
  color: #0a2647;
  border: 1px solid rgba(10, 38, 71, 0.07);
  box-shadow:
    0 8px 24px rgba(18, 28, 48, 0.10),
    0 1px 3px rgba(10, 38, 71, 0.06);
}

.welcome-card.light:hover {
  transform: translateY(-5px);
  box-shadow:
    0 18px 40px rgba(18, 28, 48, 0.18),
    0 1px 3px rgba(10, 38, 71, 0.08);
}

.welcome-card.light .card-arrow {
  color: #9a6f00;
}

/* ── Primary card ── */
.welcome-card.primary {
  background: linear-gradient(150deg, #0d2d50 0%, #143d6b 50%, #0a2040 100%);
  color: #f5f7fa;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    0 10px 28px rgba(0, 18, 52, 0.50),
    0 1px 3px rgba(0, 0, 0, 0.15);
}

.welcome-card.primary::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -30%;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(214, 170, 64, 0.10) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.welcome-card.primary:hover {
  transform: translateY(-5px);
  box-shadow:
    0 20px 44px rgba(0, 18, 52, 0.60),
    0 0 0 1px rgba(214, 170, 64, 0.15) inset;
}

.welcome-card.primary .card-arrow {
  color: #d6aa40;
}

/* ── Card icon badge ── */
.card-icon-badge {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: 14px;
}

.welcome-card.light .card-icon-badge {
  background: linear-gradient(135deg, rgba(214, 170, 64, 0.12) 0%, rgba(214, 170, 64, 0.04) 100%);
  border: 1px solid rgba(214, 170, 64, 0.15);
}

.welcome-card.primary .card-icon-badge {
  background: rgba(214, 170, 64, 0.12);
  border: 1px solid rgba(214, 170, 64, 0.18);
}

.card-icon-badge svg {
  width: 22px;
  height: 22px;
}

.welcome-card.light .card-icon-badge svg {
  color: #9a6f00;
}

.welcome-card.primary .card-icon-badge svg {
  color: #d6aa40;
}

/* ── Card content ── */
.card-head {
  margin-bottom: 6px;
}

.card-head h1 {
  font-size: 21px;
  line-height: 1.25;
  font-weight: 700;
}

.welcome-card.light .card-head h1 {
  color: #0a2647;
}

.welcome-card.primary .card-head h1 {
  color: #ffffff;
}

.welcome-card p {
  font-size: 13.5px;
  line-height: 1.5;
  margin-bottom: 10px;
}

.welcome-card.light p {
  color: #5a6f8a;
}

.welcome-card.primary p {
  color: rgba(211, 219, 234, 0.8);
}

/* ── Staggered card entrance ── */
.welcome-card:nth-child(1) {
  animation: fadeSlideUp 0.55s 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.welcome-card:nth-child(2) {
  animation: fadeSlideUp 0.55s 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ── Language selector ── */
.language-selector {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(10, 38, 71, 0.08);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  animation: fadeSlideUp 0.5s 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.language-selector .lang-icon {
  color: #9a6f00;
  margin-right: 4px;
  display: flex;
  align-items: center;
}

.language-selector .lang-icon svg {
  width: 15px;
  height: 15px;
}

.language-selector a {
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 5px 14px;
  border-radius: 20px;
  color: #3a4f6a;
  background: transparent;
  border: 1.5px solid transparent;
  transition: all 0.22s ease;
}

.language-selector a:hover {
  color: #0a2647;
  background: rgba(10, 38, 71, 0.05);
  border-color: rgba(10, 38, 71, 0.10);
}

.language-selector a.active {
  color: #9a6f00;
  background: rgba(214, 170, 64, 0.08);
  border-color: rgba(214, 170, 64, 0.25);
}

.language-selector .lang-sep {
  display: none;
}

/* ── Footer ── */
.welcome-footer {
  margin-top: 20px;
  text-align: center;
  animation: fadeSlideUp 0.5s 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.welcome-footer p {
  font-size: 12px;
  color: rgba(211, 219, 234, 0.35);
  font-weight: 400;
  letter-spacing: 0.3px;
}

/* ── Loader ── */
.loader-container {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.loader-container.bg-glass {
  background: rgba(7, 26, 51, 0.6);
  backdrop-filter: blur(6px);
}

.loader {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: #d6aa40;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Responsive ── */
@media (max-width: 680px) {
  .welcome-layout {
    padding: 28px 16px;
    justify-content: center;
  }

  .welcome-options {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .welcome-panel {
    width: min(96vw, 440px);
    padding: 16px 16px 12px;
  }

  .welcome-card {
    min-height: 140px;
    padding: 20px 18px 18px;
  }

  .welcome-title {
    font-size: 26px;
  }

  .welcome-subtitle {
    font-size: 15px;
  }

  .welcome-logo-stack {
    width: 170px;
  }

  .card-icon-badge {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    margin-bottom: 10px;
  }

  .card-icon-badge svg {
    width: 20px;
    height: 20px;
  }

  .card-head h1 {
    font-size: 19px;
  }

  .welcome-card .card-arrow {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 380px) {
  .welcome-logo-stack {
    width: 140px;
  }

  .welcome-title {
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .welcome-card,
  .welcome-hero,
  .welcome-panel,
  .welcome-card .card-arrow {
    animation: none !important;
    transition: none !important;
  }

  .welcome-logo-overlay {
    animation: none !important;
    filter: drop-shadow(0 0 4px rgba(214, 170, 64, 0.25));
  }

  .welcome-premium::before,
  .welcome-premium::after {
    animation: none !important;
  }
}
