/* ═══════════════════════════════════════════════════════
   Pricing Page — Fractal Video Shufflr
   ═══════════════════════════════════════════════════════ */

/* ── Page body ── */
.pricing-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Hero section ── */
.pricing-hero {
  position: relative;
  flex: 1;
  padding: 120px 0 48px;
  overflow: hidden;
  isolation: isolate;
}

.pricing-bg-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(700px circle at 25% 15%, rgba(99, 102, 241, 0.12), transparent),
    radial-gradient(500px circle at 75% 30%, rgba(139, 92, 246, 0.08), transparent),
    radial-gradient(400px circle at 50% 75%, rgba(6, 182, 212, 0.06), transparent);
  animation: pricingMeshFloat 20s ease-in-out infinite;
}

@keyframes pricingMeshFloat {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.04) rotate(0.5deg); }
}

/* ── Header ── */
.pricing-header {
  text-align: center;
  margin-bottom: 36px;
  position: relative;
  z-index: 1;
}

.pricing-label {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.15);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #a5b4fc;
  margin-bottom: 18px;
}

.pricing-header h1 {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 14px;
  color: #f1f5f9;
}

.pricing-subtitle {
  color: #94a3b8;
  font-size: clamp(15px, 1.8vw, 18px);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.55;
}

/* ── Billing toggle ── */
.billing-toggle {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.billing-toggle-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: #94a3b8;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.billing-toggle-btn:first-child {
  border-radius: 999px 0 0 999px;
  border-right: 0;
}

.billing-toggle-btn:last-child {
  border-radius: 0 999px 999px 0;
}

.billing-toggle-btn.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
  color: #e0e7ff;
}

.billing-toggle-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
}

.billing-save-note {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 40px;
  position: relative;
  z-index: 1;
  overflow: hidden;
  height: 20px;
}

.billing-save-note-inner {
  display: inline-block;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.billing-save-note--annual .billing-save-note-inner {
  color: #22c55e;
}

/* ── Pricing grid ── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
  align-items: stretch;
}

/* ── Plan card ── */
.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 20px;
  padding: 28px 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.plan-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.12);
}

/* Popular card */
.plan-card--popular {
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.1), rgba(99, 102, 241, 0.02));
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.08), 0 8px 32px rgba(99, 102, 241, 0.1);
}

.plan-card--popular:hover {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.12), 0 24px 56px rgba(99, 102, 241, 0.18);
}

.plan-popular-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

/* Diamond card */
.plan-card--diamond {
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.06), rgba(251, 191, 36, 0.01));
  border-color: rgba(251, 191, 36, 0.2);
}

.plan-card--diamond:hover {
  border-color: rgba(251, 191, 36, 0.35);
  box-shadow: 0 20px 50px rgba(251, 191, 36, 0.08);
}

.plan-card--diamond .plan-tier-name {
  color: #fbbf24;
}

/* ── Card header ── */
.plan-card-header {
  margin-bottom: 20px;
}

.plan-tier-name {
  font-size: 18px;
  font-weight: 700;
  color: #e5e7eb;
  margin: 0 0 12px;
}

.plan-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 4px;
}

.plan-price-amount {
  font-size: 42px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1;
  transition: all 0.3s ease;
}

.plan-price-period {
  font-size: 15px;
  color: #94a3b8;
  font-weight: 500;
}

.plan-price-detail {
  font-size: 13px;
  color: #64748b;
  margin: 0 0 14px;
  min-height: 1.4em;
  transition: all 0.3s ease;
}

.plan-tagline {
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0;
}

/* ── CTA buttons ── */
.plan-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 13px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  margin-bottom: 22px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.plan-cta-outline {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e5e7eb;
}

.plan-cta-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.plan-cta-primary {
  background: linear-gradient(135deg, #6366f1, #ec4899);
  border: none;
  color: #fff;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}

.plan-cta-primary:hover {
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.5);
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.plan-cta-diamond {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  border: none;
  color: #0b1120;
  font-weight: 800;
  box-shadow: 0 4px 20px rgba(251, 191, 36, 0.3);
}

.plan-cta-diamond:hover {
  box-shadow: 0 8px 32px rgba(251, 191, 36, 0.45);
  transform: translateY(-2px);
  filter: brightness(1.08);
}

/* ── Feature list ── */
.plan-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
  flex: 1;
}

.plan-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: #cbd5e1;
  line-height: 1.4;
}

.plan-check {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.plan-card--diamond .plan-check {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.2);
}

/* ── Footer note ── */
.pricing-footer-note {
  text-align: center;
  color: #64748b;
  font-size: 14px;
  margin-top: 40px;
  position: relative;
  z-index: 1;
}

.pricing-footer-note a {
  color: #a5b4fc;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pricing-footer-note a:hover {
  color: #c4b5fd;
}

/* ── Active nav link ── */
.header-nav a.active {
  color: #fff;
}

.header-nav a.active::after {
  transform: scaleX(1);
  opacity: 1;
}

/* ── Responsive ── */
@media (max-width: 1080px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .pricing-hero {
    padding: 120px 0 60px;
  }
}

@media (max-width: 640px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 400px;
    margin: 0 auto;
  }

  .pricing-hero {
    padding: 100px 0 40px;
  }

  .pricing-header {
    margin-bottom: 28px;
  }

  .plan-card {
    padding: 24px 20px;
  }

  .plan-popular-badge {
    font-size: 10px;
    padding: 4px 14px;
  }

  .billing-save-note {
    margin-bottom: 28px;
  }
}

/* ── Footer ── */
.pricing-page .site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 28px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: #64748b;
  font-size: 13px;
}

.pricing-page .site-footer a {
  color: #94a3b8;
  transition: color 0.2s ease;
}

.pricing-page .site-footer a:hover {
  color: #e5e7eb;
}

/* ── Price slide animations ── */
.plan-price-amount,
.plan-price-detail {
  display: inline-block;
  transition: none;
}

/* Annual = slide in from top */
@keyframes slideFromTop {
  0%   { opacity: 0; transform: translateY(-18px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Monthly = slide in from bottom */
@keyframes slideFromBottom {
  0%   { opacity: 0; transform: translateY(18px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Shared exit: fade out in-place */
@keyframes slideOutUp {
  0%   { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-14px); }
}

@keyframes slideOutDown {
  0%   { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(14px); }
}

.plan-price-amount.slide-to-annual,
.plan-price-detail.slide-to-annual {
  animation: slideFromTop 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.plan-price-amount.slide-to-monthly,
.plan-price-detail.slide-to-monthly {
  animation: slideFromBottom 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Save note animation */
@keyframes noteSlideDown {
  0%   { opacity: 0; transform: translateY(-14px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes noteSlideUp {
  0%   { opacity: 0; transform: translateY(14px); }
  100% { opacity: 1; transform: translateY(0); }
}

.billing-save-note-inner.note-to-annual {
  animation: noteSlideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.billing-save-note-inner.note-to-monthly {
  animation: noteSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
