/* ---- Auth pages (/login/) ----------------------------------------------
   All views (log in · forgot password · existing social account) render into
   the same page, so every block here is scoped under .auth. */

.auth {
  padding: 24px 0 96px;
}

.auth__noscript {
  max-width: 46ch;
  margin: 64px auto;
  text-align: center;
  color: var(--fg-muted);
  font-size: 15px;
  line-height: 1.6;
}

/* ---- Top row: BACK on the left, LOG IN on the right ---- */
.auth__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 34px;
}

.auth__toplink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
  border: none;
  background: none;
  color: var(--fg-muted);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.18s ease;
}
.auth__toplink:hover,
.auth__toplink:focus-visible {
  color: var(--fg);
}

/* ---- Logo mark + bold title ---- */
.auth__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 40px;
}

.auth__logo {
  width: 84px;
  height: 84px;
  border-radius: 20px;
  object-fit: cover;
}

.auth__title {
  margin-top: 24px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 4.4vw, 44px);
  line-height: 1.1;
  letter-spacing: var(--tracking-display);
  text-transform: uppercase;
  max-width: 22ch;
}

.auth__sub {
  margin-top: 14px;
  max-width: 44ch;
  color: var(--fg-muted);
  font-size: 15px;
  line-height: 1.6;
}

/* ---- Two-column panel: email form | OR | social providers ---- */
.auth__panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 40px;
  max-width: 860px;
  margin: 56px auto 0;
}

.auth__divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  align-self: stretch;
  color: var(--fg-subtle);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
}
.auth__divider::before,
.auth__divider::after {
  content: "";
  flex: 1;
  width: 1px;
  background: var(--hairline);
}

/* ---- Form ---- */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field__label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--fg-muted);
}

.field__control {
  position: relative;
  display: flex;
  align-items: center;
}

.field__input {
  width: 100%;
  padding: 10px 0;
  border: none;
  border-bottom: 1px solid var(--pill-border);
  border-radius: 0;
  background: transparent;
  color: var(--fg);
  font-family: inherit;
  font-size: 17px;
  letter-spacing: var(--tracking-body);
  transition: border-color 0.18s ease;
}
.field__input::placeholder {
  color: var(--fg-subtle);
}
.field__input:focus {
  outline: none;
  border-bottom-color: var(--fg);
}
.field__input--reveal {
  padding-right: 40px;
}

.field__reveal {
  position: absolute;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  background: none;
  color: var(--fg-muted);
  cursor: pointer;
  transition: color 0.18s ease;
}
.field__reveal:hover,
.field__reveal:focus-visible {
  color: var(--fg);
}

.field__error {
  font-size: 13px;
  line-height: 1.5;
  color: #ff8a8a;
}

/* ---- Buttons ---- */
.auth__submit {
  margin-top: 6px;
  width: 100%;
  padding: 16px 24px;
  border: 1px solid var(--fg);
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease;
}
.auth__submit:hover:not(:disabled) {
  background: transparent;
  color: var(--fg);
}
.auth__submit:disabled {
  border-color: var(--pill-border);
  background: rgba(255, 255, 255, 0.07);
  color: var(--fg-subtle);
  cursor: not-allowed;
}

.auth__status {
  min-height: 20px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--fg-muted);
  text-align: center;
}
.auth__status--error {
  color: #ff8a8a;
}

/* ---- Social providers ---- */
.provider-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.provider {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 15px 18px;
  border: 1px solid var(--pill-border);
  border-radius: 10px;
  background: #0a0a0a;
  color: var(--fg);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease;
}
.provider:hover,
.provider:focus-visible {
  background: #151515;
  border-color: var(--fg);
}
.provider:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.provider__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.provider__label {
  flex: 1;
  text-align: center;
}

/* ---- Footer link row ---- */
.auth__help {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

.auth__help-link {
  padding: 10px 4px;
  border: none;
  background: none;
  color: var(--fg-muted);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  cursor: pointer;
  transition:
    color 0.18s ease,
    text-decoration-color 0.18s ease;
}
.auth__help-link:hover,
.auth__help-link:focus-visible {
  color: var(--fg);
  text-decoration-color: var(--fg);
}

/* ---- Single-column views (forgot password, existing account) ---- */
.auth__narrow {
  width: 100%;
  max-width: 420px;
  margin: 40px auto 0;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.auth__note {
  margin-top: 4px;
  text-align: center;
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg-muted);
}

/* Legal line above a provider button — deliberately small, sentence case. */
.auth__legal {
  text-align: center;
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0;
  color: var(--fg-subtle);
}
.auth__legal a {
  color: var(--fg-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.18s ease;
}
.auth__legal a:hover,
.auth__legal a:focus-visible {
  color: var(--fg);
}

@media (max-width: 760px) {
  .auth__panel {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    max-width: 420px;
  }
  .auth__divider {
    flex-direction: row;
  }
  .auth__divider::before,
  .auth__divider::after {
    width: auto;
    height: 1px;
  }
  .auth__help {
    margin-top: 36px;
  }
}
