/* PrismaOS Website Main Styles */

/* CSS Variables for Consistency */
:root {
  --primary-color: #0d6efd;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --info-color: #0dcaf0;
  --light-color: #f8f9fa;
  --dark-color: #212529;
  
  /* Accessibility Colors */
  --high-contrast-bg: #000000;
  --high-contrast-text: #ffffff;
  --high-contrast-primary: #ffff00;
  --high-contrast-secondary: #00ffff;
  
  /* Typography */
  --font-family-base: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --font-size-base: 1rem;
  --line-height-base: 1.5;
  
  /* Spacing */
  --spacer: 1rem;
  --border-radius: 0.375rem;
  
  /* Transitions */
  --transition-base: all 0.2s ease-in-out;
}

/* Base Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--dark-color);
  background-color: #ffffff;
  scroll-behavior: smooth;
}

/* Skip Links */
.skip-links {
  position: absolute;
  top: -100px;
  left: 0;
  z-index: 10000;
}

.skip-link {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  background-color: var(--primary-color);
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: var(--border-radius);
  font-weight: bold;
}

.skip-link:focus {
  position: static;
  left: auto;
  width: auto;
  height: auto;
  overflow: visible;
  z-index: 10001;
}

/* Accessibility Toolbar */
.accessibility-toolbar {
  background-color: var(--light-color);
  border-bottom: 1px solid #dee2e6;
  padding: 0.5rem 0;
  font-size: 0.875rem;
}

.accessibility-toolbar .toolbar-label {
  font-weight: 600;
  color: var(--dark-color);
}

.accessibility-toolbar .btn {
  margin-right: 0.5rem;
  font-size: 0.75rem;
}

/* Navigation */
.navbar-brand {
  font-weight: bold;
  font-size: 1.5rem;
}

.navbar-brand .brand-text {
  margin-left: 0.5rem;
}

.navbar-brand .brand-logo {
  height: 40px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

/* Brand Banner */
.brand-banner {
  border-bottom: 1px solid #e9ecef;
}

.brand-showcase {
  max-width: 600px;
  margin: 0 auto;
}

.brand-banner-logo {
  height: 80px;
  width: auto;
  max-width: 400px;
  object-fit: contain;
}

.brand-info {
  text-align: left;
}

@media (max-width: 768px) {
  .brand-showcase {
    flex-direction: column;
    text-align: center;
  }
  
  .brand-info {
    margin-top: 1rem;
    margin-left: 0 !important;
    text-align: center;
  }
  
  .brand-banner-logo {
    height: 60px;
  }
}

/* Company Branding in Footer */
.company-branding {
  max-width: 500px;
  margin: 0 auto;
}

.company-icon {
  height: 50px;
  width: 50px;
  object-fit: contain;
  border-radius: 50%;
}

.company-info {
  text-align: left;
}

@media (max-width: 768px) {
  .company-branding {
    flex-direction: column;
    text-align: center;
  }
  
  .company-info {
    margin-top: 0.75rem;
    margin-left: 0 !important;
    text-align: center;
  }
  
  .company-icon {
    height: 40px;
    width: 40px;
  }
}

.navbar-nav .nav-link {
  font-weight: 500;
  padding: 0.75rem 1rem;
  transition: var(--transition-base);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
}

.navbar-nav .nav-link.active {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius);
}

/* Hero Sections */
.hero-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
  min-height: 50vh;
  display: flex;
  align-items: center;
}

.features-hero,
.technical-hero,
.sdk-hero,
.community-hero,
.contact-hero,
.roadmap-hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
  min-height: 40vh;
  display: flex;
  align-items: center;
}

.bg-gradient-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
}

.bg-gradient-dark {
  background: linear-gradient(135deg, var(--dark-color) 0%, #495057 100%);
}

/* Cards and Components */
.feature-card,
.tech-card,
.demo-card,
.program-card,
.event-card,
.update-card,
.requirements-card,
.platform-card,
.tool-card,
.doc-card,
.download-card,
.contact-option,
.stat-card {
  transition: var(--transition-base);
  border: 1px solid #dee2e6;
}

.feature-card:hover,
.tech-card:hover,
.demo-card:hover,
.program-card:hover,
.event-card:hover,
.update-card:hover,
.platform-card:hover,
.tool-card:hover,
.doc-card:hover,
.download-card:hover,
.contact-option:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}

.feature-icon,
.tech-icon,
.platform-icon,
.tool-icon,
.doc-icon,
.download-icon,
.option-icon,
.stat-icon {
  color: var(--primary-color);
}

