/* AppCloudly login kit: shared look for every portal opened from appcloudly.com.
   Same tokens, fonts and "Opening <App>" portal screen as the launcher, plus a full-screen Three.js scene themed
   per portal (see acl-login.js). Each portal sets <body class="acl" data-acl="trade|proc|scout|meoww">.
   No inline styles are needed (works under strict CSP: style-src 'self'). */
@font-face { font-family: "Michroma"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/michroma.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/hanken-grotesk.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 500; font-display: swap; src: url("fonts/jetbrains-mono.woff2") format("woff2"); }

[data-acl] {
  --acl-bg: #03060d;
  --acl-ink: #e8f1ff;
  --acl-muted: #7d8fb0;
  --acl-faint: #33415c;
  --acl-blue: #3d8bff;
  --acl-ice: #9cc8ff;
  --acl-acc: #16b6ff;
  --acl-glass: rgba(8, 16, 34, .58);
  --acl-line: rgba(156, 200, 255, .14);
  --acl-display: "Michroma", "Eurostile", "Arial Black", sans-serif;
  --acl-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --acl-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --acl-ease: cubic-bezier(.2, .8, .2, 1);
}
body.acl {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--acl-bg); color: var(--acl-ink); font-family: var(--acl-body);
  color-scheme: dark; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body.acl *, body.acl *::before, body.acl *::after { box-sizing: border-box; }
