/* The painting fills the screen; the sign-in panel sits over its calm right
   half on wide screens and along the bottom on phones. */
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 200 500;
  font-display: block;
  src: url(/login-assets/jost-latin.woff2) format('woff2');
}

:root {
  --ink: #2a2118;
  --ink-soft: #6b5a48;
  --panel: rgba(255, 250, 242, 0.84);
  --panel-line: rgba(255, 255, 255, 0.7);
  --field: #fffdf9;
  --field-line: #d8c8b4;
  --button: #26304d;
  --button-hover: #1b2340;
  --focus: #e0962f;
  --error: #9a2c22;
  --error-bg: #f9e3dc;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 24px max(24px, 7vw) 24px 24px;
  background: #9a7a5c;
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.scene img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 30% 35%;
}

.panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  padding: 32px 30px 30px;
  border: 1px solid var(--panel-line);
  border-radius: 20px;
  background: var(--panel);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  backdrop-filter: blur(14px) saturate(1.1);
  box-shadow: 0 24px 60px -24px rgba(42, 25, 10, 0.55), 0 2px 6px rgba(42, 25, 10, 0.12);
}

.brand {
  display: grid;
  gap: 2px;
  margin: 0 0 22px;
  font-weight: 400;
}

.wordmark {
  font: 300 34px/1 'Jost', system-ui, sans-serif;
  letter-spacing: 0.22em;
  margin-right: -0.22em;
}

.brand-sub {
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 500;
}

.form {
  display: grid;
  gap: 6px;
}

label {
  font-size: 15px;
  font-weight: 600;
}

input[type='text'],
input[type='password'] {
  width: 100%;
  min-height: 48px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border: 1px solid var(--field-line);
  border-radius: 10px;
  background: var(--field);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

input:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

input[aria-invalid='true'] {
  border-color: var(--error);
}

button {
  min-height: 50px;
  margin-top: 6px;
  border: 0;
  border-radius: 10px;
  background: var(--button);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  background: var(--button-hover);
}

.intro {
  margin: -8px 0 18px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.45;
}

.intro strong {
  color: var(--ink);
}

.hint {
  margin: -8px 0 10px;
  color: var(--ink-soft);
  font-size: 14px;
}

/* Lets password managers file the new password under the right username. */
input.for-password-managers {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  min-height: 0;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.error {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--error-bg);
  color: var(--error);
  font-size: 15px;
  font-weight: 500;
}

/* Phones and narrow windows: the panel moves to the bottom so her face stays
   in view above it. */
@media (max-width: 760px) {
  body {
    align-items: flex-end;
    justify-content: center;
    padding: 16px max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  }

  .scene img {
    object-position: 31% 20%;
  }

  .panel {
    max-width: 440px;
    padding: 22px 20px 20px;
    border-radius: 18px;
  }

  .brand {
    margin-bottom: 16px;
  }

  .wordmark {
    font-size: 28px;
  }
}

/* Short landscape phones: let the page scroll rather than clip the form. */
@media (max-height: 560px) and (min-width: 761px) {
  body {
    align-items: flex-start;
  }
}
