/* ==========================================================================
   Arenyze — split sign-in / sign-up

   Two halves, like the Loquitur platform: on the left an animated panel of the
   network (rank gem, ranked-score line, live event feed, the four games), on
   the right the existing form. Same tokens as theme.css: rank-gem gold on
   near-black, ember orange as second voice, cut corners and hexagons.
   Below 1024px the panel goes away and the page is the centred card again.
   All motion stops with prefers-reduced-motion.
   ========================================================================== */

/* Desktop only: the panel replaces the page art; below 1024px the page keeps it. */
@media (min-width: 1024px) {
  .page-auth.is-split { --page-art: none; background: var(--bg); }
  .page-auth.is-split > main::before, .page-auth.is-split > main::after { display: none; }
}

.auth-split { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); min-height: 100vh; }

/* ── Left: the network panel ─────────────────────────────────────────────── */
.auth-art {
  position: relative; isolation: isolate; overflow: hidden;
  position: sticky; top: 0; height: 100vh; min-height: 560px;
  display: flex; flex-direction: column; gap: clamp(14px, 2.8vh, 28px);
  padding: clamp(22px, 4vh, 36px) clamp(28px, 4vw, 64px) clamp(18px, 3vh, 30px);
  background: #060608;
  border-right: 1px solid var(--line);
}
/* The network's games in gold, as on every other page, kept quiet behind the panel. */
.auth-art::before {
  content: ""; position: absolute; inset: 0; z-index: -3; pointer-events: none;
  background: url("/assets/bg/net-3.webp?v=1") 30% 0 / auto 100% repeat-x;
  opacity: .09; filter: saturate(.8);
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 78%); mask-image: linear-gradient(180deg, #000, transparent 78%);
}
.auth-art::after {
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: var(--stripes);
}
.art-glow { position: absolute; z-index: -1; border-radius: 50%; filter: blur(70px); pointer-events: none; will-change: transform; }
.art-glow.g1 { width: 520px; height: 420px; top: -160px; right: -140px; background: rgb(var(--acc-rgb) / .22); animation: art-drift 18s ease-in-out infinite alternate; }
.art-glow.g2 { width: 380px; height: 380px; bottom: -160px; left: -120px; background: color-mix(in srgb, var(--hi) 16%, transparent); animation: art-drift 22s ease-in-out infinite alternate-reverse; }
@keyframes art-drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-60px, 50px, 0) scale(1.12); } }

/* Hexagon field: a few cells light up in gold, one after the other. */
.art-hexes { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; opacity: .9;
  -webkit-mask-image: radial-gradient(70% 60% at 70% 40%, #000, transparent 80%); mask-image: radial-gradient(70% 60% at 70% 40%, #000, transparent 80%); }
.art-hexes .cell { fill: none; stroke: #ffffff0a; stroke-width: 1; }
.art-hexes .lit { fill: rgb(var(--acc-rgb) / .0); stroke: rgb(var(--acc-rgb) / .5); animation: hex-pulse 6s ease-in-out infinite; }
@keyframes hex-pulse { 0%, 100% { fill: rgb(var(--acc-rgb) / 0); stroke: rgb(var(--acc-rgb) / .08); } 45% { fill: rgb(var(--acc-rgb) / .14); stroke: rgb(var(--acc-rgb) / .7); } }

.art-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); width: fit-content; }
.art-brand .brand-mark { width: 38px; height: 38px; border-radius: 10px; }
.art-brand b { display: block; font: 800 16px/1 var(--f-display); font-stretch: 118%; letter-spacing: .03em; text-transform: uppercase; }
.art-brand small { display: block; margin-top: 5px; font: 600 9.5px/1 var(--f-mono); letter-spacing: .32em; color: var(--ink-3); text-transform: uppercase; }

.art-copy { margin-top: auto; max-width: 660px; }
.art-eyebrow { display: inline-flex; align-items: center; gap: 9px; font: 700 11px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--acc); }
.art-eyebrow::before { content: ""; width: 11px; height: 10px; background: var(--acc); clip-path: var(--hex); }
.art-title { margin-top: clamp(10px, 2vh, 18px); font: 800 clamp(2rem, min(3.6vw, 6.4vh), 3.7rem)/.94 var(--f-display); font-stretch: var(--display-stretch); text-transform: uppercase; letter-spacing: -.005em; color: var(--ink); }
.art-title span { display: block; }
.art-title em { font-style: normal; color: transparent; background: linear-gradient(100deg, var(--acc-hi), var(--acc) 45%, var(--hi)); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; animation: art-sheen 7s ease-in-out infinite; }
@keyframes art-sheen { 0%, 100% { background-position: 0 0; } 50% { background-position: 100% 0; } }
.art-sub { margin-top: clamp(10px, 2vh, 18px); max-width: 46ch; color: var(--ink-2); font-size: .95rem; line-height: 1.6; }

