/* Pricing: the two individual plans on paper, side by side under a hairline
   divider, and the Enterprise card in charcoal beside them. The card rises to
   the headline's foot, runs to the section's foot and almost to the page's
   right edge, with its top-right corner cut and the knight faint inside it. */
.pricing {
  display: grid;
  grid-template-columns: minmax(0, 1.63fr) minmax(0, 1fr);
  grid-template-areas:
    'head .'
    'plans card';
  column-gap: clamp(2rem, 3.6vw, 4.5rem);
  /* Tuning's own foot already opens the gap above. */
  padding: clamp(1.5rem, 3vw, 3.5rem) clamp(1rem, 2.1vw, 2.5rem) clamp(2.5rem, 3vw, 3.5rem) var(--gutter);
}

.pricing__head {
  grid-area: head;
}

.pricing__plans {
  grid-area: plans;
  margin-top: clamp(2.25rem, 3.4vw, 3.25rem);
}

.pricing__label {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.6875rem;
  color: var(--ink-soft);
}

.pricing__label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.pricing__intro,
.pricing__foot p:first-child {
  margin-top: 0.9rem;
  font-family: var(--serif);
  font-size: var(--text-body);
  line-height: 1.55;
  color: var(--ink-soft);
}

.tiers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: clamp(1.75rem, 2.2vw, 2.25rem);
  list-style: none;
}

.tier {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-right: clamp(1.5rem, 3.6vw, 4.5rem);
}

.tier + .tier {
  padding-right: 0;
  padding-left: clamp(1.5rem, 3.6vw, 4.5rem);
  border-left: 1px solid var(--rule);
}

.tier__name {
  font-size: 0.6875rem;
  color: var(--ink-soft);
}

.tier__price {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  margin-top: 0.7rem;
  font-family: var(--serif);
}

.tier__price strong {
  font-weight: 400;
  font-size: clamp(2.75rem, 3vw, 3.625rem);
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.tier__price span {
  font-size: var(--text-body);
  color: var(--ink-soft);
}

.tier__for {
  margin-top: 1.1rem;
  font-family: var(--serif);
  font-size: var(--text-body);
  line-height: 1.55;
  color: var(--ink-soft);
}

/* Both links sit on the same line, however long the copy above them. */
.tier__apply {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1.6rem;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--red);
}

.tier__apply svg {
  width: 1.2rem;
  height: 1.2rem;
  transition: transform var(--dur) var(--ease);
}

.tier__apply:hover svg {
  transform: translateX(0.25rem);
}

.pricing__foot {
  margin-top: clamp(1.75rem, 2.4vw, 2.5rem);
  padding-top: 0.7rem;
  border-top: 1px solid var(--rule);
}

.pricing__foot .caps {
  margin-top: 0.4rem;
  font-size: 0.625rem;
  letter-spacing: 0.24em;
  color: var(--ink-mute);
}

/* ── The Enterprise card ── */
.enterprise {
  --cut: clamp(2.75rem, 4.7vw, 5.5rem);
  grid-area: card;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(1.75rem, 2.2vw, 2.5rem) clamp(2rem, 3.4vw, 4rem) clamp(2rem, 2.6vw, 3rem);
  background: var(--char);
  color: var(--on-char);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}

/* The knight, faint in the cut corner and cropped by the card's edge. */
.enterprise::before {
  content: '';
  position: absolute;
  top: clamp(1rem, 1.6vw, 2rem);
  right: -4%;
  z-index: -1;
  width: 32%;
  aspect-ratio: 318 / 455;
  background: linear-gradient(160deg, rgba(241, 237, 230, 0.11), rgba(241, 237, 230, 0.025) 75%);
  -webkit-mask: url('../knight-logo.png') center / contain no-repeat;
  mask: url('../knight-logo.png') center / contain no-repeat;
}

.enterprise__kicker {
  font-size: 0.6875rem;
  color: var(--on-char-soft);
}

.enterprise__title {
  margin-top: 1rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.5rem, 2.9vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.025em;
}

.enterprise__lede {
  margin-top: clamp(1rem, 1.3vw, 1.5rem);
  padding-top: clamp(1rem, 1.3vw, 1.5rem);
  border-top: 1px solid var(--on-char-rule);
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1.3vw, 1.5rem);
  line-height: 1.3;
}

.enterprise__body {
  margin-top: 0.75rem;
  font-family: var(--serif);
  font-size: var(--text-body);
  line-height: 1.55;
  color: var(--on-char-soft);
}

.enterprise__list {
  margin: 1rem 0 clamp(1.25rem, 1.6vw, 1.75rem);
  list-style: none;
  counter-reset: item;
}

.enterprise__list li {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  align-items: baseline;
  padding: 0.45rem 0;
  font-family: var(--serif);
  font-size: clamp(1.125rem, 1.2vw, 1.375rem);
  counter-increment: item;
}

.enterprise__list li + li {
  border-top: 1px solid var(--on-char-rule);
}

.enterprise__list li::before {
  content: counter(item, decimal-leading-zero);
  font: 500 0.6875rem/1 var(--sans);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.16em;
  color: var(--on-char-soft);
}

/* Held to the card's foot when the card runs taller than its contents. */
.enterprise .btn--light {
  margin-top: auto;
  height: 3.25rem;
  font-size: 1.0625rem;
}

/* ── Stacked: plans, then the card ── */
@media (max-width: 960px) {
  .pricing {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      'head'
      'plans'
      'card';
    padding-right: var(--gutter);
  }

  .enterprise {
    max-width: 34rem;
    margin-top: 3rem;
  }

  .enterprise::before {
    width: 26%;
  }
}

/* ── Phones: the two plans as white cards on a hard charcoal offset, then the
   Enterprise card the same width ── */
@media (max-width: 767px) {
  .tiers {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
    margin-top: 1.5rem;
  }

  .tier,
  .tier + .tier {
    padding: 1.25rem;
    border: 1px solid rgba(29, 27, 25, 0.28);
    border-radius: 3px;
    background: var(--white);
    box-shadow: 3px 3px 0 var(--char);
  }

  /* A real target, quiet: a red hairline box with the arrow at its end, the
     same on both plans. */
  .tier__apply {
    justify-content: space-between;
    width: 100%;
    height: 3rem;
    margin-top: 1.25rem;
    padding: 0 1.1rem;
    border: 1px solid rgba(196, 22, 28, 0.42);
    border-radius: 2px;
  }

  .pricing__foot .caps {
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    color: var(--ink-soft);
  }

  .enterprise {
    max-width: none;
    margin-top: 2.5rem;
    padding: 1.5rem;
  }

  .pricing__foot {
    margin-top: 1.5rem;
  }
}
