/*
 * Static copy of the Adviisor /start "demo closed" page.
 * Values come from the computed styles of the live page (MUI theme, light mode).
 */

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Pangea Text', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #0a1929;
  background: #fff;
}

/* ---------- Layout ---------- */

.container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 24px 16px;
}

.panel {
  background: #fff;
  border: 1px solid #90caf9;
  border-radius: 4px;
}

.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px;
}

.card {
  width: 100%;
  overflow-x: hidden;
  padding: 16px 16px 24px;
}

@media (min-width: 600px) {
  .container {
    padding-left: 24px;
    padding-right: 24px;
  }
  .card {
    padding: 32px 32px 24px;
  }
}

@media (min-width: 900px) {
  .container {
    padding-top: 48px;
    padding-bottom: 48px;
  }
  .header {
    padding: 32px;
  }
}

/* ---------- Header ---------- */

.logo {
  position: relative;
  height: 40px;
  width: fit-content;
}

.logo img {
  display: block;
  height: 40px;
  width: auto;
}

.sparkle {
  position: absolute;
  left: 12.67%;
  top: 1.24%;
  width: 4.32%;
  height: 18.01%;
  overflow: visible;
}

.sparkle g {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: sparkle-spin 1.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.sparkle path,
.sparkle polygon {
  stroke: #000;
  stroke-miterlimit: 10;
  animation: sparkle-tint 1.6s ease-out forwards;
}

@keyframes sparkle-spin {
  0% { opacity: 0; transform: rotate(-30deg) scale(0.5); filter: drop-shadow(0 0 0 rgba(20, 90, 160, 0)); }
  12% { opacity: 1; }
  55% { transform: rotate(320deg) scale(1.2); filter: drop-shadow(0 0 5px rgba(20, 90, 160, 0.85)); }
  100% { opacity: 1; transform: rotate(360deg) scale(1); filter: drop-shadow(0 0 0 rgba(20, 90, 160, 0)); }
}

@keyframes sparkle-tint {
  0%, 40% { fill: #1565c0; }
  100% { fill: #fff; }
}

.tagline {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #616161;
  text-align: center;
}

/* ---------- Closed panel ---------- */

.closed {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 16px 0;
  text-align: center;
}

.closed-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  color: #1565c0;
}

h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
}

.closed-text {
  max-width: 420px;
  margin: 0;
  color: #616161;
}

.button {
  display: inline-block;
  padding: 8px 22px;
  border-radius: 4px;
  background: #1565c0;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.75;
  text-decoration: none;
  box-shadow:
    0 3px 1px -2px rgba(0, 0, 0, 0.2),
    0 2px 2px 0 rgba(0, 0, 0, 0.14),
    0 1px 5px 0 rgba(0, 0, 0, 0.12);
  transition: background-color 250ms, box-shadow 250ms;
}

.button:hover {
  background: #0d47a1;
  box-shadow:
    0 2px 4px -1px rgba(0, 0, 0, 0.2),
    0 4px 5px 0 rgba(0, 0, 0, 0.14),
    0 1px 10px 0 rgba(0, 0, 0, 0.12);
}

.icon-link {
  display: inline-flex;
  padding: 8px;
  border-radius: 50%;
  color: #1565c0;
  transition: background-color 150ms;
}

.icon-link:hover {
  background: rgba(21, 101, 192, 0.04);
}

.button:focus-visible,
.icon-link:focus-visible {
  outline: 3px solid #1565c0;
  outline-offset: 2px;
}

/* ---------- Entrance animation ---------- */

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-seq-1 {
  animation: fade-in-up 0.6s ease-out both;
}

.fade-seq-2 {
  animation: fade-in-up 0.6s ease-out both;
  animation-delay: 0.35s;
}

/* ---------- Animated background ---------- */

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #f5f5f5 0%, rgba(13, 71, 161, 0.082) 50%, rgba(21, 101, 192, 0.082) 100%);
}

.bg-circle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(21, 101, 192, 0.125) 0%, rgba(25, 118, 210, 0.082) 50%, transparent 70%);
  filter: blur(40px);
  animation: bg-float ease-in-out infinite;
}

.c1 { top: 10%; left: 5%; width: 400px; height: 400px; animation-duration: 20s; animation-delay: 0s; }
.c2 { top: 60%; left: 70%; width: 300px; height: 300px; animation-duration: 25s; animation-delay: 2s; }
.c3 { top: 40%; left: 80%; width: 500px; height: 500px; animation-duration: 30s; animation-delay: 4s; }
.c4 { top: 80%; left: 10%; width: 250px; height: 250px; animation-duration: 22s; animation-delay: 1s; }
.c5 { top: 20%; left: 60%; width: 350px; height: 350px; animation-duration: 28s; animation-delay: 3s; }

.bg-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.4;
}

.bg-lines line {
  stroke-width: 2;
  stroke-dasharray: 1000;
  animation: bg-draw 3s ease-in-out infinite alternate;
}

.bg-ring {
  position: absolute;
  border-radius: 50%;
  animation: bg-pulse ease-in-out infinite;
}

.r1 { top: 30%; right: 15%; width: 200px; height: 200px; border: 2px solid rgba(21, 101, 192, 0.25); animation-duration: 4s; }
.r2 { bottom: 20%; left: 20%; width: 150px; height: 150px; border: 2px solid rgba(25, 118, 210, 0.25); animation-duration: 5s; animation-delay: 1s; }

@keyframes bg-float {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(10px, -20px); }
  50% { transform: translate(-10px, -40px); }
  75% { transform: translate(5px, -20px); }
}

@keyframes bg-pulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.05); }
}

@keyframes bg-draw {
  from { stroke-dashoffset: 1000; }
  to { stroke-dashoffset: 0; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .sparkle path,
  .sparkle polygon {
    fill: #fff;
  }
}
