/* Login page: blurred header 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) url("../images/header-poster.jpg") center / cover no-repeat;
  overflow-x: hidden;
}

/* background video, softened so the card stays the focus */
.bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(6px) saturate(0.9);
  transform: scale(1.05); /* hides the blurred edges */
  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;
}

.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);
}

.form {
  text-align: left;
}

.label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
}

.field {
  position: relative;
}

.field input {
  width: 100%;
  height: 52px;
  padding: 0 52px 0 18px;
  font: inherit;
  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-radius: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(160, 96, 74, 0.18);
}

.toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}

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

.toggle:focus-visible {
  outline: 2px solid var(--accent);
}

.submit {
  width: 100%;
  height: 52px;
  margin-top: 16px;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(160, 96, 74, 0.3);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.submit:hover {
  background: var(--accent-dark);
  box-shadow: 0 10px 24px rgba(131, 76, 57, 0.35);
}

.submit:active {
  transform: translateY(1px);
}

.submit:focus-visible {
  outline: 3px solid rgba(160, 96, 74, 0.45);
  outline-offset: 2px;
}

.notice {
  margin: 0 0 16px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 400;
  border-radius: 12px;
  background: rgba(138, 154, 123, 0.18);
  color: var(--ink);
}

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

@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) {
  .card {
    padding: 36px 22px 26px;
    border-radius: 20px;
  }

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

@media (prefers-reduced-motion: reduce) {
  .card,
  .notice-error {
    animation: none;
  }
}
