/* ============================================================
   Pricing. Same theme as home -- the bar, the drawer, the
   bands, the reveals, the footer all come from home.css. This
   holds the four things only this page has: the plan cards, the
   bonuses, the list of extras, and the answers.
   ============================================================ */

/* ---------------------------------------------------- plans --
   Three columns on a desktop, one on a phone. Equal height, so
   the prices line up and can be compared at a glance -- which is
   the only thing anybody does on a pricing page. */
.plans {
  display: grid; gap: var(--sc-5);
  margin: var(--sc-8) 0 0; padding: 0; list-style: none;
}
@media (min-width: 760px)  { .plans { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .plans { grid-template-columns: repeat(3, 1fr); } }

.plan {
  position: relative; display: flex; flex-direction: column;
  padding: var(--sc-6) var(--sc-6) var(--sc-6);
  border-radius: var(--sc-r-lg);
  background: var(--sc-surface);
  box-shadow: inset 0 0 0 1px var(--sc-hairline);
  transition: box-shadow var(--sc-d-base) var(--sc-ease-out),
              background var(--sc-d-base) var(--sc-ease-out);
}
.plan:hover { box-shadow: inset 0 0 0 1px var(--sc-hairline-strong); }

/* The recommended one is raised rather than recoloured. A card in a
   different colour reads as a different kind of thing; a card standing
   slightly forward reads as the same thing, chosen. */
.plan--pick {
  background: color-mix(in oklab, var(--sc-accent) 7%, var(--sc-surface));
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--sc-accent) 42%, transparent),
              0 18px 50px rgba(0, 0, 0, 0.45);
}
@media (min-width: 1040px) { .plan--pick { transform: translateY(-14px); } }

.plan__tag {
  position: absolute; top: 0; right: var(--sc-6); translate: 0 -50%;
  padding: 0.3rem 0.8rem; border-radius: var(--sc-r-pill);
  font-size: var(--sc-t-xs); font-weight: 600;
  letter-spacing: var(--sc-track-wide); text-transform: uppercase;
  color: var(--sc-accent-ink); background: var(--sc-accent);
  box-shadow: 0 8px 22px rgba(79, 176, 255, 0.32);
}
.plan__name {
  margin: 0; font-size: var(--sc-t-xs); font-weight: 500;
  letter-spacing: var(--sc-track-wide); text-transform: uppercase;
  color: var(--sc-accent);
}
.plan__price {
  margin: var(--sc-4) 0 0;
  font-family: var(--sc-font-display); font-weight: 700;
  font-size: var(--sc-t-xl); line-height: 1;
  letter-spacing: var(--sc-track-tight); color: var(--sc-ink);
}
.plan__price small {
  display: block; margin-top: var(--sc-2);
  font-family: inherit; font-size: var(--sc-t-xs); font-weight: 500;
  letter-spacing: var(--sc-track-wide); text-transform: uppercase;
  color: var(--sc-ink-soft);
}
.plan__text {
  margin: var(--sc-4) 0 0;
  font-size: var(--sc-t-sm); line-height: 1.6; color: var(--sc-ink-soft);
}
.plan__when {
  display: flex; align-items: flex-start; gap: var(--sc-3);
  margin: var(--sc-5) 0 0; padding: var(--sc-4) 0 0;
  border-top: 1px solid var(--sc-hairline);
  font-size: var(--sc-t-sm); line-height: 1.5; color: var(--sc-ink-soft);
}
.plan__when svg {
  width: 17px; height: 17px; flex: none; margin-top: 0.15em;
  fill: none; stroke: var(--sc-accent); stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.plan__when b { color: var(--sc-ink); font-weight: 600; }

.plan__has {
  list-style: none; margin: var(--sc-5) 0 var(--sc-6); padding: 0;
  display: grid; gap: var(--sc-3);
}
.plan__has li {
  display: grid; grid-template-columns: 18px 1fr; gap: var(--sc-3);
  align-items: start;
  font-size: var(--sc-t-sm); line-height: 1.5; color: var(--sc-ink-soft);
}
.plan__has svg {
  width: 18px; height: 18px; margin-top: 0.1em;
  fill: none; stroke: var(--sc-accent); stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round;
}
/* The button sits on the floor of the card whatever the list above it
   does, so three cards of different lengths still end in a straight row. */
.plan__go { margin-top: auto; }
.plan .btn { margin-top: 0; width: 100%; text-align: center; border: 0; cursor: pointer; font-family: inherit; }

/* --------------------------------------------------- bonuses --
   Same shape as the reasons on the home page: two columns that
   drift at different speeds, so the block is not a slab. */
.bonuses {
  list-style: none; margin: var(--sc-8) 0 0; padding: 0;
  display: grid; gap: var(--sc-5);
}
@media (min-width: 780px) { .bonuses { grid-template-columns: 1fr 1fr; gap: var(--sc-6) var(--sc-8); } }
.bonuses li, .bonuses li.sc-in {
  --rate: 0px;
  transform: translate3d(0, calc((0.5 - var(--sc-p, 0.5)) * var(--rate)), 0);
}
.bonuses li:nth-child(1) { --rate: 90px; }
.bonuses li:nth-child(2) { --rate: -40px; }
.bonuses__row { transform: translate3d(0, 22px, 0); transition: transform 1000ms var(--sc-ease-out); }
.bonuses li.sc-in .bonuses__row { transform: none; }
.bonuses h3 {
  margin: 0 0 var(--sc-3);
  font-size: var(--sc-t-base); font-weight: 600; color: var(--sc-ink);
}
.bonuses p, .bonuses ul { margin: 0; font-size: var(--sc-t-sm); line-height: 1.65; color: var(--sc-ink-soft); }
.bonuses ul { margin-top: var(--sc-3); padding-left: 1.1rem; }
.bonuses b { color: var(--sc-ink); font-weight: 600; }

/* --------------------------------------------------- extras --
   Plain rows, not cards. These are caveats; dressed up as cards
   they compete with the plans, which is exactly backwards. */
.extras { list-style: none; margin: var(--sc-7) 0 0; padding: 0; display: grid; gap: 0; }
.extras li {
  display: grid; grid-template-columns: 26px 1fr; gap: var(--sc-4);
  padding: var(--sc-5) 0;
  border-top: 1px solid var(--sc-hairline);
}
.extras li:last-child { border-bottom: 1px solid var(--sc-hairline); }
/* Placed, not left to flow. Three children into two columns puts the
   paragraph back under the icon -- 26px wide, one word per line. */
.extras svg { grid-column: 1; grid-row: 1; }
.extras b   { grid-column: 2; }
.extras p   { grid-column: 2; }
@media (min-width: 780px) {
  .extras li { grid-template-columns: 26px minmax(12rem, 16rem) 1fr; align-items: baseline; }
  .extras p  { grid-column: 3; grid-row: 1; }
}
.extras svg {
  width: 22px; height: 22px;
  fill: none; stroke: var(--sc-accent); stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}
.extras b { color: var(--sc-ink); font-weight: 600; font-size: var(--sc-t-base); }
.extras p { margin: var(--sc-2) 0 0; font-size: var(--sc-t-sm); line-height: 1.6; color: var(--sc-ink-soft); }
@media (min-width: 780px) { .extras p { margin-top: 0; } }

/* ------------------------------------------------------- faq --
   The panel is a grid row from 0fr to 1fr. Answers are all
   different lengths and this way nothing has to measure them --
   no max-height guess that clips the long one and drags on the
   short one. */
.faq { margin: var(--sc-7) 0 0; }
.faq__item { border-top: 1px solid var(--sc-hairline); }
.faq__item:last-child { border-bottom: 1px solid var(--sc-hairline); }
.faq__q {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sc-5);
  width: 100%; padding: var(--sc-5) 0; border: 0; background: none; cursor: pointer;
  font-family: inherit; font-size: var(--sc-t-base); font-weight: 500;
  line-height: 1.45; text-align: left; color: var(--sc-ink);
  transition: color var(--sc-d-fast) var(--sc-ease-out);
}
/* The row is the button, so the whole width of it lights up. A question
   that only reacts under the 16px mark at the far end does not look like
   anything you are meant to press. */
