/* MyCanvasAI Landing Page Styles */

/* CSS Variables - Matching Extension Theme System */
:root {
  /* Colors - Dark Theme (Default in CSS, but JS sets light as default) */
  --background: #0a0f1e;
  --surface: #141b2e;
  --surface-hover: #1a2333;
  --border: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --blue-primary: #3b82f6;
  --blue-hover: #2563eb;
  --blue-light: #60a5fa;
  --accent: #8b5cf6;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;

  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  --spacing-3xl: 64px;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Light Theme */
:root[data-theme="light"] {
  --background: #f8fafc;
  --surface: #ffffff;
  --surface-hover: #f1f5f9;
  --border: #e2e8f0;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #64748b;
  --blue-primary: #3b82f6;
  --blue-hover: #2563eb;
  --blue-light: #60a5fa;

  /* Light theme shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: var(--spacing-sm) 0;
  z-index: 1000;
  transition: background-color var(--transition-base), border-color var(--transition-base);
  backdrop-filter: blur(10px);
  background-color: rgba(20, 27, 46, 0.8);
}

:root[data-theme="light"] .navbar {
  background-color: rgba(255, 255, 255, 0.8);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.logo-icon {
  color: var(--blue-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
}

.nav-links a:not(.btn-primary) {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  transition: color var(--transition-fast);
}

.nav-links a:not(.btn-primary):hover {
  color: var(--text-primary);
}

.nav-links .btn-primary {
  padding: var(--spacing-xs) var(--spacing-md);
  font-size: 0.875rem;
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--spacing-xs);
}

.theme-toggle-track {
  display: flex;
  align-items: center;
  width: 48px;
  height: 24px;
  background: var(--surface-hover);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 2px;
  transition: all var(--transition-base);
  position: relative;
}

.theme-toggle-thumb {
  width: 18px;
  height: 18px;
  background: var(--blue-primary);
  border-radius: 50%;
  transition: transform var(--transition-base);
  box-shadow: var(--shadow-sm);
}

:root[data-theme="light"] .theme-toggle-thumb {
  transform: translateX(24px);
}

/* Buttons */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--radius-md);
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition-base);
  cursor: pointer;
  border: none;
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--blue-primary);
  color: white !important;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: var(--blue-hover);
  color: white !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--blue-primary);
  transform: translateY(-2px);
}

.btn-large {
  padding: var(--spacing-md) var(--spacing-xl);
  font-size: 1rem;
}

/* Hero Section */
.hero {
  padding: calc(var(--spacing-3xl) + var(--spacing-xl)) 0 var(--spacing-3xl) 0;
  min-height: 120vh;
  display: flex;
  align-items: center;
  position: relative;
  margin-top: 0;
  overflow: hidden;
}

/* Background Paths Animation */
.background-paths-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

:root[data-theme="light"] .background-paths-container {
  opacity: 0.5;
}

.floating-paths {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.floating-paths svg {
  width: 100%;
  height: 100%;
}

.floating-paths path {
  stroke: var(--blue-primary);
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 2000;
  stroke-dashoffset: 0;
  animation: pathDraw 25s linear infinite;
  animation-play-state: running;
  /* Remove opacity from here to avoid conflicts - using stroke-opacity in JS instead */
}

.floating-paths path:nth-child(odd) {
  animation-duration: 25s;
  animation-direction: reverse;
}

.floating-paths path:nth-child(3n) {
  animation-duration: 30s;
}

.floating-paths path:nth-child(4n) {
  animation-duration: 22s;
}

.floating-paths path:nth-child(5n) {
  animation-duration: 28s;
}

.floating-paths path:nth-child(7n) {
  animation-duration: 35s;
}

@keyframes pathDraw {
  0% {
    stroke-dashoffset: 300;
  }
  50% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: -2000;
  }
}

.hero-scroll-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xl);
  perspective: 2000px;
  position: relative;
  width: 100%;
  text-align: center;
  z-index: 1;
}

.hero-text {
  max-width: 800px;
  z-index: 2;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  background: linear-gradient(135deg, var(--blue-primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-slogan {
  font-size: 2rem;
  font-weight: 300;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-lg);
}

.hero-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-xl);
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  justify-content: center;
}

/* Laptop Container with 3D Animation */
.laptop-container {
  display: flex;
  justify-content: center;
  align-items: center;
  transform-style: preserve-3d;
  transition: none;
  will-change: transform;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.laptop-frame {
  position: relative;
  width: 100%;
  transform-style: preserve-3d;
  filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.3));
}

.laptop-screen {
  position: relative;
  width: 100%;
  padding: 0.5rem;
  background: #000000;
  border-radius: 16px;
  border: 2px solid #1a1a1a;
  box-shadow:
    inset 0 0 0 1px #2a2a2a,
    0 30px 80px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  transform-origin: bottom center;
  transform-style: preserve-3d;
  transition: none;
  will-change: transform;
}

:root[data-theme="light"] .laptop-screen {
  background: #000000;
  border: 2px solid #1a1a1a;
  box-shadow:
    inset 0 0 0 1px #2a2a2a,
    0 30px 80px rgba(0, 0, 0, 0.5);
}

.screenshot-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  position: relative;
  z-index: 1;
}

/* Section Titles */
.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--spacing-3xl);
  color: var(--text-primary);
}

/* Problem Section */
.problem-section {
  padding: var(--spacing-3xl) 0;
  background: var(--surface);
}

