@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,700&family=DM+Sans:wght@400;500;600&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  background: #FBF7F0;
  color: #1C1917;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 2rem 1rem;
}

.container {
  width: 100%;
  max-width: 480px;
}

header {
  text-align: center;
  margin-bottom: 2rem;
}

.logo {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1C1917;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.subtitle {
  color: #57534E;
  font-size: 0.95rem;
  margin-top: 0.35rem;
}

/* Steps */
.step {
  display: none;
  background: #FFFDF9;
  border: 1px solid #E7E0D8;
  border-radius: 12px;
  padding: 2rem;
}

.step.active {
  display: block;
}

.step h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.step > p {
  color: #57534E;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="tel"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #E7E0D8;
  border-radius: 8px;
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 1rem;
  background: white;
  transition: border-color 0.15s;
  outline: none;
}

input:focus {
  border-color: #0F766E;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

#invite-code {
  text-align: center;
  font-size: 1.5rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

button[type="submit"],
.btn-primary {
  width: 100%;
  padding: 0.75rem;
  background: #0F766E;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 1rem;
  transition: background 0.15s;
}

button[type="submit"]:hover,
.btn-primary:hover {
  background: #0D5E58;
}

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

.btn-secondary {
  width: 100%;
  padding: 0.6rem;
  background: none;
  color: #0F766E;
  border: 1.5px dashed #E7E0D8;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  margin-top: 1rem;
  transition: border-color 0.15s;
}

.btn-secondary:hover {
  border-color: #0F766E;
}

.btn-google {
  width: 100%;
  padding: 0.75rem;
  background: #fff;
  color: #374151;
  border: 1.5px solid #E7E0D8;
  border-radius: 8px;
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background 0.15s;
}

.btn-google:hover {
  background: #FBF7F0;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  margin: 1.25rem 0;
  color: #A8A29E;
  font-size: 0.85rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #E7E0D8;
}

.divider span {
  padding: 0 0.75rem;
}

/* Fields */
.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.35rem;
}

.field-row {
  display: flex;
  gap: 0.75rem;
}

.field-row .field {
  flex: 1;
}

.hint {
  display: block;
  font-size: 0.8rem;
  color: #A8A29E;
  margin-top: 0.25rem;
}

/* Messages */
.error {
  color: #dc2626;
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

.success {
  color: #059669;
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

/* WhatsApp success */
.success-whatsapp {
  text-align: center;
  padding: 1rem 0;
}

.success-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.success-whatsapp h2 {
  margin-bottom: 0.75rem;
}

.success-whatsapp p {
  color: #374151;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 0.5rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 500px) {
  .container {
    padding: 0;
  }

  .step {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
}
