/* =========================================================
   MapSpective · base
   Tokens, reset and shared components (logo, status, form)
   ========================================================= */

:root {
  --cream: #fdfcf7;
  --ink: #0b0c10;
  --blue: #0a39b2;
  --blue-deep: #06237a;
  --yellow: #f9ab14;
  --red: #ee3524;
  --muted: #5d6477;
  --line: #e4e2d6;

  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --pad: clamp(1.25rem, 5.7vw, 5.5rem);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
ol { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.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;
}

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 0.6rem; }
.logo__mark { width: 3.4rem; height: auto; aspect-ratio: 82 / 80; transition: transform 0.6s var(--spring); }
.logo:hover .logo__mark { transform: rotate(-6deg) scale(1.06); }
.logo__word {
  font-weight: 800; font-size: 2.15rem; letter-spacing: -0.045em; line-height: 1;
}
.logo__word b { color: var(--blue); font-weight: 800; }
.logo--sm .logo__mark { width: 2.2rem; }
.logo--sm .logo__word { font-size: 1.4rem; }

/* ---------- Status ---------- */
.status {
  display: inline-flex; align-items: center; gap: 0.9rem;
  font-family: var(--mono); font-weight: 500; font-size: 0.95rem;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--blue);
}
.status__dot { position: relative; width: 0.8rem; height: 0.8rem; border-radius: 50%; background: var(--yellow); }
.status__dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--yellow); animation: ping 2.2s var(--ease) infinite;
}
@keyframes ping { 0% { transform: scale(1); opacity: 0.7; } 80%, 100% { transform: scale(3); opacity: 0; } }

/* ---------- Signup form ---------- */
.signup { width: 100%; max-width: 44rem; }
.signup__row { display: flex; gap: 0.75rem; }

.signup__input {
  flex: 1 1 0; min-width: 0; height: 3.9rem; padding: 0 1.4rem;
  background: rgba(255, 255, 255, 0.7); border: 1px solid #cfd2dc; border-radius: 0.65rem;
  font-size: 1.1rem; font-weight: 300; color: var(--ink);
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.signup__input::placeholder { color: #8a90a2; }
.signup__input:hover { border-color: #aab0c2; }
.signup__input:focus {
  outline: none; background: #fff; border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(10, 57, 178, 0.14);
}
.signup.is-error .signup__input { border-color: var(--red); box-shadow: 0 0 0 4px rgba(238, 53, 36, 0.12); animation: shake 0.4s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

.btn {
  position: relative; overflow: hidden; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.8rem;
  height: 3.9rem; padding: 0 2rem; border: 0; border-radius: 0.65rem; cursor: pointer;
  background: var(--blue); color: #fff; font-weight: 600; font-size: 1.1rem; letter-spacing: -0.01em;
  transition: transform 0.35s var(--spring), box-shadow 0.35s, background 0.3s;
  box-shadow: 0 10px 24px -10px rgba(10, 57, 178, 0.7);
}
.btn::before {                     /* light sweep on hover */
  content: ""; position: absolute; inset: 0; transform: translateX(-120%) skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transition: transform 0.7s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(10, 57, 178, 0.8); }
.btn:hover::before { transform: translateX(120%) skewX(-18deg); }
.btn:active { transform: translateY(0) scale(0.98); }

.btn svg { width: 1.45rem; height: 1.45rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn__arrow { transition: transform 0.35s var(--spring); }
.btn:hover .btn__arrow { transform: translateX(5px); }
.btn__check { position: absolute; opacity: 0; transform: scale(0.4); }

.btn.is-loading .btn__arrow { animation: nudge 0.6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(8px); } }
.btn.is-done { background: #0d7a45; box-shadow: 0 10px 24px -10px rgba(13, 122, 69, 0.7); }
.btn.is-done .btn__label,
.btn.is-done .btn__arrow { opacity: 0; transform: translateY(-10px); }
.btn.is-done .btn__check { opacity: 1; transform: scale(1); transition: transform 0.5s var(--spring), opacity 0.3s; }

.signup__note {
  margin-top: 1.1rem; font-family: var(--mono); font-size: 0.88rem; color: var(--muted); letter-spacing: 0.01em;
  min-height: 1.4em;
}
.signup.is-error .signup__note { color: var(--red); }
.signup.is-done .signup__note { color: #0d7a45; }

@media (max-width: 560px) {
  .signup__row { flex-direction: column; }
  .btn { width: 100%; }
}

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