/* ===================================
   Color Palette Generator - InstaBooster 2026
   Diseño Premium, Moderno y Funcional
   =================================== */

:root {
  --primary-color: #e61c72;
  --primary-dark: #c41861;
  --primary-light: #ff4d94;
  --accent-color: #ff4d94;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --info-color: #3b82f6;
  --text-dark: #1a202c;
  --text-gray: #4a5568;
  --text-light: #718096;
  --bg-white: #ffffff;
  --bg-light: #f8f9fa;
  --bg-light-pink: #fef7f0;
  --border-color: #e2e8f0;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 30px rgba(230, 28, 114, 0.1);
  --transition: all 0.3s ease;
  --border-radius-sm: 10px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
}

* {
  box-sizing: border-box;
}

.palette-page {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-dark);
  background: var(--bg-light);
  line-height: 1.6;
}

.palette-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===================================
   Hero Section (2026 — minimalist, on-brand)
   =================================== */
.palette-hero {
  position: relative;
  padding: 120px 0 90px;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, 0.18) 0%, transparent 55%),
    linear-gradient(135deg, #e61c72 0%, #ff4d94 100%);
  color: white;
  overflow: hidden;
  isolation: isolate;
}

.palette-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 40%, transparent 100%);
  pointer-events: none;
  z-index: -1;
}

.hero-content {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.hero-title {
  font-size: clamp(2.1rem, 5.2vw, 3.6rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin: 0 0 18px 0;
  color: #fff;
}

.hero-title em {
  font-style: italic;
  font-weight: 800;
  position: relative;
  background: linear-gradient(120deg, #fff 0%, #ffe4f0 45%, #fff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding: 0 2px;
}

.hero-title em::after {
  content: '';
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: 0.08em;
  height: 0.12em;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 2px;
  transform: skewX(-6deg);
}

.hero-subtitle {
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
  max-width: 620px;
  margin: 0 auto 44px;
  font-weight: 400;
}

.hero-subtitle strong {
  color: #fff;
  font-weight: 600;
}

/* Swatches row — the signature visual */
.hero-swatches {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  max-width: 880px;
  margin: 0 auto;
}

.hero-swatch {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 12px 14px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  box-shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.35), 0 4px 10px -4px rgba(139, 38, 53, 0.2);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  text-align: left;
}

.hero-swatch:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -14px rgba(15, 23, 42, 0.45), 0 6px 14px -4px rgba(139, 38, 53, 0.28);
}

.hero-swatch i {
  width: 100%;
  height: 52px;
  border-radius: 8px;
  display: block;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.swatch-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.swatch-hex {
  font-size: 10.5px;
  font-weight: 600;
  color: #64748b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.02em;
}

@media (max-width: 768px) {
  .palette-hero {
    padding: 96px 0 64px;
  }
  .hero-swatches {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 520px;
  }
  .hero-swatch {
    padding: 10px;
  }
  .hero-swatch i {
    height: 40px;
  }
}

@media (max-width: 420px) {
  .hero-swatches {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===================================
   Generator Section
   =================================== */
.generator-section {
  padding: 72px 0;
  position: relative;
  background: #FFF;
}

.generator-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 32px;
  align-items: start;
}

/* ===================================
   Generator Card
   =================================== */
.generator-card {
  background: var(--bg-white);
  border-radius: var(--border-radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

.generator-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--bg-light);
}

.header-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light), #9c27b0);
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.header-text h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: var(--text-dark);
}

.header-text p {
  font-size: 14px;
  color: var(--text-gray);
  margin: 0;
}

/* ===================================
   Style Selector
   =================================== */
.style-selector {
  margin-bottom: 32px;
}

.selector-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.selector-label svg {
  color: var(--primary-color);
}

.style-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.style-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  background: var(--bg-light);
  border: 2px solid transparent;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: var(--transition);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-gray);
}

.style-tab:hover {
  background: var(--bg-light-pink);
  border-color: var(--primary-light);
}

