/* Stryv login screen — the same door as the hub.
   A charcoal ground with a slow green light behind it, and a light card holding
   WordPress's own form. Values a client can change arrive as custom properties from
   modules/login.php: --stryv-accent, the wordmark, a photograph if one is set. */

body.login {
  /* stryvcreative.com's own palette: the green, the charcoal, the greys. */
  --stryv-accent: #83d086;
  --stryv-ground: #111111;
  --stryv-card: #ffffff;
  --stryv-line: #dedede;
  --stryv-ink: #2f2f2f;
  --stryv-muted: #5c5c5c;
  --stryv-on-dark: #adadae;
  --stryv-radius: 3px;              /* the site is square-cornered; a hair of softness */

  position: relative;
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--stryv-ground);
  color: var(--stryv-ink);
  font-family: "Proxima Nova", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* The photograph, when there is one, and the light behind everything. Two layers so a
   photo can sit under the glow without either fighting the card. */
body.login::before,
body.login::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
body.login::before {
  background-position: 50% 50%;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0.28;
  filter: saturate(0.7);
}
body.login::after {
  /* Two soft pools of the green, and a dot matrix that fades out towards the edges. */
  background:
    radial-gradient(46rem 30rem at 50% 42%, color-mix(in srgb, var(--stryv-accent) 14%, transparent), transparent 68%),
    radial-gradient(28rem 20rem at 16% 12%, color-mix(in srgb, var(--stryv-accent) 8%, transparent), transparent 70%),
    radial-gradient(rgb(255 255 255 / 0.14) 1px, transparent 1.5px);
  background-size: auto, auto, 22px 22px;
  background-position: 0 0, 0 0, center;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 45%, black 25%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 70% at 50% 45%, black 25%, transparent 100%);
  animation: stryv-drift 26s ease-in-out infinite alternate;
}
@keyframes stryv-drift {
  from { transform: translate3d(-2%, 0, 0) scale(1); }
  to   { transform: translate3d(3%, 2%, 0) scale(1.06); }
}

/* The column: wordmark, line, card, links. */
#login {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  padding: 24px 20px;
  margin: 0;
  animation: stryv-rise 620ms cubic-bezier(0.16, 0.84, 0.24, 1) both;
}
@keyframes stryv-rise {
  from { opacity: 0.4; transform: translateY(10px); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}

.login h1 a {
  display: block;
  margin: 0 0 18px;
  padding: 0;
  background-size: contain;
  background-position: left center;
  background-repeat: no-repeat;
  text-indent: -9999px;
  overflow: hidden;
  outline-offset: 4px;
}

.login .stryv-tagline,
.login .message,
.login #login_error,
.login .success {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  font-size: 15px;
  line-height: 1.5;
}
.login .stryv-tagline { color: var(--stryv-on-dark); max-width: 38ch; font-size: 14px; }
.login .message, .login .success {
  color: var(--stryv-ink);
  background: var(--stryv-card);
  border: 1px solid var(--stryv-line);
  border-radius: var(--stryv-radius);
  padding: 12px 14px;
  font-size: 14px;
}
.login #login_error {
  color: #7a4a00;
  background: #fff7e8;
  border: 1px solid rgba(154, 91, 0, 0.35);
  border-radius: var(--stryv-radius);
  padding: 12px 14px;
  font-size: 14px;
}

/* The card. WordPress's own form, dressed. */
.login form {
  margin: 0;
  padding: 28px;
  background: var(--stryv-card);
  border: 1px solid var(--stryv-line);
  border-radius: var(--stryv-radius);
  box-shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.6);
}
.login form .input,
.login input[type="text"],
.login input[type="password"] {
  margin: 6px 0 16px;
  padding: 0 12px;
  height: 42px;
  font-size: 15px;
  line-height: 42px;
  color: var(--stryv-ink);
  background: #fff;
  border: 1px solid var(--stryv-line);
  border-radius: var(--stryv-radius);
  box-shadow: none;
  transition: border-color 120ms, box-shadow 120ms;
}
.login form .input:focus,
.login input[type="text"]:focus,
.login input[type="password"]:focus {
  border-color: var(--stryv-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--stryv-accent) 30%, transparent);
  outline: none;
}
.login label {
  font-size: 13px;
  font-weight: 500;
  color: var(--stryv-ink);
}
.login .wp-pwd .button.wp-hide-pw {
  color: var(--stryv-muted);
  height: 42px;
  margin-top: 6px;
}
.login .wp-pwd .button.wp-hide-pw:focus { box-shadow: 0 0 0 2px var(--stryv-accent); }

.login .forgetmenot { margin-top: 2px; }
.login .forgetmenot label { font-weight: 400; color: var(--stryv-muted); font-size: 13px; }
.login input[type="checkbox"] {
  accent-color: var(--stryv-accent);
  border-color: var(--stryv-line);
  border-radius: 4px;
  box-shadow: none;
}
.login input[type="checkbox"]:checked::before { content: none; }

/* The one button. Ink on the accent, which is how the hub's dark theme sets it, and
   which keeps contrast on the light green Stryv uses. */
.login .wp-core-ui .button-primary,
.wp-core-ui .button-primary {
  display: block;
  float: none;
  width: 100%;
  height: 44px;
  margin: 8px 0 0;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 44px;
  color: var(--stryv-ink);
  background: var(--stryv-accent);
  border: 0;
  border-radius: var(--stryv-radius);
  box-shadow: none;
  text-shadow: none;
  transition: transform 120ms, filter 120ms;
}
.wp-core-ui .button-primary:hover,
.wp-core-ui .button-primary:focus {
  color: var(--stryv-ink);
  background: var(--stryv-accent);
  filter: brightness(0.94);
  box-shadow: none;
}
.wp-core-ui .button-primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--stryv-card), 0 0 0 5px var(--stryv-accent);
}
.wp-core-ui .button-primary:active { transform: translateY(1px); }
.login .submit { padding: 0; }

/* Below the card: the links WordPress prints. Quiet, readable on the dark ground. */
.login #nav,
.login #backtoblog {
  margin: 14px 0 0;
  padding: 0;
  font-size: 13px;
  text-align: left;
}
.login #nav a,
.login #backtoblog a {
  color: var(--stryv-on-dark);
  text-decoration: none;
  text-underline-offset: 3px;
}
.login #nav a:hover,
.login #backtoblog a:hover,
.login #nav a:focus,
.login #backtoblog a:focus {
  color: #fff;
  text-decoration: underline;
}
.login .privacy-policy-page-link { margin: 18px 0 0; text-align: left; }
.login .privacy-policy-page-link a { color: var(--stryv-on-dark); font-size: 12px; }

/* One language per site; the switcher is noise here. */
.login .language-switcher { display: none; }

/* Browser surfaces belong to the design too. */
.login ::selection { background: color-mix(in srgb, var(--stryv-accent) 30%, transparent); }
.login *:focus-visible { outline: 2px solid var(--stryv-accent); outline-offset: 2px; }

@media (max-width: 440px) {
  #login { padding: 16px; }
  .login form { padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  body.login::after, #login { animation: none; }
}