.problem-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-xl);
}

.problem-card {
  background: var(--background);
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: all var(--transition-base);
}

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

.problem-icon {
  color: var(--blue-primary);
  margin-bottom: var(--spacing-md);
}

.problem-card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
}

.problem-card h3.single-line-title {
  margin-bottom: calc(var(--spacing-md) + 2.4rem);
}

.problem-card p {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Solution Section */
.solution-section {
  padding: var(--spacing-3xl) 0;
}

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

.solution-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-2xl);
  padding-bottom: var(--spacing-2xl);
  border-bottom: 1px solid var(--border);
}

.solution-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.solution-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--blue-primary);
  opacity: 0.2;
  line-height: 1;
}

.solution-details h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
}

.solution-details p {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Features Section */
.features-section {
  padding: var(--spacing-3xl) 0;
  background: var(--surface);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-xl);
  max-width: 1000px;
  margin: 0 auto;
}

.feature-card {
  background: var(--background);
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: all var(--transition-slow);
  cursor: pointer;
}

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

.feature-icon {
  width: 64px;
  height: 64px;
  background: var(--blue-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-md);
  color: white;
  transition: all var(--transition-base);
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(5deg);
  background: var(--blue-hover);
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.7;
}

.feature-card-wide {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--spacing-lg);
  padding: var(--spacing-lg) var(--spacing-xl);
}

.feature-card-wide .feature-icon {
  flex-shrink: 0;
  margin-bottom: 0;
}

.feature-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.feature-card-wide h3 {
  margin-bottom: 0;
}

.feature-card-wide p {
  margin-bottom: 0;
}

/* Magnifiable Effect */
.magnifiable {
  position: relative;
}

.magnifiable.magnified {
  transform: scale(1.05);
  z-index: 10;
}

/* Setup Section */
.setup-section {
  padding: var(--spacing-xl) 0 var(--spacing-3xl) 0;
  background: var(--surface);
}

.setup-content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-3xl);
  max-width: 1200px;
  margin: 0 auto;
}

.video-container {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.video-wrapper {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--background);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}

.video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-md);
  color: var(--text-tertiary);
}

.video-placeholder svg {
  opacity: 0.5;
}

.video-placeholder p {
  font-size: 1.125rem;
  font-weight: 500;
}

.video-container h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.video-container p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* About Section */
.about-section {
  padding: var(--spacing-3xl) 0 var(--spacing-2xl) 0;
}

.about-content {
  max-width: 800px;
  margin: 0 auto;
}

.about-text {
  background: var(--surface);
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.about-intro {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--spacing-lg);
  line-height: 1.7;
}

.about-story {
  color: var(--text-secondary);
  margin-bottom: var(--spacing-xl);
  line-height: 1.7;
}

.team-placeholder {
  padding-top: var(--spacing-xl);
  border-top: 1px solid var(--border);
}

.team-note {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-sm);
}

.team-name {
  color: var(--blue-primary);
  font-weight: 600;
}

.team-motivation {
  color: var(--text-tertiary);
  font-style: italic;
  margin-bottom: var(--spacing-lg);
}

.feedback-btn {
  margin-top: var(--spacing-md);
}

/* CTA Section */
.cta-section {
  padding: var(--spacing-3xl) 0;
  background: linear-gradient(135deg, var(--blue-primary), var(--accent));
  text-align: center;
}

.cta-content h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: var(--spacing-md);
}

.cta-content p {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--spacing-xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
}

.cta-section .btn-primary {
  background: white;
  color: #000000 !important;
}

.cta-section .btn-primary:hover {
  background: var(--surface-hover);
  color: white !important;
}

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

.cta-section .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: white;
}

.btn-cta-solo {
  min-width: 300px;
  justify-content: center;
}

/* Footer */
.footer {
  background: var(--surface);
  padding: var(--spacing-2xl) 0;
  border-top: 1px solid var(--border);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-lg);
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-weight: 600;
  color: var(--text-primary);
}

.footer-links {
  display: flex;
  gap: var(--spacing-xl);
  flex-wrap: wrap;
}

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

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

.footer-copyright {
  color: var(--text-tertiary);
  font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 968px) {
  .hero-scroll-container {
    gap: var(--spacing-2xl);
  }

  .hero {
    min-height: auto;
    padding: var(--spacing-2xl) 0;
  }

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

  .hero-slogan {
    font-size: 1.5rem;
  }

  .laptop-container {
    max-width: 100%;
  }

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

  .solution-item {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  .solution-number {
    font-size: 2rem;
  }
}

@media (max-width: 640px) {
  .nav-links {
    gap: var(--spacing-md);
  }

  .nav-links a:not(.btn-primary) {
    display: none;
  }

  .hero {
    padding: var(--spacing-2xl) 0;
    min-height: auto;
  }

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

  .hero-slogan {
    font-size: 1.25rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .hero-cta {
    flex-direction: column;
  }

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

  .section-title {
    font-size: 1.75rem;
  }

  .problem-content,
  .features-grid,
  .setup-content {
    grid-template-columns: 1fr;
  }

  .cta-content h2 {
    font-size: 1.75rem;
  }

  .cta-buttons {
    flex-direction: column;
    width: 100%;
  }

  .cta-buttons .btn-large {
    width: 100%;
  }
}

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

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Smooth scrolling offset for sticky navbar */
section {
  scroll-margin-top: 60px;
}
