/* Sign up, sign in and the other account pages, in the book-bounty.com
   redesign style. Tokens, the quote bubble, member faces and typographic
   covers follow the marketing site (src/styles/global.css there). */

@font-face {
  font-family: "Fraunces";
  src: url(/assets/fraunces-a7dfb94a1ab9192ac95b332932bf87ab2fa67b186c7a12021ed164d7acb9e565.woff2) format("woff2");
  font-weight: 500 800;
  font-display: swap;
}

.auth {
  --paper: #fbf6ec;
  --paper-2: #f3ebdc;
  --butter: #fbe7a1;
  --butter-deep: #f2d36b;
  --amber: #f4b73f;
  --amber-deep: #d99a16;
  --ink: #123f5a;
  --ink-2: #2e4f66;
  --ink-3: #5b7386;
  --brand: #2880b2;
  --brand-hover: #20668e;
  --brand-deep: #184d6b;
  --brand-block: #226e9b;
  --button: #1e6390;
  --button-hover: #184d6b;
  --sky: #7cc0e6;
  --mist: #eef4f8;
  --mist-2: #d4e6f0;
  --sage: #8fb996;
  --sand: #e2cda3;
  --terracotta: #d9663d;
  --plum: #6e4b86;
  --teal: #2c8c8c;
  --coral: #f0645a;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  color-scheme: light;
  background: var(--paper);
  color: var(--ink);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.auth :focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

.auth ::selection {
  background: var(--mist-2);
  color: var(--ink);
}

/* Page frame: the form column on paper and a colour panel beside it. On
   phones the panel drops below the form, or is left out on pages that only
   decorate with it. */
.auth-shell {
  display: grid;
  grid-template-areas: "header" "main" "panel" "footer";
  grid-template-rows: auto 1fr auto auto;
  min-height: 100vh;
  padding: 1.25rem;
  gap: 0 2rem;
}

.auth-shell-header { grid-area: header; }
.auth-shell-main { grid-area: main; display: flex; align-items: center; padding-block: 2.5rem 3rem; }
.auth-shell-panel { grid-area: panel; display: none; }
.auth-shell--panel-on-mobile .auth-shell-panel { display: block; margin-bottom: 2rem; }
.auth-shell-footer { grid-area: footer; }

.auth-shell-header,
.auth-shell-footer {
  width: 100%;
  max-width: 30rem;
  margin-inline: auto;
}

@media (min-width: 640px) {
  .auth-shell { padding: 1.5rem 2.5rem; }
}

@media (min-width: 1024px) {
  .auth-shell {
    grid-template-areas: "header panel" "main panel" "footer panel";
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    padding: 1rem 1rem 1.5rem 3.5rem;
    column-gap: 3.5rem;
  }
  .auth-shell-header { padding-top: 1rem; }
  .auth-shell-panel,
  .auth-shell--panel-on-mobile .auth-shell-panel {
    display: flex;
    margin: 0;
  }
  .auth-shell-panel > .auth-panel { flex: 1; min-height: calc(100vh - 2.5rem); }
}

@media (min-width: 1280px) {
  .auth-shell { padding-left: 5rem; column-gap: 5rem; }
}

/* Type */
.auth-h1 {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2.25rem, 1.8rem + 1.6vw, 3rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144, "SOFT" 60, "WONK" 1;
  text-wrap: balance;
}

.auth-h2 {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.875rem, 1.4rem + 1.4vw, 2.5rem);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 96, "SOFT" 40, "WONK" 1;
  text-wrap: balance;
}

.auth-lead {
  color: var(--ink-2);
  font-size: 1.125rem;
  line-height: 1.55;
  text-wrap: pretty;
}

.auth-link {
  color: var(--brand-hover);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
  transition: text-decoration-thickness 180ms ease;
}

.auth-link:hover {
  text-decoration-thickness: 3px;
}

