/* ============================================
   Ottero - Shared Styles
   ============================================ */

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

body {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Entry Animations
   ============================================ */

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

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

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes springIn {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  60% {
    transform: scale(1.03);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes springInBig {
  0% { transform: scale(0); }
  50% { transform: scale(1.15); }
  70% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

/* ============================================
   Continuous / Looping Animations
   ============================================ */

@keyframes orbPulse1 {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.2); opacity: 0.5; }
}

@keyframes orbPulse2 {
  0%, 100% { transform: scale(1.2); opacity: 0.5; }
  50% { transform: scale(1); opacity: 0.3; }
}

@keyframes orbPulse3 {
  0%, 100% { transform: scale(1); opacity: 0.2; }
  50% { transform: scale(1.3); opacity: 0.4; }
}

@keyframes glowPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 0.8; }
}

@keyframes gradientShift {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

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

/* ============================================
   Gradient Orbs
   ============================================ */

.orb {
  position: absolute;
  border-radius: 9999px;
  filter: blur(48px);
}

.orb-1 {
  top: 25%;
  left: 25%;
  width: 24rem;
  height: 24rem;
  background: linear-gradient(to bottom right, rgba(59, 130, 246, 0.3), rgba(6, 182, 212, 0.3));
  animation: orbPulse1 8s ease-in-out infinite;
}

.orb-2 {
  bottom: 25%;
  right: 25%;
  width: 24rem;
  height: 24rem;
  background: linear-gradient(to bottom right, rgba(168, 85, 247, 0.3), rgba(236, 72, 153, 0.3));
  animation: orbPulse2 8s ease-in-out infinite 1s;
}

.orb-3 {
  top: 50%;
  right: 33%;
  width: 20rem;
  height: 20rem;
  background: linear-gradient(to bottom right, rgba(6, 182, 212, 0.2), rgba(59, 130, 246, 0.2));
  animation: orbPulse3 10s ease-in-out infinite 2s;
}

/* ============================================
   Grid Overlay
   ============================================ */

.grid-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.03;
}

.grid-overlay-inner {
  height: 100%;
  width: 100%;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.5) 1px, transparent 1px);
  background-size: 50px 50px;
}

/* ============================================
   Floating Particles
   ============================================ */

.particles-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background-color: rgba(34, 211, 238, 0.4);
  border-radius: 9999px;
  bottom: -10%;
}

/* ============================================
   Logo Glow
   ============================================ */

.logo-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(59, 130, 246, 0.2), rgba(6, 182, 212, 0.2));
  filter: blur(48px);
  animation: glowPulse 4s ease-in-out infinite;
}

/* ============================================
   Animated Gradient Text
   ============================================ */

.gradient-text-animated {
  background: linear-gradient(to right, #2563eb, #0891b2, #2563eb);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 8s linear infinite;
}

/* ============================================
   Form Styles
   ============================================ */

.form-wrapper {
  position: relative;
}

.form-glow {
  position: absolute;
  inset: -4px;
  background: linear-gradient(to right, #3b82f6, #06b6d4);
  border-radius: 1rem;
  filter: blur(16px);
  opacity: 0.2;
  transition: opacity 0.5s;
}

.form-wrapper:hover .form-glow {
  opacity: 0.3;
}

.form-inner {
  position: relative;
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid #bfdbfe;
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.email-input-wrapper {
  position: relative;
  flex: 1;
}

.email-input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.25rem;
  height: 1.25rem;
  color: #60a5fa;
}

.email-input {
  width: 100%;
  height: 3.5rem;
  padding-left: 3rem;
  padding-right: 1rem;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1rem;
  color: #0f172a;
}

.email-input::placeholder {
  color: #94a3b8;
}

.subscribe-btn {
  height: 3.5rem;
  padding: 0 2rem;
  background: linear-gradient(to right, #3b82f6, #06b6d4);
  color: white;
  font-weight: 600;
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.25);
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  font-size: 1rem;
}

.subscribe-btn:hover:not(:disabled) {
  background: linear-gradient(to right, #2563eb, #0891b2);
}

.subscribe-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================
   Success Card
   ============================================ */

.success-wrapper {
  position: relative;
}

.success-glow {
  position: absolute;
  inset: -4px;
  background: linear-gradient(to right, #22c55e, #10b981);
  border-radius: 1rem;
  filter: blur(16px);
  opacity: 0.2;
}

.success-card {
  position: relative;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid #bbf7d0;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  text-align: center;
}

/* ============================================
   Spinner
   ============================================ */

.spinner {
  animation: spin 1s linear infinite;
}

/* ============================================
   JoinUs Page - Card Styles
   ============================================ */

.form-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid #bfdbfe;
  border-radius: 0.75rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.form-card-header {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 1.5rem;
}

.form-card-content {
  padding: 0 1.5rem 1.5rem;
}

/* Form elements */
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  height: 2.25rem;
  padding: 0 0.75rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #bfdbfe;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  color: #334155;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px #3b82f6;
}

.form-input::placeholder {
  color: #94a3b8;
}

.form-select {
  width: 100%;
  height: 2.25rem;
  padding: 0 2rem 0 0.75rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #bfdbfe;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  color: #334155;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
}

.form-select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px #3b82f6;
}

.form-textarea {
  width: 100%;
  min-height: 80px;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #bfdbfe;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  color: #334155;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
  font-family: inherit;
}

.form-textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px #3b82f6;
}

.form-textarea::placeholder {
  color: #94a3b8;
}

/* Submit button (full width) */
.submit-btn {
  width: 100%;
  height: 3.5rem;
  background: linear-gradient(to right, #3b82f6, #06b6d4);
  color: white;
  font-weight: 600;
  font-size: 1.125rem;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.submit-btn:hover:not(:disabled) {
  background: linear-gradient(to right, #2563eb, #0891b2);
}

.submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Back button */
.back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid #93c5fd;
  border-radius: 0.375rem;
  background: transparent;
  color: #2563eb;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}

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

/* Grid helpers */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
  .grid-3 {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* ============================================
   Success Page (JoinUs)
   ============================================ */

.success-page {
  min-height: 100vh;
  background: linear-gradient(to bottom right, #f0f9ff, #eff6ff, #ecfeff);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.success-icon-circle {
  width: 5rem;
  height: 5rem;
  margin: 0 auto;
  border-radius: 9999px;
  background: linear-gradient(to right, #4ade80, #10b981);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 15px -3px rgba(74, 222, 128, 0.25);
}

/* ============================================
   Utility: Hidden state
   ============================================ */

.hidden {
  display: none !important;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 767px) {
  .form-inner {
    flex-direction: column;
  }

  .subscribe-btn {
    width: 100%;
  }
}
