:root {
  --blue: #0376c9;
  --blue-hover: #0260a4;
  --blue-soft: #eaf5ff;
  --ink: #151b25;
  --muted: #637083;
  --line: #dbe2ea;
  --page: #f7f9fc;
  --surface: rgba(255, 255, 255, 0.76);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  overflow: hidden;
  color: var(--ink);
  background:
    linear-gradient(rgba(255, 255, 255, 0.68), rgba(247, 249, 252, 0.88)),
    radial-gradient(circle at 50% 42%, #ffffff 0, #f6f9fd 48%, #edf2f7 100%);
  font-family: "Manrope", "Avenir Next", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.48;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.025'/%3E%3C/svg%3E");
}

.ambient {
  position: fixed;
  width: 42vw;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.11;
  pointer-events: none;
}

.ambient-one {
  top: -25vw;
  left: -12vw;
  background: #0376c9;
}

.ambient-two {
  right: -14vw;
  bottom: -27vw;
  background: #f6851b;
}

.welcome {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 42px 24px 68px;
  perspective: 900px;
}

.auth-panel {
  width: min(100%, 360px);
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: arrive 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.logo-stage {
  position: relative;
  width: clamp(210px, 25vw, 292px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  isolation: isolate;
}

#foxMount {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  user-select: none;
}

#foxMount > svg {
  display: block;
  width: 100% !important;
  height: 100% !important;
  overflow: visible;
}

.logo-halo {
  position: absolute;
  z-index: 0;
  width: 58%;
  height: 58%;
  border-radius: 50%;
  background: rgba(246, 133, 27, 0.16);
  filter: blur(36px);
}

.motion-button {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: -4px;
  transform: translateX(-50%);
  min-width: 122px;
  height: 32px;
  padding: 0 13px;
  border: 1px solid rgba(3, 118, 201, 0.24);
  border-radius: 999px;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 6px 18px rgba(21, 36, 53, 0.1);
  backdrop-filter: blur(8px);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.motion-button[hidden] {
  display: none;
}

.eyebrow {
  margin: -2px 0 25px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.015em;
}

.actions {
  width: 100%;
  display: grid;
  gap: 12px;
}

.button {
  width: 100%;
  min-height: 50px;
  border-radius: 12px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease,
    border-color 160ms ease;
}

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

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

.button:focus-visible,
input:focus-visible,
.close-button:focus-visible {
  outline: 3px solid rgba(3, 118, 201, 0.25);
  outline-offset: 3px;
}

.button-primary {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 10px 22px rgba(3, 118, 201, 0.2);
}

.button-primary:hover {
  background: var(--blue-hover);
  box-shadow: 0 13px 26px rgba(3, 118, 201, 0.25);
}

.button-secondary {
  color: var(--blue);
  background: rgba(255, 255, 255, 0.58);
  border-color: var(--blue);
}

.button-secondary:hover {
  background: var(--blue-soft);
}

.privacy-note {
  position: fixed;
  bottom: 22px;
  left: 50%;
  margin: 0;
  transform: translateX(-50%);
  color: #8a94a3;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.025em;
}

.account-dialog {
  width: min(calc(100% - 32px), 420px);
  padding: 0;
  overflow: visible;
  color: var(--ink);
  border: 0;
  border-radius: 22px;
  background: transparent;
  box-shadow: 0 30px 80px rgba(25, 35, 48, 0.22);
}

.account-dialog::backdrop {
  background: rgba(18, 28, 42, 0.32);
  backdrop-filter: blur(10px);
}

.account-dialog[open] {
  animation: dialog-in 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.dialog-card {
  position: relative;
  display: grid;
  gap: 17px;
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
}

.dialog-kicker {
  margin: 0 0 -11px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dialog-card h2 {
  margin: 0 0 4px;
  font-size: 27px;
  letter-spacing: -0.04em;
}

.dialog-card label {
  display: grid;
  gap: 8px;
  color: #3b4657;
  font-size: 12px;
  font-weight: 700;
}

.dialog-card input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 14px;
}

.dialog-card input:focus {
  border-color: var(--blue);
}
.auth-feedback { min-height: 16px; margin: -4px 0 0; color: #b4233a; font-size: 11px; }

.close-button {
  position: absolute;
  top: 17px;
  right: 17px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #637083;
  background: #f1f4f7;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 520px) {
  .welcome {
    padding-inline: 28px;
  }

  .logo-stage {
    width: min(68vw, 260px);
  }

  .eyebrow {
    margin-bottom: 22px;
  }

  .dialog-card {
    padding: 30px 24px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  #foxMount {
    pointer-events: none;
  }
}

/* Keep landing and authentication text comfortably readable on phones. */
body { font-size: 16px; -webkit-text-size-adjust: 100%; }
.eyebrow, .privacy-note, .dialog-kicker, .auth-feedback { font-size: 13px; }
.button, .dialog-card label { font-size: 14px; }
.dialog-card input { min-height: 48px; font-size: 16px; }
