.auth-screen[hidden],
.auth-screen [hidden] { display: none; }

.auth-screen {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  flex: 1;
  min-height: 100svh;
  overflow: clip;
  color: #fffaf0;
  background: #193438;
}

.auth-scenery {
  position: absolute;
  z-index: -2;
  inset: 0;
  background: url('/dolomites.webp') 47% center / cover no-repeat;
  animation: auth-scenery-reveal 1.8s cubic-bezier(.15,.55,.3,1) both;
}

.auth-screen::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(180deg, #0d242770, transparent 37%, #0c21245e 60%, #081c20d9),
    linear-gradient(90deg, #09222555, transparent 65%, #0d252b38);
}

.auth-layout {
  width: min(100% - clamp(3rem, 11vw, 11rem), 84rem);
  min-height: min(48rem, 100svh);
  margin: 0 auto;
  padding: clamp(2.5rem, 7vh, 5rem) 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(22rem, 27rem);
  grid-template-rows: auto 1fr;
  column-gap: clamp(2rem, 7vw, 8rem);
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: .75rem;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -.035em;
  text-shadow: 0 1px 5px #0e2429;
}

.auth-brand-mark {
  display: grid;
  place-items: center;
  width: 2.55rem;
  height: 2.55rem;
  border: 1px solid #fff9e893;
  border-radius: .9rem;
  background: #173c42b0;
  backdrop-filter: blur(8px);
}

.auth-brand-mark svg { width: 1.28rem; height: 1.28rem; }

.auth-intro {
  grid-column: 1;
  align-self: end;
  padding-bottom: clamp(.5rem, 5vh, 3.75rem);
  animation: auth-rise .82s .12s both;
}

.auth-headline {
  font-size: clamp(2.75rem, 6.15vw, 6.1rem);
  font-weight: 780;
  line-height: .98;
  letter-spacing: -.07em;
  text-wrap: balance;
  text-shadow: 0 4px 26px #0a222c67;
}

.auth-description { font-size: .91rem; line-height: 1.55; }
.auth-intro .auth-description {
  max-width: 29rem;
  margin-top: 1.15rem;
  color: #f3efe3;
  font-size: clamp(.95rem, 1.6vw, 1.14rem);
}

.auth-card {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  padding: clamp(1.65rem, 3vw, 2.6rem);
  color: #162f34;
  color-scheme: light;
  background: #fffcf6;
  border: 1px solid #fffdf6aa;
  border-radius: 1.65rem;
  box-shadow: 0 1.25rem 4rem #041a2688;
  animation: auth-rise .65s .22s both;
}

.auth-card h1 {
  margin: 0 0 .4rem;
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  font-weight: 790;
  line-height: 1.12;
  letter-spacing: -.062em;
}

.auth-card .auth-description { color: #4a6063; }
.auth-message {
  margin-top: .9rem;
  padding: .65rem .8rem;
  border-radius: .65rem;
  font-size: .86rem;
  line-height: 1.4;
  color: #653d15;
  background: #f8ebd3;
}
.auth-message:empty { display: none; }
#google-option, .auth-form { margin-top: 1.3rem; }

.auth-google, .auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  width: 100%;
  min-height: 3rem;
  border-radius: .78rem;
  padding: .58rem .8rem;
  font-size: .92rem;
  font-weight: 700;
  transition: background-color .18s ease, box-shadow .18s ease;
}
.auth-google { border: 1px solid #b9c9c4; background: #fffefa; }
.auth-google:hover { background: #eef4ed; }
.auth-google svg, .auth-submit svg { width: 1.05rem; height: 1.05rem; flex: none; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin: 1rem 0 0;
  color: #56696b;
  font-size: .78rem;
  white-space: nowrap;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  height: 1px;
  flex: 1;
  background: #d7dfd9;
}

.auth-form { display: grid; gap: .82rem; }
.auth-form label { display: grid; gap: .3rem; font-size: .85rem; font-weight: 690; }
.auth-form input {
  width: 100%;
  min-width: 0;
  min-height: 2.8rem;
  border: 1px solid #b9c9c4;
  border-radius: .76rem;
  padding: .52rem .7rem;
  background: #fffefa;
  font-size: 1rem;
  font-weight: 450;
}
.auth-submit {
  margin-top: .2rem;
  background: #174e49;
  color: #fffdf4;
}
.auth-submit:not(:disabled):hover { background: #0e3c37; box-shadow: 0 .3rem .85rem #174e4930; }
.auth-submit:disabled { cursor: progress; }
.auth-submit:disabled svg { animation: auth-compass 1.4s ease-in-out infinite; }
.auth-card :is(a, button, input):focus-visible {
  outline: 2px solid #306d62;
  outline-offset: 3px;
}

.auth-alternative { margin-top: 1.15rem; text-align: center; color: #4a6063; font-size: .84rem; }
.auth-alternative button {
  min-height: 2rem;
  padding: 0 .2rem;
  color: #174e49;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: .2em;
}

@keyframes auth-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes auth-scenery-reveal {
  from { transform: scale(1.045); }
  to { transform: scale(1); }
}
@keyframes auth-compass { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  .auth-screen { align-items: start; }
  .auth-scenery {
    bottom: auto;
    height: 32rem;
    background-position: 35% top;
    mask-image: linear-gradient(black 68%, transparent);
  }
  .auth-screen::before {
    background: linear-gradient(180deg, #0c252773, #0b22251c 7rem, #102d31d9 20rem, transparent 30rem);
  }
  .auth-layout {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: min(100% - 2rem, 29rem);
    padding: 1.4rem 0 2rem;
    min-height: 0;
  }
  .auth-intro { align-self: stretch; padding: 2.55rem .25rem .25rem; }
  .auth-desktop-break { display: none; }
  .auth-intro .auth-description { margin-top: .7rem; }
  .auth-card { align-self: stretch; border-radius: 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-screen *, .auth-scenery { animation: none !important; transition: none !important; }
}

