/* Crossdeck — pricing page styles
 *
 * Builds on the global tokens defined in /styles.css (--ds-*).
 * Component classes scoped with `pricing-`, `plan-`, `compare-`,
 * `faq-`, `vs-`, or `included-` prefixes — never collide with the
 * homepage system.
 *
 * Tier model lives in NorthStar §6.3:
 *   Free   $0     up to $1,500 MRR
 *   Indie  $49    $1,500 – $5,000 MRR
 *   Pro    $149   $5,000 – $25,000 MRR
 *   Scale  $349   $25,000 – $100,000 MRR
 * Flat rate. No percentage fees. Unlimited apps on every tier.
 */

.pricing-body {
  background: var(--ds-bg);
}

/* Active nav state — matches the orange accent rail used elsewhere */
.site-nav a.is-current {
  color: var(--ds-text);
  font-weight: 600;
}
.site-nav a.is-current::after {
  content: "";
  display: block;
  height: 2px;
  margin-top: 2px;
  border-radius: 2px;
  background: var(--ds-accent-strong);
}

/* ============ HERO ============ */
.pricing-hero {
  position: relative;
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
  padding: 96px 0 28px;
  text-align: center;
}

.pricing-hero-inner {
  position: relative;
  z-index: 1;
}

.pricing-hero h1 {
  margin: 0 auto 18px;
  max-width: 18ch;
  font-family: var(--ds-display);
  font-size: clamp(40px, 5.6vw, 68px);
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: -0.035em;
  color: var(--ds-text);
}

.pricing-hero h1 .accent {
  background: linear-gradient(96deg, var(--ds-accent-red) 0%, var(--ds-accent) 50%, var(--ds-accent-warm) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.pricing-sub {
  margin: 0 auto 24px;
  max-width: 60ch;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ds-muted);
}

.pricing-trust {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px;
  font-size: 13px;
  color: var(--ds-muted);
}

.pricing-trust span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pricing-trust svg {
  width: 14px;
  height: 14px;
  color: var(--ds-success);
}

.pricing-aurora {
  position: absolute;
  inset: -40px -40px auto -40px;
  height: 480px;
  background:
    radial-gradient(ellipse 60% 70% at 50% 0%, rgba(255, 110, 69, 0.16), transparent 70%),
    radial-gradient(ellipse 80% 50% at 50% 80%, rgba(255, 141, 75, 0.08), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ============ PLAN CARDS ============ */
.pricing-cards-section {
  padding-top: 72px;
}

.pricing-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  align-items: stretch;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px 26px 28px;
  background: var(--ds-surface);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-lg);
  box-shadow: var(--ds-shadow-sm);
  transition: border-color 160ms, box-shadow 160ms;
}

.plan:hover {
  border-color: var(--ds-border-strong);
  box-shadow: var(--ds-shadow-md);
}

.plan-feature {
  border: 1.5px solid var(--ds-text);
  background: linear-gradient(180deg, #fff 0%, #fefaf6 100%);
  box-shadow: var(--ds-shadow-md);
}

.plan-feature:hover {
  box-shadow: var(--ds-shadow-lg);
}

.plan-ribbon {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--ds-text);
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.plan-ribbon svg {
  width: 11px;
  height: 11px;
  color: var(--ds-accent-warm);
}

.plan-head {
  margin-bottom: 20px;
  min-height: 56px;
}

.plan-name {
  margin: 0 0 4px;
  font-family: var(--ds-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ds-text);
}

.plan-tag {
  margin: 0;
  font-size: 13px;
  color: var(--ds-muted);
  line-height: 1.45;
}

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

.plan-price .amount {
  font-family: var(--ds-display);
  font-size: 48px;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--ds-text);
  line-height: 1;
}

.plan-price .cadence {
  font-size: 13.5px;
  color: var(--ds-muted);
}

.plan-band {
  margin: 0 0 22px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ds-muted);
  letter-spacing: 0.005em;
}

.plan-band strong {
  color: var(--ds-text);
  font-weight: 600;
}

.plan-cta {
  width: 100%;
  height: 40px;
  margin-bottom: 22px;
  font-size: 14px;
  font-weight: 600;
}

