/**
 * TowMate Assist Public Site Styles
 * Following TowMate AI Platform Style Guide v1.0
 */

/* ============================================================================
   CSS Variables - Aligned with TowMate AI Platform
   ============================================================================ */

:root {
  /* Primary Colors (Blues) */
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --info: #3b82f6;
  
  /* Status Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  
  /* Neutral Colors */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #0f172a;
  
  /* Layout */
  --nav-h: 64px;
  --brand-h: 100px;
  
  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 16px;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* ============================================================================
   Reset and Base Styles
   ============================================================================ */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  min-height: 100vh;
  color: var(--gray-800);
  line-height: 1.6;
}

/* ============================================================================
   Navigation Header (Fixed)
   ============================================================================ */

.navigation-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
}

.nav-tabs {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.nav-tab {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.nav-tab:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.nav-tab.active {
  background: rgba(255, 255, 255, 0.95);
  color: #1d4ed8;
  font-weight: 700;
}

/* Nav-actions and nav-btn removed - System Status moved to footer only */

/* ============================================================================
   Brand Strip (Below Navigation)
   ============================================================================ */

.brand-strip {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  z-index: 950;
  height: var(--brand-h);
  background: rgba(13, 31, 74, 0.18);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.towmate-logo {
  text-align: center;
}

.logo-text {
  font-family: 'Arial Black', Arial, sans-serif;
  font-weight: 900;
  font-size: 2.2rem;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.logo-subtitle {
  font-family: 'Arial Black', Arial, sans-serif;
  font-weight: 900;
  font-size: 1.8rem;
  color: #000000;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1;
}

.powered-by {
  font-size: 0.7rem;
  color: #000000;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.25rem;
}

/* ============================================================================
   Main Content Area
   ============================================================================ */

.main-content {
  padding-top: calc(var(--nav-h) + var(--brand-h) + 24px);
  padding-bottom: 40px;
  padding-left: 20px;
  padding-right: 20px;
  min-height: 100vh;
}

.container {
  max-width: 1600px;
  margin: 0 auto;
}

/* ============================================================================
   Cards & Containers
   ============================================================================ */

.wrap {
  max-width: 600px;
  margin: 2rem auto;
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

.wrap-wide {
  max-width: 1200px;
  margin: 2rem auto;
  background: white;
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow-lg);
}

.card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.card-header {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  color: var(--gray-900);
}

.card-body {
  color: var(--gray-700);
}

.glass-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ============================================================================
   Hero Section
   ============================================================================ */

.hero {
  text-align: center;
  padding: var(--spacing-2xl) var(--spacing-lg);
  background: linear-gradient(135deg, #1e3a8a 0%, #0ea5e9 100%);
  color: white;
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-xl);
  box-shadow: 0 12px 24px rgba(30, 58, 138, 0.3);
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--spacing-md);
}

.hero p {
  font-size: 1.25rem;
  opacity: 1;
  max-width: 700px;
  margin: 0 auto var(--spacing-xl);
  color: #ffffff;
}

.hero .tagline {
  font-size: 0.9rem;
  opacity: 0.85;
  margin-bottom: var(--spacing-md);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

/* ============================================================================
   Typography
   ============================================================================ */

h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: var(--spacing-md);
  line-height: 1.2;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: var(--spacing-md);
  line-height: 1.3;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: var(--spacing-sm);
  line-height: 1.3;
}

p {
  margin-bottom: var(--spacing-md);
  color: var(--gray-700);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ============================================================================
   Forms
   ============================================================================ */

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-top: var(--spacing-md);
  margin-bottom: 0.5rem;
  color: var(--gray-700);
}

input,
textarea,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.2s ease;
  background: white;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

input::placeholder,
textarea::placeholder {
  color: var(--gray-400);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--gray-700);
  margin-top: 0.25rem;
}

.form-error {
  font-size: 0.75rem;
  color: var(--danger);
  margin-top: 0.25rem;
  font-weight: 500;
}

.checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  margin: var(--spacing-md) 0;
}

.checkbox-wrapper input[type="checkbox"] {
  width: auto;
  margin-right: var(--spacing-sm);
  margin-top: 4px;
  min-width: 18px;
  min-height: 18px;
}

.checkbox-wrapper label {
  margin: 0;
  font-size: 0.875rem;
  font-weight: normal;
  color: var(--gray-700);
}

/* ============================================================================
   Buttons
   ============================================================================ */

button,
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

button:hover,
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
  text-decoration: none;
}

