:root {
  color-scheme: light;
  --bg-1: #f4f2ff;
  --bg-2: #fce8f2;
  --brand-1: #4c33f9;
  --brand-2: #951350;
  --brand-3: #6b2bec;
  --text: #17161a;
  --muted: #6c6a74;
  --surface: #ffffff;
  --line: #e9ddff;
  --success: #0f9d58;
  --error: #c5221f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Poppins", Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 15%, rgba(76, 51, 249, 0.18), transparent 34%),
    radial-gradient(circle at 90% 10%, rgba(149, 19, 80, 0.16), transparent 42%),
    linear-gradient(140deg, var(--bg-1), var(--bg-2));
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
}

.shell {
  width: min(100%, 480px);
}

.kicker {
  margin: 0 0 10px;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--brand-2);
  font-weight: 600;
}

.flip-card {
  perspective: 1200px;
}

.flip-inner {
  position: relative;
  min-height: 480px;
  transform-style: preserve-3d;
  transition: transform 800ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.flip-card.joined .flip-inner {
  transform: rotateY(180deg);
}

.panel {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow:
    0 10px 28px rgba(76, 51, 249, 0.14),
    0 2px 10px rgba(149, 19, 80, 0.08);
  padding: 24px;
}

.panel-back {
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.logo {
  width: 140px;
  height: auto;
  display: block;
  background: #000;
  border-radius: 12px;
  padding: 8px 10px;
  margin-bottom: 8px;
}

h1,
h2 {
  margin: 0;
  font-size: clamp(1.5rem, 4.5vw, 2rem);
  line-height: 1.15;
}

.subtitle {
  margin: 10px 0 18px;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.95rem;
}

.form {
  display: grid;
  gap: 10px;
}

label {
  font-size: 0.88rem;
  color: #3f3b4a;
}

input {
  width: 100%;
  border: 1px solid #d8cdfa;
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 1rem;
  font-family: inherit;
}

input:focus {
  border-color: var(--brand-1);
  outline: 2px solid rgba(76, 51, 249, 0.2);
}

button,
.cta {
  border: none;
  border-radius: 12px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

button {
  color: #fff;
  background: linear-gradient(120deg, var(--brand-1), var(--brand-2));
}

button:hover {
  filter: brightness(0.98);
}

button:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.status {
  min-height: 1.2rem;
  margin: 14px 0 0;
  font-size: 0.9rem;
}

.status.success {
  color: var(--success);
}

.status.error {
  color: var(--error);
}

.cta {
  margin-top: 8px;
  display: inline-block;
  width: 100%;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(120deg, #13a05a, #0f8a4f);
  opacity: 1;
  transition: opacity 350ms ease, transform 350ms ease;
}

.cta-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.back-btn {
  margin-top: 8px;
  width: 100%;
  border: 1px solid #d7d0ea;
  background: #fff;
  color: #3f3b4a;
}

.back-btn:hover {
  background: #f7f5ff;
}

.footer-note {
  margin: 12px 6px 0;
  text-align: center;
  font-size: 0.83rem;
  color: #6e5b8c;
}

@media (max-width: 520px) {
  .panel {
    padding: 18px;
  }

  .flip-inner {
    min-height: 500px;
  }

  .logo {
    width: 120px;
  }
}
