:root {
  color-scheme: light;
  --paper: #F2F1EB;
  --paper-high: #FFFFFF;
  --ink: #171A18;
  --muted: #5C625D;
  --rule: #D7DAD3;
  --edge: #6E746E;
  --oxblood: #410008;
  --oxblood-hover: #5B1822;
  --bone: #F2EDE1;
  --display: "Ivy Mode", "Didot", "Bodoni 72", "Playfair Display", Georgia, serif;
  --text: "Helvetica Now Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

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

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

::selection { background: rgba(65, 0, 8, .16); }

button,
input { font: inherit; }

:focus-visible {
  outline: 3px solid var(--oxblood);
  outline-offset: 3px;
}

.entrance-shell {
  min-height: 100dvh;
  width: min(100%, 66rem);
  margin-inline: auto;
  padding: clamp(2.5rem, 8vh, 6rem) 1.5rem;
  display: grid;
  align-content: center;
  gap: 2.75rem;
}

.entrance-lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brand-name {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .85rem;
}

.brand-mark {
  width: 5.8rem;
  aspect-ratio: 11 / 9;
  color: var(--oxblood);
}

.brand-mark path {
  fill: none;
  stroke: currentColor;
  stroke-width: 58;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wordmark {
  font-family: var(--display);
  font-size: 1.65rem;
  line-height: 1;
  letter-spacing: .3em;
  text-indent: .3em;
}

.tagline {
  margin: .55rem 0 0;
  font-family: var(--display);
  font-size: .95rem;
  line-height: 1.3;
}

.entrance-panel {
  border-top: 2px solid var(--oxblood);
  padding-top: 2.5rem;
}

.entrance-copy h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.35rem, 10vw, 3.15rem);
  font-weight: 400;
  letter-spacing: -.025em;
  line-height: 1.02;
}

.entrance-copy p {
  max-width: 34rem;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

form { margin-top: 2.35rem; }

.field-group label {
  display: block;
  margin-bottom: .65rem;
  font-size: .94rem;
  font-weight: 600;
}

.password-control { position: relative; }

.password-control input {
  width: 100%;
  min-height: 3.5rem;
  border: 1px solid var(--edge);
  border-radius: .35rem;
  background: var(--paper-high);
  color: var(--ink);
  padding: .9rem 4rem .9rem 1rem;
  font-size: 1rem;
}

.password-control input:hover { border-color: var(--ink); }

.password-control input[aria-invalid="true"] { border-color: var(--oxblood); }

.password-toggle {
  position: absolute;
  top: 50%;
  inset-inline-end: .35rem;
  width: 2.8rem;
  height: 2.8rem;
  transform: translateY(-50%);
  border: 0;
  border-radius: .2rem;
  background: transparent;
  color: var(--oxblood);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.password-toggle:hover { background: rgba(65, 0, 8, .06); }

.password-toggle-icon {
  width: 1.4rem;
  height: 1.4rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle-icon-hide,
.password-toggle[aria-pressed="true"] .password-toggle-icon-show { display: none; }

.password-toggle[aria-pressed="true"] .password-toggle-icon-hide { display: block; }

.form-error,
.pending-status {
  font-size: .84rem;
  line-height: 1.5;
}

.form-error {
  margin: .65rem 0 0;
  color: var(--oxblood);
  font-weight: 600;
}

.enter-button {
  width: 100%;
  min-height: 3.5rem;
  margin-top: 1.4rem;
  border: 2px solid var(--oxblood);
  border-radius: .35rem;
  background: var(--oxblood);
  color: var(--bone);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  font-weight: 600;
}

.enter-button:hover:not(:disabled) {
  border-color: var(--ink);
  background: var(--oxblood-hover);
}

.enter-button:active:not(:disabled) { translate: 0 1px; }

.enter-button:disabled { cursor: wait; }

.button-mark {
  display: none;
  width: .9rem;
  height: .9rem;
  border: 2px solid rgba(242, 237, 225, .45);
  border-top-color: var(--bone);
  border-radius: 50%;
}

.enter-button[aria-busy="true"] .button-mark {
  display: block;
  animation: turn .75s linear infinite;
}

.pending-status {
  min-height: 1.3rem;
  margin: .45rem 0 0;
  color: var(--muted);
  text-align: center;
}

@keyframes turn { to { rotate: 1turn; } }

@media (prefers-reduced-motion: reduce) {
  .button-mark { animation: none !important; }
  .enter-button:active:not(:disabled) { translate: none; }
}

@media (min-width: 48rem) {
  .entrance-shell {
    grid-template-columns: minmax(16rem, .85fr) minmax(22rem, 1.15fr);
    gap: clamp(4.5rem, 8vw, 7rem);
    padding-inline: 3rem;
  }

  .entrance-lockup {
    align-items: flex-start;
    justify-content: center;
  }

  .brand-name { align-items: flex-start; }

  .brand-mark { width: 7.5rem; }

  .wordmark {
    font-size: 2rem;
    text-indent: 0;
  }

  .tagline {
    margin-top: .65rem;
    font-size: 1rem;
  }

  .entrance-panel {
    border-top: 0;
    border-left: 2px solid var(--oxblood);
    padding: 1.5rem 0 1.5rem clamp(3.5rem, 6vw, 5.75rem);
  }
}