.style-tab.active {
  background: linear-gradient(135deg, rgba(230, 28, 114, 0.1), rgba(156, 39, 176, 0.1));
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.style-preview {
  width: 100%;
  height: 24px;
  border-radius: 6px;
  display: flex;
}

.soft-minimal-preview {
  background: linear-gradient(90deg, #F5F0EB 0%, #E8DCD0 33%, #D4C5B5 66%, #C4B7A6 100%);
}

.earth-tones-preview {
  background: linear-gradient(90deg, #A67C52 0%, #8B6914 33%, #5D4E37 66%, #3D2914 100%);
}

.vibrant-pop-preview {
  background: linear-gradient(90deg, #FF6B6B 0%, #4ECDC4 33%, #FFE66D 66%, #95E1D3 100%);
}

.dark-moody-preview {
  background: linear-gradient(90deg, #1A1A2E 0%, #16213E 33%, #0F3460 66%, #533483 100%);
}

.pastel-dream-preview {
  background: linear-gradient(90deg, #FFD1DC 0%, #BFEFFF 33%, #E0BBE4 66%, #FFEFD5 100%);
}

.luxury-gold-preview {
  background: linear-gradient(90deg, #1C1C1C 0%, #B8860B 33%, #D4AF37 66%, #F5F5DC 100%);
}

/* ===================================
   Color Mode Selector
   =================================== */
.color-mode-selector {
  margin-bottom: 32px;
}

.mode-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.mode-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  background: var(--bg-light);
  border: 2px solid transparent;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-gray);
}

.mode-tab:hover {
  background: var(--bg-light-pink);
  border-color: var(--primary-light);
}

.mode-tab.active {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border-color: var(--primary-color);
  color: white;
}

.mode-tab svg {
  width: 20px;
  height: 20px;
}

/* ===================================
   Color Picker
   =================================== */
.color-picker-section {
  margin-bottom: 32px;
}

.color-picker-wrapper {
  display: flex;
  gap: 12px;
  align-items: center;
}

.color-input {
  width: 60px;
  height: 48px;
  padding: 4px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.color-input:hover,
.color-input:focus {
  border-color: var(--primary-color);
}

.hex-input {
  flex: 1;
  padding: 14px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: 16px;
  font-family: 'Monaco', 'Consolas', monospace;
  text-transform: uppercase;
  transition: var(--transition);
}

.hex-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(230, 28, 114, 0.1);
}

.random-color-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: var(--bg-light);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-gray);
  white-space: nowrap;
}

.random-color-btn:hover {
  background: var(--bg-light-pink);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.input-hint {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 8px;
}

/* ===================================
   Generate Button
   =================================== */
.generate-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 18px 32px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light), #9c27b0);
  color: white;
  border: none;
  border-radius: var(--border-radius-sm);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(230, 28, 114, 0.3);
}

.generate-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(230, 28, 114, 0.4);
}

.generate-button:active {
  transform: translateY(0);
}

/* ===================================
   Palette Result
   =================================== */
.palette-result {
  margin-top: 40px;
  padding: 32px;
  background: linear-gradient(135deg, rgba(230, 28, 114, 0.03), rgba(156, 39, 176, 0.03));
  border-radius: var(--border-radius-md);
  border: 2px solid var(--primary-light);
  animation: slideIn 0.5s ease;
  display: none;
}

.palette-result.visible {
  display: block;
}

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

.palette-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.palette-header h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: var(--text-dark);
}

.palette-actions {
  display: flex;
  gap: 12px;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-gray);
}

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

/* ===================================
   Color Swatches
   =================================== */
