/* ===== TOKENS ===== */
:root {
  --bg: #ffffff;
  --bg-secondary: #f8fafc;
  --surface: #ffffff;

  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --primary-subtle: #eef2ff;

  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --border: #e2e8f0;
  --border-light: #f1f5f9;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.08);
  --shadow-lg: 0 25px 50px -12px rgba(0,0,0,0.15);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --font: 'Plus Jakarta Sans', -apple-system, sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== RESET ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ===== BACKGROUND ===== */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.bg-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, var(--primary-subtle), transparent),
    radial-gradient(ellipse 60% 40% at 80% 100%, #f0f9ff, transparent);
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-light) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.5;
}

/* ===== CONTAINER ===== */
.container {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 24px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== HEADER ===== */
.header {
  padding: 32px 0;
}

.logo {
  display: flex;
}

/* ===== HERO ===== */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 0 60px;
}

.hero-content {
  margin-bottom: 48px;
}

.title {
  font-size: clamp(2.5rem, 10vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.title-light {
  display: block;
  font-weight: 500;
  color: var(--text-secondary);
}

.title-bold {
  display: block;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 360px;
  margin: 0 auto;
}

/* ===== CTA SECTION ===== */
.cta-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

/* ===== BIG PAY BUTTON ===== */
.btn-pay {
  position: relative;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  cursor: pointer;
  transition: all 0.4s var(--ease-out);
  box-shadow:
    0 0 0 8px rgba(99, 102, 241, 0.1),
    0 0 0 16px rgba(99, 102, 241, 0.05),
    0 20px 40px rgba(99, 102, 241, 0.3);
}

.btn-pay:hover {
  transform: scale(1.05);
  box-shadow:
    0 0 0 12px rgba(99, 102, 241, 0.15),
    0 0 0 24px rgba(99, 102, 241, 0.08),
    0 30px 60px rgba(99, 102, 241, 0.35);
}

.btn-pay:active {
  transform: scale(0.98);
}

.btn-pay-text {
  position: relative;
  z-index: 1;
  font-family: var(--font);
  font-size: 3rem;
  font-weight: 800;
  color: white;
  letter-spacing: -0.02em;
}

.btn-pay-glow {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.3), transparent 70%);
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

.btn-pay-shine {
  position: absolute;
  top: 10%;
  left: 20%;
  width: 30%;
  height: 20%;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  filter: blur(8px);
  transition: opacity 0.3s;
}

.btn-pay:hover .btn-pay-shine {
  opacity: 0.5;
}

/* ===== FORM CONTAINER ===== */
.form-container {
  width: 100%;
  max-width: 400px;
  animation: slideUp 0.4s var(--ease-out);
}

.form-container.hidden {
  display: none;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  box-shadow: var(--shadow-lg);
}

.form-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: none;
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.form-close:hover {
  background: var(--border);
  color: var(--text);
}

.form-header {
  text-align: center;
  margin-bottom: 28px;
}

.form-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.form-header p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ===== FORM ===== */
.cta-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.input-group {
  position: relative;
}

.input-group input {
  width: 100%;
  padding: 16px 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font);
  color: var(--text);
  transition: all 0.3s;
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-subtle);
}

.input-group input::placeholder {
  color: var(--text-muted);
}

/* ===== SUBMIT BUTTON ===== */
.btn-submit {
  position: relative;
  width: 100%;
  padding: 18px 28px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  border-radius: var(--radius);
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s var(--ease-out);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-submit.loading .btn-text {
  opacity: 0;
}

.btn-submit.loading .btn-loader {
  display: block;
}

.btn-loader {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 22px;
  height: 22px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.btn-text {
  position: relative;
  z-index: 1;
}

/* ===== MESSAGE ===== */
.message {
  padding: 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  text-align: center;
  margin-top: 8px;
}

.message.hidden { display: none; }
.message.success {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid rgba(34,197,94,0.2);
}
.message.error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid rgba(220,38,38,0.2);
}

.form-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 16px;
}

/* ===== TRUST ROW ===== */
.trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 48px;
}

.trust-dot {
  width: 4px;
  height: 4px;
  background: var(--border);
  border-radius: 50%;
}

/* ===== FEATURES ===== */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 80px 0;
}

.feature {
  text-align: center;
  padding: 24px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  transition: transform 0.3s var(--ease-out);
}

.feature:hover {
  transform: translateY(-4px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-subtle);
  border-radius: var(--radius-sm);
  margin: 0 auto 16px;
}

.feature h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.feature p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== MEMBERS SECTION ===== */
.members-section {
  padding: 60px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 40px 0;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 24px;
}

.members-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 480px;
  margin: 0 auto;
  max-height: 300px;
  overflow-y: auto;
}

.member-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.member-name {
  font-weight: 600;
  color: var(--text);
}

.member-email {
  color: var(--text-muted);
  font-family: monospace;
}

.member-joined {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.members-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 20px;
}

/* ===== FAQ ===== */
.faq {
  padding: 0 0 60px;
  text-align: center;
}

.faq h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
}

.faq-list {
  max-width: 480px;
  margin: 0 auto;
  text-align: left;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
}

.faq-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: none;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  font-family: var(--font);
  cursor: pointer;
}

.faq-btn svg {
  flex-shrink: 0;
  transition: transform 0.3s var(--ease-out);
}

.faq-item.active .faq-btn svg {
  transform: rotate(180deg);
}

.faq-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s var(--ease-out);
}

.faq-item.active .faq-body {
  max-height: 100px;
}

.faq-body p {
  padding: 0 20px 18px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== FOOTER ===== */
.footer {
  padding: 32px 0;
  text-align: center;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .container {
    padding: 0 20px;
  }

  .btn-pay {
    width: 150px;
    height: 150px;
  }

  .btn-pay-text {
    font-size: 2.5rem;
  }

  .features {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .feature {
    display: flex;
    align-items: center;
    text-align: left;
    padding: 16px 20px;
  }

  .feature-icon {
    margin: 0;
    margin-right: 16px;
  }

  .form-card {
    padding: 32px 24px;
  }
}
