/* TerasOne's own pages before a company opens: sign-in and choosing a company. Black and white, rounded, moving
   gently; light and dark follow the device. */
:root {
  --bg: #f4f4f5; --ink: #0a0a0a; --muted: #6e6e73; --line: rgba(0, 0, 0, .09); --field: rgba(0, 0, 0, .04);
  --card: rgba(255, 255, 255, .72); --card-line: rgba(255, 255, 255, .9); --err: #c0392b;
  --blob-a: rgba(0, 0, 0, .10); --blob-b: rgba(0, 0, 0, .06); --btn-a: #0a0a0a; --btn-b: #3a3a3c; --btn-ink: #fff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 24px 60px -12px rgba(0, 0, 0, .18);
  --ease: cubic-bezier(.2, .8, .2, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #09090b; --ink: #f5f5f7; --muted: #9a9aa0; --line: rgba(255, 255, 255, .1); --field: rgba(255, 255, 255, .06);
    --card: rgba(24, 24, 27, .68); --card-line: rgba(255, 255, 255, .08); --err: #ff7b6b;
    --blob-a: rgba(255, 255, 255, .10); --blob-b: rgba(255, 255, 255, .05); --btn-a: #fafafa; --btn-b: #b8b8bd; --btn-ink: #0a0a0a;
    --shadow: 0 24px 60px -12px rgba(0, 0, 0, .7);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { min-height: 100svh; display: grid; place-items: center; padding: 24px 16px; overflow-x: hidden;
       background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased;
       font: 15px/1.5 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }

/* the moving background: two soft grey clouds drifting slowly */
.backdrop { position: fixed; inset: -20%; z-index: -1; pointer-events: none; filter: blur(60px); }
.backdrop::before, .backdrop::after { content: ""; position: absolute; border-radius: 50%; }
.backdrop::before { width: 60vmax; height: 60vmax; left: 5%; top: 0; background: radial-gradient(circle, var(--blob-a), transparent 65%);
                    animation: drift 22s var(--ease) infinite alternate; }
.backdrop::after { width: 55vmax; height: 55vmax; right: 0; bottom: 0; background: radial-gradient(circle, var(--blob-b), transparent 65%);
                   animation: drift 28s var(--ease) infinite alternate-reverse; }
@keyframes drift { to { transform: translate(12vmax, 8vmax) scale(1.15); } }

.card { position: relative; width: 100%; max-width: 420px; padding: 36px 32px 30px; border-radius: 28px;
        background: var(--card); border: 1px solid var(--card-line); box-shadow: var(--shadow);
        -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4);
        animation: rise .6s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } }

.mark { display: flex; align-items: center; gap: 12px; }
.mark svg { width: 42px; height: 42px; flex: none; }
.mark b { display: block; font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1;
          background: linear-gradient(120deg, var(--ink) 30%, var(--muted)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mark small { display: block; color: var(--muted); font-size: 12.5px; }
.logo-a { stop-color: #000; } .logo-b { stop-color: #8c8c8c; }
@media (prefers-color-scheme: dark) { .logo-a { stop-color: #fff; } .logo-b { stop-color: #7d7d7d; } }

h1 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin: 30px 0 4px; }
.sub { color: var(--muted); margin: 0 0 22px; font-size: 14px; }

/* Staff | Client: a pill with a sliding thumb */
.tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; margin-bottom: 22px;
        border-radius: 999px; background: var(--field); }
.tabs::before { content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px;
                background: var(--btn-a); box-shadow: 0 2px 8px rgba(0, 0, 0, .15); transition: transform .35s var(--ease); }
.tabs[data-on="client"]::before { transform: translateX(100%); }
.tabs a { position: relative; z-index: 1; text-align: center; padding: 9px; border-radius: 999px; color: var(--muted);
          text-decoration: none; font-size: 14px; font-weight: 600; transition: color .3s; }
.tabs a[aria-current] { color: var(--btn-ink); }
.tabs a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* fields: rounded, the label floats up when you type */
.field { position: relative; margin-bottom: 12px; }
.field input { width: 100%; height: 56px; padding: 22px 16px 6px; border-radius: 16px; border: 1px solid transparent;
               background: var(--field); color: var(--ink); font: inherit; font-size: 16px; outline: none;
               transition: border-color .2s, background .2s, box-shadow .2s; }
.field input:hover { border-color: var(--line); }
.field input:focus { border-color: var(--ink); background: transparent; box-shadow: 0 0 0 4px var(--line); }
.field label { position: absolute; left: 17px; top: 17px; color: var(--muted); font-size: 15px; pointer-events: none;
               transform-origin: left top; transition: transform .2s var(--ease), color .2s; }
.field input:focus + label, .field input:not(:placeholder-shown) + label { transform: translateY(-10px) scale(.78); }
.field input:focus + label { color: var(--ink); }
.field input:-webkit-autofill + label { transform: translateY(-10px) scale(.78); }
.field.pw input { padding-right: 70px; }
.field .show { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; border-radius: 999px;
               padding: 6px 11px; background: transparent; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: background .2s, color .2s; }
.field .show:hover { background: var(--field); color: var(--ink); }

.go { position: relative; width: 100%; height: 52px; margin-top: 10px; border: 0; border-radius: 999px; cursor: pointer;
      background: linear-gradient(135deg, var(--btn-a), var(--btn-b)); color: var(--btn-ink); font: inherit; font-size: 15.5px; font-weight: 600;
      box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .45); transition: transform .2s var(--ease), box-shadow .2s, opacity .2s; }
.go:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -8px rgba(0, 0, 0, .5); }
.go:active { transform: scale(.98); }
.go:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.go[disabled] { cursor: progress; opacity: .85; }
.go .spin { display: none; width: 16px; height: 16px; margin-right: 8px; vertical-align: -3px; border-radius: 50%;
            border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.go[disabled] .spin { display: inline-block; }
@keyframes spin { to { transform: rotate(1turn); } }

.msg { margin: 0 0 14px; padding: 11px 14px; border-radius: 14px; background: var(--field); font-size: 14px; animation: rise .4s var(--ease) both; }
.msg.error { color: var(--err); background: color-mix(in srgb, var(--err) 10%, transparent); }
.foot { color: var(--muted); font-size: 13px; margin: 20px 0 0; text-align: center; }
.foot a { color: var(--ink); }

/* choosing a company */
.orgs { display: grid; gap: 10px; margin-top: 22px; }
.orgs button { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border-radius: 18px; text-align: left; cursor: pointer;
               border: 1px solid var(--line); background: var(--field); color: var(--ink); font: inherit;
               transition: transform .2s var(--ease), border-color .2s, background .2s; animation: rise .5s var(--ease) both; }
.orgs button:nth-child(2) { animation-delay: .05s; } .orgs button:nth-child(3) { animation-delay: .1s; } .orgs button:nth-child(4) { animation-delay: .15s; }
.orgs button:hover, .orgs button:focus-visible { border-color: var(--ink); transform: translateY(-1px); outline: none; }
.orgs .ini { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; font-weight: 700;
             background: linear-gradient(135deg, var(--btn-a), var(--btn-b)); color: var(--btn-ink); }
.orgs b { display: block; font-weight: 600; } .orgs small { display: block; color: var(--muted); font-size: 13px; }
.orgs .arrow { margin-left: auto; color: var(--muted); transition: transform .2s var(--ease); }
.orgs button:hover .arrow { transform: translateX(3px); color: var(--ink); }

@media (max-width: 480px) { .card { padding: 30px 22px 24px; border-radius: 24px; } h1 { font-size: 22px; margin-top: 26px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
