/*
Theme Name: AI 4K Image Upscaler Pro
Theme URI: https://example.com/ai-4k-upscaler-pro
Author: AI 4K Upscaler Team
Author URI: https://example.com
Description: A modern one-page SaaS theme for the AI 4K Image Upscaler Pro plugin. Features dark/light mode, gradient accents, smooth animations, and fully responsive design.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ai-4k-upscaler-pro
Tags: one-column, custom-colors, custom-logo, featured-images, full-width-template, theme-options
*/

/* ========================================
   CSS VARIABLES & DESIGN TOKENS
======================================== */
:root {
  --color-bg: #0a0a0f;
  --color-bg-card: #12121a;
  --color-bg-card-hover: #1a1a2e;
  --color-surface: #16161f;
  --color-border: #2a2a3e;
  --color-text: #e4e4ed;
  --color-text-muted: #8888a0;
  --color-text-heading: #ffffff;
  --color-primary: #6c63ff;
  --color-primary-light: #8b83ff;
  --color-primary-dark: #5348d4;
  --color-accent: #00d4aa;
  --color-accent-light: #33e0be;
  --color-gradient-start: #6c63ff;
  --color-gradient-end: #00d4aa;
  --color-danger: #ff4d6a;
  --color-warning: #ffb347;
  --color-success: #00d4aa;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(108, 99, 255, 0.3);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light mode overrides */
body.light-mode {
  --color-bg: #f5f5fa;
  --color-bg-card: #ffffff;
  --color-bg-card-hover: #f0f0f8;
  --color-surface: #fafafe;
  --color-border: #e0e0ee;
  --color-text: #333344;
  --color-text-muted: #777790;
  --color-text-heading: #111122;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 20px rgba(108, 99, 255, 0.15);
}

/* ========================================
   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-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-text-heading);
  font-weight: 700;
  line-height: 1.2;
}

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

a:hover {
  color: var(--color-accent);
}

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

/* ========================================
   LAYOUT
======================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
}

.section--alt {
  background-color: var(--color-surface);
}

/* ========================================
   HEADER / NAVIGATION
======================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition-normal);
}

body.light-mode .site-header {
  background: rgba(245, 245, 250, 0.85);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--color-text-heading);
}

.site-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--color-gradient-start), var(--color-gradient-end));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-nav a {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.site-nav a:hover {
  color: var(--color-text-heading);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all var(--transition-fast);
}

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

.mobile-menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  font-size: 24px;
}

/* ========================================
   BUTTONS
======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background: linear-gradient(135deg, var(--color-gradient-start), var(--color-gradient-end));
  color: #ffffff;
  box-shadow: var(--shadow-glow);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(108, 99, 255, 0.5);
  color: #ffffff;
}

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

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

.btn--sm {
  padding: 8px 20px;
  font-size: 0.85rem;
}

.btn--lg {
  padding: 16px 36px;
  font-size: 1.05rem;
}

/* ========================================
   HERO SECTION
======================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 50%, rgba(108, 99, 255, 0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 50%, rgba(0, 212, 170, 0.06) 0%, transparent 60%);
  animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(-2%, 2%) rotate(1deg); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(108, 99, 255, 0.12);
  border: 1px solid rgba(108, 99, 255, 0.25);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--color-primary-light);
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  margin-bottom: 24px;
  letter-spacing: -0.03em;
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--color-gradient-start), var(--color-gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.2rem;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--color-border);
}

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

.hero-stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--color-gradient-start), var(--color-gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-stat-label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* ========================================
   FEATURES SECTION
======================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 60px;
}

.feature-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 36px;
  transition: all var(--transition-normal);
}

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

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.15), rgba(0, 212, 170, 0.1));
  color: var(--color-primary-light);
}

.feature-card h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ========================================
   SECTION HEADERS
======================================== */
.section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto;
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-header p {
  color: var(--color-text-muted);
  font-size: 1.1rem;
}

/* ========================================
   HOW IT WORKS
======================================== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 32px;
  margin-top: 60px;
  counter-reset: step-counter;
}

.step-card {
  text-align: center;
  padding: 40px 24px;
  counter-increment: step-counter;
  position: relative;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-gradient-start), var(--color-gradient-end));
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 20px;
}

.step-card h3 {
  font-size: 1.15rem;
  margin-bottom: 12px;
}

.step-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* ========================================
   AI MODES SECTION
======================================== */
.modes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 60px;
}

.mode-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 28px 20px;
  text-align: center;
  transition: all var(--transition-normal);
}

.mode-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

.mode-card .mode-emoji {
  font-size: 2.5rem;
  margin-bottom: 16px;
  display: block;
}

.mode-card h4 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.mode-card p {
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

/* ========================================
   PRICING SECTION
======================================== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 60px;
}

.pricing-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: center;
  position: relative;
  transition: all var(--transition-normal);
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.pricing-card--featured {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow);
}

.pricing-card--featured::before {
  content: 'POPULAR';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 20px;
  background: linear-gradient(135deg, var(--color-gradient-start), var(--color-gradient-end));
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
}

.pricing-card h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.pricing-card .price {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  color: var(--color-text-heading);
  margin: 16px 0;
}

.pricing-card .price span {
  font-size: 1rem;
  color: var(--color-text-muted);
  font-weight: 400;
}

.pricing-card .credits-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(108, 99, 255, 0.12);
  border-radius: var(--radius-full);
  color: var(--color-primary-light);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.pricing-card ul {
  list-style: none;
  margin: 24px 0;
  text-align: left;
}

.pricing-card ul li {
  padding: 8px 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pricing-card ul li::before {
  content: '✓';
  color: var(--color-accent);
  font-weight: 700;
}

/* ========================================
   CTA SECTION
======================================== */
.cta-section {
  text-align: center;
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.06), rgba(0, 212, 170, 0.04));
  border-radius: var(--radius-xl);
}

.cta-section .container {
  position: relative;
  z-index: 1;
}

.cta-section h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 16px;
}

.cta-section p {
  color: var(--color-text-muted);
  font-size: 1.1rem;
  margin-bottom: 32px;
}

/* ========================================
   FOOTER
======================================== */
.site-footer {
  padding: 60px 0 32px;
  border-top: 1px solid var(--color-border);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand {
  max-width: 300px;
}

.footer-brand p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-top: 12px;
}

.footer-links {
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
}

.footer-col h4 {
  font-size: 0.95rem;
  margin-bottom: 16px;
  color: var(--color-text-heading);
}

.footer-col a {
  display: block;
  padding: 4px 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

/* ========================================
   UPSCALER PLUGIN AREA
======================================== */
.upscaler-section {
  padding: 80px 0;
}

.upscaler-wrapper {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 48px;
  box-shadow: var(--shadow-lg);
}

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

.animate-in {
  animation: fadeInUp 0.6s var(--transition-slow) forwards;
  opacity: 0;
}

.animate-in:nth-child(2) { animation-delay: 0.1s; }
.animate-in:nth-child(3) { animation-delay: 0.2s; }
.animate-in:nth-child(4) { animation-delay: 0.3s; }
.animate-in:nth-child(5) { animation-delay: 0.4s; }

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 768px) {
  .site-nav {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 24px;
  }

  .features-grid,
  .steps-grid,
  .modes-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
  }

  .footer-links {
    gap: 32px;
  }

  .section {
    padding: 60px 0;
  }

  .upscaler-wrapper {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn--lg {
    width: 100%;
  }
}
