/* ElevatorConstructor - Modern Design 2025 */

/* Variables */
:root {
  --bg: #0a0f1a;
  --bg-alt: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.7);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --primary: #14b8a6;
  --primary-hover: #0d9488;
  --primary-glow: rgba(20, 184, 166, 0.15);
  --accent: #38bdf8;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.4);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Animated Background Mesh */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(20, 184, 166, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(56, 189, 248, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(99, 102, 241, 0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
  animation: meshFloat 20s ease-in-out infinite;
}

@keyframes meshFloat {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}

/* Grid Pattern Overlay */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: -1;
}

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

a:hover {
  color: var(--accent);
}

/* Header - Glassmorphism */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 15, 26, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  transition: all 0.3s ease;
}

.logo:hover {
  color: var(--primary);
  transform: translateY(-1px);
}

.logo svg {
  color: var(--primary);
  transition: all 0.3s ease;
}

.logo:hover svg {
  filter: drop-shadow(0 0 8px var(--primary));
}

.nav {
  display: flex;
  gap: 32px;
}

.nav a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.nav a:hover {
  color: var(--text);
}

.nav a:hover::after {
  width: 100%;
}

.theme-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  transform: rotate(15deg);
}

.icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

/* Search Section - Glassmorphism */
.search-section {
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(10px);
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.search-wrapper {
  max-width: 900px;
  margin: 0 auto;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 18px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow), var(--shadow);
}

.search-box svg {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color 0.3s ease;
}

.search-box:focus-within svg {
  color: var(--primary);
}

.search-box input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.95rem;
  color: var(--text);
  outline: none;
  padding: 8px 0;
  min-width: 200px;
}

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

.search-box select {
  border: none;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 0.85rem;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  outline: none;
  transition: all 0.3s ease;
}

.search-box select:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Directory Section */
.directory {
  padding: 48px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.directory-header {
  margin-bottom: 32px;
  text-align: center;
}

.directory-header h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--text) 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

/* Vendor Grid */
.vendor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

/* Vendor Card - Glassmorphism with Hover Effects */
.vendor-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.vendor-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.vendor-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg), 0 0 30px var(--primary-glow);
}

.vendor-card:hover::before {
  opacity: 1;
}

.vendor-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.3;
  color: var(--text);
  transition: color 0.3s ease;
}

.vendor-card:hover h3 {
  color: var(--primary);
}

.vendor-card .description {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 14px;
  line-height: 1.6;
  flex-grow: 1;
}

.vendor-card .category {
  display: inline-block;
  background: rgba(20, 184, 166, 0.1);
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid rgba(20, 184, 166, 0.2);
}

.vendor-card .contact {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.7;
}

.vendor-card .contact a {
  color: var(--accent);
}

.vendor-card .contact a:hover {
  text-decoration: underline;
}

.vendor-card .visit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s ease;
  text-align: center;
}

.vendor-card .visit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(20, 184, 166, 0.3);
  color: white;
}

/* Submit Section */
.submit-section {
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(10px);
  padding: 64px 24px;
  border-top: 1px solid var(--border);
  position: relative;
}

.submit-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  pointer-events: none;
}

.submit-inner {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.submit-inner h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  text-align: center;
}

.submit-inner > p {
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 28px;
  font-size: 0.95rem;
}

.submit-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.submit-form .form-row {
  display: flex;
  gap: 14px;
}

.submit-form input,
.submit-form textarea {
  flex: 1;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  background: var(--bg-card);
  color: var(--text);
  outline: none;
  font-family: inherit;
  transition: all 0.3s ease;
}

.submit-form input:focus,
.submit-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.submit-form input::placeholder,
.submit-form textarea::placeholder {
  color: var(--text-muted);
}

.submit-form textarea {
  resize: vertical;
  min-height: 100px;
}

.submit-form button {
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  align-self: center;
}

.submit-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(20, 184, 166, 0.35);
}

/* Newsletter */
.newsletter {
  background: var(--bg-alt);
  padding: 64px 24px;
  border-top: 1px solid var(--border);
}

.newsletter-inner {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
}

.newsletter h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.newsletter > .newsletter-inner > p {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 0.9rem;
}

.newsletter-form {
  display: flex;
  gap: 12px;
}

.newsletter-form input {
  flex: 1;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  background: var(--bg-card);
  color: var(--text);
  outline: none;
  transition: all 0.3s ease;
}

.newsletter-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.newsletter-form button {
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.newsletter-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(20, 184, 166, 0.3);
}

.newsletter-note {
  display: block;
  margin-top: 14px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Footer */
.footer {
  background: var(--bg);
  color: var(--text-muted);
  padding: 48px 24px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 48px;
  align-items: start;
}

.footer-logo {
  display: block;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

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

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.75rem;
  opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 20px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    margin-top: 14px;
  }

  .search-box {
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
  }

  .search-box svg {
    display: none;
  }

  .search-box select {
    width: 100%;
  }

  .vendor-grid {
    grid-template-columns: 1fr;
  }

  .submit-form .form-row {
    flex-direction: column;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

  .footer-links {
    flex-direction: row;
    justify-content: center;
    gap: 24px;
  }
}

/* Loading State with Animation */
.vendor-grid:empty::before {
  content: "Loading suppliers...";
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px;
  color: var(--text-muted);
  grid-column: 1 / -1;
  font-size: 1rem;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Smooth Scroll Offset */
#directory, #submit {
  scroll-margin-top: 80px;
}

/* Selection */
::selection {
  background: var(--primary);
  color: white;
}
