/* Room & Road sign-in: the first frame of the entrance animation. The same beige, the same solid black emblem
   (upright), and the form in a white card. On a successful sign-in the form fades, the emblem
   glides to the center, and the app opens straight into the animation from that frame. */

:root {
  --navy: #071d3b;
  --navy-deep: #04142b;
  --red: #d92f36;
  --red-deep: #b8242a;
  --ink: #071d3b;
  --muted: #626d7b;
  --cream: #f6f0e5;
  --beige: #f4f1ea;
  --line: #d4d8dd;
  --clay: #b3262c;
  --clay-bg: #fcedee;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: var(--sans); color: var(--ink); background: var(--beige); -webkit-font-smoothing: antialiased; }

.login {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 420px);
  justify-content: center;
  align-content: center;
  padding: 32px 16px;
  background: var(--beige);
}

/* The emblem: solid black and upright, above the card (the animation tilts it and snaps it back after sign-in). */
.mark { display: grid; place-items: center; margin: 0 0 6px; }
.emblem { width: 132px; height: auto; display: block; filter: brightness(0); }

.panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0;
  background: none;
}
.panel > .form, .panel > .foot { background: #fff; }
.panel h1 { text-align: center; }
/* The card: the fields and button on white with a soft shadow. */
.form { padding: 24px 26px 18px; border-radius: 16px; box-shadow: 0 18px 50px rgba(7, 29, 59, .12), 0 1px 0 rgba(7, 29, 59, .06); }
.foot { background: none !important; border-top: 0 !important; text-align: center; }
h1 { margin: 6px 0 6px; font-family: var(--serif); font-weight: 600; font-size: 34px; line-height: 1.15; color: var(--navy); }
.intro { margin: 0; color: var(--muted); font-size: 14px; }

.form { display: flex; flex-direction: column; gap: 6px; }
.form[hidden] { display: none; }
label { margin-top: 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--navy); }
input[type="email"], input[type="password"], input[type="text"] {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}
input:focus { outline: 2px solid var(--navy); outline-offset: 1px; border-color: var(--navy); }
button:focus-visible, a:focus-visible, .check input:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

.checks { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 4px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; margin: 0; color: var(--muted); cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--navy); }

button[type="submit"] {
  margin-top: 12px;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .03em;
  cursor: pointer;
}
button[type="submit"]:hover { background: var(--red-deep); }
button[type="submit"]:disabled { opacity: .7; cursor: wait; }
button.link { align-self: center; margin-top: 4px; padding: 6px; border: 0; background: none; color: var(--navy); font: inherit; font-size: 13.5px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.message { margin: 6px 0 0; padding: 10px 12px; font-size: 13.5px; line-height: 1.45; border-radius: 8px; background: #edf1f5; color: var(--navy); }
.message.error { background: var(--clay-bg); color: var(--clay); }

.foot { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.foot p { margin: 0 0 6px; }
.foot a { color: var(--navy); }

.login.plain { grid-template-columns: minmax(0, 440px); justify-content: center; }

/* Phones: no card; the fields sit on the beige like an app screen. */
@media (max-width: 600px) {
  .login { align-content: start; padding: max(48px, env(safe-area-inset-top)) 20px 28px; }
  .emblem { width: 112px; }
  .form { padding: 4px 0 0; background: none !important; box-shadow: none; border-radius: 0; }
  input[type="email"], input[type="password"], input[type="text"] { background: #fff; }
}

/* The handoff: the form fades away while the emblem (a copy floating above the page) glides to the center. */
.login.leaving .panel > :not(.mark) { opacity: 0; transform: translateY(8px); transition: opacity .35s ease, transform .35s ease; }
.login.leaving .mark { visibility: hidden; }
.flying-emblem { position: fixed; z-index: 10; filter: brightness(0); pointer-events: none; }
