/* ==========================================================================
   AKA CONNECT — auth pages (register / login)
   Geometry mirrors Figma node 72:242 (1470x956): intro column 620px at
   left 60 / top 80; form card 710x916 at top 20, 60px gutter between.
   ========================================================================== */

.auth {
  display: grid;
  grid-template-columns: 620px 710px;
  gap: 60px;
  justify-content: center;
  align-items: start;
  /* No min-height: 100vh. Nothing here stretches to the container — the grid
     starts its rows at the top and the card sets its own height — so all that
     ever did was make the box tall, and with a header above it now that is
     100vh of grid under a header, i.e. a screenful plus a scrollbar. The body
     background paints the canvas either way. */
  padding: 20px;
}

/* ---------------- left column ---------------- */

.intro {
  display: flex;
  flex-direction: column;
  gap: 106px;
  padding-top: 60px;          /* design top 80 vs card top 20 */
}

.intro__head { display: flex; flex-direction: column; gap: 40px; }

.intro__heading { display: flex; flex-direction: column; gap: 20px; max-width: 599px; }

.intro__title {
  font: var(--h1);
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--ink);
}
/* the brand sits on its own line, as in the design; works for all three
   languages regardless of where {brand} falls in the sentence */
.intro__title em { display: block; font-style: normal; color: var(--purple); }

.intro__lead {
  max-width: 408px;
  font: var(--t1);
  letter-spacing: 0;
  color: var(--body);
}

/* account-type cards — Figma component 205:3543 / 205:3544 */
.plans { display: flex; flex-direction: column; gap: 20px; align-items: stretch; }
.plans__row { display: flex; gap: 12px; width: 100%; }

.plan {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  width: 304px;
  min-height: 324px;
  padding: 30px;
  border: 1px solid var(--gray-purple);
  border-radius: var(--r-plan);
  background: transparent;
  text-align: left;
  transition: background-color .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.plan:hover { border-color: var(--purple); }

/* selected state mirrors the Hover variant: white fill, card shadow, arrow */
.plan[aria-pressed="true"] {
  background: var(--white);
  border-color: transparent;
  box-shadow: var(--shd-card);
}

.plan__top { display: flex; flex-direction: column; gap: 40px; width: 100%; color: var(--ink); }
.plan__name { font: var(--h3); letter-spacing: 0; }

/* spans, not <li> — the card is a <button> and may only hold phrasing content */
.plan__list { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.plan__list > span {
  position: relative;
  padding-left: 22px;
  font: var(--t-med);
  letter-spacing: 0;
}
.plan__list > span::before {
  content: "\2726";           /* the four-pointed star used in the design */
  position: absolute;
  left: 0;
  font-size: 12px;
  line-height: 1.75;
}

/* arrow badge, only on the selected card */
.plan__go {
  display: flex;
  align-items: center;
  padding: 10px;
  border-radius: var(--r-chip);
  background: var(--w-purple);
  opacity: 0;
  transition: opacity .18s ease;
}
.plan__go img { width: 20px; height: 20px; }
.plan[aria-pressed="true"] .plan__go { opacity: 1; }

/* ---------------- login-only: dark showcase + accent chips ----------------
   Registration asks the visitor to make a choice, so its left column is two
   selectable cards. A returning user has nothing to choose, so login instead
   borrows the marketing pages' own furniture: the signature black stat panel
   and the pastel capability chips. */

.showcase {
  width: 100%;
  padding: 28px 30px 30px;
  border-radius: var(--r-plan);
  background: var(--ink);
  box-shadow: var(--inner-purple), var(--shd-card);
  color: var(--white);
}

.showcase__eyebrow {
  font: var(--t-bold);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--gray-purple);
}

.showcase__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 26px;
}
.stat__value { font: var(--h2); letter-spacing: 0; }
.stat--accent .stat__value { color: var(--accent-lavender); }
.stat__label {
  margin-top: 8px;
  font: var(--t-med);
  letter-spacing: 0;
  color: var(--gray-purple);
}

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  padding: 9px 16px;
  border-radius: var(--r-pill);
  background: var(--bg);
  box-shadow: var(--inner-chip);
  font: var(--t-med);
  letter-spacing: 0;
  color: var(--ink-warm);
}
.chip:nth-child(1) { --bg: var(--accent-lavender); }
.chip:nth-child(2) { --bg: var(--accent-lgreen); }
.chip:nth-child(3) { --bg: var(--accent-blue); }
.chip:nth-child(4) { --bg: var(--light-purple); }
.chip:nth-child(5) { --bg: var(--accent-peach); }

/* upgrade hint pill — Figma 72:263 */
.hint {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  background: var(--white);
  border-radius: var(--r-btn);
  font: var(--t-med);
  letter-spacing: 0;
  color: var(--body);
}
.hint img { width: 16px; height: 16px; flex: none; }
.hint b { font-weight: 500; color: var(--purple); }

/* the trust strip lives in base.css — the hero uses it too */

/* ---------------- right card ---------------- */

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  width: 710px;
  min-height: 916px;
  padding: 100px 80px 40px;
  background: var(--card);
  border-radius: var(--r-panel);
  box-shadow: var(--shd-panel);
}

/* title, optionally with a subtitle tucked under it rather than a full
   40px card gap away */
.card__head { display: flex; flex-direction: column; gap: 10px; width: 100%; }

.card__title {
  width: 100%;
  font: var(--h2);
  letter-spacing: 0;
  text-align: center;
  color: var(--ink-text);
}

.card__sub {
  font: var(--t-med);
  letter-spacing: 0;
  text-align: center;
  color: var(--gray-purple);
}

