/* ==========================================================
   Auth — a dark card floating over the landing photograph.
   Shared by login.html and signup.html; the only differences
   between them are the heading and which fields show.
   ========================================================== */

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }

body {
  font-family: "Space Grotesk", system-ui, sans-serif;
  color: #fff;
  background: #1b2650;
}

/* ---- the ground: the same hero photograph, dimmed back ---- */
.auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #1b2650;
}
.auth-bg img {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  display: block;
}
/* a scrim only — the photograph stays sharp */
.auth-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 50% 45%, rgba(9, 14, 34, .16) 0%, rgba(9, 14, 34, .5) 76%);
}

.sky {
  position: fixed;
  inset: 0;
  /* a canvas is a replaced element: inset:0 alone leaves it at its intrinsic
     300x150, so the sky has to be sized explicitly or the constellations are
     drawn against a tiny box */
  width: 100%;
  height: 100%;
  z-index: 1;          /* above the photo and its scrim, below the card */
  pointer-events: none;
}

.auth-wrap {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 20px 64px;
}

/* ---- close ---- */
.auth-close {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 4;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .14);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}
.auth-close:hover { background: rgba(255, 255, 255, .2); }
.auth-close svg { width: 17px; height: 17px; }

/* ---- the card ---- */
/* Measured off wafer's own login card: 430px wide, 32px radius, a near-black
   translucent fill and a single hairline. Its controls are 40px, which is what
   makes it read as tight rather than chunky. */
.card {
  width: 100%;
  max-width: 430px;
  padding: 30px 77px 0;   /* 430 - 276 = 154, split either side */
  border-radius: 32px;
  border: 1px solid rgba(157, 157, 157, .2);
  background: rgba(0, 0, 0, .8);
  /* this blurs only what sits behind the card, not the page — it is what makes
     the fill read as slightly milky rather than flat black */
  backdrop-filter: blur(37px);
  -webkit-backdrop-filter: blur(37px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .25);
  text-align: center;
}

.logo {
  width: 46px;
  height: 46px;
  margin: 0 auto;
  border-radius: 13px;
  background: #0c0c0d;
  display: grid;
  place-items: center;
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  font-size: 23px;
  color: #fff;
  line-height: 1;
}

.card h1 {
  font-family: "DM Sans", sans-serif;
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -.02em;
  margin: 18px 0 0;
}
.card .sub {
  font-size: 14px;
  color: rgba(255, 255, 255, .5);
  margin: 7px 0 0;
}

/* ---- providers ---- */
.oauth {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}
.oauth button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  height: 40px;
  border-radius: 52px;
  border: 0;
  background: #222;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .18s ease;
}
.oauth button:hover { background: #2c2c2c; }
.oauth svg { width: 17px; height: 17px; }

.or {
  margin: 14px 0 12px;
  font-size: 14px;
  color: rgba(255, 255, 255, .4);
}

/* ---- fields ---- */
.field { position: relative; margin-bottom: 10px; }
.field input {
  width: 100%;
  height: 40px;
  padding: 0 40px 0 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, .06);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
}
.field input::placeholder { color: rgba(255, 255, 255, .42); }
.field input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .09);
}
.peek {
  position: absolute;
  right: 4px;
  top: 50%;
  translate: 0 -50%;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, .55);
  cursor: pointer;
}
.peek:hover { color: #fff; }
.peek svg { width: 19px; height: 19px; }

.forgot {
  display: block;
  text-align: right;
  margin: 8px 2px 0;
  font-size: 13.5px;
  color: rgba(255, 255, 255, .62);
  text-decoration: none;
}
.forgot:hover { color: #fff; }

.submit {
  width: 100%;
  height: 40px;
  margin-top: 20px;
  border: 0;
  border-radius: 52px;
  background: #fff;
  color: #111;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .18s ease;
}
.submit:hover { opacity: .9; }

.alt {
  display: block;
  margin: 14px 0 0;
  font-size: 14px;
  color: rgba(255, 255, 255, .78);
  text-decoration: none;
}
.alt:hover { color: #fff; }

/* ---- foot ---- */
.foot {
  margin: 20px -77px 0;
  padding: 16px 28px;
  border-top: 1px solid rgba(157, 157, 157, .2);
  font-size: 14px;
  color: rgba(255, 255, 255, .55);
}
.foot a {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.foot a:hover { text-decoration: underline; }

.terms {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 18px;
  z-index: 3;
  text-align: center;
  font-size: 14px;
  color: rgba(255, 255, 255, .5);
}
.terms a { color: rgba(255, 255, 255, .8); }

@media (max-width: 520px) {
  .card { padding: 24px 20px 0; border-radius: 26px; }
  .foot { margin: 18px -20px 0; padding: 15px 20px; }
  .card h1 { font-size: 23px; }
  .auth-wrap { padding: 20px 16px 60px; }
}

/* ---- wired-up bits ---- */
#googleSlot {
  display: flex;
  justify-content: center;
  min-height: 40px;
  border-radius: 52px;
  overflow: hidden;
  color-scheme: light;
}
#googleSlot > div,
#googleSlot iframe { width: 100% !important; }

.auth-error {
  margin: 16px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(220, 92, 92, .18);
  color: #ffc9c9;
  font-size: 13px;
  text-align: left;
}
