/* ==========================================================================
   Pricing page — Self-publish plans
   Matches the interactive pricing mockup (tabs, word slider, plan cards, FAQ)
   ========================================================================== */

/* Continuity: same banner wash behind sticky navbar (no grey gap) */
body:has(.pricing-page) {
  --pr-banner-bg:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(10, 42, 74, 0.12), transparent 60%),
    radial-gradient(ellipse 50% 40% at 90% 10%, rgba(201, 162, 39, 0.12), transparent 55%),
    linear-gradient(180deg, #f7f8fb 0%, #eef1f6 40%, #f3f5f8 100%);
  background: var(--pr-banner-bg) !important;
  background-attachment: scroll !important;
  background-color: #f7f8fb !important;
}

body:has(.pricing-page) nav {
  background: transparent !important;
}

.pricing-page {
  --pr-navy: #0a2a4a;
  --pr-navy-deep: #061b33;
  --pr-gold: #c9a227;
  --pr-gold-soft: #f7f1de;
  --pr-soft: #eef1f6;
  --pr-ink: #0a2a4a;
  --pr-ink-soft: #3d4f63;
  --pr-muted: #6b7888;
  --pr-border: #d5dce5;
  --pr-bg: #eef1f6;
  --pr-card: #ffffff;
  --pr-radius: 14px;
  --pr-shadow: 0 10px 28px rgba(10, 42, 74, 0.1);
  --pr-shadow-sm: 0 4px 14px rgba(10, 42, 74, 0.06);

  /* legacy aliases */
  --pr-teal: var(--pr-navy);
  --pr-teal-deep: var(--pr-navy-deep);
  --pr-teal-soft: var(--pr-soft);
  --pr-teal-mid: var(--pr-gold);

  /* Pull section under sticky nav so banner colour reaches the top */
  margin-top: -96px;
  background: transparent;
  padding: calc(2.5rem + 96px) 0 4rem;
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--pr-ink);
}

.pricing-page * {
  box-sizing: border-box;
}

.pricing-inner {
  width: min(1120px, 92%);
  margin: 0 auto;
}

/* Hero */
.pricing-title {
  text-align: center;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 650;
  font-size: clamp(1.85rem, 4.2vw, 2.75rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--pr-ink);
  margin: 0.5rem auto 0.75rem;
  max-width: 18ch;
}

.pricing-title span {
  color: var(--pr-gold);
}

.pricing-subtitle {
  text-align: center;
  color: var(--pr-muted);
  font-size: 1.05rem;
  margin: 0 auto 1.75rem;
  max-width: 36rem;
}

/* Tabs */
.pricing-tabs-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 0 0 1.5rem;
}

.pricing-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px;
  background: var(--pr-card);
  border: 1px solid var(--pr-border);
  border-radius: 999px;
  box-shadow: var(--pr-shadow-sm);
  margin: 0;
  width: fit-content;
  max-width: 100%;
}

.pricing-tab {
  appearance: none;
  border: 2px solid transparent;
  background: transparent;
  color: var(--pr-muted);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 1.3rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.22s ease, color 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  white-space: nowrap;
}

.pricing-tab:hover {
  color: var(--pr-teal-deep);
}

.pricing-tab:not(.pricing-active) {
  color: var(--pr-teal);
  border-color: var(--pr-teal);
  background: #fff;
}

.pricing-tab.pricing-active {
  background: var(--pr-teal);
  color: #fff;
  border-color: var(--pr-teal);
  box-shadow: 0 4px 12px rgba(10, 42, 74, 0.28);
}

.pricing-tab:focus-visible {
  outline: 2px solid var(--pr-teal-mid);
  outline-offset: 2px;
}

/* Word count slider */
.pricing-range-box {
  background: var(--pr-card);
  border: 1px solid var(--pr-border);
  border-radius: var(--pr-radius);
  box-shadow: var(--pr-shadow-sm);
  width: min(520px, 100%);
  margin: 0 auto 2.25rem;
  padding: 1.35rem 1.5rem 1.5rem;
  text-align: center;
}

.pricing-range-box strong {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--pr-ink);
  margin-bottom: 0.65rem;
}

#pricing-wordCount {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--pr-gold);
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.pricing-range-track {
  position: relative;
  padding: 0 0.25rem;
}

#pricing-wordRange {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--pr-teal) 0%,
    var(--pr-teal) var(--range-progress, 50%),
    #dfe8ea var(--range-progress, 50%),
    #dfe8ea 100%
  );
  outline: none;
  cursor: pointer;
  margin: 0;
}

#pricing-wordRange::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--pr-teal);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(10, 42, 74, 0.4);
  cursor: pointer;
  transition: transform 0.15s ease;
}

#pricing-wordRange::-webkit-slider-thumb:hover {
  transform: scale(1.08);
}

#pricing-wordRange::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--pr-teal);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(10, 42, 74, 0.4);
  cursor: pointer;
}

#pricing-wordRange::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: transparent;
}

.pricing-range-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.55rem;
  font-size: 0.75rem;
  color: var(--pr-muted);
}

/* Plans */
.pricing-plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: stretch;
  margin: 0 auto 2.5rem;
}