.color-swatches {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.color-swatch {
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeInUp 0.3s ease forwards;
  opacity: 0;
}

.color-swatch:nth-child(1) { animation-delay: 0.1s; }
.color-swatch:nth-child(2) { animation-delay: 0.2s; }
.color-swatch:nth-child(3) { animation-delay: 0.3s; }
.color-swatch:nth-child(4) { animation-delay: 0.4s; }
.color-swatch:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.swatch-color {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.swatch-color:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.swatch-color::after {
  content: 'Copiar';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  transition: var(--transition);
}

.swatch-color:hover::after {
  opacity: 1;
}

.swatch-info {
  text-align: center;
}

.swatch-hex {
  display: block;
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.swatch-name {
  font-size: 11px;
  color: var(--text-light);
}

/* ===================================
   Feed Preview
   =================================== */
.feed-preview-section {
  margin-bottom: 32px;
}

.feed-preview-section h4 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 16px 0;
  color: var(--text-dark);
}

.feed-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  background: white;
  padding: 8px;
  box-shadow: var(--shadow);
}

.feed-item {
  aspect-ratio: 1;
  border-radius: 4px;
  transition: var(--transition);
}

.feed-item:hover {
  transform: scale(1.02);
}

/* ===================================
   Export Section
   =================================== */
.export-section h4 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 16px 0;
  color: var(--text-dark);
}

.export-buttons {
  display: flex;
  gap: 12px;
}

.export-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  background: white;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-gray);
}

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

/* ===================================
   Info Sidebar
   =================================== */
.info-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.info-card {
  background: var(--bg-white);
  border-radius: var(--border-radius-md);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

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

.info-icon {
  width: 48px;
  height: 48px;
  background: var(--bg-light-pink);
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  margin-bottom: 16px;
}

.info-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 12px 0;
  color: var(--text-dark);
}

.info-card p {
  font-size: 14px;
  color: var(--text-gray);
  margin: 0;
  line-height: 1.6;
}

/* Trends Card */
.trends-card {
  background: linear-gradient(135deg, #FFF8F0, #FFF);
  border: 2px solid #F5DEB3;
}

.trends-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.trend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: white;
  border-radius: var(--border-radius-sm);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.trend-color {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  flex-shrink: 0;
}

.trend-info strong {
  display: block;
  font-size: 14px;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.trend-info span {
  font-size: 12px;
  color: var(--text-light);
}

/* Tips List */
.tips-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0 0;
}

.tips-list li {
  padding: 10px 0;
  padding-left: 24px;
  position: relative;
  font-size: 14px;
  color: var(--text-gray);
  border-bottom: 1px solid var(--bg-light);
}

.tips-list li:last-child {
  border-bottom: none;
}

.tips-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 8px;
  height: 8px;
  background: var(--primary-color);
  border-radius: 50%;
}

/* CTA Card */
.cta-card {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: white;
}

.cta-card .cta-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-bottom: 16px;
}

.cta-card h3 {
  color: white;
}

.cta-card p {
  color: rgba(255, 255, 255, 0.9);
}

.cta-button-sidebar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: white;
  color: var(--primary-color);
  border-radius: var(--border-radius-sm);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  transition: var(--transition);
  margin-top: 16px;
}

.cta-button-sidebar:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  color: var(--primary-color);
}

/* ===================================
   Premade Palettes Section
   =================================== */
.premade-section {
  padding: 80px 0;
  background: white;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 12px 0;
  color: var(--text-dark);
}

.section-header p {
  font-size: 16px;
  color: var(--text-gray);
  margin: 0;
}

.premade-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.premade-card {
  background: var(--bg-light);
  border-radius: var(--border-radius-md);
  padding: 20px;
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}

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

.premade-colors {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  height: 60px;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
}

.premade-colors span {
  flex: 1;
  transition: var(--transition);
}

.premade-card:hover .premade-colors span {
  transform: scaleY(1.1);
}

.premade-info h4 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 4px 0;
  color: var(--text-dark);
}

.premade-info p {
  font-size: 13px;
  color: var(--text-light);
  margin: 0 0 16px 0;
}

.use-palette-btn {
  width: 100%;
  padding: 12px;
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-gray);
}

.use-palette-btn:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

/* ===================================
   Theory Section
   =================================== */
.theory-section {
  padding: 80px 0;
  background: var(--bg-light);
}

.theory-card {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: 48px;
  box-shadow: var(--shadow);
}

.theory-header {
  text-align: center;
  margin-bottom: 48px;
}

.theory-header h2 {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 12px 0;
  color: var(--text-dark);
}

