/**
 * Sparky Pricing Table — Frontend Styles
 * Tasarım: sparkylaunch.com CSS sistemine uygun
 * Fontlar: Manrope (başlık) + DM Sans (gövde)
 * Renkler: #3C3B6E (indigo) · #1A1A1A (koyu) · #FAFAFA (açık)
 */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,700;1,9..40,400&display=swap');

/* ── Design Tokens ─────────────────────────────────────────────────── */
.spt-wrapper {
  --spt-primary:         #1A1A1A;
  --spt-secondary:       #3C3B6E;
  --spt-secondary-hover: #2D2C5A;
  --spt-text:            #1E1F21;
  --spt-muted:           #6B7280;
  --spt-bg:              #FFFFFF;
  --spt-surface:         #FAFAFA;
  --spt-border:          #E5E7EB;
  --spt-success:         #10B981;
  --spt-danger:          #EF4444;
  --spt-badge-bg:        #FFBC7D;
  --spt-badge-text:      #1A1A1A;
  --spt-radius-card:     16px;
  --spt-radius-btn:      7px;
  --spt-font-heading:    'Manrope', sans-serif;
  --spt-font-body:       'DM Sans', sans-serif;
  --spt-ease:            0.25s ease;
  --spt-shadow:          0 2px 16px rgba(0,0,0,0.06);
  --spt-shadow-hover:    0 12px 40px rgba(0,0,0,0.13);
  --spt-shadow-featured: 0 8px 48px rgba(60,59,110,0.28);
}

/* Dark theme overrides */
.spt-wrapper.spt-dark {
  --spt-primary:   #FFFFFF;
  --spt-text:      #E4E4E7;
  --spt-muted:     #A1A1AA;
  --spt-bg:        #0F0F14;
  --spt-surface:   #1A1A22;
  --spt-border:    #2E2E3A;
  --spt-shadow:    0 2px 16px rgba(0,0,0,0.35);
  --spt-shadow-hover: 0 12px 40px rgba(0,0,0,0.55);
}

/* ── Reset ─────────────────────────────────────────────────────────── */
.spt-wrapper *,
.spt-wrapper *::before,
.spt-wrapper *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.spt-wrapper {
  font-family: var(--spt-font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.9em;
  color: var(--spt-text);
  background-color: var(--spt-bg);
  padding: 72px 24px;
  width: 100%;
}

/* ── Section Header ────────────────────────────────────────────────── */
.spt-section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px;
}

.spt-section-badge {
  display: inline-block;
  font-family: var(--spt-font-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--spt-secondary);
  background: rgba(60,59,110,0.08);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 18px;
}

.spt-dark .spt-section-badge {
  background: rgba(60,59,110,0.3);
  color: #9B9EE0;
}

.spt-section-title {
  font-family: var(--spt-font-heading);
  font-size: 42px;
  font-weight: 800;
  line-height: 1.15em;
  letter-spacing: -1.2px;
  color: var(--spt-primary);
  margin-bottom: 16px;
}

.spt-section-desc {
  font-family: var(--spt-font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.9em;
  color: var(--spt-muted);
}

/* ── Billing Toggle ────────────────────────────────────────────────── */
.spt-toggle-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.spt-toggle-label {
  font-family: var(--spt-font-heading);
  font-size: 15px;
  font-weight: 600;
  color: var(--spt-muted);
  cursor: pointer;
  transition: color var(--spt-ease);
  user-select: none;
}

.spt-toggle-label.spt-active {
  color: var(--spt-primary);
}

.spt-toggle-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}

.spt-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.spt-toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--spt-border);
  border-radius: 100px;
  cursor: pointer;
  transition: background var(--spt-ease);
}

.spt-toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background: #FFFFFF;
  border-radius: 50%;
  left: 4px;
  top: 4px;
  transition: transform var(--spt-ease);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.spt-toggle-switch input:checked + .spt-toggle-slider {
  background: var(--spt-secondary);
}

.spt-toggle-switch input:checked + .spt-toggle-slider::before {
  transform: translateX(24px);
}

