@import url("https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,opsz,wght@0,6..96,400..900;1,6..96,400..900&display=swap");

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

*:not(dialog) {
  margin: 0;
}

html,
body {
  height: 100%;
}

body {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;

  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;

  display: flex;
}

img {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

p {
  overflow-wrap: break-word;
  text-wrap: pretty;
}

.sidebar {
  flex: 0 0 30%;
  height: 100%;

  background-image: url("https://images.unsplash.com/photo-1528155124528-06c125d81e89");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;

  position: relative;

  color: white;
}

.sidebar a {
  color: white;
}

.back-link {
  align-self: flex-start;
  font-size: small;
  padding: 0.5rem;
}

.logo {
  position: absolute;
  top: 20%;
  width: 100%;
}

.logo-bg {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;

  gap: 1rem;

  padding: 1.5rem;
  background-color: rgba(0, 0, 0, 0.55);
}

.logo img {
  height: 4em;
  width: auto;
}

.logo span {
  font-family: "Bodoni Moda", serif;
  font-optical-sizing: auto;
  font-weight: 600;
  font-style: normal;
  font-size: 2.5rem;
  letter-spacing: 0.1em;
}

.credit {
  padding-bottom: 1rem;
  font-size: clamp(0.5rem, 1vw, 0.75rem);
}

main {
  flex: 1;
  height: 100%;
  overflow-y: auto;

  display: flex;
  flex-direction: column;

  background: whitesmoke;
}

.intro {
  max-width: 700px;
  margin: 2.25rem 3.5rem;

  font-weight: 600;
}

.intro p:last-child {
  margin-top: 1rem;
}

.signup-form {
  display: flex;
  flex-direction: column;
}

.form-card {
  width: 100%;
  background: white;
  padding: 1.5rem 3.5rem 2rem;
}

.form-card .form-title {
  margin: 0 0 1.5rem 0;

  font-size: 1.5rem;
  color: #0a6e4b;
}

.form-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 3rem;

  max-width: 640px;
  width: 100%;
}

.form-grid .field {
  min-width: 0;
  flex: 1 1 240px;
  display: flex;
  flex-direction: column;
}

.actions,
.login-link {
  padding-left: 3.5rem;
  margin-bottom: 1.25rem;
}

.actions {
  margin-top: 1.5rem;
}

label {
  color: #194536;

  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 0.1rem;
}

input,
select {
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 0.35rem 0.55rem;
}

input:focus,
select:focus {
  outline: none;
  border-color: dodgerblue;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.15);
}

.field .error {
  min-height: 1.5em;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: crimson;
}

.field.invalid input,
.field.invalid select {
  border-color: crimson;
}

.field.valid input,
.field.valid select {
  border-color: #299b74;
}

button {
  background-color: #299b74;
  color: white;
  font-weight: bold;
  padding: 0.8em 3em;

  border: none;
  border-radius: 7px;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.15);
}

.login-link a {
  text-decoration: none;
  font-weight: bold;
  color: #299b74;
}

.toast {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.25em;

  color: white;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;

  box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.15);
  opacity: 0;

  transition: opacity 300ms ease;

  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
}

.toast.is-success {
  background: #299b74;
}

.toast.is-error {
  background: crimson;
}
