/* ===================================
   HEIC2JPG Landing Page Styles
   Modern, responsive design
   =================================== */

/* CSS Variables */
:root {
  /* Primary Colors */
  --clr-primary: #6366f1;
  --clr-primary-light: #818cf8;
  --clr-primary-dark: #4f46e5;
  --clr-accent: #f59e0b;
  --clr-accent-light: #fbbf24;
  
  /* Backgrounds */
  --clr-bg-base: #fafafa;
  --clr-bg-surface: #ffffff;
  --clr-bg-elevated: #f5f5f5;
  --clr-bg-subtle: #f0f0f5;
  
  /* Text */
  --clr-text-primary: #18181b;
  --clr-text-secondary: #52525b;
  --clr-text-muted: #a1a1aa;
  --clr-text-inverted: #ffffff;
  
  /* Borders */
  --clr-border: #e4e4e7;
  --clr-border-hover: #a1a1aa;
  --clr-border-focus: var(--clr-primary);
  
  /* States */
  --clr-success: #10b981;
  --clr-error: #ef4444;
  --clr-warning: #f59e0b;
  
  /* 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;
  
  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
  
  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 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: 2rem;
  --font-size-4xl: 2.5rem;
  --font-size-5xl: 3.5rem;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
}

/* Dark Theme */
@media (prefers-color-scheme: dark) {
  :root {
    --clr-bg-base: #09090b;
    --clr-bg-surface: #18181b;
    --clr-bg-elevated: #27272a;
    --clr-bg-subtle: #1f1f23;
    
    --clr-text-primary: #fafafa;
    --clr-text-secondary: #a1a1aa;
    --clr-text-muted: #71717a;
    
    --clr-border: #3f3f46;
    --clr-border-hover: #52525b;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 60px rgba(99, 102, 241, 0.2);
  }
}

/* Theme toggle class support */
html.dark {
  --clr-bg-base: #09090b;
  --clr-bg-surface: #18181b;
  --clr-bg-elevated: #27272a;
  --clr-bg-subtle: #1f1f23;
  
  --clr-text-primary: #fafafa;
  --clr-text-secondary: #a1a1aa;
  --clr-text-muted: #71717a;
  
  --clr-border: #3f3f46;
  --clr-border-hover: #52525b;
  
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 60px rgba(99, 102, 241, 0.2);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--clr-text-primary);
  background-color: var(--clr-bg-base);
  min-height: 100vh;
}

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

/* ===================================
   Header
   =================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--clr-border);
  backdrop-filter: blur(12px);
  background: rgba(250, 250, 250, 0.85);
}

html.dark .site-header {
  background: rgba(9, 9, 11, 0.95);
  border-bottom-color: rgba(63, 63, 70, 0.8);
}

@media (prefers-color-scheme: dark) {
  html:not(.light) .site-header {
    background: rgba(9, 9, 11, 0.95);
    border-bottom-color: rgba(63, 63, 70, 0.8);
  }
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: var(--clr-text-primary);
}

.logo-icon {
  width: 36px;
  height: 36px;
}

.logo-text {
  font-size: var(--font-size-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-accent {
  color: var(--clr-primary);
}

.nav-links {
  display: none;
  gap: var(--space-xl);
}

.nav-links a {
  color: var(--clr-text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: var(--font-size-sm);
  transition: color var(--transition-fast);
}

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

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--clr-bg-elevated);
  color: var(--clr-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  background: var(--clr-border);
  color: var(--clr-text-primary);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.theme-toggle .icon-moon {
  display: none;
}

html.dark .theme-toggle .icon-sun {
  display: none;
}

html.dark .theme-toggle .icon-moon {
  display: block;
}

@media (prefers-color-scheme: dark) {
  html:not(.light) .theme-toggle .icon-sun {
    display: none;
  }
  
  html:not(.light) .theme-toggle .icon-moon {
    display: block;
  }
}

/* ===================================
   Hero Section
   =================================== */