.card__body { display: flex; flex-direction: column; align-items: center; gap: 88px; width: 100%; }
.card__main { display: flex; flex-direction: column; align-items: center; gap: 70px; width: 100%; }

/* segmented phone / email switch — Figma 72:305 */
.seg { display: flex; gap: 5px; }
.seg__btn {
  padding: 10px 15px;
  border-radius: var(--r-btn);
  font: var(--t-body);
  letter-spacing: var(--ls-body);
  color: var(--ink-text);
  transition: background-color .18s ease, color .18s ease;
}
.seg__btn:hover { background: var(--w-purple); }
.seg__btn[aria-selected="true"] { background: var(--purple); color: var(--white); }
.seg__btn[aria-selected="true"]:hover { background: var(--purple-hover); }

/* the form carries the same 70px rhythm as its siblings in .card__main */
.card__main form { display: flex; flex-direction: column; gap: 70px; width: 100%; }

.form-block { display: flex; flex-direction: column; gap: 16px; width: 100%; }
.fields { display: flex; flex-direction: column; gap: 40px; width: 100%; }

/* consent / remember row — Figma 72:301 */
.consent {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 15px 5px 20px;
  border-radius: var(--r-chip);
  font: var(--t-med);
  letter-spacing: 0;
  color: var(--ink);
  cursor: pointer;
}
.consent input { position: absolute; opacity: 0; width: 0; height: 0; }
.consent__box {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  /* sized rather than padded, so the outline below does not grow the box past
     the 20px it has always been and nudge the label along with it */
  width: 20px;
  height: 20px;
  /* The outline is what makes an unticked box a box. w-purple is #F6F5FE, so
     the fill alone is all but invisible against the white card, and the tick
     used to be doing the work of showing there was a control here at all. */
  border: 1px solid var(--card-border);
  border-radius: var(--r-check);
  background: var(--w-purple);
  transition: border-color .15s ease;
}
/* Not drawn until it is ticked. At 35% it read as a check mark that had already
   been made and then greyed out, which is the opposite of "not selected". */
.consent__box img { width: 14px; height: 14px; opacity: 0; transition: opacity .15s ease; }
.consent input:checked + .consent__box { border-color: var(--purple); }
.consent input:checked + .consent__box img { opacity: 1; }
.consent input:focus-visible + .consent__box { box-shadow: var(--focus); }

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}
.row-between .consent { padding-left: 0; }
.link-quiet { font: var(--t-med); letter-spacing: 0; color: var(--purple); }

.cta { display: flex; flex-direction: column; align-items: center; gap: 15px; width: 100%; }
.oauth { display: flex; gap: 4px; width: 100%; }
.oauth .btn { flex: 1 1 0; min-width: 0; }
.oauth .btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* bottom link — Figma 82:1166 */
.card__foot {
  padding: 3px 0;
  border-bottom: 1px solid var(--ink);
  font: var(--t-body);
  letter-spacing: var(--ls-body);
  color: var(--ink-text);
}
.card__foot:hover { color: var(--purple); border-color: var(--purple); text-decoration: none; }

/* submit feedback */
.form-note {
  width: 100%;
  padding: 13px 18px;
  border-radius: var(--r-chip);
  font: var(--t-med);
  letter-spacing: 0;
}
.form-note--info  { background: var(--w-purple); color: #40308A; }
.form-note--error { background: #FDECEE; color: #97283A; }

/* ---------------- verify-email / reset-password ----------------
   These two carry one short message and at most one field, so they take the
   card without the sign-in pages' second column or their 916px floor. */

/* Both selectors name their class twice on purpose. The responsive steps below
   set .auth and .card at the same weight and come later in the file, so a
   single class here would lose to them at every width but the widest. */
.auth.auth--single { grid-template-columns: minmax(0, 710px); justify-content: center; }
.card.card--slim { min-height: 0; padding: 60px 80px 50px; gap: 30px; }
.card--slim .card__body { gap: 40px; }
.card--slim .card__main { gap: 30px; }
.card--slim .card__sub { text-align: center; }
/* the sign-in form leaves 70px between blocks; these have one */
.token-form { display: flex; flex-direction: column; gap: 40px; width: 100%; }

/* ---------------- responsive ----------------
   The Figma auth frames are desktop-only, so these steps are a sensible
   reduction of the same design rather than a 1:1 match to mobile frames. */

@media (max-width: 1450px) {
  .auth { grid-template-columns: minmax(0, 620px) minmax(0, 710px); gap: 40px; }
  .intro__title { font-size: clamp(40px, 4.2vw, 60px); }
  .card { width: 100%; padding: 70px 56px 40px; }
}

@media (max-width: 1120px) {
  .auth { grid-template-columns: minmax(0, 1fr); gap: 40px; max-width: 710px; margin: 0 auto; }
  .intro { padding-top: 24px; gap: 48px; }
  .card { min-height: 0; }
}

@media (max-width: 640px) {
  .auth { padding: 16px; }
  .card.card--slim { padding: 32px 20px 28px; }
  .intro { gap: 36px; padding-top: 56px; }
  .intro__title { font-size: 34px; }
  .intro__lead { font-size: 16px; }
  .plans__row { flex-direction: column; }
  .plan { width: 100%; min-height: 0; padding: 22px; }
  .plan__top { gap: 20px; }
  .card { padding: 32px 20px 28px; border-radius: 22px; gap: 28px; }
  .card__title { font-size: 26px; }
  .card__body { gap: 40px; }
  .card__main { gap: 36px; }
  .fields { gap: 24px; }
  .oauth { flex-direction: column; gap: 10px; }
}
