/* ============================================================================
   Refetcher · Auth side panel (sign-in, sign-up, password and verify pages)
   Inset rounded card on the right with a halftone globe, form on the left,
   one logo in the top-left corner. Markup is filled in by assets/auth-panel.js.
   ========================================================================== */

/* One set of numbers drives the panel and the corner logo, so they line up. */
:root {
  --ap-gap: 12px;                               /* space around the panel */
  --ap-pad: clamp(28px, 3.2vw, 44px);           /* panel inner padding */
  --ap-h1: clamp(1.75rem, 2.5vw, 2.45rem);      /* panel headline size */
  --ap-logo: 24px;                              /* corner logo height */
}

/* ── Shared frame ────────────────────────────────────────────── */
.ap {
  min-width: 0;
  margin: var(--ap-gap) var(--ap-gap) var(--ap-gap) 0;
  position: sticky;
  top: var(--ap-gap);
  align-self: start;
  height: calc(100vh - 2 * var(--ap-gap));
  height: calc(100svh - 2 * var(--ap-gap));
  min-height: 600px;
  border-radius: 24px;
  overflow: hidden;
  isolation: isolate;
  font-family: "Outfit", system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  padding: var(--ap-pad);
}

.ap__art {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.ap__headline,
.ap__foot {
  position: relative;
  z-index: 2;
}

.ap__headline {
  max-width: 17ch;
  font-size: var(--ap-h1);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.ap__headline span { display: block; text-wrap: balance; }

.ap__foot {
  margin-top: auto;
  font-size: .9rem;
  line-height: 1.45;
}

/* ── Corner logo ─────────────────────────────────────────────
   Wide screens: top-left of the page, mirroring the panel's inset on the
   right and centred on the panel headline's first line.
   Narrow screens (panel hidden): back above the form, as before. */
.auth-form { position: relative; }

.auth-form > .auth-logo {
  position: absolute;
  top: calc(var(--ap-gap) + var(--ap-pad) + (var(--ap-h1) * 1.12 - var(--ap-logo)) / 2);
  left: calc(var(--ap-gap) + var(--ap-pad));
  margin: 0;
  font-size: 1.35rem;
  z-index: 2;
}

.auth-form > .auth-logo img { height: var(--ap-logo); }

/* Bottom line ("© 2026 Refetch(er). · Cookie settings"): bottom-left on wide
   screens, level with the panel's stats; under the form on narrow ones. */
.auth-legal {
  font-size: .82rem;
  color: #8A93A6;
}

.auth-legal .rc-footer-link::before {
  content: "·";
  margin-right: .4em;
  color: #B0B8C9;
}

@media (min-width: 1021px) {
  .auth-legal {
    position: absolute;
    left: calc(var(--ap-gap) + var(--ap-pad));
    bottom: calc(var(--ap-gap) + var(--ap-pad));
  }

  /* Form lines the side panel already says in big type (sign-up's 3,000 free
     scrapes). Shown again below 1020px, where the panel is hidden. */
  .auth-subtitle--panel { display: none; }

  .auth-form {
    padding-top: calc(var(--ap-gap) + var(--ap-pad) + var(--ap-logo) + 40px);
    padding-bottom: calc(var(--ap-gap) + var(--ap-pad) + var(--ap-logo) + 40px);
  }
}

/* ── Responsive + motion ─────────────────────────────────────── */
@media (max-width: 1020px) {
  .ap { display: none; }

  .auth-form { flex-direction: column; }

  .auth-form > .auth-logo {
    position: static;
    width: 100%;
    max-width: 420px;
    margin-bottom: 44px;
    font-size: 1.15rem;
  }

  .auth-form > .auth-logo img { height: 19px; }

  .auth-legal { margin-top: 36px; }
}

@media (max-width: 480px) {
  .auth-form > .auth-logo { margin-bottom: 38px; }
}

/* ── Globe ─────────────────────────────────────────────────── */
.ap--globe {
  color: #0B1020;
  background: #F3F2EE;
}

.ap--globe .ap__foot { align-self: flex-start; }
.ap--globe .ap__headline span { color: #8C909B; }

.ap-globe__canvas {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  transition: opacity .9s ease;
}

.ap-globe__canvas.is-ready { opacity: 1; }

.ap-stats {
  display: flex;
  gap: clamp(24px, 3.2vw, 48px);
}

.ap-stats b {
  display: block;
  font-size: clamp(2rem, 3.1vw, 3rem);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: 1;
}

.ap-stats span {
  display: block;
  margin-top: 10px;
  font-size: .88rem;
  color: #6B7183;
}

@media (prefers-reduced-motion: reduce) {
  .ap-globe__canvas { transition: none; }
}