.hero-section {
  position: relative;
  padding: var(--space-3xl) 0;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.hero-gradient {
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 120%;
  height: 100%;
  background: radial-gradient(ellipse at center, 
    rgba(99, 102, 241, 0.12) 0%,
    rgba(139, 92, 246, 0.08) 30%,
    transparent 70%);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 1px 1px, var(--clr-border) 1px, transparent 0);
  background-size: 40px 40px;
  opacity: 0.5;
}

.hero-content {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  background: var(--clr-bg-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  color: var(--clr-text-secondary);
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.badge-icon {
  font-size: var(--font-size-base);
}

.hero-title {
  font-size: var(--font-size-3xl);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-md);
}

@media (min-width: 768px) {
  .hero-title {
    font-size: var(--font-size-5xl);
  }
}

.gradient-text {
  background: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: var(--font-size-lg);
  color: var(--clr-text-secondary);
  max-width: 540px;
  margin: 0 auto;
}

/* ===================================
   Upload Card
   =================================== */
.upload-card {
  max-width: 640px;
  margin: 0 auto;
  background: var(--clr-bg-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border: 1px solid var(--clr-border);
}

@media (min-width: 768px) {
  .upload-card {
    padding: var(--space-xl);
  }
}

.upload-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: var(--space-xl);
  border: 2px dashed var(--clr-border);
  border-radius: var(--radius-lg);
  background: var(--clr-bg-subtle);
  cursor: pointer;
  transition: all var(--transition-base);
}

@media (min-width: 768px) {
  .upload-zone {
    min-height: 260px;
    padding: var(--space-2xl);
  }
}

.upload-zone:hover,
.upload-zone.is-dragover {
  border-color: var(--clr-primary);
  background: rgba(99, 102, 241, 0.05);
}

.upload-zone.is-dragover {
  border-style: solid;
  transform: scale(1.01);
}

.upload-zone.has-files {
  border-color: var(--clr-success);
  background: rgba(16, 185, 129, 0.05);
}

.upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  pointer-events: none;
}

.upload-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: var(--space-md);
  background: var(--clr-bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.upload-icon {
  width: 32px;
  height: 32px;
  color: var(--clr-primary);
}

.upload-text {
  margin-bottom: var(--space-sm);
}

.upload-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--clr-text-primary);
  margin-bottom: var(--space-xs);
}

.upload-hint {
  font-size: var(--font-size-sm);
  color: var(--clr-text-secondary);
}

.upload-link {
  color: var(--clr-primary);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.upload-formats {
  font-size: var(--font-size-xs);
  color: var(--clr-text-muted);
}

/* File list preview */
.file-list {
  margin-top: var(--space-sm);
  padding: var(--space-sm);
  background: var(--clr-bg-elevated);
  border-radius: var(--radius-sm);
  border: 1px solid var(--clr-border);
  max-height: 140px;
  overflow-y: auto;
  overflow-x: hidden;
}

.file-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 4px 0;
  font-size: var(--font-size-xs);
  color: var(--clr-text-secondary);
  border-bottom: 1px solid var(--clr-border);
}

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

.file-item:first-child {
  padding-top: 0;
}

.file-item-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--clr-primary);
}

.file-item-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-item-size {
  flex-shrink: 0;
  color: var(--clr-text-muted);
  font-size: 10px;
}

/* ===================================
   Settings Panel
   =================================== */
.settings-panel {
  display: grid;
  gap: var(--space-md);
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--clr-border);
}

@media (min-width: 480px) {
  .settings-panel {
    grid-template-columns: 1fr 2fr;
    align-items: start;
  }
}

.setting-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.setting-label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--clr-text-secondary);
}

.setting-label svg {
  width: 16px;
  height: 16px;
  color: var(--clr-text-muted);
}

.setting-select {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  font-size: var(--font-size-base);
  font-family: inherit;
  color: var(--clr-text-primary);
  background: var(--clr-bg-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 40px;
}

.setting-select:hover {
  border-color: var(--clr-border-hover);
}

.setting-select:focus {
  outline: none;
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.setting-slider {
  width: 100%;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--clr-bg-elevated);
  appearance: none;
  cursor: pointer;
}

.setting-slider::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--clr-primary);
  cursor: pointer;
  transition: transform var(--transition-fast);
  box-shadow: var(--shadow-md);
}