.plan-everything {
  margin: 0 0 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ds-text-soft);
  letter-spacing: 0.005em;
}

.plan-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
  font-size: 13.5px;
  color: var(--ds-text-soft);
}

/* Each feature is a single, atomic line — no nested em-dashes that wrap
 * awkwardly inside narrow card columns. The check-mark is a small
 * glyph absolutely-floated to the left so the text gets the full
 * available width to wrap when it must (rare on this concise copy). */
.plan-features li {
  position: relative;
  padding-left: 22px;
  line-height: 1.5;
}

.plan-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 14px;
  height: 14px;
  background-color: var(--ds-accent-strong);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.4 6.5 11.4 12.5 4.8'/></svg>") no-repeat center / contain;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.4 6.5 11.4 12.5 4.8'/></svg>") no-repeat center / contain;
}

.cards-footnote {
  margin: 28px auto 0;
  text-align: center;
  font-size: 13.5px;
  color: var(--ds-muted);
}

@media (max-width: 1100px) {
  .pricing-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .pricing-cards {
    grid-template-columns: 1fr;
  }
}

/* ============ VS COMPARISON (the closer) ============ */
.pricing-vs {
  padding-top: 96px;
}

.vs-card {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 44px 48px;
  background: var(--ds-surface);
  border: 1px solid var(--ds-border);
  border-radius: 22px;
  box-shadow: var(--ds-shadow-md);
}

.vs-copy h2 {
  margin: 12px 0 14px;
  font-family: var(--ds-display);
  font-size: clamp(26px, 3.4vw, 36px);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ds-text);
}

.vs-copy h2 .accent {
  background: linear-gradient(96deg, var(--ds-accent-red) 0%, var(--ds-accent) 60%, var(--ds-accent-warm) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.vs-copy p {
  margin: 0 0 14px;
  font-size: 15.5px;
  color: var(--ds-muted);
  line-height: 1.6;
  max-width: 50ch;
}

.vs-numbers {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.vs-row {
  padding: 22px 24px;
  border-radius: 14px;
  border: 1px solid var(--ds-divider);
  background: var(--ds-surface-soft);
}

.vs-row-them {
  position: relative;
}

.vs-row-them .vs-amount {
  color: var(--ds-muted);
  text-decoration: line-through;
  text-decoration-color: rgba(107, 98, 89, 0.45);
  text-decoration-thickness: 2px;
}

.vs-row-us {
  background: linear-gradient(180deg, #fff 0%, #fefaf5 100%);
  border-color: var(--ds-text);
  box-shadow: var(--ds-shadow-sm);
}

.vs-label {
  margin: 0 0 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ds-muted);
}

.vs-row-us .vs-label {
  color: var(--ds-accent-strong);
}

.vs-fee {
  margin: 0 0 6px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.vs-amount {
  font-family: var(--ds-display);
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ds-text);
}

.vs-suffix {
  font-size: 14px;
  color: var(--ds-muted);
}

.vs-detail {
  margin: 0;
  font-size: 12.5px;
  color: var(--ds-muted);
  line-height: 1.5;
}

@media (max-width: 880px) {
  .vs-card {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 32px 28px;
  }
}

/* ============ "WHAT YOU GET" GRID ============ */
.pricing-included {
  padding-top: 96px;
}

.included-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 8px;
  background: var(--ds-border);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-lg);
  overflow: hidden;
}

.included-cell {
  padding: 28px 26px;
  background: var(--ds-surface);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 168px;
}

.included-title {
  margin: 0 0 6px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ds-text);
}

.included-body {
  margin: 0;
  font-size: 13.5px;
  color: var(--ds-muted);
  line-height: 1.55;
}

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

@media (max-width: 600px) {
  .included-grid {
    grid-template-columns: 1fr;
  }
  .included-cell {
    min-height: 0;
  }
}

/* ============ OVERAGE / TRUST CALLOUT (under freshness grid) ============ */
.pricing-callout {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-top: 16px;
  padding: 22px 26px;
  background: var(--ds-surface);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-lg);
}

