/* styles for the landing home module */

body.home-active {
  background: radial-gradient(circle at 18% 22%, rgba(59, 130, 246, 0.32), transparent 58%),
              radial-gradient(circle at 82% 18%, rgba(236, 72, 153, 0.32), transparent 60%),
              linear-gradient(180deg, #0b0f1a 0%, #060914 100%);
  overflow: hidden;
}

body.home-active #app-container,
body.home-active #app-loader {
  display: none !important;
}

#home-root {
  display: none;
  min-height: 100dvh;
  width: 100%;
  justify-content: center;
  align-items: center;
  padding: clamp(18px, 4vh, 48px);
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

body.home-active #home-root {
  display: flex;
}

#home-root::before {
  content: '';
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(59, 130, 246, 0.22), transparent 65%),
    radial-gradient(ellipse at 75% 25%, rgba(236, 72, 153, 0.2), transparent 68%),
    radial-gradient(circle at 50% 110%, rgba(14, 165, 233, 0.18), transparent 72%);
  filter: blur(0.5px);
  z-index: 0;
}

.home {
  width: 100%;
  max-width: 720px;
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.home__panel {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 32px;
  padding: clamp(36px, 5vw, 60px);
  backdrop-filter: blur(18px);
  box-shadow: 0 40px 80px rgba(2, 6, 23, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 28px;
  position: relative;
}

.home__panel::after {
  content: '';
  position: absolute;
  inset: 14px;
  border-radius: 28px;
  border: 1px solid rgba(148, 197, 255, 0.12);
  pointer-events: none;
}

.home__hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.home__hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.home__hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  max-width: 44ch;
}

.home__heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.home__heading .home__version {
  align-self: center;
}

.home__emblem {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(180px, 26vw, 240px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, rgba(191, 219, 254, 0.12), rgba(15, 23, 42, 0.85));
  box-shadow:
    inset 0 -20px 45px rgba(15, 23, 42, 0.85),
    0 24px 60px rgba(45, 212, 191, 0.12),
    0 0 22px rgba(59, 130, 246, 0.35);
  overflow: hidden;
}

.home__emblem-ring,
.home__emblem-spark {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
}

.home__emblem-ring {
  border: 2px solid rgba(191, 219, 254, 0.28);
  box-shadow: 0 0 28px rgba(148, 197, 255, 0.35);
  animation: home-ring-spin 14s linear infinite;
}

.home__emblem-spark {
  background:
    radial-gradient(circle at 28% 40%, rgba(59, 130, 246, 0.5), transparent 55%),
    radial-gradient(circle at 72% 60%, rgba(236, 72, 153, 0.45), transparent 55%),
    radial-gradient(circle at 50% 80%, rgba(56, 189, 248, 0.4), transparent 60%);
  mix-blend-mode: screen;
  opacity: 0.85;
  filter: blur(2px);
  animation: home-spark-pulse 9s ease-in-out infinite;
}

.home__logo {
  width: 62%;
  height: auto;
  filter: drop-shadow(0 20px 32px rgba(59, 130, 246, 0.42));
  animation: home-logo-breathe 11s ease-in-out infinite;
  transform-origin: center;
}

.home__version {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.2);
  color: rgba(191, 219, 254, 0.95);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.32);
  margin-top: 8px;
}

