/* ============================================================
   HELIOCASTLE — PLANS
   Three cards that read as one ladder: A, then B "everything in A
   plus", then C. The big-systems panel underneath is the one with
   no fixed price.
   ============================================================ */

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 1.6vw, 24px);
  margin-top: clamp(34px, 4vw, 54px);
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 2.2vw, 34px);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform 0.5s var(--ease), border-color 0.4s, box-shadow 0.5s var(--ease);
}
/* the gold line that draws itself across the top on hover */
.plan::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  transition: width 0.6s var(--ease);
}
.plan:hover {
  transform: translateY(-6px);
  border-color: rgb(var(--accent-rgb) / 0.28);
  box-shadow: 0 26px 55px rgb(var(--shadow-rgb) / calc(0.5 * var(--shadow-a)));
}
.plan:hover::before { width: 100%; }

.plan-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.plan-letter {
  flex: 0 0 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 22px;
  color: var(--gold);
  border: 1px solid rgb(var(--accent-rgb) / 0.35);
  transition: background 0.4s, color 0.4s;
}
.plan:hover .plan-letter { background: rgb(var(--accent-rgb) / 0.1); }

.plan-name {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.plan-for {
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-top: 3px;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-family: var(--serif);
  font-size: clamp(36px, 3.4vw, 46px);
  font-weight: 500;
  line-height: 1;
  margin: 22px 0 0;
}
/* The currency mark only. It used to be the one <span> in here, with
   the number beside it as bare text - but a field has to be an
   element to be published into, so the number became an element too
   and quietly inherited "small and gold". */
.plan-price span {
  font-size: 0.5em;
  color: var(--gold);
}

.plan-price .plan-figure {
  font-size: 1em;
  font-weight: inherit;
  color: inherit;
}

.plan-summary {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.75;
  margin: 16px 0 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

/* --- what you get --- */
.plan-list {
  list-style: none;
  display: grid;
  gap: 11px;
  margin-bottom: 26px;
}
.plan-list li {
  display: grid;
  grid-template-columns: 17px 1fr;
  gap: 11px;
  align-items: start;
  font-size: 14px;
  line-height: 1.6;
  color: rgb(var(--ink-rgb) / 0.82);
}
.plan-list svg {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  color: var(--gold);
}

/* "everything in the plan before this one" — the step up, said once */
/* "EVERYTHING IN PLAN A, PLUS" — the label above a plan's feature list.
   It sits OUTSIDE the <ul> now, because the list is filled from the
   database one <li> per feature and anything else left inside it would
   be replaced on the first publish. Same size, weight, colour and
   spacing as before; it simply is not a list item any more.

   :empty hides it on the first plan, which has nothing below it to
   inherit from. */
.plan-inherit {
  margin: 0 0 11px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  line-height: 1.6;
  text-transform: uppercase;
  color: var(--gold);
}

.plan-inherit:empty { display: none; }

.plan-cta {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  transition: color 0.3s;
}
.plan-cta svg { width: 16px; height: 16px; transition: transform 0.35s var(--ease); }
.plan-cta:hover { color: var(--gold-pale); }
.plan-cta:hover svg { transform: translateX(5px); }

/* ============================================================
   BIG SYSTEMS — the one with no price on it
   ============================================================ */

.plan-big {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(24px, 4vw, 60px);
  margin-top: clamp(16px, 1.6vw, 24px);
  padding: clamp(26px, 2.6vw, 38px) clamp(26px, 3vw, 44px);
  background:
    linear-gradient(120deg, rgb(var(--accent-rgb) / 0.07), transparent 58%),
    var(--surface-2);
  border: 1px solid rgb(var(--accent-rgb) / 0.22);
}
.plan-big-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
}
.plan-big-label svg { width: 18px; height: 18px; }
.plan-big h3 {
  font-family: var(--serif);
  font-size: clamp(22px, 2.3vw, 30px);
  font-weight: 500;
  letter-spacing: 0.02em;
  margin: 12px 0 10px;
}
.plan-big p {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.8;
  max-width: 62ch;
}
.plan-big-price {
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 26px);
  color: var(--gold);
  white-space: nowrap;
}
.plan-big-side {
  display: grid;
  gap: 16px;
  justify-items: end;
  text-align: right;
}

/* The cards arrive one after another. This used to be a hand-written
   style="--d:.08s" on the second and third card, which only works
   while somebody remembers to add one to the fourth. [data-stagger]
   numbers the children into --i and the delay follows from it. */
.plan-grid .plan { --d: calc(var(--i, 0) * 0.08s); }