.pricing-callout-mark {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--ds-accent-soft, rgba(238, 79, 37, 0.1));
  color: var(--ds-accent-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pricing-callout-mark svg {
  width: 14px;
  height: 14px;
}

.pricing-callout-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pricing-callout-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ds-text);
}

.pricing-callout-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ds-muted);
}

@media (max-width: 600px) {
  .pricing-callout {
    padding: 18px 20px;
    gap: 14px;
  }
}

/* ============ COMPARE TABLE ============ */
.pricing-compare-section {
  padding-top: 96px;
}

.compare-table-wrap {
  margin-top: 8px;
  overflow-x: auto;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-lg);
  background: var(--ds-surface);
  box-shadow: var(--ds-shadow-sm);
}

.compare-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 13.5px;
}

.compare-table thead th {
  padding: 18px 20px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--ds-text);
  background: var(--ds-surface);
  border-bottom: 1px solid var(--ds-border);
}

.compare-table thead th.is-feature {
  color: var(--ds-accent-strong);
  background: linear-gradient(180deg, #fffaf5 0%, #fff 100%);
}

.compare-table tbody th[scope="row"] {
  text-align: left;
  font-weight: 500;
  color: var(--ds-text-soft);
  padding: 14px 20px;
  background: var(--ds-surface-soft);
  border-bottom: 1px solid var(--ds-divider);
  width: 32%;
}

.compare-table tbody td {
  padding: 14px 20px;
  text-align: left;
  color: var(--ds-text-soft);
  border-bottom: 1px solid var(--ds-divider);
  vertical-align: middle;
}

.compare-table tbody td.is-feature {
  background: rgba(255, 110, 69, 0.04);
  color: var(--ds-text);
  font-weight: 500;
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
  border-bottom: 0;
}

.compare-table .ic-yes {
  width: 16px;
  height: 16px;
  color: var(--ds-success);
}

.compare-table .ic-no {
  width: 14px;
  height: 14px;
  color: var(--ds-muted-soft);
}

/* ============ FAQ ============ */
.pricing-faq {
  padding-top: 96px;
}

.link-accent {
  color: var(--ds-accent-strong);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

.link-accent:hover {
  color: var(--ds-accent-red);
}

.faq-list {
  display: flex;
  flex-direction: column;
  max-width: 880px;
  margin: 32px auto 0;
  border-top: 1px solid var(--ds-border);
}

.faq-item {
  border-bottom: 1px solid var(--ds-border);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ds-text);
  transition: color 140ms;
}

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

.faq-item summary:hover {
  color: var(--ds-accent-strong);
}

.faq-chevron {
  width: 16px;
  height: 16px;
  color: var(--ds-muted);
  transition: transform 180ms ease;
  flex: 0 0 auto;
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
  color: var(--ds-accent-strong);
}

.faq-item p {
  margin: 0 0 22px;
  padding: 0 4px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ds-muted);
  max-width: 76ch;
}

/* ============ FINAL CTA ============ */
.pricing-final-cta {
  padding-top: 96px;
  padding-bottom: 96px;
}

.final-cta-card {
  position: relative;
  padding: 64px 32px;
  border-radius: 22px;
  background: var(--ds-text);
  color: #fff;
  text-align: center;
  overflow: hidden;
  box-shadow: var(--ds-shadow-lg);
}

.final-cta-aurora {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 70% at 18% 20%, rgba(255, 110, 69, 0.45), transparent 70%),
    radial-gradient(ellipse 50% 70% at 82% 80%, rgba(255, 141, 75, 0.30), transparent 70%);
  pointer-events: none;
}

.final-cta-card h2 {
  position: relative;
  margin: 0 0 12px;
  font-family: var(--ds-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.final-cta-card p {
  position: relative;
  margin: 0 auto 28px;
  max-width: 52ch;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.55;
}

.final-cta-actions {
  position: relative;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.final-cta-actions .btn {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
}

.final-cta-actions .btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.32);
}

.final-cta-actions .btn-accent {
  background: linear-gradient(180deg, var(--ds-accent) 0%, var(--ds-accent-strong) 100%);
  color: #fff;
  border-color: var(--ds-accent-strong);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset, 0 4px 14px rgba(238, 79, 37, 0.32);
}