.home__title {
  margin: 0;
  font-size: clamp(40px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.01em;
  background: linear-gradient(118deg, rgba(191, 219, 254, 0.98), rgba(129, 140, 248, 0.94) 45%, rgba(236, 72, 153, 0.92));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.home__subtitle {
  margin: 0;
  max-width: 38ch;
  color: rgba(226, 232, 240, 0.9);
  font-size: 17px;
  line-height: 1.65;
}

.home__form {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: stretch;
}

.home__label {
  font-size: 14px;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.92);
  text-align: left;
}

.home__input {
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 16px;
  padding: 14px 18px;
  font-size: 16px;
  color: #e2e8f0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.home__input:focus {
  outline: none;
  border-color: rgba(96, 165, 250, 0.65);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.home__input:disabled {
  opacity: 0.65;
}

.home__actions {
  display: flex;
  justify-content: center;
  margin-top: 6px;
}

.home__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 36px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 999px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0b1120;
  min-width: 220px;
}

.home__submit[aria-busy='true']::after {
  content: '';
  margin-left: 10px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(17, 24, 39, 0.65);
  border-top-color: transparent;
  display: inline-block;
  animation: home-spin 0.9s linear infinite;
}

.home__message {
  min-height: 20px;
  font-size: 14px;
  color: rgba(226, 232, 240, 0.88);
  text-align: center;
}

.home__message.is-error {
  color: #f87171;
}

.home__message.is-success {
  color: #34d399;
}

.home__message.is-info {
  color: rgba(96, 165, 250, 0.9);
}

.home__legal {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(148, 163, 184, 0.8);
  max-width: 46ch;
}

@media (min-width: 960px) {
  .home {
    max-width: min(1240px, 90vw);
  }

  .home__panel {
    padding: clamp(38px, 4.5vw, 56px);
    display: grid;
    grid-template-columns: minmax(0, 0.56fr) minmax(0, 0.44fr);
    grid-template-areas:
      "visual visual"
      "copy form"
      "legal form";
    column-gap: clamp(48px, 6vw, 92px);
    row-gap: clamp(24px, 4vw, 36px);
    align-items: flex-start;
    text-align: left;
  }

  .home__hero {
    display: contents;
  }

  .home__hero-visual {
    grid-area: visual;
    justify-content: center;
    align-items: center;
    justify-self: center;
  }

  .home__hero-copy {
    grid-area: copy;
    align-items: flex-start;
    text-align: left;
    max-width: 40ch;
    gap: 18px;
    justify-self: flex-start;
    margin-top: clamp(16px, 3vw, 32px);
  }

  .home__heading {
    align-items: flex-start;
    gap: 10px;
  }

  .home__heading .home__version {
    align-self: flex-start;
    margin-top: 8px;
  }

  .home__subtitle {
    text-align: left;
  }

  .home__form {
    grid-area: form;
    align-self: flex-start;
    justify-self: stretch;
    margin-top: clamp(18px, 3vw, 32px);
  }

  .home__message {
    grid-area: message;
    text-align: left;
    justify-self: flex-start;
  }

  .home__legal {
    grid-area: legal;
    text-align: left;
    justify-self: flex-start;
    max-width: 48ch;
  }
}

@media (max-width: 720px) {
  #home-root {
    padding: 24px;
  }

  .home__panel {
    padding: 32px 26px;
    border-radius: 24px;
  }

  .home__panel::after {
    inset: 10px;
    border-radius: 20px;
  }

  .home__emblem {
    width: clamp(160px, 42vw, 200px);
  }

  .home__version {
    font-size: 12px;
    padding: 6px 16px;
  }

  .home__title {
    font-size: clamp(36px, 10vw, 48px);
  }

  .home__subtitle {
    font-size: 16px;
  }

  .home__submit {
    width: 100%;
    min-width: auto;
  }
}

@keyframes home-logo-breathe {
  0%, 100% {
    transform: scale(1) rotate(0deg);
    filter: drop-shadow(0 22px 36px rgba(59, 130, 246, 0.48));
  }
  25% {
    transform: scale(1.08) rotate(4deg);
    filter: drop-shadow(0 28px 40px rgba(236, 72, 153, 0.42));
  }
  55% {
    transform: scale(0.98) rotate(-6deg);
    filter: drop-shadow(0 18px 28px rgba(56, 189, 248, 0.5));
  }
}

@keyframes home-ring-spin {
  from { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(160deg) scale(1.05); }
  to { transform: rotate(360deg) scale(1); }
}

@keyframes home-spark-pulse {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  40% { opacity: 0.45; transform: scale(1.05) translate3d(4px, -6px, 0); }
  70% { opacity: 0.68; transform: scale(0.95) translate3d(-6px, 4px, 0); }
}

@keyframes home-spin {
  to { transform: rotate(360deg); }
}

