/*
 * Auth landing — /sign-in and /sign-up
 * Visual reference: altruate-flutter-app.lovable.app
 */

body:has(.landing-auth) {
  background: #f2f8f5;
}

.landing-auth {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: #161d1a;
  background:
    radial-gradient(900px 420px at 18% -8%, #e7f8ee 0%, transparent 58%),
    #f2f8f5;
}

.landing-auth__shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1;
}

.landing-auth__hero-copy {
  display: none;
}

.landing-auth__intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  margin-bottom: 8px;
}

.landing-auth__mark {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.landing-auth__intro-title,
.landing-auth__card-title {
  margin: 0;
  font-size: 1.875rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.landing-auth__intro-title em,
.landing-auth__hero-title em {
  font-style: normal;
  color: #28bd78;
}

.landing-auth__intro-subtitle,
.landing-auth__hero-subtitle,
.landing-auth__card-subtitle {
  margin: 0;
  color: #5b6b64;
  font-size: 0.95rem;
  line-height: 1.45;
}

.landing-auth__stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.landing-auth__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 72px;
  padding: 10px 8px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(20, 34, 28, 0.06);
}

.landing-auth__stat-icon {
  display: none;
}

.landing-auth__stat-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.landing-auth__stats strong {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  order: -1;
}

.landing-auth__stats .landing-auth__stat-copy span {
  color: #6b7c74;
  font-size: 0.75rem;
  font-weight: 600;
}

.landing-auth__stat--activities .landing-auth__stat-copy span,
.landing-auth__stat--cities .landing-auth__stat-copy span {
  text-transform: lowercase;
}

.landing-auth__feed {
  margin-top: 8px;
  outline: none;
}

.landing-auth__feed-viewport {
  overflow: hidden;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(20, 34, 28, 0.12);
  touch-action: pan-y;
}

.landing-auth__feed-track {
  display: flex;
  width: 100%;
  transform: translate3d(0, 0, 0);
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.landing-auth__feed-track--dragging,
.landing-auth__feed-track--no-motion {
  transition: none;
}

.landing-auth__shot {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  color: #14221c;
  background: #fff;
  user-select: none;
}

.landing-auth__shot-visual {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  color: #fff;
}

.landing-auth__shot-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}

.landing-auth__shot-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(14, 28, 22, 0.08) 22%, rgba(14, 28, 22, 0.78) 100%);
}

