/* ========================================
   CC PowerCore - Dark Industrial Theme
   ======================================== */

/* CSS Variables */
:root {
  /* Lighter Dark Theme - Still contrasts with app UI */
  --bg-primary: #1a1a1d;
  --bg-secondary: #25252a;
  --bg-elevated: #2f2f35;
  --bg-card: #28282e;

  /* Brand Colors */
  --brand-orange: #ff4400;
  --brand-orange-dark: #cc3700;
  --claude-orange: #d97757;
  --openrouter-blue: #6366f1;

  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: #b4b4b8;
  --text-muted: #85858a;

  /* Accent */
  --accent-glow: rgba(255, 68, 0, 0.15);

  /* Typography */
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px var(--accent-glow);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-display);
  font-weight: 400;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* Container */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  padding: 80px 0 40px;
  text-align: center;
  background:
    radial-gradient(ellipse at top, var(--accent-glow) 0%, transparent 60%),
    var(--bg-primary);
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

/* Title Wrapper with Language Toggle */
.title-wrapper {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Language Toggle Container */
.lang-switch-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-label {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
}

/* Flip Switch - 3D Skeuomorphic Style */
.flip-switch {
  position: relative;
  width: 60px;
  height: 32px;
  perspective: 1000px;
}

.flip-switch-input {
  display: none;
}

.flip-switch-label {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, #3a3a40, #25252a);
  border-radius: 20px;
  cursor: pointer;
  position: relative;
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.3),
    inset 0 -2px 4px rgba(255, 255, 255, 0.05),
    0 4px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.flip-switch-handle {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  background: linear-gradient(145deg, #505055, #3a3a40);
  border-radius: 50%;
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.3),
    0 1px 2px rgba(255, 255, 255, 0.1) inset,
    0 -1px 2px rgba(0, 0, 0, 0.2) inset;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transform-style: preserve-3d;
}

.flip-switch-handle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  background: linear-gradient(145deg, #606065, #4a4a50);
  border-radius: 50%;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.2) inset,
    0 1px 1px rgba(255, 255, 255, 0.05);
}

/* Checked State */
.flip-switch-input:checked+.flip-switch-label {
  background: linear-gradient(145deg, #ff5722, var(--brand-orange));
}

.flip-switch-input:checked+.flip-switch-label .flip-switch-handle {
  left: calc(100% - 29px);
  background: linear-gradient(145deg, #fff, #e0e0e0);
  box-shadow:
    0 4px 12px rgba(255, 68, 0, 0.4),
    0 1px 2px rgba(255, 255, 255, 0.3) inset,
    0 -1px 2px rgba(0, 0, 0, 0.1) inset;
}

.flip-switch-input:checked+.flip-switch-label .flip-switch-handle::before {
  background: linear-gradient(145deg, #f5f5f5, #d0d0d0);
}

/* Hover Effect */
.flip-switch-label:hover {
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.4),
    inset 0 -2px 4px rgba(255, 255, 255, 0.08),
    0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Title */
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 10vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.title-cc {
  color: var(--text-primary);
}

.title-powercore {
  color: var(--brand-orange);
}

/* Tagline */
.hero-tagline {
  font-size: clamp(1rem, 3vw, 1.25rem);
  font-weight: 400;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.text-openrouter {
  color: #6366f1;
  font-weight: 600;
}

.text-claude {
  color: #d97757;
  font-weight: 600;
}

.brand-badge.claude {
  color: var(--claude-orange);
}

.brand-badge.openrouter {
  color: var(--openrouter-blue);
}

.brand-icon {
  width: 16px;
  height: 16px;
}

.brand-icon-img {
  height: 20px;
  width: auto;
  object-fit: contain;
  border-radius: 4px;
}

.claude-icon {
  height: 22px;
}

.openrouter-logo {
  height: 18px;
  width: auto;
}

/* App Icon */
.hero-icon {
  width: 100px;
  height: 100px;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-md), var(--shadow-glow);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--brand-orange);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm), 0 0 20px rgba(255, 68, 0, 0.3);
}

.btn-primary:hover {
  background: var(--brand-orange-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), 0 0 30px rgba(255, 68, 0, 0.4);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-card);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ========================================
   Features Gallery Section
   ======================================== */
.features-gallery {
  padding: 60px 0 80px;
  background: var(--bg-secondary);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

.gallery-item {
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.gallery-item:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 68, 0, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.gallery-item-wide {
  grid-column: span 2;
}

.gallery-image {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.gallery-image:hover {
  opacity: 0.9;
}

.gallery-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 16px 20px 8px;
}

.gallery-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 20px 20px;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.lightbox-content {
  max-width: 95%;
  max-height: 95%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 50px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s ease;
}

.lightbox-close:hover {
  color: var(--brand-orange);
}

/* ========================================
   Footer
   ======================================== */
.footer {
  padding: 40px 0;
  background: var(--bg-secondary);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-license {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

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

.footer-credits a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-credits a:hover {
  color: var(--brand-orange);
}

.footer-github {
  color: var(--text-muted);
  transition: color 0.2s ease;
  margin-top: 8px;
}

.footer-github:hover {
  color: var(--text-primary);
}

.footer-github svg {
  display: block;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
  .hero {
    padding: 60px 0 30px;
  }

  .hero-content {
    gap: 20px;
  }

  .hero-tagline {
    font-size: 0.95rem;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 280px;
  }

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

  .hero-icon {
    width: 80px;
    height: 80px;
    border-radius: 18px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-item-wide {
    grid-column: span 1;
  }

  .lightbox-close {
    font-size: 40px;
    top: 10px;
    right: 15px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.25rem;
  }

  .hero-tagline {
    font-size: 0.875rem;
  }

  .title-wrapper {
    gap: 16px;
  }

  .lang-switch-container {
    gap: 8px;
  }
}