.theory-header p {
  font-size: 16px;
  color: var(--text-gray);
  margin: 0;
}

.theory-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

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

.theory-color {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.theory-item h4 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 12px 0;
  color: var(--text-dark);
}

.theory-item p {
  font-size: 14px;
  color: var(--text-gray);
  margin: 0;
  line-height: 1.6;
}

/* ===================================
   Final CTA Section
   =================================== */
/* ===================================
   Final CTA (2026 — asymmetric, on-brand)
   =================================== */
.final-cta {
  position: relative;
  padding: 100px 0;
  background:
    radial-gradient(90% 80% at 100% 50%, rgba(255, 255, 255, 0.12) 0%, transparent 60%),
    linear-gradient(135deg, #e61c72 0%, #ff4d94 100%);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}

.final-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 80% at 30% 50%, #000 30%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 30% 50%, #000 30%, transparent 90%);
  pointer-events: none;
  z-index: -1;
}

.cta-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
  max-width: 1080px;
  margin: 0 auto;
}

.cta-copy {
  position: relative;
}

.cta-eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.cta-copy h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.8rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 18px 0;
  color: #fff;
}

.cta-copy > p {
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.92);
  margin: 0 0 32px 0;
  max-width: 460px;
}

.cta-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.cta-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 28px;
  background: #fff;
  color: var(--primary-color);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.005em;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cta-btn-primary svg {
  transition: transform 0.25s ease;
}

.cta-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
  text-decoration: none;
  color: var(--primary-color);
}

.cta-btn-primary:hover svg {
  transform: translateX(3px);
}

.cta-btn-ghost {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  padding: 15px 4px;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.45);
  transition: border-color 0.25s ease, opacity 0.25s ease;
  line-height: 1;
}

.cta-btn-ghost:hover {
  color: #fff;
  text-decoration: none;
  border-bottom-color: #fff;
  opacity: 1;
}

/* Visual side — mock "palette card" */
.cta-visual {
  position: relative;
}

.cta-card {
  position: relative;
  background: #fff;
  border-radius: 18px;
  box-shadow:
    0 30px 60px -20px rgba(15, 23, 42, 0.35),
    0 18px 36px -18px rgba(139, 38, 53, 0.25);
  overflow: hidden;
  transform: perspective(1200px) rotateY(-4deg) rotateX(1.5deg);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cta-card:hover {
  transform: perspective(1200px) rotateY(-2deg) rotateX(0.5deg) translateY(-4px);
}

.cta-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid #eef1f5;
  background: #f9fafb;
}

.cta-card-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e5e7eb;
}

.cta-card-dot:first-child { background: #ff6b6b; }
.cta-card-dot:nth-child(2) { background: #ffd93d; }
.cta-card-dot:nth-child(3) { background: #6bcf7f; }

.cta-card-body {
  padding: 22px 22px 20px;
}

.cta-card-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 12px;
}

.cta-card-strip {
  display: flex;
  gap: 4px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}

.cta-card-strip span {
  flex: 1;
  height: 44px;
}

.cta-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 4px;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 14px;
}

.cta-card-grid div {
  width: 100%;
  height: 100%;
}

.cta-card-meta {
  display: flex;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid #eef1f5;
}

.cta-card-metric {
  display: flex;
  flex-direction: column;
  font-size: 10.5px;
  font-weight: 600;
  color: #9ca3af;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.2;
}

.cta-card-metric strong {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary-color);
  letter-spacing: -0.02em;
  text-transform: none;
  margin-bottom: 2px;
}

@media (max-width: 900px) {
  .cta-grid {
    grid-template-columns: 1fr;
    gap: 48px;
    max-width: 520px;
  }
  .cta-card {
    transform: none;
    max-width: 380px;
    margin: 0 auto;
  }
  .cta-card:hover {
    transform: translateY(-4px);
  }
  .final-cta {
    padding: 72px 0;
  }
  .cta-copy > p {
    max-width: none;
  }
}