/* The marker stroke behind one heading phrase. */
.auth-marker {
  position: relative;
  isolation: isolate;
  white-space: nowrap;
}

.auth-marker::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -0.08em;
  right: -0.1em;
  bottom: 0.02em;
  height: 0.5em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 40' preserveAspectRatio='none'%3E%3Cpath fill='%23D4E6F0' d='M6 14c40-6 110-9 190-8 70 1 140 2 196 7 6 1 8 6 6 11-2 6-8 8-14 8-60 2-130 0-200 1-60 1-120 3-172 1-8 0-12-4-12-10 0-5 2-9 6-10z'/%3E%3C/svg%3E")
    center / 100% 100% no-repeat;
  transform-origin: left center;
  transform: rotate(-1deg);
  animation: auth-marker-in 500ms var(--ease-out) 300ms both;
}

@keyframes auth-marker-in {
  from {
    transform: scaleX(0) rotate(-1deg);
  }
}

/* Form fields */
.auth-label {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
}

.auth-hint {
  margin-top: 0.15rem;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--ink-3);
}

.auth .auth-input {
  display: block;
  width: 100%;
  min-height: 52px;
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1.5px solid #b8c6d0;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font-size: 1.0625rem;
  line-height: 1.4;
  box-shadow: none;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.auth .auth-input:hover {
  border-color: var(--ink-3);
}

.auth .auth-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--mist-2);
}

.auth .field_with_errors .auth-input {
  border-color: #c2410c;
}

.auth-password {
  position: relative;
}

.auth-password .auth-input {
  padding-right: 5rem;
}

.auth-password-toggle {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  min-height: 36px;
  padding: 0 0.75rem;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--brand-hover);
}

.auth-password-toggle:hover {
  background: var(--mist);
}

.auth .auth-check {
  width: 1.25rem;
  height: 1.25rem;
  border: 1.5px solid #b8c6d0;
  border-radius: 6px;
  color: var(--button);
}

.auth .auth-check:focus {
  box-shadow: 0 0 0 3px var(--mist-2);
}

/* The marketplace picker (SlimSelect) dressed like the other inputs. */
.auth .ss-main {
  --ss-border-color: #b8c6d0;
  --ss-border-radius: 14px;
  --ss-primary-color: var(--button);
  --ss-focus-color: var(--brand);
  --ss-font-color: var(--ink);
  --ss-spacing-l: 8px;
  --ss-spacing-m: 6px;
  --ss-spacing-s: 4px;
  min-height: 52px;
  margin-top: 0.5rem;
  padding: 6px 10px;
  border-width: 1.5px;
  font-size: 1rem;
}

.auth .ss-main .ss-values .ss-value {
  border-radius: 999px;
  padding: 2px 4px 2px 8px;
}

.auth .ss-main .ss-values .ss-value .ss-value-text {
  display: inline-flex;
  align-items: center;
  font-size: 0.9375rem;
}

.auth .ss-content {
  border-radius: 14px;
  font-size: 1rem;
}

/* Buttons */
.auth-btn {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 56px;
  padding-inline: 1.75rem;
  border-radius: 999px;
  background: var(--button);
  color: #fff;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition:
    background-color 180ms ease,
    transform 180ms ease;
}

.auth-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 10px 22px -10px rgb(18 63 90 / 0.55);
  opacity: 0.4;
  transition: opacity 420ms var(--ease-out);
  pointer-events: none;
}

.auth-btn:hover,
.auth-btn:focus-visible {
  background: var(--button-hover);
}

.auth-btn:hover::after,
.auth-btn:focus-visible::after {
  opacity: 1;
}

.auth-btn:active {
  transform: scale(0.97);
}

.auth-btn-ribbon {
  position: absolute;
  z-index: -1;
  left: 1.4rem;
  top: -6px;
  width: 12px;
  height: 26px;
  color: var(--amber);
  transition: transform 420ms var(--ease-spring);
}

