@import "snippets/chroma.css";

form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;

  width: 100%;
  max-width: 24rem;
}

.login-container {
  display: flex;
  align-items: stretch;

  min-height: 100dvh;
}

.form-container {
  flex: 0 0 32%;
  max-width: 30rem;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  position: relative;

  gap: 2.5rem;

  background: var(--surface);
  min-height: 100%;
  padding: 3rem 2.5rem;
  border-right: 1px solid var(--glass-border);
  box-shadow: 8px 0 40px rgba(0, 0, 0, 0.3);

  &::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(
      180deg,
      transparent 0%,
      rgba(255, 255, 255, 0.06) 30%,
      rgba(255, 255, 255, 0.06) 70%,
      transparent 100%
    );
  }
}

.oauth-btn {
  width: 100%;
  max-width: 24rem;
}

.or-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  color: var(--gray);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;

  &::before,
  &::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
  }
}

.notice {
  position: absolute;
  text-align: center;
  bottom: 1.5rem;
  left: 2rem;
  right: 2rem;

  font-size: 0.6rem;
  color: var(--gray);
  line-height: 1.6;
  opacity: 0.7;
}

.sidebar {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 4rem;
  position: relative;

  &::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(255,255,255,0.02) 0%, transparent 70%);
    pointer-events: none;
  }
}

.sidebar-copy {
  max-width: 34rem;
  position: relative;
}

.sidebar-copy h2 {
  margin: 0 0 1.25rem;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.01em;
}

.sidebar-copy p {
  max-width: 32rem;
  color: var(--gray);
  font-size: 1.05rem;
  line-height: 1.7;
}

.sidebar-kicker {
  margin-bottom: 1rem;
  color: var(--green);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.9;
}

.sidebar-lead {
  color: var(--light-gray);
}

@media (max-width: 900px) {
  .login-container {
    flex-direction: column;
    justify-content: center;
  }

  .form-container {
    flex: none;
    width: 100%;
    max-width: none;
    min-height: auto;
    padding: 4rem 2rem 5rem;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
    border-right: none;
    border-bottom: 1px solid var(--glass-border);

    &::after {
      display: none;
    }
  }

  .sidebar {
    padding: 2.5rem 1.5rem 3rem;
  }
}

.title {
  font-size: 5rem;
}

.form-error {
  width: 100%;
  max-width: 24rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-left: 2px solid var(--foreground);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--light-gray);
  font-size: 0.85rem;
  line-height: 1.4;
}

.auth-switch {
  font-size: 0.8rem;
  color: var(--gray);
  text-align: center;
  width: 100%;
  max-width: 24rem;

  & a {
    color: var(--foreground);
    text-underline-offset: 3px;
  }
}