button:active,
.btn:active {
  transform: translateY(0);
}

button:disabled,
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-outline {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.8);
  color: white;
  box-shadow: none;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: white;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

button[type="submit"],
.btn-primary {
  width: 100%;
  margin-top: var(--spacing-lg);
}

.btn-secondary {
  background: var(--gray-600);
  box-shadow: 0 4px 12px rgba(75, 85, 99, 0.3);
}

.btn-secondary:hover {
  background: var(--gray-700);
}

.btn-success {
  background: var(--success);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-warning {
  background: var(--warning);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-danger {
  background: var(--danger);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-group {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--spacing-lg);
}

/* ============================================================================
   Messages & Alerts
   ============================================================================ */

.success,
.error,
.info {
  padding: 1rem;
  border-radius: var(--radius-sm);
  margin-top: var(--spacing-md);
  display: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.success {
  background: #e6f6eb;
  border: 1px solid #a3e2b2;
  color: #154220;
}

.error {
  background: #ffeaea;
  border: 1px solid #ffb1b1;
  color: #7b2131;
}

.info {
  background: #e8f4fd;
  border: 1px solid #b3d9f5;
  color: #0b4a7b;
}

.message-visible {
  display: block;
}

/* ============================================================================
   Feature Grid
   ============================================================================ */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-lg);
  margin: var(--spacing-xl) 0;
}

.feature-item {
  text-align: center;
  padding: var(--spacing-lg);
  background: var(--gray-50);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  background: white;
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
}

.feature-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  color: var(--gray-900);
}

.feature-description {
  color: var(--gray-600);
  font-size: 0.95rem;
}

/* ============================================================================
   Lists
   ============================================================================ */

ul,
ol {
  margin: var(--spacing-md) 0;
  padding-left: var(--spacing-xl);
}

li {
  margin-bottom: var(--spacing-sm);
  color: var(--gray-700);
}

/* ============================================================================
   Footer
   ============================================================================ */

.footer {
  text-align: center;
  padding: var(--spacing-xl) var(--spacing-lg);
  background: rgba(13, 31, 74, 0.25);
  backdrop-filter: blur(6px);
  color: white;
  margin-top: var(--spacing-2xl);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.footer a {
  color: white;
  margin: 0 var(--spacing-md);
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  padding: 0.25rem 0;
}

.footer a:hover {
  text-decoration: underline;
}

/* Mobile footer adjustments */
@media (max-width: 768px) {
  .footer a {
    display: inline-block;
    margin: 0.5rem 0.5rem;
    font-size: 0.9rem;
  }
}

/* ============================================================================
   Utility Classes
   ============================================================================ */

.text-center {
  text-align: center;
}

.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

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

@media (max-width: 768px) {
  :root {
    --brand-h: 80px;
  }
  
  .navigation-header {
    padding: 0 1rem;
    overflow-x: auto;
  }
  
  .nav-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .nav-tab {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 0.85rem;
  }
  
  .logo-text {
    font-size: 1.5rem;
  }
  
  .logo-subtitle {
    font-size: 1.2rem;
  }
  
  .powered-by {
    font-size: 0.6rem;
  }
  
  .wrap {
    margin: 1rem;
    padding: 1.5rem;
    border-radius: 12px;
  }
  
  .wrap-wide {
    margin: 1rem;
    padding: 1.5rem;
    border-radius: 12px;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .btn-group {
    flex-direction: column;
  }
  
  .btn-group .btn {
    width: 100%;
  }
  
  .feature-grid {
    grid-template-columns: 1fr;
  }
  
  .card {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: var(--spacing-lg);
  }
  
  .hero h1 {
    font-size: 1.75rem;
  }
}

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

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

.fade-in {
  animation: fadeIn 0.3s ease;
}

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

.slide-in-up {
  animation: slideInUp 0.3s ease;
}

/* ============================================================================
   Accessibility
   ============================================================================ */

*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* Minimum touch targets */
.btn,
.nav-tab,
button {
  min-height: 44px;
}