.pricing-plan {
  background: var(--pr-card);
  border: 1.5px solid var(--pr-border);
  border-radius: var(--pr-radius);
  box-shadow: var(--pr-shadow-sm);
  padding: 1.5rem 1.35rem 1.35rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
  position: relative;
  overflow: hidden;
}

.pricing-plan:hover {
  transform: translateY(-3px);
  box-shadow: var(--pr-shadow);
}

.pricing-plan.pricing-active-card {
  border-color: var(--pr-gold);
  border-width: 2px;
  box-shadow: 0 14px 36px rgba(201, 162, 39, 0.18);
}

.pricing-plan-header {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pr-gold);
  margin-bottom: 0.55rem;
}

.pricing-plan-price {
  font-family: "Fraunces", Georgia, serif;
  font-size: 2.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--pr-ink);
  line-height: 1;
  margin-bottom: 1.15rem;
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.pricing-old-price {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: var(--pr-muted);
  text-decoration: line-through;
}

.pricing-features,
.pricing-addons {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pricing-features {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  flex: 1;
  margin-bottom: 1.1rem;
}

.pricing-features li {
  position: relative;
  padding-left: 1.7rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--pr-ink-soft);
}

.pricing-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: var(--pr-teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 8.5l3 3 6-6.5' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 0.7rem no-repeat;
}

.pricing-addons {
  border-top: 1px solid var(--pr-border);
  padding-top: 0.9rem;
  margin-bottom: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.pricing-addons li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: var(--pr-muted);
}

.pricing-addons li span {
  font-weight: 700;
  color: var(--pr-ink);
  white-space: nowrap;
}

.pricing-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--pr-teal);
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 700;
  font-size: 0.98rem;
  padding: 0.85rem 1rem;
  border: 2px solid var(--pr-teal);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  margin-top: auto;
}

.pricing-btn:hover {
  background: #fff;
  color: var(--pr-teal) !important;
  transform: translateY(-1px);
}

.pricing-btn:focus-visible {
  outline: 2px solid var(--pr-teal-mid);
  outline-offset: 3px;
}

/* Hide empty feature rows if any */
.pricing-features li:empty {
  display: none;
}

/* Partner logos on pricing page */
.pricing-page #header-logo-wrapper {
  margin: 0.5rem auto 2.75rem;
  width: min(1000px, 92%);
  max-width: 1000px;
  overflow: hidden;
}

.pricing-page #header-logo-container {
  opacity: 1;
  filter: none;
}

/* FAQ overrides scoped to pricing */
.pricing-page .faq-container {
  max-width: 820px;
  margin: 0 auto;
  width: 100%;
  padding: 0;
}

.pricing-page .faq-heading {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--pr-ink);
  text-align: center;
  margin: 0 0 0.4rem;
}

.pricing-page .faq-subheading {
  text-align: center;
  color: var(--pr-muted);
  margin: 0 0 1.75rem;
  font-size: 1rem;
}

.pricing-page .faq-item {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--pr-border);
  border-radius: 12px;
  margin-bottom: 0.65rem;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pricing-page .faq-item:hover {
  transform: none;
  border-color: #b9d5da;
  box-shadow: var(--pr-shadow-sm);
}

.pricing-page .faq-question {
  padding: 1rem 3rem 1rem 1.15rem;
  color: var(--pr-ink);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  user-select: none;
}

.pricing-page .faq-question::after {
  content: "+";
  color: var(--pr-gold);
  right: 1.15rem;
  font-size: 1.4rem;
  font-weight: 500;
  transition: transform 0.25s ease;
}

.pricing-page .faq-item.active .faq-question::after {
  transform: rotate(45deg);
}

.pricing-page .faq-answer {
  background: transparent;
  color: var(--pr-muted);
  padding: 0 1.15rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.pricing-page .faq-item.active .faq-answer {
  padding: 0 1.15rem 1.1rem;
}

/* Motion */
@media (prefers-reduced-motion: no-preference) {
  .pricing-title,
  .pricing-subtitle,
  .pricing-tabs-wrap,
  .pricing-range-box,
  .pricing-plan {
    animation: pricingReveal 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .pricing-subtitle { animation-delay: 0.06s; }
  .pricing-tabs-wrap { animation-delay: 0.12s; }
  .pricing-range-box { animation-delay: 0.18s; }
  .pricing-plan:nth-child(1) { animation-delay: 0.22s; }
  .pricing-plan:nth-child(2) { animation-delay: 0.28s; }
  .pricing-plan:nth-child(3) { animation-delay: 0.34s; }
}

@keyframes pricingReveal {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 980px) {
  .pricing-plans {
    grid-template-columns: 1fr;
    max-width: 420px;
  }

  .pricing-plan.pricing-active-card {
    order: -1;
  }
}

@media (max-width: 560px) {
  .pricing-page {
    margin-top: -80px;
    padding: calc(1.5rem + 80px) 0 3rem;
  }

  .pricing-tabs-wrap {
    width: 100%;
  }

  .pricing-tabs {
    width: 100%;
  }

  .pricing-tab {
    flex: 1;
    text-align: center;
    padding: 0.65rem 0.5rem;
    font-size: 0.85rem;
  }

  .pricing-title {
    max-width: none;
  }

  .pricing-range-box {
    padding: 1.1rem 1rem 1.25rem;
  }

  .pricing-plan-price {
    font-size: 2rem;
  }
}
