/* Upsiden Main CSS - Enhanced and Optimized */
/* Updated: January 2024 */

/* CSS Custom Properties (Variables) */
:root {
  /* Colors */
  --clr-primary: #D4AF37;
  --clr-primary-dark: #B8941F;
  --clr-primary-light: #E6C55A;
  --clr-secondary: #1a1a1a;
  --clr-text: #333333;
  --clr-text-light: #666666;
  --clr-text-muted: #999999;
  --clr-bg: #ffffff;
  --clr-bg-secondary: #f8f9fa;
  --clr-surface: #ffffff;
  --clr-border: #e0e0e0;
  --clr-error: #d9534f;
  --clr-success: #5cb85c;
  --clr-warning: #f0ad4e;
  --clr-info: #5bc0de;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-primary-dark) 100%);
  --gradient-hero: linear-gradient(135deg, var(--clr-bg) 0%, var(--clr-bg-secondary) 100%);
  
  /* Typography */
  --ff-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --ff-heading: 'Cormorant Garamond', Georgia, serif;
  --ff-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
  
  /* Font Sizes */
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.25rem;
  --fs-2xl: 1.5rem;
  --fs-3xl: 1.875rem;
  --fs-4xl: 2.25rem;
  --fs-5xl: 3rem;
  --fs-6xl: 3.75rem;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
  
  /* Z-index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --clr-text: #ffffff;
    --clr-text-light: #cccccc;
    --clr-text-muted: #999999;
    --clr-bg: #1a1a1a;
    --clr-bg-secondary: #2d2d2d;
    --clr-surface: #2d2d2d;
    --clr-border: #404040;
  }
}

/* Reset and Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body {
  font-family: var(--ff-primary);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--clr-text);
  background-color: var(--clr-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-heading);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--space-md);
  color: var(--clr-text);
}

h1 { font-size: var(--fs-5xl); }
h2 { font-size: var(--fs-4xl); }
h3 { font-size: var(--fs-3xl); }
h4 { font-size: var(--fs-2xl); }
h5 { font-size: var(--fs-xl); }
h6 { font-size: var(--fs-lg); }

p {
  margin-bottom: var(--space-md);
  color: var(--clr-text-light);
}

a {
  color: var(--clr-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover,
a:focus {
  color: var(--clr-primary-dark);
  text-decoration: underline;
}

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: var(--space-3xl) 0;
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-xl);
  font-size: var(--fs-4xl);
  font-weight: 700;
}

.section-subtitle {
  text-align: center;
  margin-bottom: var(--space-2xl);
  font-size: var(--fs-lg);
  color: var(--clr-text-light);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Flexbox Utilities */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--clr-border);
  z-index: var(--z-fixed);
  transition: all var(--transition-base);
}

.navbar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  max-width: 1200px;
  margin: 0 auto;
}

.navbar-brand {
  display: flex;
  align-items: center;
  font-family: var(--ff-heading);
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--clr-text);
  text-decoration: none;
}

.logo-img {
  height: 40px;
  width: auto;
  margin-right: var(--space-sm);
}

.navbar-nav {
  display: flex;
  list-style: none;
  gap: var(--space-lg);
}

.nav-link {
  color: var(--clr-text);
  font-weight: 500;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.nav-link:hover,
.nav-link:focus,
.nav-link.active {
  color: var(--clr-primary);
  background-color: rgba(212, 175, 55, 0.1);
  text-decoration: none;
}

.cart-link {
  position: relative;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--clr-primary);
  color: var(--clr-secondary);
  font-size: var(--fs-xs);
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  min-width: 18px;
  text-align: center;
}

/* Hero Section */
.hero {
  padding: 120px 0 80px;
  background: var(--gradient-hero);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.hero-headline {
  font-size: var(--fs-6xl);
  font-weight: 700;
  margin-bottom: var(--space-lg);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: var(--fs-xl);
  color: var(--clr-text-light);
  margin-bottom: var(--space-2xl);
  line-height: 1.5;
}

.hero-cta-group {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-2xl);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-2xl);
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: var(--fs-3xl);
  font-weight: 700;
  color: var(--clr-primary);
  display: block;
}