[data-acl="trade"] { --acl-acc: #16b6ff; }
[data-acl="proc"]  { --acl-acc: #3d8bff; }
[data-acl="scout"] { --acl-acc: #7f8cff; }
[data-acl="meoww"] { --acl-acc: #36d1c4; }

/* ---------- 3D background ---------- */
#acl-gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.acl-veil {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(90% 70% at 72% 50%, transparent 0%, rgba(3, 6, 13, .35) 70%, rgba(3, 6, 13, .8) 100%),
    linear-gradient(90deg, rgba(3, 6, 13, .55) 0%, transparent 45%);
}
body.acl.acl-nogl #acl-gl { display: none; }
body.acl.acl-nogl {
  background:
    radial-gradient(70% 60% at 70% 40%, color-mix(in srgb, var(--acl-acc) 28%, transparent), transparent 70%),
    radial-gradient(60% 50% at 10% 90%, rgba(61, 139, 255, .14), transparent 70%), var(--acl-bg);
}

/* ---------- "Opening <App>" portal screen (continues the launcher's dive) ---------- */
.acl-splash {
  position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  background: radial-gradient(120% 90% at 50% 50%, #0b2350 0%, var(--acl-bg) 62%);
  background: radial-gradient(120% 90% at 50% 50%, color-mix(in srgb, var(--acl-acc) 34%, var(--acl-bg)) 0%, var(--acl-bg) 62%);
  transition: opacity .9s var(--acl-ease), visibility 0s linear .9s;
}
.acl-splash .label { font-family: var(--acl-mono); font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--acl-ice); }
.acl-splash .pname {
  font-family: var(--acl-display); font-size: clamp(30px, 6vw, 84px); letter-spacing: .04em; line-height: 1;
  color: #fff; text-shadow: 0 0 40px var(--acl-acc);
}
.acl-splash .bar { width: min(220px, 50vw); height: 2px; border-radius: 2px; background: rgba(156, 200, 255, .15); overflow: hidden; }
.acl-splash .bar::after {
  content: ""; display: block; width: 40%; height: 100%; background: var(--acl-acc); box-shadow: 0 0 12px var(--acl-acc);
  animation: acl-load 1.1s cubic-bezier(.6, 0, .4, 1) infinite;
}
@keyframes acl-load { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
body.acl.acl-ready .acl-splash { opacity: 0; visibility: hidden; }
body.acl.acl-ready .acl-splash .pname { letter-spacing: .3em; transition: letter-spacing 1s var(--acl-ease); }

/* ---------- Top bar ---------- */
.acl-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 5;
  padding: calc(env(safe-area-inset-top, 0px) + 22px) 32px 0;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.acl-mark {
  display: inline-flex; align-items: center; gap: 12px; font-family: var(--acl-display); font-size: 13px; letter-spacing: .14em;
  color: var(--acl-ink); text-decoration: none;
}
.acl-mark i {
  width: 9px; height: 9px; border-radius: 50%; background: var(--acl-acc);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--acl-acc) 18%, transparent), 0 0 18px var(--acl-acc);
  animation: acl-pulse 2.8s var(--acl-ease) infinite;
}
.acl-mark:hover { color: #fff; }
.acl-mark:focus-visible { outline: 1px solid var(--acl-ice); outline-offset: 6px; border-radius: 4px; }
@keyframes acl-pulse { 50% { box-shadow: 0 0 0 9px transparent, 0 0 26px var(--acl-acc); } }
.acl-meta { font-family: var(--acl-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--acl-muted); display: flex; gap: 20px; }
.acl-meta b { color: var(--acl-ink); font-weight: 500; }
.acl-live { display: inline-flex; align-items: center; gap: 8px; }
.acl-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--acl-acc); box-shadow: 0 0 8px var(--acl-acc); }

/* ---------- Layout: product hero on the left, sign-in card on the right ---------- */
.acl-stage {
  position: relative; z-index: 3; min-height: 100vh; min-height: 100dvh;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, 440px); align-items: center; gap: 48px;
  padding: 110px clamp(20px, 6vw, 96px) 80px;
}
.acl-hero { max-width: 620px; }
.acl-kicker { font-family: var(--acl-mono); font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--acl-ice); margin: 0 0 18px; }
.acl-title {
  font-family: var(--acl-display); font-weight: 400; font-size: clamp(34px, 5.2vw, 72px); line-height: 1.02; letter-spacing: .02em; margin: 0;
  color: #fff; text-shadow: 0 0 46px color-mix(in srgb, var(--acl-acc) 55%, transparent);
}
.acl-title span { color: var(--acl-acc); }
.acl-tagline { font-size: clamp(15px, 1.4vw, 18px); line-height: 1.55; color: #b9c8e3; margin: 22px 0 0; max-width: 520px; }
.acl-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.acl-chips span {
  font-family: var(--acl-mono); font-size: 11px; letter-spacing: .08em; color: var(--acl-ink);
  padding: 7px 12px; border-radius: 999px; background: rgba(8, 16, 34, .55); border: 1px solid var(--acl-line);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.acl-ticker {
  margin-top: 30px; display: flex; gap: 22px; font-family: var(--acl-mono); font-size: 12px; color: var(--acl-muted);
  overflow: hidden; white-space: nowrap; mask-image: linear-gradient(90deg, #000 70%, transparent);
  -webkit-mask-image: linear-gradient(90deg, #000 70%, transparent);
}
.acl-ticker b { color: var(--acl-ink); font-weight: 500; }
.acl-ticker .up { color: #4ddf9a; } .acl-ticker .dn { color: #ff6b7d; }

/* ---------- Glass card ---------- */
.acl-card {
  position: relative; width: 100%; padding: 34px 32px 28px; border-radius: 22px;
  background: var(--acl-glass); border: 1px solid var(--acl-line);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .02) inset, 0 0 60px -30px var(--acl-acc);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  animation: acl-rise .9s var(--acl-ease) both .15s;
}
.acl-card::before {
  content: ""; position: absolute; inset: -1px; border-radius: 23px; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--acl-angle, 0deg), transparent 0 70%, var(--acl-acc) 85%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: .7;
  animation: acl-spin 6s linear infinite;
}
@property --acl-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes acl-spin { to { --acl-angle: 360deg; } }
@keyframes acl-rise { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.acl-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.acl-badge {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0;
  background: color-mix(in srgb, var(--acl-acc) 16%, rgba(8, 16, 34, .8)); border: 1px solid color-mix(in srgb, var(--acl-acc) 45%, transparent);
  box-shadow: 0 0 24px -8px var(--acl-acc);
}
.acl-badge { color: var(--acl-acc); }
.acl-badge img, .acl-badge svg { width: 24px; height: 24px; }
.acl-card-name { font-family: var(--acl-display); font-size: 15px; letter-spacing: .1em; color: #fff; }
.acl-card-sub { font-family: var(--acl-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--acl-muted); margin-top: 3px; }
.acl-card h1, .acl-card .acl-h { font-family: var(--acl-body); font-size: 24px; font-weight: 650; letter-spacing: -.01em; margin: 0 0 6px; color: #fff; }
.acl-card p, .acl-card .acl-p { color: #a9b8d6; font-size: 14px; line-height: 1.5; margin: 0 0 20px; }

/* form controls inside the card (scoped so the apps' own styles elsewhere are untouched).
   16px minimum: iOS Safari zooms into any field with smaller text when it is tapped. */
.acl-card label { display: block; font-family: var(--acl-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--acl-muted); margin: 0 0 7px; font-weight: 400; }
.acl-card input[type="text"], .acl-card input[type="email"], .acl-card input[type="password"], .acl-card input:not([type]) {
  width: 100%; box-sizing: border-box; height: 46px; padding: 0 14px; border-radius: 12px; font: 500 16px var(--acl-body); color: var(--acl-ink);
  background: rgba(3, 8, 20, .66); border: 1px solid rgba(156, 200, 255, .16); outline: none;
  transition: border-color .25s var(--acl-ease), box-shadow .25s var(--acl-ease), background .25s;
}
.acl-card input::placeholder { color: #50607e; }
.acl-card input:hover { border-color: rgba(156, 200, 255, .28); }
.acl-card input:focus { border-color: var(--acl-acc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--acl-acc) 18%, transparent), 0 0 24px -8px var(--acl-acc); background: rgba(3, 8, 20, .85); }
.acl-card input:-webkit-autofill { -webkit-text-fill-color: var(--acl-ink); -webkit-box-shadow: 0 0 0 40px #07101f inset; caret-color: var(--acl-ink); }
.acl-card button[type="submit"], .acl-card .acl-btn {
  position: relative; overflow: hidden; width: 100%; height: 48px; margin-top: 8px; border: 0; border-radius: 12px; cursor: pointer;
  font: 650 15px var(--acl-body); letter-spacing: .02em; color: #021022;
  background: linear-gradient(180deg, color-mix(in srgb, var(--acl-acc) 70%, #fff), var(--acl-acc));
  box-shadow: 0 10px 30px -10px var(--acl-acc), 0 0 0 1px rgba(255, 255, 255, .2) inset;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .2s var(--acl-ease), box-shadow .25s var(--acl-ease), filter .2s;
}
.acl-card button[type="submit"]::after, .acl-card .acl-btn::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
  transition: transform .8s var(--acl-ease);
}
.acl-card button[type="submit"]:hover, .acl-card .acl-btn:hover { transform: translateY(-1px); box-shadow: 0 16px 36px -10px var(--acl-acc), 0 0 0 1px rgba(255, 255, 255, .25) inset; }
.acl-card button[type="submit"]:hover::after, .acl-card .acl-btn:hover::after { transform: translateX(120%); }
.acl-card button[type="submit"]:active { transform: translateY(1px); }
.acl-card button[type="submit"]:disabled { filter: grayscale(.4) brightness(.8); cursor: progress; }
.acl-card button[type="submit"]:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.acl-card a { color: var(--acl-ice); text-decoration: none; }
.acl-card a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.acl-card svg { color: currentColor; }

.acl-field { margin: 0 0 14px; }
.acl-card .acl-code { text-transform: uppercase; font-family: var(--acl-mono); letter-spacing: .12em; }
.acl-err { color: #ff8b9c; font-size: 13px; line-height: 1.4; min-height: 0; margin: 4px 0 0; }
.acl-err:empty { display: none; }
.acl-fine { font-size: 11.5px !important; line-height: 1.5 !important; color: #6f80a0 !important; margin: 16px 0 0 !important; }
.acl-pw { position: relative; }
.acl-pw input { padding-right: 46px !important; }
.acl-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 9px;
  background: transparent; color: var(--acl-muted); cursor: pointer; display: grid; place-items: center;
}
.acl-eye:hover { color: var(--acl-ink); background: rgba(156, 200, 255, .08); }
.acl-eye svg { width: 18px; height: 18px; }

.acl-foot {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 4; padding: 0 32px calc(env(safe-area-inset-bottom, 0px) + 18px);
  display: flex; justify-content: space-between; gap: 16px; font-family: var(--acl-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--acl-faint);
  pointer-events: none;
}
.acl-foot a { color: var(--acl-muted); text-decoration: none; pointer-events: auto; }
.acl-foot a:hover { color: var(--acl-ink); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .acl-stage { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 92px 18px 70px; align-content: center; justify-items: center; }
  .acl-hero { text-align: center; }
  .acl-tagline { margin-inline: auto; }
  .acl-chips, .acl-ticker { justify-content: center; }
  .acl-ticker { display: none; }
  .acl-card { max-width: 440px; }
  .acl-top { padding-inline: 18px; }
  .acl-meta .acl-hide-sm { display: none; }
  .acl-veil { background: radial-gradient(100% 80% at 50% 45%, transparent 0%, rgba(3, 6, 13, .55) 75%, rgba(3, 6, 13, .85) 100%); }
}
@media (max-width: 560px) {
  .acl-hero .acl-tagline, .acl-chips { display: none; }
  .acl-title { font-size: 30px; }
  .acl-card { padding: 26px 20px 22px; border-radius: 18px; }
  .acl-field { margin: 0 0 14px; }
.acl-card .acl-code { text-transform: uppercase; font-family: var(--acl-mono); letter-spacing: .12em; }
.acl-err { color: #ff8b9c; font-size: 13px; line-height: 1.4; min-height: 0; margin: 4px 0 0; }
.acl-err:empty { display: none; }
.acl-fine { font-size: 11.5px !important; line-height: 1.5 !important; color: #6f80a0 !important; margin: 16px 0 0 !important; }
.acl-pw { position: relative; }
.acl-pw input { padding-right: 46px !important; }
.acl-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 9px;
  background: transparent; color: var(--acl-muted); cursor: pointer; display: grid; place-items: center;
}
.acl-eye:hover { color: var(--acl-ink); background: rgba(156, 200, 255, .08); }
.acl-eye svg { width: 18px; height: 18px; }

.acl-foot { padding-inline: 18px; }
  .acl-foot .acl-hide-sm { display: none; }
  .acl-meta { display: none; }
  .acl-card h1, .acl-card .acl-h { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  .acl-mark i, .acl-splash .bar::after, .acl-card::before, .acl-card { animation: none; }
  .acl-splash { transition: none; }
}

/* never let a focused field trigger iOS zoom, whatever the portal's own form classes are */
body.acl input, body.acl select, body.acl textarea { font-size: max(16px, 1em); }
