/* Kontext LoRA - Purple Elegant Theme CSS */

/* CSS Variables - Purple Elegant Theme */
:root {
  --primary: #7c3aed;
  --primary-dark: #6d28d9;
  --primary-light: #8b5cf6;
  --secondary: #6b7280;
  --background: #fafafa;
  --surface: #ffffff;
  --text: #111827;
  --text-secondary: #6b7280;
  --border: #e5e7eb;
  --shadow: rgba(124, 58, 237, 0.1);
  --gradient: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
  
  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  
  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius: 0.5rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  
  /* Transitions */
  --transition-fast: 0.15s ease-in-out;
  --transition: 0.3s ease-in-out;
  --transition-slow: 0.5s ease-in-out;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--text);
  background-color: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-4);
  color: var(--text);
}

h1 {
  font-size: var(--font-size-4xl);
}

h2 {
  font-size: var(--font-size-3xl);
}

h3 {
  font-size: var(--font-size-2xl);
}

p {
  margin-bottom: var(--space-4);
  color: var(--text-secondary);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

img {
  max-width: 100%;
  height: auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  font-size: var(--font-size-base);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  min-width: 120px;
}

.btn--primary {
  background: var(--gradient);
  color: white;
  box-shadow: 0 4px 14px var(--shadow);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--shadow);
  color: white;
}

.btn--secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn--secondary:hover {
  background: var(--primary);
  color: white;
}

.btn--large {
  padding: var(--space-4) var(--space-8);
  font-size: var(--font-size-lg);
}

/* Header & Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: all var(--transition);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) 0;
}

.nav__logo h1 {
  font-size: var(--font-size-xl);
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0;
}

.nav__list {
  display: flex;
  list-style: none;
  gap: var(--space-6);
  margin: 0;
}

.nav__link {
  font-weight: 500;
  color: var(--text);
  transition: color var(--transition-fast);
}

.nav__link:hover {
  color: var(--primary);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.nav__toggle span {
  width: 25px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

/* Hero Section */
.hero {
  padding: calc(80px + var(--space-20)) 0 var(--space-20) 0;
  background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
  text-align: center;
}

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

.hero__title {
  font-size: var(--font-size-4xl);
  margin-bottom: var(--space-6);
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__description {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-8);
  color: var(--text-secondary);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.demo-container {
  margin: var(--space-12) 0;
  display: flex;
  justify-content: center;
  background: white;
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  box-shadow: 0 20px 50px rgba(124, 58, 237, 0.1);
}

.demo-iframe {
  border-radius: var(--radius-lg);
  max-width: 100%;
}

.hero__buttons {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* Section Styles */
section {
  padding: var(--space-20) 0;
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-16);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.section__title {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-4);
}

.section__subtitle {
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
}

/* Features Section */
.features {
  background: white;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-8);
}

.feature__card {
  padding: var(--space-8);
  border-radius: var(--radius-lg);
  background: white;
  border: 1px solid var(--border);
  text-align: center;
  transition: all var(--transition);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.feature__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 50px var(--shadow);
  border-color: var(--primary-light);
}

.feature__icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-6) auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
}

.feature__icon img {
  border-radius: var(--radius);
}

.feature__title {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-3);
  color: var(--text);
}

.feature__description {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Tutorials Section */
.tutorials {
  background: var(--background);
}

.tutorials__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--space-8);
}

.tutorial__card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: all var(--transition);
}

.tutorial__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 50px var(--shadow);
}

.tutorial__image {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.tutorial__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.tutorial__card:hover .tutorial__image img {
  transform: scale(1.05);
}

.tutorial__content {
  padding: var(--space-6);
}

.tutorial__title {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-3);
  color: var(--text);
}

.tutorial__description {
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
  line-height: 1.7;
}

.tutorial__link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  position: relative;
}

.tutorial__link:after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background: var(--primary);
  transition: width var(--transition);
}

.tutorial__link:hover:after {
  width: 100%;
}

/* Gallery Section */
.gallery {
  background: white;
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-6);
}

.gallery__item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all var(--transition);
}