.spt-discount-chip {
  display: inline-block;
  font-family: var(--spt-font-heading);
  font-size: 12px;
  font-weight: 700;
  color: var(--spt-success);
  background: rgba(16,185,129,0.10);
  padding: 3px 10px;
  border-radius: 100px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ── Grid ──────────────────────────────────────────────────────────── */
.spt-grid {
  display: grid;
  gap: 24px;
  max-width: 1170px;
  margin: 0 auto;
  align-items: start;
}

.spt-grid.spt-cols-2 { grid-template-columns: repeat(2, 1fr); }
.spt-grid.spt-cols-3 { grid-template-columns: repeat(3, 1fr); }
.spt-grid.spt-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Card ──────────────────────────────────────────────────────────── */
.spt-card {
  position: relative;
  background: var(--spt-surface);
  border: 1.5px solid var(--spt-border);
  border-radius: var(--spt-radius-card);
  padding: 40px 32px;
  box-shadow: var(--spt-shadow);
  transition: box-shadow var(--spt-ease), transform var(--spt-ease);
}

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

/* Featured */
.spt-card.spt-featured {
  background: var(--spt-secondary);
  border-color: var(--spt-secondary);
  box-shadow: var(--spt-shadow-featured);
  transform: translateY(-10px);
}

.spt-card.spt-featured:hover {
  transform: translateY(-14px);
  box-shadow: 0 20px 60px rgba(60,59,110,0.38);
}

/* ── Card Badge ────────────────────────────────────────────────────── */
.spt-card-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: var(--spt-font-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  background: var(--spt-badge-bg);
  color: var(--spt-badge-text);
  padding: 6px 18px;
  border-radius: 100px;
  box-shadow: 0 2px 10px rgba(255,188,125,0.45);
}

/* ── Plan Header ───────────────────────────────────────────────────── */
.spt-plan-header {
  margin-bottom: 28px;
}

.spt-plan-name {
  font-family: var(--spt-font-heading);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3em;
  letter-spacing: -0.4px;
  color: var(--spt-primary);
  margin-bottom: 6px;
}

.spt-featured .spt-plan-name {
  color: #FFFFFF;
}

.spt-plan-tagline {
  font-size: 14px;
  line-height: 1.6em;
  color: var(--spt-muted);
}

.spt-featured .spt-plan-tagline {
  color: rgba(255,255,255,0.65);
}

/* ── Price Block ───────────────────────────────────────────────────── */
.spt-price-block {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1.5px solid var(--spt-border);
}

.spt-featured .spt-price-block {
  border-color: rgba(255,255,255,0.18);
}

.spt-original-price {
  font-size: 16px;
  font-weight: 500;
  color: var(--spt-muted);
  text-decoration: line-through;
  margin-bottom: 4px;
}

.spt-featured .spt-original-price {
  color: rgba(255,255,255,0.45);
}

.spt-price-row {
  display: flex;
  align-items: flex-end;
  gap: 4px;
}

.spt-currency {
  font-family: var(--spt-font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--spt-primary);
  line-height: 1;
  padding-bottom: 10px;
}

.spt-featured .spt-currency {
  color: #FFFFFF;
}

.spt-amount {
  font-family: var(--spt-font-heading);
  font-size: 54px;
  font-weight: 800;
  line-height: 1em;
  letter-spacing: -2px;
  color: var(--spt-primary);
}

.spt-featured .spt-amount {
  color: #FFFFFF;
}

.spt-period {
  font-size: 15px;
  font-weight: 400;
  color: var(--spt-muted);
  padding-bottom: 10px;
}

.spt-featured .spt-period {
  color: rgba(255,255,255,0.55);
}

.spt-plan-desc {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.7em;
  color: var(--spt-muted);
}

.spt-featured .spt-plan-desc {
  color: rgba(255,255,255,0.62);
}

/* ── Features ──────────────────────────────────────────────────────── */
.spt-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.spt-feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  line-height: 1.6em;
  color: var(--spt-text);
}

.spt-featured .spt-feature {
  color: rgba(255,255,255,0.88);
}

.spt-feature.spt-excluded {
  opacity: 0.42;
}

.spt-feature-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.spt-feature-icon.spt-check {
  background: rgba(16,185,129,0.12);
  color: var(--spt-success);
}

.spt-feature-icon.spt-cross {
  background: rgba(239,68,68,0.10);
  color: var(--spt-danger);
}

.spt-featured .spt-feature-icon.spt-check {
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.9);
}

.spt-featured .spt-feature-icon.spt-cross {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.4);
}

.spt-feature-icon svg {
  width: 11px;
  height: 11px;
  stroke-width: 2.5;
}

.spt-feature-text {
  flex: 1;
}

