/* Unauthenticated screen: brand lockup and a sign-in card on the ocean gradient,
   over a decorative seascape. Colours are theme-independent here by intent — the
   navy field is the brand, in both themes. */

.ks-login {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 2.5rem 1rem;
  overflow: hidden;
  background: var(--ks-ocean-gradient);
}

.ks-login__lockup {
  position: relative;
  z-index: 1;
  height: 6rem;
  max-width: 88vw;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgb(0 0 0 / 0.35));
}

.ks-login__card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 28rem;
  padding: 2rem;
  text-align: center;
  border-radius: var(--ks-radius);
  background: color-mix(in srgb, var(--ks-surface-subtle) 95%, transparent);
  border: 1px solid var(--ks-surface-border);
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.45);
  backdrop-filter: blur(4px);
}

.ks-login__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.ks-login__subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--ks-muted-text);
}

.ks-login__error {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding: 0.5rem 0.75rem;
  text-align: left;
  font-size: 0.75rem;
  line-height: 1.5;
  border-radius: var(--ks-radius);
  border: 1px solid var(--ks-danger);
  color: var(--ks-danger);
  background: color-mix(in srgb, var(--ks-danger) 10%, transparent);
}

.ks-login__error[hidden] {
  display: none;
}

.ks-login__form {
  margin-top: 1.5rem;
  text-align: left;
}

.ks-login__field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.ks-login__field + .ks-login__field {
  margin-top: 0.875rem;
}

.ks-login__label {
  font-size: 0.8125rem;
  font-weight: 600;
}

.ks-login__input {
  padding: 0.625rem 0.75rem;
  font: inherit;
  color: inherit;
  border-radius: var(--ks-radius);
  border: 1px solid var(--ks-surface-border);
  background: var(--ks-surface);
}

.ks-login__input:focus-visible {
  outline: var(--ks-focus-outline);
  outline-offset: 1px;
}

.ks-login__button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 1.5rem;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  border-radius: var(--ks-radius);
  color: var(--primary-color-text);
  background: var(--ks-senner-blue);
}

.ks-login__button:hover {
  background: var(--ks-oxford-blue);
}

.ks-login__button:focus-visible {
  outline: var(--ks-focus-outline);
  outline-offset: 2px;
}

.ks-login__button:disabled {
  opacity: 0.6;
  cursor: default;
}

.ks-login__hint {
  margin: 1rem 0 0;
  font-size: 0.75rem;
  color: var(--ks-muted-text);
}

/* --- Seascape: three layered waves with a tug drifting along the waterline --- */

.ks-login__seascape {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 28%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.ks-login__waves {
  position: absolute;
  left: -10%;
  bottom: 0;
  width: 120%;
  height: 100%;
}

.ks-login__wave {
  fill: var(--ks-senner-blue);
}

.ks-login__wave--back {
  opacity: 0.18;
  animation: ks-wave-drift 19s ease-in-out infinite;
}

.ks-login__wave--mid {
  opacity: 0.32;
  animation: ks-wave-drift 13s ease-in-out infinite reverse;
}

.ks-login__wave--front {
  opacity: 0.55;
  animation: ks-wave-drift 9s ease-in-out infinite;
}

.ks-login__tug {
  position: absolute;
  inset-inline: 0;
  bottom: 34%;
  animation: ks-tug-drift 32s ease-in-out infinite;
}

.ks-login__tug-bob {
  animation: ks-tug-bob 4s ease-in-out infinite;
}

.ks-login__tug-img {
  width: 3rem;
  height: 3rem;
  /* Mirrored so the bow faces the direction of drift. */
  transform: scaleX(-1);
  filter: drop-shadow(0 2px 4px rgb(0 0 0 / 0.3));
}

@keyframes ks-wave-drift {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(-3%); }
}

@keyframes ks-tug-drift {
  0%, 100% { transform: translateX(12%); }
  50%      { transform: translateX(72%); }
}

@keyframes ks-tug-bob {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50%      { transform: translateY(-6px) rotate(1.5deg); }
}