.stat-label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--clr-text-muted);
  letter-spacing: 0.1em;
}

/* Buttons */
.cta-button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  background: var(--gradient-primary);
  color: var(--clr-secondary);
  font-weight: 600;
  font-size: var(--fs-base);
  border: none;
  border-radius: var(--radius-lg);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-md);
}

.cta-button:hover,
.cta-button:focus {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--clr-secondary);
  text-decoration: none;
}

.cta-button-secondary {
  background: transparent;
  color: var(--clr-text);
  border: 2px solid var(--clr-border);
}

.cta-button-secondary:hover,
.cta-button-secondary:focus {
  background: var(--clr-primary);
  color: var(--clr-secondary);
  border-color: var(--clr-primary);
}

/* Cards */
.card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-header {
  margin-bottom: var(--space-lg);
}

.card-title {
  font-size: var(--fs-xl);
  margin-bottom: var(--space-sm);
}

.card-subtitle {
  color: var(--clr-text-light);
  font-size: var(--fs-sm);
}

/* Forms */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  margin-bottom: var(--space-sm);
  font-weight: 500;
  color: var(--clr-text);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--space-md);
  background: var(--clr-bg);
  border: 2px solid var(--clr-border);
  border-radius: var(--radius-md);
  color: var(--clr-text);
  font-size: var(--fs-base);
  font-family: inherit;
  transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* Footer */
.footer {
  background: var(--clr-secondary);
  color: #ffffff;
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer-section h4 {
  color: var(--clr-primary);
  margin-bottom: var(--space-lg);
  font-size: var(--fs-lg);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-sm);
}

.footer-links a {
  color: #cccccc;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--clr-primary);
}

.footer-bottom {
  border-top: 1px solid #404040;
  padding-top: var(--space-xl);
}

.footer-bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-lg);
}

.social-links {
  display: flex;
  gap: var(--space-md);
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(212, 175, 55, 0.1);
  color: var(--clr-primary);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.social-links a:hover {
  background: var(--clr-primary);
  color: var(--clr-secondary);
  transform: translateY(-2px);
}

/* Utilities */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sr-only-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  padding: var(--space-sm) var(--space-md);
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  background: var(--clr-primary);
  color: var(--clr-secondary);
  text-decoration: none;
  border-radius: var(--radius-md);
}

.bg-secondary {
  background-color: var(--clr-bg-secondary);
}

.text-center {
  text-align: center;
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 1024px) {
  :root {
    --fs-6xl: 2.5rem;
    --fs-5xl: 2rem;
    --fs-4xl: 1.75rem;
  }
  
  .container {
    padding: 0 var(--space-md);
  }
  
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hero-cta-group {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-stats {
    gap: var(--space-lg);
  }
}

@media (max-width: 768px) {
  :root {
    --fs-6xl: 2rem;
    --fs-5xl: 1.75rem;
    --fs-4xl: 1.5rem;
    --space-3xl: 2rem;
  }
  
  .navbar-nav {
    display: none;
  }
  
  .hero {
    padding: 100px 0 60px;
  }
  
  .hero-headline {
    font-size: var(--fs-4xl);
  }
  
  .hero-subtitle {
    font-size: var(--fs-lg);
  }
  
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: var(--space-md);
  }
  
  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-sm);
  }
  
  .hero-cta-group {
    gap: var(--space-md);
  }
  
  .cta-button {
    width: 100%;
    justify-content: center;
  }
  
  .card {
    padding: var(--space-lg);
  }
}