/* Showcase: three panels that look like the trackers, slightly staggered. */
.art-show { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; grid-template-rows: auto auto; gap: 14px; max-width: 620px; }
.art-panel {
  position: relative; padding: 16px 16px 14px;
  background: linear-gradient(180deg, #ffffff0a, #ffffff04); border: 1px solid var(--line-2);
  clip-path: var(--cut-tr); backdrop-filter: blur(6px);
  animation: art-rise .8s cubic-bezier(.2, .8, .2, 1) both;
}
.art-panel::after { content: ""; position: absolute; top: 0; right: 0; width: calc(var(--cut) * 1.45); height: 2px; background: linear-gradient(90deg, var(--acc), var(--hi)); transform-origin: right top; transform: translate(-2px, 3px) rotate(45deg); }
.art-panel:nth-child(2) { animation-delay: .12s; }
.art-panel:nth-child(3) { animation-delay: .24s; }
@keyframes art-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.art-label { font: 700 10px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }

/* Rank card: the gem, a counting score and the bar to the next league. */
.art-rank { grid-row: span 2; display: flex; flex-direction: column; gap: 14px; }
.art-rank-top { display: flex; align-items: center; gap: 14px; }
.art-gem { position: relative; width: 62px; height: 62px; flex: none; }
.art-gem svg { width: 100%; height: 100%; filter: drop-shadow(0 0 18px rgb(var(--acc-rgb) / .45)); animation: gem-float 5s ease-in-out infinite; }
.art-gem::after { content: ""; position: absolute; inset: 0; clip-path: var(--hex); background: linear-gradient(115deg, transparent 35%, #ffffff66 50%, transparent 65%); background-size: 260% 100%; animation: gem-shine 4.5s ease-in-out infinite; mix-blend-mode: overlay; }
@keyframes gem-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes gem-shine { 0%, 55% { background-position: 120% 0; } 100% { background-position: -120% 0; } }
.art-league { font: 800 1.35rem/1 var(--f-display); font-stretch: var(--display-stretch); text-transform: uppercase; color: var(--ink); }
.art-league small { display: block; margin-top: 6px; white-space: nowrap; font: 600 11px/1 var(--f-mono); letter-spacing: .08em; color: var(--ink-3); text-transform: none; }
.art-score { display: flex; align-items: baseline; gap: 10px; }
.art-score b { font: 800 2.3rem/1 var(--f-display); font-stretch: var(--num-stretch); font-variant-numeric: tabular-nums; color: var(--ink); }
.art-delta { display: inline-flex; align-items: center; gap: 3px; padding: 3px 7px; font: 700 11px/1 var(--f-mono); color: #3ddc97; background: #3ddc9714; border-radius: 3px; }
.art-bar { height: 6px; background: #ffffff10; border-radius: 3px; overflow: hidden; }
.art-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--acc-lo), var(--acc), var(--acc-hi)); box-shadow: 0 0 12px rgb(var(--acc-rgb) / .6); animation: bar-fill 2.4s .5s cubic-bezier(.2, .8, .2, 1) forwards, bar-glow 3s 3s ease-in-out infinite; }
@keyframes bar-fill { to { width: 78%; } }
@keyframes bar-glow { 50% { filter: brightness(1.25); } }
.art-bar-legend { display: flex; justify-content: space-between; font: 600 10.5px/1 var(--f-mono); color: var(--ink-3); }
.art-form { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.art-form ol { display: flex; gap: 5px; margin: 0; padding: 0; list-style: none; }
.art-form li { display: grid; place-items: center; width: 22px; height: 20px; clip-path: var(--hex); font: 800 9.5px/1 var(--f-mono); opacity: 0; transform: scale(.4); animation: form-pop .35s cubic-bezier(.3, 1.4, .5, 1) forwards; }
.art-form li.w { background: rgb(var(--acc-rgb) / .9); color: var(--acc-ink); }
.art-form li.l { background: #ffffff14; color: var(--ink-3); }
@keyframes form-pop { to { opacity: 1; transform: none; } }
.art-stats { margin-top: 4px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.art-stats div { display: flex; flex-direction: column; gap: 6px; }
.art-stats b { font: 800 1.05rem/1 var(--f-display); font-stretch: var(--num-stretch); color: var(--ink); }

/* Ranked-score line: drawn once, then a dot runs along it. */
.art-spark svg { display: block; width: 100%; height: 74px; margin-top: 10px; overflow: visible; }
.art-spark .area { fill: url(#artSparkFill); opacity: 0; animation: art-fade 1s 1.6s forwards; }
.art-spark .line { fill: none; stroke: var(--acc); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 520; stroke-dashoffset: 520; animation: spark-draw 2.2s .4s cubic-bezier(.4, 0, .2, 1) forwards; filter: drop-shadow(0 0 6px rgb(var(--acc-rgb) / .5)); }
.art-spark .runner { fill: var(--acc-hi); offset-path: path("M0 58 L24 52 L48 55 L72 40 L96 44 L120 30 L144 34 L168 20 L192 24 L216 10 L240 14"); offset-rotate: 0deg; animation: spark-run 5s 2.6s linear infinite; opacity: 0; }
@keyframes spark-draw { to { stroke-dashoffset: 0; } }
@keyframes spark-run { 0% { offset-distance: 0%; opacity: 0; } 8%, 92% { opacity: 1; } 100% { offset-distance: 100%; opacity: 0; } }
@keyframes art-fade { to { opacity: 1; } }

/* Live feed: network events scroll up endlessly. */
.art-feed-window { position: relative; height: 104px; margin-top: 10px; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent); mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent); }
.art-feed { display: flex; flex-direction: column; gap: 8px; animation: feed-up 16s linear infinite; }
@keyframes feed-up { to { transform: translateY(-50%); } }
.art-ev { display: flex; align-items: center; gap: 9px; font-size: .78rem; color: var(--ink-2); white-space: nowrap; }
.art-ev .dot { width: 8px; height: 7px; flex: none; clip-path: var(--hex); background: var(--c, var(--acc)); }
.art-ev b { color: var(--ink); font-weight: 600; }
.art-ev span { overflow: hidden; text-overflow: ellipsis; }
.art-live { display: inline-flex; align-items: center; gap: 6px; float: right; font: 700 9.5px/1 var(--f-mono); letter-spacing: .14em; color: #3ddc97; }
.art-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 #3ddc9799; animation: live-ping 1.8s ease-out infinite; }
@keyframes live-ping { 70% { box-shadow: 0 0 0 7px #3ddc9700; } 100% { box-shadow: 0 0 0 0 #3ddc9700; } }

.art-games { display: flex; flex-wrap: wrap; gap: 6px; }
.art-game { display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; font: 600 11.5px/1 var(--f-body, inherit); color: var(--ink-2); background: #ffffff06; border: 1px solid var(--line-2); clip-path: var(--lean); padding-inline: 13px; }
.art-game i { width: 9px; height: 8px; clip-path: var(--hex); background: var(--c); }
.art-foot { display: flex; justify-content: space-between; gap: 16px; flex: none; color: var(--ink-4, var(--ink-3)); font: 600 10.5px/1.4 var(--f-mono); letter-spacing: .06em; }

/* ── Right: the form ─────────────────────────────────────────────────────── */
.auth-pane { position: relative; isolation: isolate; display: grid; place-items: center; padding: 72px clamp(20px, 4vw, 56px) 48px; background: var(--bg); }
.auth-pane::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(520px 320px at 50% 0%, rgb(var(--acc-rgb) / .08), transparent 70%);
}
.auth-pane .auth-back { position: absolute; top: 26px; left: auto; right: clamp(20px, 3vw, 40px); }
.auth-pane .auth-wrap { width: min(430px, 100%); }
.auth-pane .auth-card { box-shadow: 0 30px 80px -40px #000; }
.page-auth.is-split .auth-head .auth-mark { display: none; }

@media (max-width: 1180px) {
  .art-show { grid-template-columns: 1fr; }
  .art-rank { grid-row: auto; }
  .art-feed-panel { display: none; }
}
@media (max-width: 1023px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .page-auth.is-split .auth-head .auth-mark { display: block; }
  .auth-pane { min-height: 100vh; }
  .auth-pane .auth-back { left: 20px; right: auto; }
}
/* Short screens: keep the whole panel inside the viewport. */
@media (max-height: 880px) and (min-width: 1024px) {
  .art-feed-panel { display: none; }
  .art-show { grid-template-columns: 1.05fr 1fr; }
  .art-rank { grid-row: auto; }
  .art-stats, .art-form { display: none; }
  .art-sub { font-size: .875rem; }
}
@media (max-height: 720px) and (min-width: 1024px) {
  .art-spark, .art-foot { display: none; }
  .art-show { grid-template-columns: minmax(0, 340px); }
}

@media (prefers-reduced-motion: reduce) {
  .auth-art *, .auth-art *::before, .auth-art *::after { animation: none !important; }
  .art-bar i { width: 78%; }
  .art-form li { opacity: 1; transform: none; }
  .art-spark .line { stroke-dashoffset: 0; }
  .art-spark .area { opacity: 1; }
  .art-spark .runner { display: none; }
}

/* The injected /v/arz.css paints every `.auth-card input` dark, the terms checkbox
   included, so a ticked box looked empty. Restore the gold tick (pre-existing issue). */
.auth-card .auth-check input { background: transparent; box-shadow: none; border-radius: 3px !important; }
.auth-card .auth-check input:checked { background: var(--acc); border-color: var(--acc); }
