/* NEXA signature layer: opening splash, sign-in screen, partner strip, sidebar thread.
   Everything is tinted by --copper, so it follows the shop's accent colour, the skin and dark/light.
   The logo and the NEXA wordmark are never altered. One easing curve: cubic-bezier(.16,1,.3,1). */

/* ---- opening splash: the logo arrives, holds a moment, and gives way to the screen ---- */
#nxSplash { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; background: var(--bg); overflow: hidden; animation: nx-splash-out .5s cubic-bezier(.7,0,.2,1) 1s forwards; }
html.no-splash #nxSplash { display: none; }
#nxSplash::before { content: ""; position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--copper) 26%, transparent), transparent 62%); opacity: 0; animation: nx-fade-in 1.4s .1s ease-out forwards; }
.nx-splash-mark { position: relative; display: grid; justify-items: center; gap: 20px; }
.nx-splash-logo { position: relative; width: 96px; height: 96px; animation: nx-logo-in 1s cubic-bezier(.16,1,.3,1) .1s both; }
.nx-splash-logo img { width: 100%; height: 100%; display: block; }
.nx-splash-logo::after { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 1.5px solid var(--copper); opacity: 0; animation: nx-ring 1.2s .55s cubic-bezier(.16,1,.3,1) forwards; }
.nx-splash-name { font: 800 1.7rem/1 'Inter', sans-serif; color: var(--ink); margin-inline-end: -.16em; animation: nx-name-in 1.1s cubic-bezier(.16,1,.3,1) .45s both; }
.nx-splash-line { height: 2px; width: 0; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--copper), transparent); animation: nx-line 1s cubic-bezier(.16,1,.3,1) .85s forwards; }
@keyframes nx-logo-in { from { opacity: 0; transform: scale(.72); filter: blur(14px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes nx-ring { 0% { opacity: .7; transform: scale(.7); } 100% { opacity: 0; transform: scale(1.7); } }
@keyframes nx-name-in { from { opacity: 0; letter-spacing: .6em; } to { opacity: 1; letter-spacing: .16em; } }
@keyframes nx-line { to { width: 140px; } }
@keyframes nx-fade-in { to { opacity: 1; } }
@keyframes nx-splash-out { to { opacity: 0; visibility: hidden; transform: scale(1.04); } }

/* ---- soft gradient field behind the sign-in screen ---- */
@keyframes nx-drift-a { 50% { transform: translate3d(6vw, 4vh, 0) scale(1.12); } }
@keyframes nx-drift-b { 50% { transform: translate3d(-7vw, -4vh, 0) scale(1.08); } }
.nx-aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; opacity: 0; transition: opacity .8s; }
body:has(#authScreen:not([hidden])) .nx-aurora { opacity: 1; }
.nx-aurora i { position: absolute; border-radius: 50%; filter: blur(100px); opacity: .26; will-change: transform; }
.nx-aurora i:nth-child(1) { width: 46vmax; height: 46vmax; inset-block-start: -22vmax; inset-inline-start: -12vmax; background: var(--copper); animation: nx-drift-a 30s ease-in-out infinite; }
.nx-aurora i:nth-child(2) { width: 36vmax; height: 36vmax; inset-block-end: -18vmax; inset-inline-end: -10vmax; background: #c2478f; opacity: .16; animation: nx-drift-b 36s ease-in-out infinite; }
:root[data-theme="light"] .nx-aurora i { opacity: .16; }
:root[data-theme="light"] .nx-aurora i:nth-child(2) { opacity: .1; }
.nx-aurora.is-static i { animation: none; }
#authScreen { position: relative; z-index: 1; }   /* NOT .app-frame: a z-index there traps the drawer (z 70) below the scrim (z 65) */

/* ---- sign-in layout: two even columns, both centred ---- */
#authScreen .stage { align-items: center; gap: clamp(28px, 5vw, 72px); padding-block: 2vh 5vh; }
#authScreen .pitch { display: flex; flex-direction: column; }
.pitch h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.25; padding-block-end: .2em; margin-block-end: 6px; }
.pitch .sub { line-height: 1.8; margin-block-end: 18px; }
.pitch .pitch-list { flex-direction: row; flex-wrap: wrap; gap: 8px 10px; margin-block-end: 0; }
.pitch .pitch-list li { padding: 7px 14px; font-size: .86rem; border-radius: 999px; background: color-mix(in srgb, var(--ink) 6%, transparent); box-shadow: inset 0 0 0 1px var(--line); }
.pitch .pitch-list li::before { display: none; }
.pitch .showcase { margin-top: 26px; }

/* ---- the sign-in card ---- */
.auth-panel { display: flex; justify-content: center; }
.auth-panel .ticket {
  width: 100%; max-width: 420px; margin: 0; border: 0; border-radius: 28px; padding: 28px 28px 24px; overflow: hidden; position: relative; isolation: isolate;
  background: color-mix(in srgb, var(--panel) 80%, transparent); backdrop-filter: blur(26px) saturate(1.6); -webkit-backdrop-filter: blur(26px) saturate(1.6);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 9%, transparent), inset 0 1px 0 color-mix(in srgb, #fff 14%, transparent), 0 50px 90px -45px rgba(0, 0, 0, .6);
}
.auth-panel .ticket::before { content: none; }
/* while a field has focus a thin light travels round the card edge */
@property --nx-a { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes nx-spin { to { --nx-a: 360deg; } }
.auth-panel .ticket::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none; z-index: 3; opacity: 0; transition: opacity .5s;
  background: conic-gradient(from var(--nx-a), transparent 0 55%, var(--copper) 78%, color-mix(in srgb, var(--copper) 40%, #fff) 88%, transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); mask-composite: exclude; animation: nx-spin 5s linear infinite;
}
.auth-panel .ticket:focus-within::after { opacity: 1; }
.nx-glow { position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: 0; transition: opacity .4s; background: radial-gradient(380px circle at var(--tx, 50%) var(--ty, 0%), color-mix(in srgb, var(--copper) 12%, transparent), transparent 62%); }
.auth-panel .ticket:hover .nx-glow { opacity: 1; }
.auth-panel .ticket > * { position: relative; z-index: 1; }
.auth-panel .ticket > .nx-glow { position: absolute; }

.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0 0 20px; }
.auth-brand .auth-logo { width: 60px; height: 60px; }
.auth-brand .auth-logo-name { font-size: 1.25rem; }
.auth-brand .auth-brand-rule { display: none; }
.auth-brand .auth-brand-sub { font-size: .84rem; color: var(--ink-dim); }

/* segmented tabs with a sliding thumb */
.auth-panel .ticket .tabs { position: relative; display: flex; gap: 0; padding: 4px; margin: 0 0 22px; border: 0; border-radius: 14px; background: color-mix(in srgb, var(--ink) 7%, transparent); box-shadow: inset 0 0 0 1px var(--line); }
.auth-panel .ticket .tabs::before { content: ""; position: absolute; top: 4px; bottom: 4px; left: 0; width: var(--tw, 50%); transform: translateX(var(--tx, 0px)); border-radius: 10px; background: var(--panel); box-shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 0 0 1px var(--line); transition: transform .45s cubic-bezier(.16,1,.3,1), width .45s cubic-bezier(.16,1,.3,1); }
.auth-panel .ticket .tab { position: relative; z-index: 1; flex: 1; border-radius: 10px; background: transparent !important; box-shadow: none !important; transition: color .25s; }
.auth-panel .ticket .tab.active { color: var(--ink); }

/* inputs with a leading icon */
.auth-panel .ticket input[type="email"], .auth-panel .ticket input[type="password"], .auth-panel .ticket #loginEmail { padding-inline-start: 42px; background-repeat: no-repeat; background-size: 18px; background-position: right 14px center; }
:root[dir="ltr"] .auth-panel .ticket input[type="email"], :root[dir="ltr"] .auth-panel .ticket input[type="password"] { background-position: left 14px center; }
.auth-panel .ticket input[type="email"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='3'/%3E%3Cpath d='M3 8l9 6 9-6'/%3E%3C/svg%3E"); }
.auth-panel .ticket input[type="password"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='10' width='16' height='10' rx='3'/%3E%3Cpath d='M8 10V7a4 4 0 018 0v3'/%3E%3C/svg%3E"); }
.auth-panel .ticket input:focus { border-color: var(--copper); box-shadow: 0 0 0 4px color-mix(in srgb, var(--copper) 16%, transparent); }
.auth-panel .ticket button.primary-btn { position: relative; overflow: hidden; color: #fff; min-height: 50px; font-size: 1rem; font-weight: 700; letter-spacing: .01em; background: linear-gradient(135deg, color-mix(in srgb, var(--copper) 58%, #2a1478), color-mix(in srgb, var(--copper) 46%, #1c0d58)); box-shadow: 0 10px 26px -10px color-mix(in srgb, var(--copper) 70%, transparent), inset 0 1px 0 rgba(255,255,255,.22); transition: transform .2s cubic-bezier(.16,1,.3,1), box-shadow .3s; }
.auth-panel .ticket button.primary-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -10px color-mix(in srgb, var(--copper) 80%, transparent), inset 0 1px 0 rgba(255,255,255,.28); }
.auth-panel .ticket button.primary-btn:active { transform: translateY(0) scale(.99); }
.auth-panel .ticket .tab:not(.active) { color: var(--ink-dim); }
.auth-panel .ticket .primary-btn::after { content: ""; position: absolute; inset-block: 0; width: 45%; inset-inline-start: -70%; transform: skewX(-20deg); background: linear-gradient(90deg, transparent, rgba(255,255,255,.3), transparent); pointer-events: none; }
.auth-panel .ticket .primary-btn:hover::after { inset-inline-start: 130%; transition: inset-inline-start .8s cubic-bezier(.16,1,.3,1); }

/* ---- partner stores strip ---- */
.partners { margin-top: 26px; max-width: 520px; }
.partners[hidden] { display: none; }
.partners-label { display: block; margin-bottom: 12px; font-size: .8rem; color: var(--ink-dim); }
.partners-view { overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); mask: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); }
.partners-track { display: flex; align-items: center; gap: 12px; width: max-content; }
.partners.is-loop .partners-track { animation: nx-marquee-r var(--nx-marq, 30s) linear infinite; }
:root[dir="ltr"] .partners.is-loop .partners-track { animation-name: nx-marquee-l; }
.partners.is-loop:hover .partners-track { animation-play-state: paused; }
.partners.is-few .partners-view { -webkit-mask: none; mask: none; }
.partners.is-few .partners-track { width: auto; flex-wrap: wrap; }
@keyframes nx-marquee-r { to { transform: translateX(50%); } }
@keyframes nx-marquee-l { to { transform: translateX(-50%); } }
.partner { display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px 7px 8px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 5%, transparent); box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap; font-size: .88rem; font-weight: 600; color: var(--ink); }
.partner-mark { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: none; background: color-mix(in srgb, var(--copper) 18%, transparent); display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: .8rem; color: var(--copper); }

/* ---- thread: a hairline spine in the sidebar with one bead on the active item ---- */
@media (min-width: 821px) {
  .nx-threaded { position: relative; }
  .nx-threaded::before { content: ""; position: absolute; inset-block: 4px; inset-inline-start: -9px; width: 1px; background: linear-gradient(var(--line), var(--line)); pointer-events: none; }
  .nx-bead {
    position: absolute; inset-inline-start: -12px; top: 0; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; pointer-events: none;
    background: var(--copper); box-shadow: 0 0 0 3px color-mix(in srgb, var(--copper) 22%, transparent), 0 0 14px var(--copper);
    transform: translateY(var(--by, 0px)); transition: transform .45s cubic-bezier(.3,1.35,.45,1), opacity .2s; opacity: 0;
  }
  .nx-bead.is-on { opacity: 1; }
  :root[data-skin="nexa"] .nx-threaded .nav-item.active::before { display: none; }
}
@media (prefers-reduced-motion: reduce) { .nx-bead { transition: none; } }


@media (prefers-reduced-motion: reduce) { .nx-aurora i, .partners.is-loop .partners-track, .auth-panel .ticket::after { animation: none; } .auth-panel .ticket .tabs::before { transition: none; } }
@media (max-width: 900px) { #authScreen .stage { gap: 28px; } .partners { max-width: none; } }
@media (max-width: 520px) { .auth-panel .ticket { padding: 22px 18px 20px; border-radius: 24px; } }
/* phones: the form comes first, the pitch below it */
@media (max-width: 900px) { .auth-panel { order: -1; } }

/* v87 sign-in refinements (impeccable critique + Emil motion rules) */
.auth-panel .ticket input { transition: border-color .16s ease-out, box-shadow .16s ease-out, background-color .16s ease-out; }
.auth-panel .ticket .tabs::before { transition-duration: .26s; transition-timing-function: cubic-bezier(.23, 1, .32, 1); }
.auth-panel .ticket button.primary-btn { transition: transform .16s cubic-bezier(.23, 1, .32, 1), box-shadow .2s ease-out; }
.auth-panel .ticket button.primary-btn:active { transform: scale(.97); }
/* focus ring stays still: a light circling the card while someone types is a distraction */
.auth-panel .ticket::after { animation: none; transition-duration: .2s; }
.forgot-link { display: block; margin: 2px 0 10px; margin-inline-start: auto; padding: 4px 0; background: none; border: 0; color: var(--copper); cursor: pointer; font-size: .82rem; }
.forgot-link:hover { text-decoration: underline; }
.auth-panel .ticket .form-note { color: color-mix(in srgb, var(--ink) 66%, transparent); }
@media (prefers-reduced-motion: reduce) { .auth-panel .ticket .tabs::before, .auth-panel .ticket button.primary-btn { transition-duration: 0s; } }


/* ---- phone performance: the big blurred aurora and glass blur are very costly on phones,
   and the app renders this same page in a WebView — so on narrow touch screens we drop them. ---- */
@media (max-width: 820px) {
  .nx-aurora { display: none !important; }
  .auth-panel .ticket { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; background: var(--panel) !important; }
  #nxSplash { animation-delay: .7s !important; }
}