/* Print Styles */
@media print {
  .navbar,
  .footer,
  .cta-button {
    display: none;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  h1, h2, h3 {
    page-break-after: avoid;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --clr-border: #000000;
    --shadow-sm: none;
    --shadow-md: none;
    --shadow-lg: none;
  }
  
  .card {
    border-width: 2px;
  }
}

/* Product Showcase Styles */
.creations-track {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
}

.product-card {
  background: var(--clr-surface);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  position: relative;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.product-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base);
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-badge {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  background: var(--gradient-primary);
  color: var(--clr-secondary);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.product-info {
  padding: var(--space-xl);
}

.product-title {
  font-size: var(--fs-2xl);
  margin-bottom: var(--space-md);
  color: var(--clr-text);
}

.product-specs {
  display: flex;
  gap: var(--space-sm);
  margin: var(--space-lg) 0;
  flex-wrap: wrap;
}

.spec {
  background: rgba(212, 175, 55, 0.1);
  color: var(--clr-primary);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 600;
}

.product-price {
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--clr-primary);
  margin: var(--space-lg) 0;
}

.product-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--clr-primary);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.product-cta:hover {
  color: var(--clr-primary-dark);
  transform: translateX(4px);
}

/* Features Section */
.features-section {
  background: var(--clr-bg-secondary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
}

.feature-card {
  background: var(--clr-surface);
  padding: var(--space-2xl);
  border-radius: var(--radius-xl);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 80px;
  height: 80px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-lg);
  font-size: var(--fs-2xl);
  color: var(--clr-secondary);
}

.feature-card h3 {
  font-size: var(--fs-xl);
  margin-bottom: var(--space-md);
  color: var(--clr-text);
}

.feature-card p {
  color: var(--clr-text-light);
  line-height: 1.6;
}

/* Testimonials Section */
.testimonials-section {
  background: var(--clr-bg);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
}

.testimonial-card {
  background: var(--clr-surface);
  padding: var(--space-2xl);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  position: relative;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: var(--space-lg);
  left: var(--space-xl);
  font-size: 4rem;
  color: var(--clr-primary);
  font-family: var(--ff-heading);
  line-height: 1;
  opacity: 0.3;
}

.testimonial-content {
  margin-bottom: var(--space-xl);
}

.testimonial-content p {
  font-size: var(--fs-lg);
  font-style: italic;
  color: var(--clr-text);
  margin-bottom: 0;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.author-info h4 {
  font-size: var(--fs-base);
  margin-bottom: var(--space-xs);
  color: var(--clr-text);
}

.author-info span {
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
}

/* Hero Background */
.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.hero-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.1;
}

/* Hero Scroll Indicator */
.hero-scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  color: var(--clr-text-muted);
  text-decoration: none;
  font-size: var(--fs-sm);
  margin-top: var(--space-2xl);
  transition: all var(--transition-fast);
}

.hero-scroll-indicator:hover {
  color: var(--clr-primary);
  transform: translateY(4px);
}

.hero-scroll-indicator i {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* Footer Enhancements */
.footer-brand {
  max-width: 300px;
}

.footer-logo {
  height: 40px;
  width: auto;
  margin-bottom: var(--space-md);
}

.footer-certifications {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  flex-wrap: wrap;
}

.cert {
  background: rgba(212, 175, 55, 0.1);
  color: var(--clr-primary);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 600;
}

/* Locale Selectors */
.locale-selectors {
  display: flex;
  gap: var(--space-sm);
}

.locale-selector {
  padding: var(--space-sm) var(--space-md);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  color: var(--clr-text);
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.locale-selector:focus {
  outline: none;
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.1);
}

/* Hover Effects */
.hover-grow {
  transition: transform var(--transition-base);
}

.hover-grow:hover {
  transform: scale(1.02);
}

/* Mobile Navigation (placeholder for future implementation) */
@media (max-width: 768px) {
  .navbar-nav {
    display: none;
  }
  
  .locale-selectors {
    flex-direction: column;
  }
  
  .hero-cta-group {
    flex-direction: column;
    align-items: center;
  }
  
  .cta-button {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }
  
  .creations-track {
    grid-template-columns: 1fr;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .reveal {
    opacity: 1;
    transform: none;
  }
  
  .hero-scroll-indicator i {
    animation: none;
  }
}