/* Tooltip */
.spt-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--spt-border);
  color: var(--spt-muted);
  font-size: 10px;
  font-weight: 700;
  font-family: var(--spt-font-heading);
  cursor: help;
  margin-left: 5px;
  vertical-align: middle;
  flex-shrink: 0;
  line-height: 1;
}

.spt-tip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1A1A1A;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  padding: 8px 12px;
  border-radius: 8px;
  white-space: normal;
  max-width: 200px;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
  z-index: 100;
  width: max-content;
}

.spt-tip:hover::after {
  opacity: 1;
}

/* ── Button ────────────────────────────────────────────────────────── */
.spt-btn {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  font-family: var(--spt-font-heading);
  font-size: 16px;
  font-weight: 700;
  line-height: 1em;
  padding: 20px 37px;
  border-radius: var(--spt-radius-btn);
  border: 2px solid transparent;
  cursor: pointer;
  transition:
    background     var(--spt-ease),
    color          var(--spt-ease),
    border-color   var(--spt-ease),
    transform      var(--spt-ease),
    box-shadow     var(--spt-ease);
}

.spt-btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

/* Primary */
.spt-btn-primary {
  background: var(--spt-secondary);
  color: #FFFFFF;
  border-color: var(--spt-secondary);
}

.spt-btn-primary:hover {
  background: var(--spt-secondary-hover);
  border-color: var(--spt-secondary-hover);
  box-shadow: 0 8px 24px rgba(60,59,110,0.30);
  color: #FFFFFF;
}

/* Featured card — inverted primary */
.spt-featured .spt-btn-primary {
  background: #FFFFFF;
  color: var(--spt-secondary);
  border-color: #FFFFFF;
}

.spt-featured .spt-btn-primary:hover {
  background: rgba(255,255,255,0.92);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  color: var(--spt-secondary);
}

/* Outline */
.spt-btn-outline {
  background: transparent;
  color: var(--spt-secondary);
  border-color: var(--spt-secondary);
}

.spt-btn-outline:hover {
  background: var(--spt-secondary);
  color: #FFFFFF;
}

.spt-featured .spt-btn-outline {
  color: #FFFFFF;
  border-color: rgba(255,255,255,0.55);
}

.spt-featured .spt-btn-outline:hover {
  background: rgba(255,255,255,0.15);
  border-color: #FFFFFF;
  color: #FFFFFF;
}

/* Secondary (pastel) */
.spt-btn-secondary {
  background: rgba(60,59,110,0.07);
  color: var(--spt-secondary);
  border-color: transparent;
}

.spt-btn-secondary:hover {
  background: rgba(60,59,110,0.13);
}

.spt-featured .spt-btn-secondary {
  background: rgba(255,255,255,0.12);
  color: #FFFFFF;
}

.spt-featured .spt-btn-secondary:hover {
  background: rgba(255,255,255,0.2);
}

/* ── Toggle visibility ─────────────────────────────────────────────── */
.spt-price-yearly {
  display: none;
}

.spt-yearly-active .spt-price-monthly {
  display: none;
}

.spt-yearly-active .spt-price-yearly {
  display: flex;
}

/* ── Scroll Animation ──────────────────────────────────────────────── */
.spt-animate .spt-card {
  opacity: 0;
  transform: translateY(28px);
  /* Hover transitions still apply on top via specificity */
}

.spt-animate .spt-card.spt-featured {
  transform: translateY(18px);
}

.spt-animate .spt-card.spt-in {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity   0.6s ease,
    transform 0.6s ease,
    box-shadow var(--spt-ease);
}

.spt-animate .spt-card.spt-featured.spt-in {
  transform: translateY(-10px);
}

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .spt-grid.spt-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .spt-section-title {
    font-size: 34px;
    letter-spacing: -0.8px;
  }
}

@media (max-width: 767px) {
  .spt-wrapper {
    padding: 48px 16px;
  }

  .spt-section-title {
    font-size: 28px;
    letter-spacing: -0.5px;
  }

  .spt-grid.spt-cols-2,
  .spt-grid.spt-cols-3,
  .spt-grid.spt-cols-4 {
    grid-template-columns: 1fr;
  }

  /* Featured card normal flow on mobile */
  .spt-card.spt-featured {
    transform: none;
  }

  .spt-card.spt-featured:hover {
    transform: translateY(-4px);
  }

  .spt-animate .spt-card.spt-featured.spt-in {
    transform: none;
  }

  .spt-amount {
    font-size: 44px;
  }

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