.gallery__item:hover {
  transform: scale(1.02);
  box-shadow: 0 20px 50px rgba(124, 58, 237, 0.2);
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.gallery__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(124, 58, 237, 0.9));
  color: white;
  padding: var(--space-6);
  transform: translateY(100%);
  transition: transform var(--transition);
}

.gallery__item:hover .gallery__overlay {
  transform: translateY(0);
}

.gallery__overlay h4 {
  margin-bottom: var(--space-2);
  font-size: var(--font-size-lg);
}

.gallery__overlay p {
  margin: 0;
  font-size: var(--font-size-sm);
  opacity: 0.9;
}

/* Models Section */
.models {
  background: var(--background);
}

.models__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--space-8);
}

.model__card {
  background: white;
  padding: var(--space-8);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: all var(--transition);
  border: 1px solid var(--border);
}

.model__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 50px var(--shadow);
  border-color: var(--primary-light);
}

.model__title {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-3);
  color: var(--text);
}

.model__description {
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
  line-height: 1.7;
}

.model__stats {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.model__stat {
  background: var(--gradient);
  color: white;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius);
  font-size: var(--font-size-sm);
  font-weight: 500;
}

.model__link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.model__link:hover {
  color: var(--primary-dark);
}

/* CTA Section */
.cta {
  background: var(--gradient);
  color: white;
  text-align: center;
}

.cta__title {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-4);
  color: white;
}

.cta__description {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-8);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.9;
}

.cta__buttons {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

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

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

.cta .btn--secondary {
  border-color: white;
  color: white;
}

.cta .btn--secondary:hover {
  background: white;
  color: var(--primary);
}

/* Specs Section */
.specs {
  background: white;
}

.specs__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-8);
}

.spec__category {
  background: var(--background);
  padding: var(--space-8);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.spec__title {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-4);
  color: var(--text);
}

.spec__list {
  list-style: none;
}

.spec__list li {
  padding: var(--space-2) 0;
  color: var(--text-secondary);
  position: relative;
  padding-left: var(--space-6);
}

.spec__list li:before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

/* Footer */
.footer {
  background: var(--text);
  color: white;
  padding: var(--space-20) 0 var(--space-8) 0;
}

.footer__content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

.footer__title {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-4);
  color: white;
}

.footer__subtitle {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-4);
  color: white;
}

.footer__description {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.7;
  margin-bottom: var(--space-4);
}

.footer__links {
  list-style: none;
}

.footer__links li {
  margin-bottom: var(--space-2);
}

.footer__links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer__links a:hover {
  color: var(--primary-light);
}

.footer__social {
  display: flex;
  gap: var(--space-4);
}

.footer__social-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer__social-link:hover {
  color: var(--primary-light);
}

.footer__bottom {
  text-align: center;
  padding-top: var(--space-8);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__copyright {
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  :root {
    --font-size-4xl: 2rem;
    --font-size-3xl: 1.5rem;
  }
  
  .nav__menu {
    display: none;
  }
  
  .nav__toggle {
    display: flex;
  }
  
  .hero__title {
    font-size: var(--font-size-3xl);
  }
  
  .demo-container {
    padding: var(--space-2);
  }
  
  .demo-iframe {
    width: 100%;
    height: 300px;
  }
  
  .hero__buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 280px;
  }
  
  .features__grid,
  .tutorials__grid,
  .models__grid {
    grid-template-columns: 1fr;
  }
  
  .gallery__grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  
  .specs__grid {
    grid-template-columns: 1fr;
  }
  
  .footer__content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer__social {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-3);
  }
  
  section {
    padding: var(--space-12) 0;
  }
  
  .hero {
    padding: calc(80px + var(--space-12)) 0 var(--space-12) 0;
  }
  
  .demo-iframe {
    height: 250px;
  }
}

/* Animation and Loading States */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* 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;
}

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

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

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

.mb-0 {
  margin-bottom: 0 !important;
}

.mb-4 {
  margin-bottom: var(--space-4) !important;
}

.mt-8 {
  margin-top: var(--space-8) !important;
}