/* Login page: heavily blurred front page video behind a frosted card. Palette matches style.css */

:root {
  --paper: #F2EDE4;
  --sand: #E8E1D5;
  --ink: #3B2F2A;
  --ink-soft: #5E514A;
  --muted: #84776D;
  --line: #CFC5B5;
  --accent: #A0604A;
  --accent-dark: #834C39;
  --sage: #8A9A7B;
}

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

html,
body {
  height: 100%;
  margin: 0;
}

body {
  font-family: 'Poppins', Helvetica, Arial, sans-serif;
  font-weight: 300;
  color: var(--ink);
  background: var(--ink);
  overflow-x: hidden;
}

/* background video, blurred to just colors so the card stays the focus */
.bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(40px) saturate(0.9);
  transform: scale(1.6); /* hides the blurred edges and the video's white margins */
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(160deg, rgba(59, 47, 42, 0.55), rgba(59, 47, 42, 0.25));
  z-index: 1;
}

.login {
  position: relative;
  z-index: 2;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  padding: 44px 36px 32px;
  text-align: center;
  background: rgba(242, 237, 228, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(30, 22, 18, 0.35);
  animation: rise 0.7s ease-out both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

.monogram {
  display: block;
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(160, 96, 74, 0.35);
}

.names {
  margin: 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 500;
  font-size: 38px;
  line-height: 1.15;
  color: var(--ink);
}

.names .amp {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

.date {
  margin: 10px 0 30px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Bootstrap form components, themed to the palette */
.login-card label {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
}

.login-card .form-control {
  height: 52px;
  font-size: 16px; /* 16px stops iOS from zooming in on focus */
  font-weight: 400;
  color: var(--ink);
  background: #FBF9F5;
  border: 1.5px solid var(--line);
  border-right: 0;
  border-radius: 14px 0 0 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-card .input-group-append .btn-toggle {
  width: 52px;
  padding: 0;
  color: var(--muted);
  background: #FBF9F5;
  border: 1.5px solid var(--line);
  border-left: 0;
  border-radius: 0 14px 14px 0;
  transition: border-color 0.2s, box-shadow 0.2s, color 0.2s;
}

.login-card .btn-toggle:hover,
.login-card .btn-toggle[aria-pressed="true"] {
  color: var(--accent);
}

/* input and eye button light up together as one field */
.login-card .form-control:focus,
.login-card .input-group:focus-within .form-control,
.login-card .input-group:focus-within .btn-toggle {
  border-color: var(--accent);
  box-shadow: none;
}

.login-card .input-group {
  border-radius: 14px;
  transition: box-shadow 0.2s;
}

.login-card .input-group:focus-within {
  box-shadow: 0 0 0 4px rgba(160, 96, 74, 0.18);
}

.login-card .btn-toggle:focus {
  box-shadow: none;
}

.login-card .btn-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -4px;
}

.login-card .btn-primary {
  height: 52px;
  margin-top: 8px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
  background: var(--accent);
  border: 0;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(160, 96, 74, 0.3);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.login-card .btn-primary:hover,
.login-card .btn-primary:not(:disabled):not(.disabled):active {
  background: var(--accent-dark);
  box-shadow: 0 10px 24px rgba(131, 76, 57, 0.35);
}

.login-card .btn-primary:active {
  transform: translateY(1px);
}

.login-card .btn-primary:focus {
  box-shadow: 0 0 0 4px rgba(160, 96, 74, 0.35);
}

.login-card .alert {
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 400;
  border: 0;
  border-radius: 12px;
}

.login-card .alert-danger {
  background: rgba(160, 96, 74, 0.14);
  color: var(--accent-dark);
  animation: shake 0.4s ease-in-out;
}

.login-card .alert-success {
  background: rgba(138, 154, 123, 0.2);
  color: var(--ink);
}

@keyframes shake {
  0%, 100% { transform: none; }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.hint {
  margin: 22px 0 0;
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 420px) {
  .login-card {
    padding: 36px 22px 26px;
    border-radius: 20px;
  }

  .names {
    font-size: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-card,
  .login-card .alert-danger {
    animation: none;
  }
}
