/* 
 * Tandika Sokoni - Location Sharing Page
 * Production CSS - Best Practices
 */

/* =========================================
   1. CSS Variables & Theming
   ========================================= */
:root {
  /* Brand Colors */
  --primary: #438058;
  /* Tandika Green (Extracted) */
  --primary-dark: #2d5a3c;

  /* Background Variables - Deep Green-Black for sleek look */
  --bg-dark: #121f16;
  --bg-darker: #0a110c;

  /* Text Colors */
  --text-color: #ffffff;
  --text-muted: #d0e0d6;

  /* Utility Colors */
  --success: #438058;
  --error: #ff4d4d;
  --warning: #ffd700;

  /* Glassmorphism Variables */
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(67, 128, 88, 0.3);
  /* Green-tinted border */
  --shadow-light: rgba(0, 0, 0, 0.5);

  /* Blobs - Green/White Theme */
  --blob-color-1: #438058;
  /* Brand Green */
  --blob-color-2: rgba(255, 255, 255, 0.2);
}

/* =========================================
   2. Reset & Base Styles
   ========================================= */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* Prevent scroll on mobile caused by blobs */
  position: relative;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* =========================================
   3. Animated Background Elements
   ========================================= */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.6;
  animation: float 10s infinite alternate cubic-bezier(0.45, 0.05, 0.55, 0.95);
  pointer-events: none;
  /* Improve performance/interaction */
}

.blob-1 {
  width: 300px;
  height: 300px;
  background: var(--blob-color-1);
  top: -50px;
  left: -50px;
}

.blob-2 {
  width: 400px;
  height: 400px;
  background: var(--blob-color-2);
  bottom: -100px;
  right: -100px;
  animation-delay: -5s;
}

@keyframes float {
  0% {
    transform: translate(0, 0);
  }

  100% {
    transform: translate(30px, 50px);
  }

  /* Consider 3d transform for GPU acceleration */
}

/* =========================================
   4. Components
   ========================================= */

/* Glass Card */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  /* Safari support */
  border: 1px solid var(--glass-border);
  padding: 40px 30px;
  border-radius: 24px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 8px 32px 0 var(--shadow-light);
  animation: fadeInUp 0.8s ease-out;
  position: relative;
  z-index: 10;
  margin-top: 20px;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero Image (Clean Internal Layout) */
.hero-image-container {
  margin: 0 auto 30px;
  /* Standard spacing inside card */
  position: relative;
  z-index: 20;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.hero-image {
  width: 200px;
  /* Balanced size */
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
  animation: hover-rider 4s ease-in-out infinite;

  /* Ensure it doesn't get cut off */
  transform-origin: center center;
}

@keyframes float-rider {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

/* Logo (Small) */
.brand-logo-small {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: white;
  padding: 3px;
  z-index: 30;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Logo */
.brand-logo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid var(--primary);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  margin-bottom: 20px;
  object-fit: cover;
}

/* Typography */
h1 {
  font-weight: 600;
  margin-bottom: 16px;
  font-size: 1.8rem;
  letter-spacing: -0.5px;
}

p {
  color: var(--text-muted);
  margin-bottom: 30px;
  font-size: 1rem;
}

/* Action Button */
.btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 16px 32px;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  width: 100%;
  /* Better touch target on mobile */
  max-width: 300px;
  position: relative;
  overflow: hidden;
}

.btn:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn:disabled {
  background: #555;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  opacity: 0.8;
}

/* Status Messages */
#status {
  margin-top: 20px;
  font-size: 0.95rem;
  min-height: 24px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#status.visible {
  opacity: 1;
}

.loading {
  color: var(--warning);
}

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

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

/* Focus States for Accessibility */
button:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}