.auth-btn:hover .auth-btn-ribbon,
.auth-btn:focus-visible .auth-btn-ribbon {
  transform: translateY(-4px);
}

.auth-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding-inline: 1.25rem;
  border-radius: 999px;
  box-shadow: inset 0 0 0 2px var(--ink);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  transition: background-color 180ms ease;
}

.auth-btn-secondary:hover {
  background: var(--paper-2);
}

/* Colour block panel, the paper cut-out look from the marketing site. */
.auth-panel {
  position: relative;
  isolation: isolate;
  overflow: clip;
  border-radius: 28px;
}

@media (min-width: 1024px) {
  .auth-panel {
    border-radius: 40px;
  }
}

/* Keeps short panel content centred in view while a longer form scrolls. */
@media (min-width: 1024px) {
  .auth-panel-pin {
    position: sticky;
    top: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100vh - 8.5rem);
  }
}

.auth-panel--navy {
  background: var(--ink);
  color: var(--paper);
}

.auth-panel--butter {
  background: var(--butter);
  color: var(--ink);
}

.auth-doodle {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  opacity: 0.15;
  fill: none;
  stroke: currentColor;
  stroke-width: 10;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-stat {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.875rem, 1.4rem + 1.6vw, 3rem);
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--butter);
  font-variation-settings: "opsz" 144, "SOFT" 60;
}

/* The steps strip: account, email, membership. */
.auth-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink-3);
}

.auth-step {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.auth-step-dot {
  display: inline-grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px #b8c6d0;
  font-size: 0.875rem;
  font-weight: 700;
}

.auth-step[aria-current="step"] {
  color: var(--ink);
}

.auth-step[aria-current="step"] .auth-step-dot {
  background: var(--ink);
  box-shadow: none;
  color: #fff;
}

.auth-step--done .auth-step-dot {
  background: var(--mist-2);
  box-shadow: none;
  color: var(--ink);
}

.auth-step + .auth-step::before {
  content: "";
  width: 0.75rem;
  height: 2px;
  margin-right: 0.25rem;
  border-radius: 2px;
  background: #cbd6de;
}

/* Member quotes: the speech bubble from the marketing site's MemberQuote. */
.mq {
  display: grid;
  gap: 1.25rem;
}

.mq-bubble {
  position: relative;
  padding: 1.375rem 1.625rem;
  border: 2px solid var(--ink);
  border-radius: 24px;
  background: #fff;
  color: var(--ink);
}

.mq-bubble::after {
  content: "";
  position: absolute;
  bottom: -9px;
  left: 2rem;
  width: 16px;
  height: 16px;
  border: solid var(--ink);
  border-width: 0 0 2px 2px;
  background: #fff;
  rotate: -45deg;
}

.auth-panel--navy .mq-bubble,
.auth-panel--navy .mq-bubble::after {
  border-color: #fff;
}

.mq-bubble p {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.3125rem;
  font-weight: 500;
  line-height: 1.4;
  font-variation-settings: "opsz" 48, "SOFT" 80, "WONK" 0;
  text-wrap: pretty;
}

.mq-mark {
  float: left;
  width: 30px;
  height: 30px;
  margin: -0.3em 0.6rem -0.5em -0.15rem;
  fill: var(--b);
}

.mq--big .mq-bubble {
  padding: 1.75rem 2rem;
  border-radius: 28px;
}

.mq--big .mq-bubble::after {
  left: 2.5rem;
}

.mq--big .mq-bubble p {
  font-size: clamp(1.5rem, 1.25rem + 0.6vw, 1.75rem);
  line-height: 1.3;
}

.mq--big .mq-mark {
  width: 40px;
  height: 40px;
}

.mq-who {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-left: 1rem;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
}

.auth-panel--navy .mq-who {
  color: var(--paper);
}

/* Member faces: a tone circle, a cap poured over it and a doodle face. */
.mf {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--a);
  fill: var(--b);
  transition: rotate 420ms var(--ease-spring);
}