/* ===================================
   Toast Notification
   =================================== */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text-dark);
  color: white;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 1200px) {
  .premade-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 991px) {
  .generator-grid {
    grid-template-columns: 1fr;
  }

  .info-sidebar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .theory-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 36px;
  }

  .hero-subtitle {
    font-size: 18px;
  }

  .palette-hero {
    padding: 80px 0 60px;
  }

  .generator-section,
  .premade-section,
  .theory-section {
    padding: 60px 0;
  }

  .generator-card {
    padding: 28px;
  }

  .theory-card {
    padding: 32px 24px;
  }

  .info-sidebar {
    grid-template-columns: 1fr;
  }

  .style-tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  .mode-tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  .color-swatches {
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
  }

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

  .theory-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .section-header h2,
  .theory-header h2 {
    font-size: 28px;
  }

  .color-picker-wrapper {
    flex-wrap: wrap;
  }

  .hex-input {
    order: 2;
    flex: 100%;
  }

  .random-color-btn {
    flex: 1;
  }

  .palette-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .export-buttons {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .style-tabs {
    grid-template-columns: 1fr;
  }

  .mode-tabs {
    grid-template-columns: 1fr;
  }

  .generator-card,
  .info-card {
    padding: 20px;
  }

  .color-swatches {
    grid-template-columns: repeat(3, 1fr);
  }

  .feed-grid {
    gap: 2px;
  }

  .cta-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .cta-btn-primary {
    justify-content: center;
  }

  .cta-btn-ghost {
    text-align: center;
  }

  .palette-actions {
    flex-direction: column;
    width: 100%;
  }

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

/* ===================================
   HowTo Section (2026)
   =================================== */
.howto-section {
  padding: 80px 0;
  background: linear-gradient(180deg, #FFF 0%, #FAF7F4 100%);
}

.howto-steps {
  list-style: none;
  padding: 0;
  margin: 40px 0 0 0;
  display: grid;
  gap: 20px;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.howto-steps li {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px;
  background: #FFF;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid rgba(230, 28, 114, 0.08);
}

.howto-steps li:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(230, 28, 114, 0.2);
}

.howto-num {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: #FFF;
  font-weight: 800;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(230, 28, 114, 0.3);
}

.howto-steps h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px 0;
  color: var(--text-dark);
}

.howto-steps p {
  font-size: 15px;
  color: var(--text-gray);
  margin: 0;
  line-height: 1.6;
}

.howto-steps a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dashed currentColor;
}

.howto-steps a:hover {
  color: var(--primary-dark);
}

/* ===================================
   FAQ Section (2026)
   =================================== */
.faq-section {
  padding: 80px 0;
  background: #FFF;
}

.faq-list {
  max-width: 820px;
  margin: 40px auto 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: #FAF7F4;
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transition: var(--transition);
}

.faq-item[open] {
  background: #FFF;
  box-shadow: var(--shadow);
  border-color: rgba(230, 28, 114, 0.15);
}

.faq-item summary {
  cursor: pointer;
  padding: 20px 24px;
  font-weight: 600;
  color: var(--text-dark);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  user-select: none;
}

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

.faq-item summary h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  color: inherit;
  flex: 1;
}

.faq-item summary::after {
  content: '+';
  font-size: 24px;
  font-weight: 300;
  color: var(--primary-color);
  transition: transform 0.3s ease;
  line-height: 1;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item > p {
  padding: 0 24px 22px;
  margin: 0;
  color: var(--text-gray);
  font-size: 15px;
  line-height: 1.7;
}

.faq-item a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dashed currentColor;
}

.faq-item a:hover {
  color: var(--primary-dark);
}

.faq-item strong {
  color: var(--text-dark);
  font-weight: 700;
}

@media (max-width: 768px) {
  .howto-section,
  .faq-section {
    padding: 48px 0;
  }
  .howto-steps li {
    padding: 18px;
    gap: 14px;
  }
  .howto-num {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
  .faq-item summary {
    padding: 16px 18px;
  }
  .faq-item summary h3 {
    font-size: 15px;
  }
  .faq-item > p {
    padding: 0 18px 18px;
    font-size: 14px;
  }
}

/* Performance optimizations */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
