@font-face {
  font-family: "Geist";
  src: url("/fonts/Geist-Variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --page: oklch(0.137 0 0);
  --surface: oklch(0.185 0.004 70);
  --surface-hover: oklch(0.23 0.005 70);
  --ink: oklch(0.958 0.008 80);
  --muted: oklch(0.7 0.008 80);
  --soft: oklch(0.55 0.007 80);
  --accent: oklch(0.743 0.173 55.32);
  --accent-ink: oklch(0.16 0.018 55.32);
  --line: oklch(1 0 0 / 0.1);
  --error: oklch(0.75 0.13 25);
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  min-width: 20rem;
  min-height: 100%;
  background: var(--page);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background:
    radial-gradient(circle at 75% 0%, oklch(0.743 0.173 55.32 / 0.08), transparent 28rem),
    var(--page);
  color: var(--ink);
}

button, input { color: inherit; font: inherit; }

button, a, input { -webkit-tap-highlight-color: transparent; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

::selection { background: var(--accent); color: var(--accent-ink); }

.login-shell {
  display: grid;
  width: min(100% - 2.5rem, 70rem);
  min-height: 100vh;
  min-height: 100svh;
  grid-template-rows: auto 1fr auto;
  margin-inline: auto;
  padding-block: clamp(1.5rem, 4vw, 3rem);
}

.studio-mark {
  justify-self: start;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
  text-decoration: none;
}

.login-panel {
  display: grid;
  width: min(100%, 54rem);
  grid-template-columns: minmax(0, 0.85fr) minmax(18rem, 1fr);
  align-self: center;
  justify-self: center;
  gap: clamp(2.5rem, 7vw, 6.5rem);
  align-items: center;
  padding-block: 3rem;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.login-copy h1 {
  max-width: 8ch;
  margin: 0;
  font-size: clamp(2.75rem, 6vw, 5.25rem);
  font-weight: 540;
  letter-spacing: -0.07em;
  line-height: 0.92;
  text-wrap: balance;
}

.login-copy > p:last-child {
  max-width: 25rem;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  text-wrap: pretty;
}

.login-form {
  display: grid;
  gap: 1.1rem;
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: var(--surface);
  box-shadow: 0 28px 80px -48px oklch(0 0 0 / 0.9);
}

.field { display: grid; gap: 0.5rem; }

.field label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 620;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.field input {
  width: 100%;
  min-height: 3.15rem;
  padding: 0.78rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: oklch(0.14 0 0);
  font-size: 1rem;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.field input:hover { background: oklch(0.155 0 0); }

.field input:focus {
  border-color: oklch(0.743 0.173 55.32 / 0.7);
  outline: 2px solid oklch(0.743 0.173 55.32 / 0.18);
  outline-offset: 0;
}

.field input::placeholder { color: var(--soft); }

.reveal-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--soft);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 620;
}

.reveal-button:hover { color: var(--ink); }

.submit-button {
  min-height: 3rem;
  margin-block-start: 0.35rem;
  padding-inline: 1.2rem;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--page);
  cursor: pointer;
  font-size: 0.83rem;
  font-weight: 700;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.submit-button:hover:not(:disabled) { background: var(--accent); color: var(--accent-ink); }
.submit-button:active:not(:disabled) { transform: scale(0.98); }
.submit-button:disabled { cursor: wait; opacity: 0.62; }

.form-status {
  min-height: 1.25rem;
  margin: -0.2rem 0 0;
  color: var(--error);
  font-size: 0.78rem;
  line-height: 1.45;
}

.login-footer {
  margin: 0;
  color: var(--soft);
  font-size: 0.72rem;
}

@media (max-width: 43rem) {
  .login-shell { width: min(100% - 2rem, 30rem); padding-block: 1.4rem; }
  .login-panel { grid-template-columns: 1fr; gap: 2.35rem; padding-block: 3.5rem; }
  .login-copy h1 { font-size: clamp(2.75rem, 14vw, 4.25rem); }
  .login-copy > p:last-child { margin-top: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}

/* Restored compact client sign-in */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.portal-page { background: #050505; color: #f4f3ef; }

.portal-shell {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 100vh;
  min-height: 100svh;
  padding: 1.5rem 1.25rem 1.25rem;
}

.portal-card {
  width: min(100%, 21.5rem);
  align-self: center;
  justify-self: center;
  transform: translateY(-1.125rem);
}

.portal-header { margin-bottom: 1.75rem; text-align: center; }

.portal-studio {
  display: inline-block;
  margin: 0 0 1rem;
  color: #92928e;
  font-size: 0.6875rem;
  font-weight: 555;
  letter-spacing: 0.14em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}

.portal-studio:hover { color: #f4f3ef; }

.portal-title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 580;
  letter-spacing: -0.035em;
  line-height: 1.08;
  text-align: center;
  text-wrap: balance;
}

.portal-intro {
  margin: 0.5625rem 0 0;
  color: #92928e;
  font-size: 0.875rem;
  line-height: 1.5;
  text-align: center;
}

.portal-form { display: flex; flex-direction: column; gap: 0.75rem; }
.portal-fields { display: flex; flex-direction: column; gap: 0.625rem; }
.portal-field { position: relative; height: 2.875rem; border: 1px solid #353533; }

.portal-input {
  width: 100%;
  height: 100%;
  padding: 0 0.875rem;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: #050505;
  color: #f4f3ef;
  font-size: 0.875rem;
}

.portal-input--password { padding-inline-end: 2.875rem; }
.portal-input::placeholder { color: #73736f; opacity: 1; }
.portal-input:focus { background: #0d0d0d; }

.password-toggle {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  display: flex;
  width: 2.875rem;
  height: 100%;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #7f7f7b;
  cursor: pointer;
}

.password-icon { width: 1rem; height: 1rem; pointer-events: none; }
.password-icon[hidden] { display: none; }
.password-toggle:hover { color: #f4f3ef; }

.portal-submit {
  display: flex;
  width: 100%;
  height: 2.875rem;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #f4f3ef;
  color: #050505;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
}

.portal-submit:disabled { cursor: not-allowed; opacity: 0.28; }

.portal-feedback {
  min-height: 1.125rem;
  margin: 0.125rem 0 0;
  color: #92928e;
  font-size: 0.8125rem;
  line-height: 1.4;
  text-align: center;
}

.portal-credit {
  justify-self: center;
  color: #92928e;
  font-size: 0.75rem;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
}

.portal-credit:hover { color: #f4f3ef; text-decoration: underline; }

.portal-studio:focus-visible,
.portal-credit:focus-visible,
.password-toggle:focus-visible,
.portal-submit:focus-visible {
  outline: 2px solid #f4f3ef;
  outline-offset: 3px;
}

@media (max-width: 23.5rem) {
  .portal-shell { padding-inline: 1rem; }
  .portal-title { font-size: 1.625rem; }
}
