/* ==========================================================================
   Khesht — pricing landing page
   Built on the same design tokens as style.css (palette, fonts, spacing);
   this file only adds the components this page needs that don't exist
   elsewhere: a static (non-JS) header/mobile-nav, the plan-card wall, and
   the diff-mode toggle.
   ========================================================================== */

.page-pricing .site-header {
  border-bottom-color: var(--line);
}

.page-pricing .main-nav a.is-current {
  color: var(--red);
}

.page-pricing .main-nav a.is-current::after {
  transform: scaleX(1);
  transform-origin: right;
}

/* ---------- hero ---------- */

.pricing-hero {
  position: relative;
  padding: 168px 0 70px;
  overflow: hidden;
  background:
    radial-gradient(640px 360px at 88% -10%, rgba(201, 161, 94, 0.16), transparent 65%),
    radial-gradient(560px 320px at 6% 0%, rgba(194, 42, 31, 0.08), transparent 60%);
}

.pricing-hero .eyebrow {
  margin-bottom: 26px;
}

.pricing-hero h1 {
  font-size: clamp(38px, 6vw, 68px);
  max-width: 16ch;
}

.pricing-hero h1 em {
  font-style: normal;
  color: var(--red);
}

.pricing-hero-sub {
  margin-top: 24px;
  max-width: 52ch;
  font-size: 17px;
  color: var(--ink-soft);
}

.pricing-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.pricing-badges span {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  border: 1px solid var(--line-strong);
  background: var(--paper);
  padding: 8px 16px;
  border-radius: var(--radius);
}

.diff-toggle {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 38px;
  max-width: 52ch;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  user-select: none;
}

.diff-toggle span:last-child {
  min-width: 0;
  padding-top: 3px;
}

.diff-toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.diff-toggle-slider {
  width: 40px;
  height: 23px;
  border-radius: 999px;
  background: var(--cream);
  border: 1px solid var(--line-strong);
  position: relative;
  flex-shrink: 0;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.diff-toggle-slider::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 2px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--ink-soft);
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}

.diff-toggle input:checked + .diff-toggle-slider {
  background: var(--gold-soft);
  border-color: var(--gold);
}

.diff-toggle input:checked + .diff-toggle-slider::after {
  transform: translateX(-17px);
  background: var(--gold-deep);
}

.diff-toggle input:focus-visible + .diff-toggle-slider {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

body.diff-mode .plan-cumulative {
  display: none;
}

/* ---------- plans wall ---------- */

.plans-wall {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
}

@media (min-width: 1400px) {
  .plans-wall {
    grid-template-columns: repeat(5, 1fr);
  }
}

.plan-card {
  position: relative;
  background: var(--paper);
  padding: 34px 26px 28px;
  display: flex;
  flex-direction: column;
  transition: background 0.35s var(--ease);
}

.plan-card:hover {
  background: var(--cream);
}

.plan-card--featured {
  background: var(--cream);
  box-shadow: inset 0 3px 0 var(--red);
}

.plan-card--featured:hover {
  background: var(--gold-soft);
}

.plan-badge {
  position: absolute;
  top: -1px;
  inset-inline-end: 26px;
  background: var(--red);
  color: var(--cream);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 6px 14px;
  border-radius: 0 0 4px 4px;
}

.plan-card__index {
  font-family: var(--ff-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.plan-card__index .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-deep);
}

.plan-card__name {
  font-size: 21px;
  margin-top: 14px;
}

.plan-card__tag {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 6px;
}

.plan-card__price {
  font-family: var(--ff-display);
  font-size: 27px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 22px;
}

.plan-card__price small {
  font-family: var(--ff-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-inline-start: 6px;
}

.plan-card__delta {
  font-size: 12px;
  color: var(--gold-deep);
  font-weight: 600;
  margin-top: 4px;
  min-height: 1.4em;
}

.plan-card__divider {
  height: 1px;
  background: var(--line);
  margin: 18px 0 20px;
}

.plan-section-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 10px;
}

.plan-section-label + .plan-section-label {
  margin-top: 10px;
}

.plan-new-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--red);
  margin: 0 0 8px;
}

.plan-features {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
}

.plan-features li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 13.6px;
  line-height: 1.65;
  padding: 5px 0;
  color: var(--ink);
}

.plan-features li .ic {
  flex-shrink: 0;
  width: 16px;
  font-weight: 700;
}

.plan-features li.is-base { color: var(--ink-soft); }
.plan-features li.is-base .ic { color: var(--ink-soft); }
.plan-features li.is-new .ic { color: var(--red); }
.plan-features li.is-excluded {
  color: var(--ink-soft);
  text-decoration: line-through;
  text-decoration-color: var(--line-strong);
}
.plan-features li.is-excluded .ic { color: var(--line-strong); }
.plan-features li.is-dim { color: var(--ink-soft); opacity: 0.75; }

.plan-features-area {
  flex: 1 1 auto;
}

.plan-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  margin: 6px 0 20px;
  padding: 15px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.plan-card:hover .plan-meta,
.plan-card--featured .plan-meta {
  background: var(--paper);
}

.plan-meta-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.plan-meta-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--gold-deep);
}

.plan-meta-text {
  display: flex;
  flex-direction: column;
}

.plan-meta-label {
  font-size: 11px;
  color: var(--ink-soft);
  line-height: 1.4;
}

.plan-meta-value {
  font-size: 13px;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.5;
  margin-top: 1px;
}

.plan-meta-total {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 9px;
  padding-top: 11px;
  margin-top: 2px;
  border-top: 1px dashed var(--line-strong);
}

.plan-meta-total .plan-meta-icon { color: var(--red); }
.plan-meta-total .plan-meta-value { color: var(--red); }

.plan-cta {
  margin-top: auto;
  text-align: center;
  width: 100%;
  justify-content: center;
}

/* ---------- footnotes ---------- */

.pricing-notes {
  margin-top: 70px;
  padding: 26px 28px;
  background: var(--cream);
  border: 1px dashed var(--line-strong);
}

.pricing-notes h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 16px;
}

.pricing-notes ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pricing-notes li {
  font-size: 13.8px;
  color: var(--ink-soft);
  padding-inline-start: 18px;
  position: relative;
}

.pricing-notes li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  background: var(--red);
}

/* ---------- responsive ---------- */

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

@media (max-width: 640px) {
  .pricing-hero {
    padding-top: 132px;
  }
  .plans-wall {
    grid-template-columns: 1fr;
  }
}
