/* Kontext LoRA - Main Stylesheet */
/* ================================= */

/* CSS Variables - Tech Style Color Scheme */
:root {
  --primary: #06b6d4;
  --secondary: #64748b;
  --background: #0f172a;
  --surface: #1e293b;
  --text: #f1f5f9;
  --accent: #00d4ff;
  --gradient: linear-gradient(135deg, #06b6d4 0%, #00d4ff 100%);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.3);
  --border-radius: 8px;
  --border-radius-lg: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--background);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.8rem; }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.2rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
  color: var(--secondary);
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.accent { 
  color: var(--accent); 
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: none;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

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

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--secondary);
}

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

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

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

.btn-large {
  padding: 16px 32px;
  font-size: 1.1rem;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid rgba(100, 116, 139, 0.2);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 20px;
}

.nav-brand {
  display: flex;
  align-items: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.5rem;
}

.logo-icon {
  font-size: 2rem;
  margin-right: 0.5rem;
}

.logo-text {
  color: var(--text);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient);
  transition: var(--transition);
}

.nav-link:hover::after {
  width: 100%;
}

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

.nav-toggle span {
  width: 25px;
  height: 3px;
  background: var(--text);
  transition: var(--transition);
}

/* Hero Section */
.hero {
  padding: 8rem 0 4rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-title {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 1.3rem;
  color: var(--secondary);
  margin-bottom: 2rem;
  line-height: 1.5;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-demo {
  background: var(--surface);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(100, 116, 139, 0.2);
}

.demo-title {
  color: var(--primary);
  margin-bottom: 1.5rem;
  text-align: center;
}

.iframe-container {
  position: relative;
  width: 100%;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

.demo-iframe {
  width: 100%;
  height: 450px;
  border: none;
  display: block;
}

.demo-description {
  text-align: center;
  color: var(--secondary);
  font-size: 0.9rem;
}

/* Section Styles */
section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* Features Section */
.features {
  background: var(--surface);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--background);
  padding: 2.5rem;
  border-radius: var(--border-radius-lg);
  text-align: center;
  transition: var(--transition);
  border: 1px solid rgba(100, 116, 139, 0.2);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  display: block;
}

.feature-title {
  color: var(--text);
  margin-bottom: 1rem;
}

.feature-description {
  color: var(--secondary);
}

/* Technology Section */
.technology {
  background: var(--background);
}

.tech-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.tech-title {
  color: var(--text);
  margin-bottom: 1.5rem;
}

.tech-description {
  font-size: 1.1rem;
  color: var(--secondary);
  margin-bottom: 2rem;
}

.tech-features {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.tech-feature h4 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.tech-feature p {
  color: var(--secondary);
  margin: 0;
}

.tech-visual {
  position: relative;
}

.tech-diagram {
  position: relative;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.tech-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
}

/* Applications Section */
.applications {
  background: var(--surface);
}

.applications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.application-card {
  background: var(--background);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid rgba(100, 116, 139, 0.2);
}

.application-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.app-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.app-content {
  padding: 2rem;
}

.app-title {
  color: var(--text);
  margin-bottom: 1rem;
}

.app-description {
  color: var(--secondary);
  margin-bottom: 1.5rem;
}

.app-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.app-link:hover {
  color: var(--accent);
}

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

.tutorials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.tutorial-card {
  background: var(--surface);
  padding: 2.5rem;
  border-radius: var(--border-radius-lg);
  position: relative;
  border: 1px solid rgba(100, 116, 139, 0.2);
  transition: var(--transition);
}

.tutorial-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.tutorial-badge {
  position: absolute;
  top: -10px;
  left: 2rem;
  background: var(--gradient);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  font-size: 0.8rem;
  font-weight: 600;
}

.tutorial-title {
  color: var(--text);
  margin-bottom: 1rem;
  margin-top: 1rem;
}

.tutorial-description {
  color: var(--secondary);
  margin-bottom: 1.5rem;
}

.tutorial-topics {
  list-style: none;
  margin-bottom: 2rem;
}

.tutorial-topics li {
  color: var(--secondary);
  padding: 0.3rem 0;
  position: relative;
  padding-left: 1.5rem;
}

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

/* Tools Section */
.tools {
  background: var(--surface);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.tool-card {
  background: var(--background);
  padding: 2.5rem;
  border-radius: var(--border-radius-lg);
  text-align: center;
  transition: var(--transition);
  border: 1px solid rgba(100, 116, 139, 0.2);
}

.tool-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.tool-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  display: block;
}

.tool-title {
  color: var(--text);
  margin-bottom: 1rem;
}

.tool-description {
  color: var(--secondary);
  margin-bottom: 1.5rem;
}

.tool-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.tool-link:hover {
  color: var(--accent);
}

/* Community Section */
.community {
  background: var(--background);
}

.community-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.community-title {
  color: var(--text);
  margin-bottom: 1.5rem;
}

.community-description {
  font-size: 1.1rem;
  color: var(--secondary);
  margin-bottom: 2rem;
}

.community-stats {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
}

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

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--secondary);
  font-size: 0.9rem;
}

.community-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.community-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
}

/* FAQ Section */
.faq {
  background: var(--surface);
}

.faq-grid {
  display: grid;
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--background);
  padding: 2rem;
  border-radius: var(--border-radius-lg);
  border: 1px solid rgba(100, 116, 139, 0.2);
}

.faq-question {
  color: var(--text);
  margin-bottom: 1rem;
}

.faq-answer {
  color: var(--secondary);
  margin: 0;
}

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

.cta-title {
  color: var(--text);
  margin-bottom: 1.5rem;
}

.cta-description {
  font-size: 1.2rem;
  color: var(--secondary);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Footer */
.footer {
  background: var(--surface);
  border-top: 1px solid rgba(100, 116, 139, 0.2);
  padding: 3rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  font-weight: 700;
  font-size: 1.5rem;
}

.footer-description {
  color: var(--secondary);
  margin-bottom: 1.5rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--background);
  color: var(--text);
  text-decoration: none;
  border-radius: var(--border-radius);
  transition: var(--transition);
  font-weight: 600;
}

.social-link:hover {
  background: var(--primary);
  color: white;
}

.footer-title {
  color: var(--text);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--secondary);
  text-decoration: none;
  transition: var(--transition);
}

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

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(100, 116, 139, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.copyright, .powered-by {
  color: var(--secondary);
  font-size: 0.9rem;
  margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }

  .nav-menu {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .tech-content,
  .community-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .community-stats {
    justify-content: center;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .footer-bottom {
    text-align: center;
    flex-direction: column;
  }

  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
  .hero {
    padding: 6rem 0 2rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .hero-buttons,
  .cta-buttons,
  .community-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .community-stats {
    flex-direction: column;
    gap: 1rem;
  }

  section {
    padding: 3rem 0;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Scroll animations */
.scroll-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.scroll-animate.animate {
  opacity: 1;
  transform: translateY(0);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--surface);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Loading animation for iframe */
.iframe-container::before {
  content: '⚡ Loading AI Demo...';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--primary);
  font-weight: 600;
  z-index: 1;
}

.demo-iframe:not([src]) + .iframe-container::before {
  display: block;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }