/* client-signin-v3 (Nov 18, 2026): "Focus lock" sign-in page. Everything here is scoped to [data-v3-signin], which
   v2/signin-focus.js puts on the sign-in screen only, so no other part of the portal changes.
   The accent is one custom property on the sign-in root: --signin-accent. It is the portal's own green (app.css
   --green #55A882). To try the banner green, override that one variable (for example #00BF63); nothing else changes.

   Intro timeline (only when data-v3-intro="play": first view this session, motion allowed). transform and opacity only.
   client-signin-v3-1: the logo part is the "[i] aperture with focus pull" (set A); the rest is V3's timing, unchanged.
     element              role        start   length  easing    motion
     bloom                decoration     0   1400 ms  ease-out  opens: opacity 0 to 1, scale .86 to 1
     brackets             lead           0    240 ms  ease-out  fade in, hugging the second i (the "[i]")
     2nd i, soft copy     lead           0    440 ms  ease-out  soft light up to .8, then away (the focus pull)
     2nd i, sharp stem    lead          80    360 ms  ease-out  opacity 0 to 1, scale 1.06 to 1
     2nd i, dot           lead         160    460 ms  condense  soft accent light scale 2.4 to 1, fades as the dot sharpens
     aperture             lead         300    760 ms  in-out    brackets open outward; their inner edges uncover the name
     1st i, dot           lead         980    460 ms  condense  same as the 2nd dot, once the left bracket has landed
     sign-in card         support      320    780 ms  ease-out  rise 16 px, fade in (usable from the first frame)
     heading              support      560    720 ms  ease-out  rise 12 px, fade in
     line under it        support      640    700 ms  ease-out  rise 8 px, fade in
     inside list          support      760    700 ms  ease-out  rise 8 px, fade in (one beat for the whole list, no stagger)
   ease-out cubic-bezier(0.23, 1, 0.32, 1); condense cubic-bezier(0.22, 1, 0.36, 1); in-out cubic-bezier(0.76, 0, 0.24, 1).
   The logo settles at 1440 ms, the last element at 1460 ms. data-v3-intro="done", "skipped" or "off" means no animation
   at all: the base styles below ARE the final page, the from-states live only inside the keyframes. */

/* No layout shift while the web fonts arrive (they load with display=swap): until they do, the brand text uses a local
   font scaled to the same width, so the heading and lines wrap the same before and after the swap. Ratios measured in
   Chromium on the heading and lede text: Instrument Serif / Georgia 76.3%, / Times 82.8%, Inter / Arial 106.7%. */
@font-face { font-family: "v3 serif fallback g"; src: local("Georgia"); size-adjust: 76.3%; }
@font-face { font-family: "v3 serif fallback t"; src: local("Times New Roman"), local("Times"); size-adjust: 82.8%; }
@font-face { font-family: "v3 sans fallback"; src: local("Arial"), local("Helvetica"); size-adjust: 106.7%; }

[data-v3-signin] {
  --signin-accent: #55A882;
  --v3-serif: "Instrument Serif", "v3 serif fallback g", "v3 serif fallback t", Georgia, serif;
  --v3-sans: "Inter", "v3 sans fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  --v3-ink: #0d0d0f;
  --v3-ink-2: #141417;
  --v3-on-ink: #F7F7F5;
  --v3-on-ink-2: #b9b9c0;
  --v3-on-ink-3: #8d8d96;
  --v3-hair: rgba(247, 247, 245, .09);
  --v3-ease: cubic-bezier(0.23, 1, 0.32, 1);
  --v3-condense: cubic-bezier(0.22, 1, 0.36, 1);
  --v3-aperture: cubic-bezier(0.76, 0, 0.24, 1);
  --v3-accent-soft: rgba(85, 168, 130, .30);
  --v3-accent-soft: color-mix(in srgb, var(--signin-accent) 34%, transparent);
  --v3-accent-faint: rgba(85, 168, 130, .12);
  --v3-accent-faint: color-mix(in srgb, var(--signin-accent) 13%, transparent);
}

/* ---------- page ---------- */
.auth[data-v3-signin] {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 452px);
  grid-template-rows: minmax(0, 1fr) auto auto minmax(0, 1fr);
  grid-template-areas: ". card" "brand card" "inside card" ". card";
  column-gap: clamp(40px, 7vw, 128px);
  row-gap: 44px;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(24px, 4.5vh, 56px) clamp(28px, 7vw, 120px);
  background: var(--v3-ink);
  color: var(--v3-on-ink);
  caret-color: var(--signin-accent);
}
.auth[data-v3-signin] ::selection { background: var(--v3-accent-soft); color: inherit; }
/* Aayan's art panel stays in the DOM, untouched; this page draws its own brand block instead. */
.auth[data-v3-signin] > .auth-art { display: none; }

/* ---------- backdrop: one soft bloom, a faint second light, fine grain ---------- */
.v3-bloom { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.v3-bloom > span { position: absolute; display: block; border-radius: 50%; }
.v3-bloom-a {
  left: -18vmax; top: 50%; width: 92vmax; height: 92vmax; margin-top: -46vmax;
  background: radial-gradient(closest-side, var(--v3-accent-soft), var(--v3-accent-faint) 45%, transparent 72%);
}
.v3-bloom-b {
  right: -30vmax; bottom: -42vmax; width: 80vmax; height: 80vmax;
  background: radial-gradient(closest-side, rgba(247, 247, 245, .055), transparent 70%);
}
.v3-grain {
  inset: 0; border-radius: 0 !important;
  background-image: radial-gradient(rgba(247, 247, 245, .045) 1px, transparent 1px);
  background-size: 3px 3px;
  -webkit-mask-image: radial-gradient(ellipse at 30% 50%, #000, transparent 70%);
  mask-image: radial-gradient(ellipse at 30% 50%, #000, transparent 70%);
  opacity: .6;
}

/* ---------- brand block ---------- */
.v3-brand { grid-area: brand; align-self: end; max-width: 600px; font-family: var(--v3-sans); }
.v3-lockup {
  position: relative;
  display: block;
  width: clamp(260px, 30vw, 420px);
  aspect-ratio: 1152 / 244;
}
.v3-word, .v3-word img, .v3-br { position: absolute; display: block; }
.v3-word { inset: 0; }
.v3-word img {
  inset: 0; width: 100%; height: 100%;
  /* the logo file carries its own brackets; show only the letters here (the brackets are drawn below) */
  clip-path: inset(0 7% 0 7%); /* 7%: clear of the file's brackets (x 0 to 57 and 1095 to 1152) */
}
.v3-br { top: 0; bottom: 0; width: calc(57 / 1152 * 100%); z-index: 1; color: var(--signin-accent); }
.v3-br svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.v3-br-l { left: 0; transform-origin: 100% 50%; }
.v3-br-r { right: 0; transform-origin: 0 50%; }

.v3-title {
  margin: 40px 0 0;
  font-family: var(--v3-serif);
  font-weight: 400;
  font-size: clamp(40px, 4.4vw, 64px);
  line-height: 1.04;
  letter-spacing: -.02em;
  color: var(--v3-on-ink);
  text-wrap: balance;
}
.v3-lede {
  margin: 18px 0 0;
  max-width: 46ch;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--v3-on-ink-2);
  text-wrap: pretty;
}

/* ---------- inside your portal (a ruled index, not cards) ---------- */
.v3-inside { grid-area: inside; align-self: start; max-width: 600px; font-family: var(--v3-sans); }
.v3-inside-title {
  margin: 0 0 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--v3-on-ink-3);
}
.v3-inside-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.v3-inside-list li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 13px 0;
  border-top: 1px solid var(--v3-hair);
}
.v3-inside-list li:last-child { grid-column: 1 / -1; }
.v3-ico { width: 22px; height: 22px; color: var(--signin-accent); padding-top: 1px; }
.v3-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.v3-inside-text { display: grid; gap: 2px; min-width: 0; }
.v3-inside-text b { font-size: 14px; font-weight: 600; color: var(--v3-on-ink); }
.v3-inside-text span { font-size: 13px; line-height: 1.45; color: var(--v3-on-ink-3); }

/* ---------- the sign-in card (Aayan's or our .auth-form, restyled only) ---------- */
.auth[data-v3-signin] > .auth-form {
  grid-area: 1 / 2 / -1 / 3;
  align-self: center;
  display: block;
  padding: 30px 30px 26px;
  background: var(--card);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 22px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 2px 6px rgba(0, 0, 0, .22), 0 28px 70px -24px rgba(0, 0, 0, .7);
}
:root[data-theme="dark"] .auth[data-v3-signin] > .auth-form { border-color: var(--line); }
.auth[data-v3-signin] .auth-form .box { max-width: none; gap: 14px; }
.auth[data-v3-signin] .auth-form h2 { font-size: 32px; line-height: 1.1; letter-spacing: -.01em; margin: 0 0 4px; }
.auth[data-v3-signin] .gbtn {
  min-height: 48px;
  border-radius: 12px;
  font-size: 14.5px;
  transition: transform .1s var(--v3-ease), border-color .15s ease, background-color .15s ease;
}
.auth[data-v3-signin] .gbtn:active { transform: scale(.98); }
@media (hover: hover) and (pointer: fine) {
  .auth[data-v3-signin] .gbtn:hover { border-color: var(--signin-accent); }
  .auth[data-v3-signin] .demo-grid button:hover { border-color: var(--signin-accent); }
}
.auth[data-v3-signin] .input { min-height: 46px; border-radius: 12px; }
.auth[data-v3-signin] .input:focus { border-color: var(--signin-accent); box-shadow: 0 0 0 3px var(--v3-accent-soft); }
.auth[data-v3-signin] .btn.lg, .auth[data-v3-signin] form .btn.pri { min-height: 48px; border-radius: 12px; }
.auth[data-v3-signin] :is(button, a, .btn, .gbtn):focus-visible {
  outline: 2px solid var(--signin-accent);
  outline-offset: 2px;
}
.auth[data-v3-signin] .or { margin: 2px 0; }

/* ---------- phone and narrow tablet: one column, the form right after the brand ---------- */
@media (max-width: 820px) {
  .auth[data-v3-signin] {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    grid-template-areas: "brand" "card" "inside";
    row-gap: 28px;
    padding: calc(28px + env(safe-area-inset-top, 0px)) calc(18px + env(safe-area-inset-right, 0px)) calc(36px + env(safe-area-inset-bottom, 0px)) calc(18px + env(safe-area-inset-left, 0px));
    align-content: start;
  }
  .auth[data-v3-signin] > .auth-form { grid-area: card; padding: 26px 20px 22px; border-radius: 20px; }
  .auth[data-v3-signin] .auth-form h2 { font-size: 28px; }
  .v3-brand { align-self: start; }
  .v3-lockup { width: 188px; }
  .v3-title { margin-top: 26px; font-size: 36px; }
  .v3-lede { font-size: 14.5px; margin-top: 12px; }
  .v3-inside-list { grid-template-columns: minmax(0, 1fr); }
  .v3-bloom-a { left: -60vmax; top: -30vmax; margin-top: 0; width: 120vmax; height: 120vmax; }
}

/* ---------- the aperture's split layers (client-signin-v3-1) ----------
   Built only while the intro plays (v2/signin-focus.js), hidden by default. Every layer and every image is exactly
   the lockup's own box (inset 0, 100% by 100%), the same box as the plain wordmark, so each copy of the one logo file
   (img/inspirate-logo-dark.svg, viewBox 0 0 1152 244) is drawn on the same pixels as the rest state and the swap at
   the end cannot jump. The pieces are cut with fixed rectangular clips: --x --y --w --h are a piece in viewBox units.
   Measured from the file: 1st i dot x 82 to 119, 2nd i dot x 567 to 603 (both y 22 to 55), nothing else above y 72
   left of x 610 (the "t" rises to y 44, right of it), so the left and centre pieces start at y 64 and leave the dots
   out; the dots get their own pieces. Everything is absolute inside the lockup, which keeps its size: no layout shift. */
.v3-ap { display: none; position: absolute; inset: 0; pointer-events: none; }
.v3-ap-clip, .v3-ap-win, .v3-ap-dot, .v3-ap-pt, .v3-ap-glow, .v3-ap-soft { position: absolute; display: block; }
.v3-ap-clip, .v3-ap-win, .v3-ap-dot, .v3-ap-pt { inset: 0; }
.v3-ap-clip, .v3-ap-win, .v3-ap-pt {
  clip-path: inset(calc(var(--y) / 244 * 100%) calc((1152 - var(--x) - var(--w)) / 1152 * 100%)
    calc((244 - var(--y) - var(--h)) / 244 * 100%) calc(var(--x) / 1152 * 100%));
}
/* the same box and the same 7% side clip as .v3-word img */
.v3-ap img {
  position: absolute; display: block; max-width: none;
  inset: 0; width: 100%; height: 100%;
  clip-path: inset(0 7% 0 7%);
}
.v3-ap-l { --x: 57; --y: 64; --w: 503; --h: 180; }
.v3-ap-c { --x: 560; --y: 64; --w: 50; --h: 180; }
.v3-ap-r { --x: 610; --y: 0; --w: 485; --h: 244; }
.v3-ap-dot1 { --x: 77; --y: 17; --w: 48; --h: 44; }
.v3-ap-dot2 { --x: 561; --y: 17; --w: 48; --h: 44; }
/* each dot scales about its own centre */
.v3-ap-pt { transform-origin: calc((var(--x) + var(--w) / 2) / 1152 * 100%) calc((var(--y) + var(--h) / 2) / 244 * 100%); }
/* the 2nd i's stem (x 571 to 600, y 75 to 191) scales about its own centre */
.v3-ap-c img { transform-origin: calc(585.5 / 1152 * 100%) calc(133 / 244 * 100%); }
/* soft copy of that stem: a white light the size of a defocused stem, no filter */
.v3-ap-soft {
  left: calc(551.5 / 1152 * 100%); top: calc(58 / 244 * 100%); width: calc(68 / 1152 * 100%); height: calc(150 / 244 * 100%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(247, 247, 245, .9), rgba(247, 247, 245, .38) 52%, transparent);
  opacity: 0;
}
/* the light each i-dot condenses from, in the page accent: the dot's piece grown by 30% on every side */
.v3-ap-glow {
  left: calc((var(--x) - var(--w) * .3) / 1152 * 100%); top: calc((var(--y) - var(--h) * .3) / 244 * 100%);
  width: calc(var(--w) * 1.6 / 1152 * 100%); height: calc(var(--h) * 1.6 / 244 * 100%);
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--signin-accent), var(--v3-accent-soft) 48%, transparent);
  opacity: 0;
}

/* ---------- the intro (first view this session only) ---------- */
@keyframes v3-bloom { from { opacity: 0; transform: scale(.86); } }
@keyframes v3-rise-16 { from { opacity: 0; transform: translateY(16px); } }
@keyframes v3-rise-12 { from { opacity: 0; transform: translateY(12px); } }
@keyframes v3-rise-8 { from { opacity: 0; transform: translateY(8px); } }
/* aperture: the brackets start hugging the 2nd i (left inner edge at x 553, right at x 617) and open to rest. Each
   window moves with its bracket by the same distance on the same curve while its image moves back by that distance,
   so the reveal edge is the bracket's inner edge on every frame and the letters stay put.
   left: 496 units, right: 478 units (a bracket is 57 units wide; a window and its image are the full 1152). */
@keyframes v3-ap-fade { from { opacity: 0; } }
@keyframes v3-ap-open-l { from { transform: translateX(calc(496 / 57 * 100%)); } }
@keyframes v3-ap-open-r { from { transform: translateX(calc(-478 / 57 * 100%)); } }
@keyframes v3-ap-win-l { from { transform: translateX(calc(496 / 1152 * 100%)); } }
@keyframes v3-ap-img-l { from { transform: translateX(calc(-496 / 1152 * 100%)); } }
@keyframes v3-ap-win-r { from { transform: translateX(calc(-478 / 1152 * 100%)); } }
@keyframes v3-ap-img-r { from { transform: translateX(calc(478 / 1152 * 100%)); } }
/* focus pull on the 2nd i: the soft light comes up and goes as the sharp stem settles */
@keyframes v3-ap-soft { 0% { opacity: 0; transform: scale(1.2); } 36% { opacity: .8; } 100% { opacity: 0; transform: scale(1); } }
@keyframes v3-ap-sharp { from { opacity: 0; transform: scale(1.06); } }
/* each i-dot: the light shrinks into the dot and fades as the sharp dot arrives (both invisible before their start) */
@keyframes v3-ap-glow { 0% { opacity: 0; transform: scale(2.4); } 16% { opacity: .75; } 100% { opacity: 0; transform: scale(1); } }
@keyframes v3-ap-dot { from { opacity: 0; transform: scale(2.4); } }

[data-v3-intro="play"] .v3-bloom-a,
[data-v3-intro="play"] .v3-bloom-b { animation: v3-bloom 1400ms var(--v3-ease) 0ms both; }
[data-v3-intro="play"] .v3-ap { display: block; }
[data-v3-intro="play"] .v3-word { opacity: 0; }
[data-v3-intro="play"] .v3-br-l { animation: v3-ap-fade 240ms var(--v3-ease) 0ms both, v3-ap-open-l 760ms var(--v3-aperture) 300ms both; }
[data-v3-intro="play"] .v3-br-r { animation: v3-ap-fade 240ms var(--v3-ease) 0ms both, v3-ap-open-r 760ms var(--v3-aperture) 300ms both; }
[data-v3-intro="play"] .v3-ap-l > .v3-ap-win { animation: v3-ap-win-l 760ms var(--v3-aperture) 300ms both; }
[data-v3-intro="play"] .v3-ap-l img { animation: v3-ap-img-l 760ms var(--v3-aperture) 300ms both; }
[data-v3-intro="play"] .v3-ap-r > .v3-ap-win { animation: v3-ap-win-r 760ms var(--v3-aperture) 300ms both; }
[data-v3-intro="play"] .v3-ap-r img { animation: v3-ap-img-r 760ms var(--v3-aperture) 300ms both; }
[data-v3-intro="play"] .v3-ap-soft { animation: v3-ap-soft 440ms var(--v3-ease) 0ms both; }
[data-v3-intro="play"] .v3-ap-c img { animation: v3-ap-sharp 360ms var(--v3-ease) 80ms both; }
[data-v3-intro="play"] .v3-ap-dot2 > .v3-ap-glow { animation: v3-ap-glow 460ms var(--v3-condense) 160ms both; }
[data-v3-intro="play"] .v3-ap-dot2 > .v3-ap-pt { animation: v3-ap-dot 460ms var(--v3-condense) 160ms both; }
[data-v3-intro="play"] .v3-ap-dot1 > .v3-ap-glow { animation: v3-ap-glow 460ms var(--v3-condense) 980ms both; }
[data-v3-intro="play"] .v3-ap-dot1 > .v3-ap-pt { animation: v3-ap-dot 460ms var(--v3-condense) 980ms both; }
[data-v3-intro="play"] > .auth-form { animation: v3-rise-16 780ms var(--v3-ease) 320ms both; }
[data-v3-intro="play"] .v3-title { animation: v3-rise-12 720ms var(--v3-ease) 560ms both; }
[data-v3-intro="play"] .v3-lede { animation: v3-rise-8 700ms var(--v3-ease) 640ms both; }
[data-v3-intro="play"] .v3-inside { animation: v3-rise-8 700ms var(--v3-ease) 760ms both; }
/* compositor hints only while playing, only on the moving logo pieces */
[data-v3-intro="play"] :is(.v3-br, .v3-ap-win, .v3-ap-win > img, .v3-ap-c img, .v3-ap-soft, .v3-ap-glow, .v3-ap-pt) { will-change: transform, opacity; }

/* Reduced motion: no intro at all (v2/signin-focus.js never sets "play" then; this is the belt to that brace). */
@media (prefers-reduced-motion: reduce) {
  [data-v3-signin] *, [data-v3-signin] > .auth-form { animation: none !important; transition: none !important; }
  [data-v3-signin] .v3-ap { display: none !important; }
  [data-v3-signin] .v3-word { opacity: 1 !important; }
}
