/*
 * Observes "SaaS coming soon" page.
 *
 * Matches the app's sign-in screen (kickdee-reactjs, src/pages/auth/Login.jsx): the purple
 * gradient, a centred card, Inter, and the gradient button. The font is self-hosted, so the CSP
 * can stay 'self'-only. Dark mode follows the system and uses the app's dark surfaces.
 */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
}

:root {
  color-scheme: light;
  --purple-light: #8864fd;
  --purple: #6a3dfc;
  --gradient: linear-gradient(135deg, var(--purple-light) 0%, var(--purple) 100%);
  /* Observes palette only: the app's purple (#6a3dfc), the logo's light violet (#b59cff), and the
     presence site's band (oklch 0.19 0.03 285) and band accent teal (oklch 0.82 0.11 182).
     The page background lets the dark band dominate, so it's a step less purple than the app's
     sign-in screen; buttons keep the app's purple gradient. */
  --band: oklch(0.19 0.03 285);
  --band-accent: oklch(0.82 0.11 182);
  --page-base: oklch(0.3 0.09 285);
  --page-gradient: linear-gradient(135deg, var(--purple) 0%, oklch(0.3 0.09 285) 50%, var(--band) 100%);
  --card: hsl(0 0% 100% / 82%);
  --card-border: hsl(0 0% 100% / 60%);
  --text: hsl(220 30% 6%);
  --text-secondary: hsl(220 20% 35%);
  --outline: hsl(220 20% 80%);
  --outline-hover: hsl(254 60% 96%);
  --badge-bg: hsl(254 97% 96%);
  --badge-text: hsl(254 70% 42%);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --card: hsl(220 18% 16% / 82%);
    --card-border: hsl(0 0% 100% / 10%);
    --text: hsl(0 0% 100%);
    --text-secondary: hsl(0 0% 100% / 72%);
    --outline: hsl(220 16% 32%);
    --outline-hover: hsl(220 16% 20%);
    --badge-bg: hsl(254 60% 26%);
    --badge-text: hsl(254 100% 88%);
  }
}

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

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--page-base) var(--page-gradient);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Blurred background ---------- */

.backdrop {
  /* Pointer position, set by motion.js: --cx/--cy in px, --px/--py from -1 to 1. */
  --cx: 50vw;
  --cy: 50vh;
  --px: 0;
  --py: 0;
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.7;
  will-change: transform;
}

/* `translate` moves each blob a little against the pointer; `transform` carries the slow drift. */
.blob-1 {
  width: 55vmax;
  height: 55vmax;
  left: -15vmax;
  top: -20vmax;
  background: #b59cff;
  translate: calc(var(--px) * -40px) calc(var(--py) * -40px);
  animation: drift-1 26s ease-in-out infinite alternate;
}

.blob-2 {
  width: 45vmax;
  height: 45vmax;
  right: -12vmax;
  bottom: -18vmax;
  background: var(--band);
  translate: calc(var(--px) * 30px) calc(var(--py) * 30px);
  animation: drift-2 32s ease-in-out infinite alternate;
}

.blob-3 {
  width: 32vmax;
  height: 32vmax;
  right: 8vmax;
  top: -6vmax;
  background: var(--band-accent);
  opacity: 0.3;
  translate: calc(var(--px) * -24px) calc(var(--py) * 24px);
  animation: drift-3 22s ease-in-out infinite alternate;
}

.glow {
  position: absolute;
  left: 0;
  top: 0;
  width: 36vmax;
  height: 36vmax;
  margin: -18vmax 0 0 -18vmax;
  border-radius: 50%;
  background: radial-gradient(circle, hsl(0 0% 100% / 38%) 0%, hsl(0 0% 100% / 0%) 65%);
  filter: blur(30px);
  translate: var(--cx) var(--cy);
  opacity: 0;
  transition: opacity 600ms ease;
}

/* motion.js adds .is-tracking once a mouse or pen moves. */
.backdrop.is-tracking .glow {
  opacity: 1;
}

@keyframes drift-1 {
  to {
    transform: translate(12vmax, 10vmax) scale(1.1);
  }
}

@keyframes drift-2 {
  to {
    transform: translate(-14vmax, -8vmax) scale(0.9);
  }
}

@keyframes drift-3 {
  to {
    transform: translate(-18vmax, 16vmax) scale(1.2);
  }
}

/* ---------- Card ---------- */

.shell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 2.5rem 1rem;
}

.card {
  width: 100%;
  max-width: 34rem;
  padding: 2rem 1.5rem;
  border: 1px solid var(--card-border);
  border-radius: 24px;
  background: var(--card);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  box-shadow:
    0 8px 10px -5px rgb(0 0 0 / 20%),
    0 15px 22px 2px rgb(0 0 0 / 14%),
    0 6px 28px 5px rgb(0 0 0 / 12%);
  text-align: center;
  animation: rise 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@media (min-width: 600px) {
  .card {
    padding: 2.5rem 2.5rem 2rem;
  }
}

.mark {
  display: block;
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  fill: var(--purple);
  stroke: var(--purple);
}

@media (prefers-color-scheme: dark) {
  .mark {
    fill: #b59cff;
    stroke: #b59cff;
  }
}

.mark-lines {
  stroke-width: 27;
}

.mark-ring {
  fill: none;
  stroke-width: 30;
}

h1 {
  margin: 0 0 0.35em;
  font-size: 2.125rem;
  font-weight: 700;
  line-height: 1.2;
}

.tagline {
  margin: 0;
  color: var(--text-secondary);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1.75rem 0 0;
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 0.875rem;
  font-weight: 600;
}

.badge-dot {
  position: relative;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
}

.badge-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: currentColor;
  animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.message {
  max-width: 42ch;
  margin: 1rem auto 0;
  color: var(--text-secondary);
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    filter 150ms,
    background-color 150ms,
    transform 150ms;
}

.button:active {
  transform: translateY(1px);
}

.button-primary {
  background: var(--gradient);
  color: #ffffff;
  box-shadow: 0 6px 16px -6px rgb(106 61 252 / 60%);
}

.button-primary:hover {
  filter: brightness(1.08);
}

.button-outline {
  border-color: var(--outline);
  color: var(--text);
}

.button-outline:hover {
  background: var(--outline-hover);
}

.note {
  margin: 1.25rem 0 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.caption {
  margin: 2rem 0 0;
  color: var(--text-secondary);
  font-size: 0.75rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}

@keyframes ping {
  75%,
  100% {
    transform: scale(2.4);
    opacity: 0;
  }
}

/* No drift, glow or entrance for visitors who prefer reduced motion. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .glow {
    display: none;
  }

  .blob {
    translate: none;
  }
}
