/* Two ways to take part: two equal cards after the biograph.com memberships block (measured from the
   live site at 1440px), set in our type and section 2's colours. Each panel opens with the plan's
   name and a line under it, then its 3D metal card (metal-card.js) square on to the viewer, then an
   "Ideal for those who" list, then the panel's own button. The light panel (left) is Saccade Research
   with the violet card, the dark one (right) Saccade Acuity with the green card. */
/* Inter is only for the lettering the 3D cards paint onto their own textures. */
@font-face {
  font-family: Inter; src: url("vendor/inter/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
}
.plans {
  --plans-ink: #120c08;
  --plans-muted: rgba(18, 12, 8, .8);
  padding: calc(150 * var(--px)) calc(60 * var(--px)); background: #fff; color: var(--plans-ink);
  /* the cards' canvases reach past their columns; never let that scroll the page sideways */
  overflow-x: clip;
}
.plans__intro { max-width: calc(800 * var(--px)); margin: 0 auto; text-align: center; }
.plans__title {
  margin: 0; font: 500 calc(46 * var(--px))/calc(51.06 * var(--px)) var(--landing-head); letter-spacing: normal; color: var(--plans-ink);
  text-wrap: balance;
}
.plans__sub {
  max-width: calc(558 * var(--px)); margin: calc(20 * var(--px)) auto 0; font: 400 calc(15 * var(--px))/calc(22 * var(--px)) var(--landing-body); letter-spacing: -0.2px;
  color: var(--plans-muted); text-wrap: pretty;
}

.plans__grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, calc(500 * var(--w)))); justify-content: center; gap: calc(24 * var(--px));
  margin: calc(50 * var(--px)) 0 0; padding: 0; list-style: none;
}
/* A soft light in the card's own colour, brightest behind the card: violet for Research, a gentle
   green for Acuity. The violet fades out across the light panel. The green is smaller and fades to
   nothing well before the list, and the dark panel is one black throughout, so there is no edge
   anywhere. Both lights are centred on the card: its 60px margin plus half its height above the top
   half's bottom edge (146px at 1440px, 115px on phones); the card's height follows the panel's
   width (--w) and the margins the spacing (--px). */
