:root {
  --paper: #fffefd;
  --ivory: #f7f8f5;
  --ink: #2f3b44;
  --ink-soft: #65727a;
  --sage: #a9b3a5;
  --sage-dark: #5f7064;
  --blue: #aec4da;
  --blue-pale: #edf3f8;
  --line: rgba(47, 59, 68, 0.16);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Baskerville, Georgia, serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  color: inherit;
  font: inherit;
}

:focus-visible {
  outline: 3px solid #7899b7;
  outline-offset: 3px;
}

.login-shell {
  display: grid;
  min-height: 100dvh;
  grid-template-columns: minmax(0, 1.12fr) minmax(420px, 0.88fr);
}

.login-visual {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  background: #72858f;
}

.login-visual picture,
.login-visual img {
  width: 100%;
  height: 100%;
}

.login-visual picture {
  position: absolute;
  inset: 0;
}

.login-visual img {
  object-fit: cover;
  object-position: center;
}

.login-visual__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(34, 48, 57, 0.64), transparent 60%),
    linear-gradient(90deg, rgba(43, 58, 66, 0.2), transparent 65%);
}

.login-visual__copy {
  position: absolute;
  z-index: 1;
  right: clamp(30px, 6vw, 90px);
  bottom: clamp(42px, 8vw, 105px);
  left: clamp(30px, 6vw, 90px);
  color: #fff;
}

.login-visual__copy p,
.eyebrow {
  margin: 0 0 18px;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.login-visual__copy h1,
.login-panel h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.login-visual__copy h1 {
  font-size: clamp(4rem, 8vw, 8.4rem);
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.18);
}

.login-visual__copy h1 i {
  color: #dbe7f1;
  font-size: 0.48em;
  font-weight: 400;
}

.login-panel {
  display: grid;
  min-height: 100dvh;
  padding: clamp(35px, 7vw, 105px);
  background:
    radial-gradient(circle at 92% 4%, rgba(174, 196, 218, 0.24), transparent 34%),
    radial-gradient(circle at 8% 94%, rgba(169, 179, 165, 0.2), transparent 30%),
    var(--paper);
  place-items: center;
}

.login-panel__inner {
  width: min(100%, 460px);
}

.monogram {
  display: grid;
  width: 64px;
  height: 64px;
  margin-bottom: clamp(42px, 8vh, 88px);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--sage-dark);
  font-family: var(--serif);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  place-items: center;
}

.eyebrow {
  color: var(--sage-dark);
}

.login-panel h2 {
  margin-bottom: 22px;
  font-size: clamp(3.2rem, 6vw, 5.5rem);
}

.intro {
  max-width: 390px;
  margin: 0 0 38px;
  color: var(--ink-soft);
  font-size: 1.04rem;
  line-height: 1.7;
}

.login-error {
  margin: -14px 0 22px;
  padding: 12px 15px;
  border-left: 3px solid #a34a45;
  border-radius: 8px;
  background: #f8eceb;
  color: #7f302b;
  font-size: 0.9rem;
  line-height: 1.5;
}

form > label {
  display: block;
  margin-bottom: 9px;
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.password-field {
  position: relative;
}

.password-field input {
  width: 100%;
  min-height: 58px;
  padding: 14px 105px 14px 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  font-size: 16px;
}

.password-field input:focus {
  border-color: #7899b7;
  box-shadow: 0 0 0 4px rgba(174, 196, 218, 0.28);
  outline: none;
}

.password-field button {
  position: absolute;
  top: 50%;
  right: 9px;
  min-height: 40px;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 0.73rem;
  font-weight: 700;
  transform: translateY(-50%);
}

.submit-button {
  display: flex;
  width: 100%;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding: 14px 22px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-size: 0.79rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.submit-button:hover {
  border-color: var(--sage-dark);
  background: var(--sage-dark);
  transform: translateY(-1px);
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 24px 0 0;
  color: var(--ink-soft);
  font-size: 0.76rem;
  line-height: 1.5;
}

.privacy-note span {
  color: var(--sage-dark);
  font-size: 0.58rem;
  transform: translateY(4px);
}

@media (max-width: 860px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 34dvh;
  }

  .login-visual__copy {
    bottom: 28px;
  }

  .login-visual__copy h1 {
    font-size: clamp(3.5rem, 14vw, 6rem);
  }

  .login-panel {
    min-height: 66dvh;
    padding: 38px 24px max(42px, env(safe-area-inset-bottom));
  }

  .monogram {
    display: none;
  }

  .login-panel h2 {
    font-size: clamp(3rem, 13vw, 4.8rem);
  }
}

@media (max-width: 430px) {
  .login-visual {
    min-height: 31dvh;
  }

  .login-visual__copy p {
    margin-bottom: 10px;
  }

  .login-panel {
    min-height: 69dvh;
    padding-inline: 20px;
  }

  .intro {
    margin-bottom: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
