/* CRUMB pricing page (pricing.html only).
   Builds on site.css: the same tokens, plan cards, tags and check lists. Nothing here is loaded
   by any other page. The plan cards, terms and comparison table are generated from
   Shared/feature-catalogue.json by Website/tools/build_pricing.py. */

.pricing-page__head { max-width: 50rem; }
.pricing-page__soon {
  display: inline-flex;
  margin-top: 18px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--sunk);
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 600;
}

.pricing-page__section { margin-top: clamp(40px, 6vw, 72px); }
.pricing-page__section > h2 { font-size: clamp(1.6rem, 1.6vw + 1.1rem, 2.2rem); }
.pricing-page__section > h2 + .pricing__terms { margin-top: 18px; }
.pricing-page__compare-head { max-width: 46rem; }
.pricing-page__compare-head .lede { margin-top: 16px; }
.pricing-page__more { margin-top: 22px; text-align: center; }
.pricing-page__small { max-width: 60rem; margin-top: 18px; color: var(--ink-soft); font-size: 0.9375rem; }
.pricing-page__small a, .pricing-page__more a { color: var(--terracotta-deep); }

/* ---------- Plan cards ---------- */

.tiers {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: 18px;
  align-items: stretch;
}
/* A soft wash of the brand colours behind the cards, so the Premium card's glass has something to show. */
.tiers::before {
  content: "";
  position: absolute;
  inset: 8% 4% 12%;
  z-index: -1;
  border-radius: 48px;
  background:
    radial-gradient(60% 70% at 55% 35%, var(--terracotta-soft), transparent 70%),
    radial-gradient(50% 60% at 20% 80%, var(--mint), transparent 70%);
  filter: blur(36px);
  opacity: 0.8;
  pointer-events: none;
}
@media (min-width: 1060px) { .tiers { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.16fr) minmax(0, 0.92fr); } }
@media (min-width: 720px) and (max-width: 1059.98px) {
  .tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tier--premium-plus { grid-column: 1 / -1; }
}

.tier .price__amount { white-space: nowrap; }
.tier .price__name { overflow-wrap: normal; }
.tier .checks { gap: 10px; }
.tier .checks li { font-size: 0.975rem; }
.tier__cta { width: 100%; margin-top: auto; }
.tier__status {
  margin-top: auto;
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--sunk);
  color: var(--ink);
  font-size: 0.9375rem;
}

/* Premium: the one card with tasteful glass. Opaque fallback where backdrop blur is unsupported. */
.tier--premium {
  background: var(--raised);
  box-shadow: 0 30px 60px -40px var(--terracotta), var(--shadow-card);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .tier--premium {
    background: color-mix(in srgb, var(--raised) 78%, transparent);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    backdrop-filter: blur(18px) saturate(1.2);
  }
}
@media (prefers-reduced-transparency: reduce) {
  .tier--premium { background: var(--raised); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.tier--premium .price { background: color-mix(in srgb, var(--canvas) 82%, transparent); }

/* Premium Plus: clearly not on sale. */
.tier--premium-plus { border-style: dashed; border-color: var(--line-strong); }
.tier--premium-plus .price__amount { color: var(--ink-soft); }
.tier--premium-plus .price { grid-template-columns: 1fr; }
.tier--premium-plus .checks .icon { color: var(--ink-soft); }

/* ---------- Comparison table ---------- */

.matrix-key {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 24px;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}
.matrix-key li { display: inline-flex; align-items: center; gap: 8px; }
.matrix-key .tag { font-size: 0.75rem; }

.matrix-hint { display: none; margin-top: 14px; color: var(--ink-soft); font-size: 0.875rem; }

.matrix {
  margin-top: 18px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--raised);
  box-shadow: var(--shadow-card);
}
.matrix:focus-visible { outline-offset: 4px; }

.matrix__table {
  width: 100%;
  min-width: 700px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9375rem;
  line-height: 1.45;
}
.matrix__table th, .matrix__table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.matrix__table tbody:last-child tr:last-child > * { border-bottom: 0; }

.matrix__table thead th {
  padding-block: 18px;
  background: var(--raised);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  vertical-align: bottom;
}
.matrix__plan { width: 19%; }
.matrix__plan--premium { color: var(--terracotta-deep); }
.matrix__price {
  display: block;
  margin-top: 4px;
  color: var(--ink-soft);
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0;
}
.matrix__plan--premium .matrix__price { color: var(--ink-soft); }

/* Feature names stay in view while the plans scroll sideways. */
.matrix__feature {
  position: sticky;
  left: 0;
  z-index: 1;
  width: 43%;
  background: var(--raised);
  box-shadow: 1px 0 0 var(--line);
}
thead .matrix__feature { z-index: 2; color: var(--ink-soft); font-size: 0.875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.matrix__name { font-weight: 700; color: var(--ink); }
.matrix__detail { display: block; margin-top: 3px; color: var(--ink-soft); font-size: 0.8125rem; font-weight: 400; }
.matrix__tag { margin-left: 8px; padding: 1px 9px; font-size: 0.6875rem; vertical-align: 1px; }
.matrix__price .matrix__tag { margin-left: 0; margin-top: 2px; }

.matrix__group-name {
  padding-top: 22px !important;
  background: var(--sunk) !important;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.matrix__group-label { position: sticky; left: 16px; display: inline-block; }
.matrix__emoji { display: inline-block; margin-right: 4px; }

.matrix__cell { color: var(--ink); }
.matrix__cell > span { display: inline; }
.matrix__icon {
  display: inline-block;
  width: 20px; height: 20px;
  margin: 0 6px -4px 0;
  color: var(--mint-deep);
  stroke-width: 2.6;
}
.matrix__cell--limited .matrix__icon { color: var(--terracotta); }
.matrix__cell--limited { font-weight: 600; }
.matrix__cell--no { color: var(--ink-soft); }
.matrix__no {
  display: inline-block;
  width: 12px; height: 2px;
  margin: 0 10px 5px 4px;
  border-radius: 2px;
  background: var(--line-strong);
}
.matrix-key .matrix__no { margin: 0 2px; }
.matrix-key .matrix__icon { margin: 0; }

/* Premium column picks up the brand colour, quietly. */
.matrix__table td:nth-child(3) { background: color-mix(in srgb, var(--terracotta-soft) 26%, transparent); }
.matrix__table thead th:nth-child(3) { background: color-mix(in srgb, var(--terracotta-soft) 40%, var(--raised)); }

@media (max-width: 879.98px) {
  .matrix-hint { display: block; }
  /* Fixed columns: the feature name keeps about half the screen, and each plan a readable 124 px,
     so the Free column sits beside the names and the others are a swipe away. */
  .matrix__table { width: calc(min(46vw, 260px) + 372px); min-width: 0; table-layout: fixed; font-size: 0.875rem; }
  .matrix__feature { width: min(46vw, 260px); }
  .matrix__plan { width: 124px; }
  .matrix__table th, .matrix__table td { padding: 12px; }
  .matrix__group-label { left: 12px; }
}

.pricing-links { display: grid; gap: 10px; margin-top: 18px; }
@media (min-width: 720px) { .pricing-links { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pricing-links a { color: var(--terracotta-deep); }

@media print {
  .tiers::before { display: none; }
  .matrix { overflow: visible; box-shadow: none; }
  .matrix__table { min-width: 0; }
  .matrix__feature { position: static; }
}