.setting-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.setting-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
  background: var(--clr-primary);
  cursor: pointer;
  transition: transform var(--transition-fast);
  box-shadow: var(--shadow-md);
}

.quality-group {
  opacity: 1;
  transition: opacity var(--transition-base);
}

.quality-group.is-hidden {
  opacity: 0.4;
  pointer-events: none;
}

/* ===================================
   Convert Button
   =================================== */
.convert-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
  padding: var(--space-md) var(--space-xl);
  margin-top: var(--space-lg);
  font-size: var(--font-size-base);
  font-weight: 600;
  font-family: inherit;
  color: var(--clr-text-inverted);
  background: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-primary-dark) 100%);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-md), 0 4px 20px rgba(99, 102, 241, 0.3);
}

.convert-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), 0 8px 30px rgba(99, 102, 241, 0.4);
}

.convert-btn:active:not(:disabled) {
  transform: translateY(0);
}

.convert-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.convert-btn svg {
  width: 20px;
  height: 20px;
}

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

.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}

@media (min-width: 768px) {
  .section-title {
    font-size: var(--font-size-3xl);
  }
}

.section-subtitle {
  font-size: var(--font-size-lg);
  color: var(--clr-text-secondary);
}

.features-grid {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  padding: var(--space-xl);
  background: var(--clr-bg-base);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
}

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

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-md);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-radius: var(--radius-md);
  color: var(--accent);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.feature-card h3 {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.feature-card p {
  font-size: var(--font-size-sm);
  color: var(--clr-text-secondary);
  line-height: 1.6;
}

/* ===================================
   How It Works Section
   =================================== */
.how-section {
  padding: var(--space-3xl) 0;
}

.steps-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  align-items: center;
}

@media (min-width: 768px) {
  .steps-grid {
    flex-direction: row;
    justify-content: center;
    gap: var(--space-md);
  }
}

.step-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-xl);
  background: var(--clr-bg-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  max-width: 280px;
  width: 100%;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-md);
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--clr-text-inverted);
  background: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-primary-dark) 100%);
  border-radius: var(--radius-full);
}

.step-content h3 {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.step-content p {
  font-size: var(--font-size-sm);
  color: var(--clr-text-secondary);
}

.step-arrow {
  display: none;
  color: var(--clr-text-muted);
}

.step-arrow svg {
  width: 24px;
  height: 24px;
}

@media (min-width: 768px) {
  .step-arrow {
    display: flex;
  }
}

/* ===================================
   FAQ Section
   =================================== */
.faq-section {
  padding: var(--space-3xl) 0;
  background: var(--clr-bg-surface);
}

.faq-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  background: var(--clr-bg-base);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-lg);
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--clr-text-primary);
  cursor: pointer;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-icon {
  width: 20px;
  height: 20px;
  color: var(--clr-text-muted);
  transition: transform var(--transition-base);
}

.faq-item[open] .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 var(--space-lg) var(--space-lg);
}

.faq-answer p {
  font-size: var(--font-size-sm);
  color: var(--clr-text-secondary);
  line-height: 1.7;
}

/* ===================================
   Footer
   =================================== */
.site-footer {
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--clr-border);
}

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

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-brand .logo {
  margin-bottom: var(--space-sm);
}

.footer-desc {
  font-size: var(--font-size-sm);
  color: var(--clr-text-secondary);
}

.footer-links {
  display: flex;
  gap: var(--space-lg);
}

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

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

.footer-copy {
  font-size: var(--font-size-xs);
  color: var(--clr-text-muted);
}

/* ===================================
   Animations
   =================================== */
@keyframes pulse-subtle {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.animate-pulse-subtle {
  animation: pulse-subtle 2s ease-in-out infinite;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

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