.landing-auth__shot--1 .landing-auth__shot-visual {
  background: linear-gradient(145deg, #86efac 0%, #166534 100%);
}

.landing-auth__shot--2 .landing-auth__shot-visual {
  background: linear-gradient(145deg, #7dd3fc 0%, #0f766e 100%);
}

.landing-auth__shot--3 .landing-auth__shot-visual {
  background: linear-gradient(145deg, #6ee7b7 0%, #115e59 100%);
}

.landing-auth__shot--4 .landing-auth__shot-visual {
  background: linear-gradient(145deg, #fde68a 0%, #047857 100%);
}

.landing-auth__shot-tag,
.landing-auth__shot-title {
  position: relative;
  z-index: 2;
}

.landing-auth__shot-tag {
  align-self: flex-start;
  margin-bottom: auto;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #14532d;
  font-size: 0.7rem;
  font-weight: 700;
}

.landing-auth__shot-title {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.landing-auth__shot-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #fff;
}

.landing-auth__shot-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e8faf3;
  color: #1fbf7a;
  font-size: 0.7rem;
  font-weight: 800;
}

.landing-auth__shot-byline {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.landing-auth__shot-name {
  overflow: hidden;
  font-size: 0.8rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.landing-auth__shot-role {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #8a9b93;
  font-size: 0.65rem;
  font-weight: 600;
}

.landing-auth__shot-pin {
  display: block;
  width: 12px;
  height: 12px;
  opacity: 0.7;
}

.landing-auth__shot-counts {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #28bd78;
  font-size: 0.8rem;
  font-weight: 700;
}

.landing-auth__shot-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.landing-auth__shot-stat img {
  display: block;
  width: 16px;
  height: 16px;
}

.landing-auth__dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}

.landing-auth__dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #c9d6d0;
  cursor: pointer;
  transition: width 180ms ease, background-color 180ms ease;
}

.landing-auth__dot--active {
  width: 24px;
  background: #28bd78;
}

.landing-auth__stage {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.landing-auth__card {
  width: min(440px, 100%);
  margin: 0 auto;
  padding: 20px 18px 22px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(22, 29, 26, 0.08);
}

.landing-auth__card-brand {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  margin-bottom: 18px;
}

.landing-auth__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: #eef7f2;
}

.landing-auth__tab {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #5b6b64;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.landing-auth__tab[aria-selected="true"] {
  background: #fff;
  color: #14221c;
  box-shadow: 0 4px 12px rgba(20, 34, 28, 0.08);
}

.landing-auth__panel[hidden] {
  display: none !important;
}

.landing-auth__form {
  display: grid;
  gap: 12px;
}

.landing-auth .field__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.landing-auth .field__box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: #f0f5f2;
}

.landing-auth .field__box .field__input {
  flex: 1;
  min-width: 0;
  min-height: auto;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  outline: none;
}

.landing-auth .field__input::placeholder {
  color: #8a9b93;
}

.landing-auth .field--clearable .field__clear {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  color: #8a9b93;
}

.landing-auth .field--clearable.field--filled .field__clear {
  display: flex;
}

.landing-auth .field--password .field__toggle {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  padding: 0;
  color: #8a9b93;
}

.landing-auth .field--password .field__toggle-icon {
  grid-area: 1 / 1;
  display: block;
  width: 24px;
  height: 24px;
}

.landing-auth .field--password .field__toggle-icon--show {
  display: none;
}

.landing-auth .field--password .field__toggle.is-visible .field__toggle-icon--hide {
  display: none;
}

.landing-auth .field--password .field__toggle.is-visible .field__toggle-icon--show {
  display: block;
}

.landing-auth .field:focus-within .field__box {
  border-color: #28bd78;
  box-shadow: 0 0 0 3px rgba(40, 189, 120, 0.16);
  background: #fff;
}

.landing-auth .field--error .field__box,
.landing-auth .field--error:focus-within .field__box {
  border-color: #ec5b5b;
  box-shadow: none;
}

.landing-auth .login__submit-wrap,
.landing-auth .registration__submit-wrap {
  display: grid;
  gap: 8px;
}

.landing-auth .btn--primary {
  min-height: 44px;
  border-radius: 16px;
  background: #28bd78;
  font-size: 0.9375rem;
  font-weight: 700;
}

.landing-auth .btn--primary:disabled,
.landing-auth .btn--primary.btn--disabled {
  background: #28bd78;
  color: #fff;
  opacity: 1;
}

.landing-auth__forgot {
  display: block;
  margin: 4px 0 0;
  text-align: center;
  color: #6b7c74;
  font-size: 0.875rem;
  font-weight: 600;
}

.landing-auth__legal {
  margin: 12px 0 0;
  text-align: center;
  color: #6b7c74;
  font-size: 0.8rem;
  line-height: 1.45;
}

.landing-auth__legal a {
  color: #28bd78;
  font-weight: 700;
}

.landing-auth__notice,
.landing-auth .login__server-error,
.landing-auth .registration__server-error {
  margin: 0 0 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #e8faf3;
  color: #0d6e6c;
  font-size: 0.8125rem;
  text-align: center;
}

.landing-auth__notice--error,
.landing-auth .login__server-error:not(.login__server-error--hidden),
.landing-auth .registration__server-error {
  background: #fff1f1;
  color: #b42318;
}

.landing-auth .login__server-error--hidden {
  display: none;
}

.landing-auth__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: #8a9b93;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.landing-auth__divider::before,
.landing-auth__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e3ece7;
}

.landing-auth__guest {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 16px;
  background: #f0f5f2;
  color: #161d1a;
  font-weight: 700;
}

.landing-auth__explore-label {
  display: none;
  margin: 18px 0 10px;
  text-align: center;
  color: #8a9b93;
  font-size: 0.8rem;
}

.landing-auth__chips {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.landing-auth__chip {
  padding: 8px 14px;
  border-radius: 999px;
  background: #eef7f2;
  color: #14532d;
  font-size: 0.8125rem;
  font-weight: 700;
}

.landing-auth__footer {
  padding: 8px 16px 28px;
  text-align: center;
  color: #8a9b93;
  font-size: 0.8rem;
}

.landing-auth__footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  margin-bottom: 8px;
}

.landing-auth__footer-links a:hover {
  color: #14532d;
}

@media screen and (min-width: 960px) {
  .landing-auth__shell {
    display: grid;
    grid-template-columns: 454px minmax(380px, 440px);
    justify-content: center;
    align-items: center;
    gap: 48px;
    padding: 48px 0 32px;
  }

  .landing-auth__hero {
    width: 454px;
    max-width: 100%;
  }

  .landing-auth__hero-copy {
    display: block;
    margin-bottom: 22px;
  }

  .landing-auth__hero-title {
    margin: 0 0 16px;
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 1.05;
  }

  .landing-auth__hero-title-line {
    display: block;
  }

  .landing-auth__hero-subtitle {
    max-width: 36rem;
    font-size: 1.05rem;
  }

  .landing-auth__intro {
    display: none;
  }

  .landing-auth__stats {
    display: flex;
    grid-template-columns: none;
    justify-content: start;
    gap: 10px;
    margin: 20px 0 22px;
  }

  .landing-auth__stat {
    flex: 1;
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    min-height: 52px;
    padding: 8px 10px;
    border-radius: 16px;
  }

  .landing-auth__stat--altruators {
    order: 1;
  }

  .landing-auth__stat--cities {
    order: 2;
  }

  .landing-auth__stat--activities {
    order: 3;
  }

  .landing-auth__stat-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(40, 189, 120, 0.12);
    color: #28bd78;
  }

  .landing-auth__stat-copy {
    align-items: flex-start;
    gap: 2px;
  }

  .landing-auth__stats strong {
    font-size: 1rem;
    order: 2;
  }

  .landing-auth__stats .landing-auth__stat-copy span {
    order: 1;
    font-size: 0.5625rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .landing-auth__feed {
    margin-top: 0;
  }

  .landing-auth__feed-viewport {
    overflow: visible;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .landing-auth__feed-track {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: start;
    transform: none !important;
    transition: none;
    will-change: auto;
  }

  .landing-auth__shot {
    position: relative;
    flex: none;
    width: auto;
    min-height: 0;
    overflow: hidden;
    border-radius: 24px;
    color: #fff;
    background: transparent;
    box-shadow: 0 14px 30px rgba(20, 34, 28, 0.12);
    transition: transform 180ms ease, box-shadow 180ms ease;
  }

  .landing-auth__shot:nth-child(1),
  .landing-auth__shot:nth-child(4) {
    height: 210px;
  }

  .landing-auth__shot:nth-child(2),
  .landing-auth__shot:nth-child(3) {
    height: 176px;
  }

  .landing-auth__shot:nth-child(2) {
    margin-top: 24px;
  }

  .landing-auth__shot:nth-child(4) {
    margin-top: -24px;
  }

  .landing-auth__shot:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 36px rgba(20, 34, 28, 0.16);
  }

  .landing-auth__shot-visual {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
    min-height: 0;
    padding: 16px 16px 52px;
  }

  .landing-auth__shot-meta {
    position: absolute;
    z-index: 1;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px 16px;
    background: transparent;
    color: #fff;
  }

  .landing-auth__shot-avatar {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
  }

  .landing-auth__shot-title {
    font-size: 0.8125rem;
  }

  .landing-auth__shot-name {
    font-size: 0.75rem;
  }

  .landing-auth__shot-role {
    display: none;
  }

  .landing-auth__shot-counts {
    color: rgba(255, 255, 255, 0.92);
  }

  .landing-auth__shot-stat img,
  .landing-auth__shot-pin {
    filter: brightness(0) invert(1);
    opacity: 0.9;
  }

  .landing-auth__dots {
    display: none;
  }

  .landing-auth__explore-label {
    display: block;
  }

  .landing-auth__chips {
    margin-top: 0;
  }

  .landing-auth__card-brand {
    display: flex;
  }

  .landing-auth__card {
    width: 100%;
    padding: 28px 28px 24px;
  }

  .landing-auth__footer {
    padding-bottom: 36px;
  }
}