.mq:hover .mf {
  rotate: 6deg;
}

.mf--40 {
  width: 40px;
  height: 40px;
}

.mf--72 {
  width: 72px;
  height: 72px;
}

.mf > use:last-child {
  fill: none;
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-faces {
  display: flex;
}

.auth-faces .mf {
  box-shadow: 0 0 0 3px var(--paper);
}

.auth-faces .mf + .mf {
  margin-left: -10px;
}

.fa-sage { --a: var(--sage); }
.fa-sand { --a: var(--sand); }
.fa-amber { --a: var(--amber); }
.fa-sky { --a: var(--sky); }
.fa-butter-deep { --a: var(--butter-deep); }
.fa-mist-2 { --a: var(--mist-2); }
.fa-coral { --a: var(--coral); }
.fb-ink { --b: var(--ink); }
.fb-brand { --b: var(--brand); }
.fb-plum { --b: var(--plum); }
.fb-teal { --b: var(--teal); }
.fb-terracotta { --b: var(--terracotta); }
.fb-brand-deep { --b: var(--brand-deep); }
.fb-amber-deep { --b: var(--amber-deep); }

/* Typographic covers, invented titles only. */
.auth-cover {
  --w: 150px;
  --tone: var(--ink);
  --tone-dark: color-mix(in srgb, var(--tone) 80%, black);
  --on: var(--paper);
  position: relative;
  display: block;
  flex: none;
  width: var(--w);
  aspect-ratio: 2 / 3;
  perspective: 1100px;
}

.auth-cover::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 6%;
  right: -4%;
  bottom: -7%;
  height: 9%;
  border-radius: 50%;
  background: rgb(18 63 90 / 0.22);
  filter: blur(6px);
}

.auth-cover__book {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateY(var(--ry, -20deg)) translateY(var(--lift, 0));
  transition: transform 420ms var(--ease-out);
}

.auth-cover:hover .auth-cover__book {
  --ry: -6deg;
  --lift: -6px;
}

.auth-cover__front {
  container-type: inline-size;
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 14% 8% 10% 17%;
  border-radius: 2px 5px 5px 2px;
  background: var(--tone);
  color: var(--on);
  overflow: hidden;
  box-shadow: inset calc(var(--w) * 0.08) 0 0 var(--tone-dark);
  transform: translateZ(calc(var(--w) * 0.04));
}

.auth-cover__front::before {
  content: "";
  position: absolute;
  inset: 6% 6% 6% 14%;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  opacity: 0.55;
}

.auth-cover__title {
  position: relative;
  font-family: "Fraunces", Georgia, serif;
  font-size: 12cqi;
  font-weight: 700;
  line-height: 1.05;
  font-variation-settings: "opsz" 48, "SOFT" 80;
  text-wrap: balance;
}

.auth-cover__author {
  position: relative;
  margin-top: 6%;
  font-size: 6.5cqi;
  font-weight: 600;
  line-height: 1.2;
}

.auth-cover__genre {
  position: relative;
  margin-top: auto;
  font-size: 5.5cqi;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}

.auth-cover--brand { --tone: var(--brand); }
.auth-cover--terracotta { --tone: var(--terracotta); }
.auth-cover--plum { --tone: var(--plum); }
.auth-cover--teal { --tone: var(--teal); }
.auth-cover--sage { --tone: var(--sage); --on: var(--ink); }

/* The bookmark ribbon draped over a cover. */
.auth-ribbon {
  position: absolute;
  top: -10px;
  right: 7%;
  width: 18px;
  height: 52px;
  color: var(--amber);
  transform: translateZ(calc(var(--w) * 0.05));
  transform-origin: top center;
  animation: auth-sway 4s ease-in-out infinite;
}

@keyframes auth-sway {
  50% {
    rotate: 3deg;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth *,
  .auth *::before,
  .auth *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 479px) {
  .auth-step:not([aria-current]) .auth-step-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}