.plan {
  display: flex; flex-direction: column; border-radius: calc(30 * var(--px));
  background: radial-gradient(ellipse 80% calc(300 * var(--w)) at 50% calc(144.7 * var(--px) + 97.7 * var(--w)),
    rgba(133, 86, 214, .32), rgba(133, 86, 214, .13) 45%, rgba(133, 86, 214, 0) 78%), #f7f7f5;
}
.plan--dark { background: #0c0d0c; color: #fff; }
/* 30px corners, as on section 2's blocks */
.plan__top { padding: calc(30 * var(--px)) calc(30 * var(--px)) 0; border-radius: calc(30 * var(--px)) calc(30 * var(--px)) 0 0; }
.plan--dark .plan__top {
  background: radial-gradient(ellipse calc(290 * var(--w)) calc(150 * var(--w)) at 50% calc(100% - 48.3 * var(--px) - 97.7 * var(--w)),
    rgba(34, 168, 106, .5), rgba(34, 168, 106, .28) 45%, rgba(34, 168, 106, .1) 75%, rgba(34, 168, 106, 0));
}

/* The card's stage is the card's own footprint at rest (a credit card's proportions); it takes the
   drags. The canvas reaches well past it on every side, so the card can turn without its corners
   being cut off, and floats over whatever is there. The front image shows until the scene has drawn,
   and stays where WebGL isn't available. */
.plan__stage {
  position: relative; z-index: 1; width: 62%; margin: calc(56 * var(--px)) auto calc(60 * var(--px)); aspect-ratio: 85.6 / 53.98; border-radius: calc(12 * var(--px));
}
.plan__stage.is-live { cursor: grab; }
.plan__stage.is-live:active { cursor: grabbing; }
.plan__stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.plan__stage img[hidden] { display: none; }
.plan__stage canvas {
  position: absolute; top: -50%; left: -14%; display: block; width: 128%; height: 200%; pointer-events: none; outline: none;
}
.plan__stage:has(canvas:focus-visible) { outline: 2px solid #3fb383; outline-offset: calc(8 * var(--px)); }
/* The light panel (Research) is set in black, its name in the violet of its card; the dark panel
   (Acuity) in white. */
.plan { --plan-text: #120c08; --plan-soft: rgba(18, 12, 8, .76); }
.plan__name { margin: 0; font: 700 calc(32 * var(--px))/calc(38.4 * var(--px)) var(--landing-head); color: #553090; }
/* "Saccade" heavy, the product word smaller and light beside it. */
.plan__name-sub { margin-left: 2px; font-size: calc(22 * var(--px)); font-weight: 300; }
.plan--dark .plan__name { color: #fff; }
.plan__line { margin: calc(8 * var(--px)) 0 0; font: 400 calc(16 * var(--px))/calc(24 * var(--px)) var(--landing-body); color: var(--plan-soft); }
.plan--dark .plan__line { color: rgba(255, 255, 255, .72); }

.plan__bottom { display: flex; flex-direction: column; flex: 1; padding: calc(30 * var(--px)) calc(30 * var(--px)) calc(32 * var(--px)); }
.plan__ideal { margin: 0; font: 500 calc(14 * var(--px))/calc(14 * var(--px)) var(--landing-body); color: var(--plan-text); }
.plan--dark .plan__ideal { color: #fff; }
.plan__list { display: grid; gap: calc(10 * var(--px)); margin: calc(15 * var(--px)) 0 calc(28 * var(--px)); padding: 0; list-style: none; }
.plan__list li {
  display: flex; align-items: center; gap: calc(10 * var(--px)); font: 400 calc(14 * var(--px))/calc(21 * var(--px)) var(--landing-body); color: var(--plan-soft);
}
.plan--dark .plan__list li { color: rgba(255, 255, 255, .72); }
.plan__list svg { flex: none; width: calc(16 * var(--px)); height: calc(16 * var(--px)); }

/* Acuity's price, with what it buys in one line under it, just above its button: the price is
   shown before the click so the reader knows what they are booking. */
.plan__price {
  margin: 0 0 calc(18 * var(--px)); padding-top: calc(20 * var(--px)); box-shadow: inset 0 1px rgba(255, 255, 255, .1);
  font: 400 calc(14 * var(--px))/calc(21 * var(--px)) var(--landing-body); color: rgba(255, 255, 255, .72);
}
.plan__price strong {
  display: block; margin-bottom: calc(4 * var(--px));
  font: 500 calc(26 * var(--px))/calc(32 * var(--px)) var(--landing-head); letter-spacing: -0.3px; color: #fff;
}
/* "/ month" after the price, quieter and in the text face, and "Billed quarterly" small under it. */
.plan__bill { display: block; margin: calc(-2 * var(--px)) 0 calc(8 * var(--px)); font: 400 calc(12 * var(--px))/calc(16 * var(--px)) var(--landing-body); color: rgba(255, 255, 255, .55); }
.plan__per { font: 400 calc(15 * var(--px))/1 var(--landing-body); letter-spacing: 0; color: rgba(255, 255, 255, .6); }

/* Each panel ends with its own action, and the weight follows what it is (Linear's pricing cards):
   Acuity, the product you buy, gets the one full-width button; Research, an enquiry, gets a violet
   text link at the same height, so the two still line up. Regular-weight type with tightened
   tracking (Apple) and a chevron that grows a stem on hover (Stripe). Never a black block. */
.plan__btn, .plan__link {
  display: inline-flex; align-items: center; gap: calc(8 * var(--px)); height: calc(46 * var(--px)); margin-top: auto;
  font: 500 calc(15 * var(--px))/1 var(--landing-body); letter-spacing: -.015em; white-space: nowrap;
}
.plan__btn {
  justify-content: center; width: 100%; border-radius: var(--landing-pill);
  background: #f2f2f0; color: #120c08; box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(0, 0, 0, .4);
  transition: background-color .2s ease;
}
.plan__btn:hover { background: #fff; }
.plan__btn:focus-visible { outline: 2px solid #fff; outline-offset: calc(3 * var(--px)); }
.plan__link { align-self: flex-start; color: #553090; }
.plan__link:hover { text-decoration: underline; text-underline-offset: calc(4 * var(--px)); }
.plan__link:focus-visible { outline: 2px solid #553090; outline-offset: calc(4 * var(--px)); border-radius: calc(4 * var(--px)); }
.plan__arrow { flex: none; width: calc(10 * var(--px)); height: calc(10 * var(--px)); overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round; }
.plan__arrow-stem { opacity: 0; transition: opacity .15s ease; }
.plan__arrow-head { transition: transform .15s ease; }
:is(.plan__btn, .plan__link):hover .plan__arrow-stem { opacity: 1; }
:is(.plan__btn, .plan__link):hover .plan__arrow-head { transform: translateX(calc(3 * var(--px))); }

/* When "Ask about the study" or "Get started" is pressed (plans.js): the panel, lifted into a fixed
   holder at the same spot, stays on top while a layer in its colour spreads out under it over the
   screen. Then a veil in that same colour fades in over the panel, under the card only (the stage
   sits above it), so the card is left alone on the colour as the next page takes it over. */
.plan-spread { position: fixed; inset: 0; z-index: 9000; pointer-events: none; }
.plan-lift { position: fixed; z-index: 9001; pointer-events: none; }
.plan-lift .plan { position: relative; height: 100%; }
.plan-lift .plan::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--plan-spread);
  opacity: 0; transition: opacity .3s ease;
}
.plan-lift.is-leaving .plan::after { opacity: 1; }
/* For the journey the card is its flat front image: a live 3D canvas can't be carried across. */
.plan__stage.is-handing-over img[hidden] { display: block; }
.plan__stage.is-handing-over canvas { visibility: hidden; }
/* The card glides across to the next page (membership.css times it); only that hand-over animates. */
@view-transition { navigation: auto; }

/* Text for screen readers only (the "with Saccade Acuity" part of a button label). */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* The hero's own type steps. */
@media (max-width: 1439.98px) {
  .plans__title { font-size: 36px; line-height: 39.96px; letter-spacing: -0.5px; }
  .plans__sub { font-size: 16px; line-height: 24px; }
}
/* Below two cards' width, they stack. */
@media (max-width: 1069.98px) {
  .plans { padding: 80px 15px; }
  .plans__grid { grid-template-columns: minmax(0, 500px); }
}
@media (max-width: 809.98px) {
  .plans__title { font-size: 32px; line-height: 35.52px; }
  .plan__name { font-size: 28px; line-height: 33.6px; }
  .plan__top { padding: 26px 24px 0; }
  .plan__stage { width: 72%; margin: 44px auto 48px; }
  .plan--dark .plan__top {
    background: radial-gradient(ellipse 220px 118px at 50% calc(100% - 115px),
      rgba(34, 168, 106, .5), rgba(34, 168, 106, .28) 45%, rgba(34, 168, 106, .1) 75%, rgba(34, 168, 106, 0));
  }
  .plan__bottom { padding: 26px 24px 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .plan__btn, .plan__arrow-stem, .plan__arrow-head { transition: none; }
}