/* Architecture Layers */
.layer-item {
  transition: var(--transition-base);
}

.layer-item:hover {
  transform: translateX(5px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Buttons */
.btn {
  border-radius: var(--border-radius);
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  transition: var(--transition-base);
  border: 2px solid transparent;
}

.btn:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #0056b3;
  border-color: #0056b3;
  transform: translateY(-1px);
}

/* Forms */
.form-control,
.form-select {
  border-radius: var(--border-radius);
  border: 2px solid #ced4da;
  padding: 0.75rem;
  transition: var(--transition-base);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
  outline: none;
}

.form-label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--dark-color);
}

.form-text {
  font-size: 0.875rem;
  color: var(--secondary-color);
}

.invalid-feedback {
  display: block;
  font-size: 0.875rem;
  color: var(--danger-color);
  margin-top: 0.25rem;
}

/* Demo Components */
.demo-controls {
  background-color: var(--light-color);
  padding: 1rem;
  border-radius: var(--border-radius);
  margin-top: 1rem;
}

.contrast-preview {
  background-color: #ffffff;
  color: var(--dark-color);
  transition: var(--transition-base);
}

.contrast-preview.high-contrast {
  background-color: var(--high-contrast-bg);
  color: var(--high-contrast-text);
}

.contrast-preview.high-contrast .btn {
  background-color: var(--high-contrast-primary);
  color: var(--high-contrast-bg);
  border-color: var(--high-contrast-primary);
}

.voice-status {
  border: 2px solid #dee2e6;
  transition: var(--transition-base);
}

.voice-status.listening {
  border-color: var(--success-color);
  background-color: rgba(25, 135, 84, 0.1);
}

.voice-indicator {
  font-size: 1.5rem;
}

.gesture-area {
  background-color: var(--light-color);
  cursor: pointer;
  transition: var(--transition-base);
  position: relative;
}

.gesture-area:hover,
.gesture-area:focus {
  background-color: #e9ecef;
  border-color: var(--primary-color);
}

.gesture-area:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 3rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 1.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: #dee2e6;
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-marker {
  position: absolute;
  left: -3rem;
  top: 0;
}

.timeline-status {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: bold;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.timeline-status.completed {
  background-color: var(--success-color);
  color: white;
}

.timeline-status.active {
  background-color: var(--primary-color);
  color: white;
}

.timeline-status.upcoming {
  background-color: var(--light-color);
  color: var(--secondary-color);
}

.timeline-content {
  background-color: #ffffff;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  border: 1px solid #dee2e6;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.timeline-header {
  display: flex;
  justify-content: between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Progress Circles */
.progress-circle {
  position: relative;
  display: inline-block;
}

.progress-circle svg {
  transform: rotate(-90deg);
}

/* Code Examples */
.code-preview,
.code-example pre {
  background-color: #1e1e1e;
  color: #d4d4d4;
  border-radius: var(--border-radius);
  overflow-x: auto;
}

.code-header {
  border-bottom: 1px solid #333;
}

.code-dots {
  display: flex;
  gap: 0.5rem;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

/* Newsletter */
.newsletter-form .input-group {
  max-width: 500px;
  margin: 0 auto;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-section {
    min-height: 40vh;
    text-align: center;
  }
  
  .timeline {
    padding-left: 2rem;
  }
  
  .timeline::before {
    left: 1rem;
  }
  
  .timeline-marker {
    left: -2rem;
  }
  
  .timeline-status {
    width: 2rem;
    height: 2rem;
    font-size: 1rem;
  }
  
  .timeline-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Print Styles */
@media print {
  .accessibility-toolbar,
  .skip-links,
  header,
  footer,
  .btn {
    display: none !important;
  }
  
  body {
    color: #000000;
    background: #ffffff;
  }
  
  .container {
    width: 100% !important;
    max-width: none !important;
  }
}

/* Focus Management */
[tabindex="-1"]:focus {
  outline: none !important;
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

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

/* Error States */
.error-message {
  color: var(--danger-color);
  background-color: rgba(220, 53, 69, 0.1);
  border: 1px solid rgba(220, 53, 69, 0.3);
  padding: 1rem;
  border-radius: var(--border-radius);
  margin: 1rem 0;
}

/* Success States */
.success-message {
  color: var(--success-color);
  background-color: rgba(25, 135, 84, 0.1);
  border: 1px solid rgba(25, 135, 84, 0.3);
  padding: 1rem;
  border-radius: var(--border-radius);
  margin: 1rem 0;
}

/* Utility Classes */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.text-balance {
  text-wrap: balance;
}

.focus-ring {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}