.faq__q:hover, .faq__q:focus-visible { color: var(--sc-accent); }
.faq__q:hover i, .faq__q:focus-visible i {
  border-color: var(--sc-accent);
  background: color-mix(in oklab, var(--sc-accent) 16%, transparent);
}

/* Two strokes in a ring, one of which turns with the panel: a plus
   becoming a minus says opened and closed without a word of label. The
   ring is what carries it -- bare strokes on a dark page read as a
   decoration at the end of the line rather than as a control. */
.faq__q i {
  position: relative; flex: none; width: 30px; height: 30px;
  /* Written out rather than var(--sc-hairline-strong): a color-mix()
     substituted into the `border` shorthand is dropped at computed-value
     time, and the ring falls back to currentColor -- which is the accent,
     so a shut question looked open. */
  border: 1px solid rgba(255, 255, 255, 0.26); border-radius: 50%;
  color: var(--sc-accent);
  transition: border-color var(--sc-d-fast) var(--sc-ease-out),
              background var(--sc-d-fast) var(--sc-ease-out),
              transform var(--sc-d-slow) var(--sc-ease-out);
}
.faq__q i::before, .faq__q i::after {
  content: ""; position: absolute; top: 50%; left: 50%; translate: -50% -50%;
  width: 12px; height: 2px; border-radius: 2px;
  background: currentColor;
  transition: transform var(--sc-d-slow) var(--sc-ease-out);
}
.faq__q i::after { transform: rotate(90deg); }
.faq__item.is-open .faq__q { color: var(--sc-accent); }
.faq__item.is-open .faq__q i {
  border-color: var(--sc-accent);
  background: color-mix(in oklab, var(--sc-accent) 22%, transparent);
  transform: rotate(180deg);
}
.faq__item.is-open .faq__q i::after { transform: rotate(0deg); }

.faq__a {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows var(--sc-d-slow) var(--sc-ease-out);
}
.faq__item.is-open .faq__a { grid-template-rows: 1fr; }
.faq__a > div { overflow: hidden; }
.faq__a p {
  margin: 0 0 var(--sc-5); max-width: 62ch;
  font-size: var(--sc-t-sm); line-height: 1.7; color: var(--sc-ink-soft);
}
.faq__a b { color: var(--sc-ink); font-weight: 600; }

/* The ask's button sits tight to the text above it here, unlike the
   shared rule in home.css which gives it room of its own. */
.band--ask .btn { margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  /* The drift is parallax and goes. The raise on the recommended card
     stays: it is where the card sits, not something it does, and
     flattening it removes the one signal saying which plan is meant
     without giving anybody any relief from motion. */
  .bonuses li, .bonuses li.sc-in { transform: none; }
}
