/* Password lock for the works (js/lock.js). Kept out of the SCSS build on purpose,
   so a CodeKit recompile of base.css / style.css never removes it. */

/* Home: frosted layer over Selected Works -> Archive */
.bo-lock-zone {
  position: absolute;
  left: 0;
  width: 100%;
  z-index: 50;
  background: rgba(255, 255, 255, 0.42);
  -webkit-backdrop-filter: blur(28px) saturate(1.1);
  backdrop-filter: blur(28px) saturate(1.1);
  transition: opacity 0.6s ease, -webkit-backdrop-filter 0.6s ease, backdrop-filter 0.6s ease;
}
/* the card stays in the middle of the screen while you scroll the locked part */
.bo-lock-zone .bo-lock-card {
  position: sticky;
  top: calc(50vh - 150px);
  margin: 160px auto;
}

/* Case study / work page: the whole page is frosted */
html.bo-page-locked body { overflow: hidden; }
html.bo-page-locked body::before { /* covers the page from the first paint, before the card is added */
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(255, 255, 255, 0.5);
  -webkit-backdrop-filter: blur(28px) saturate(1.1);
  backdrop-filter: blur(28px) saturate(1.1);
}
.bo-lock-cover {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  transition: opacity 0.6s ease;
}

.bo-lock-open { opacity: 0; pointer-events: none; }

/* Card: same frosted white and soft shadow as the site's .button */
.bo-lock-card {
  box-sizing: border-box;
  width: min(420px, calc(100vw - 48px));
  padding: 36px 32px 28px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.2), 0 1px 1px rgba(0, 0, 0, 0.04), 0 8px 32px rgba(0, 0, 0, 0.08);
  text-align: center;
  color: var(--black, #1E1F20);
  font-family: var(--body-font, "Inter", sans-serif);
}
.bo-lock-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: var(--bg-grey, #f4f4f4);
}
.bo-lock-title {
  margin: 0 0 8px;
  font-family: var(--heading-font, "Inter", sans-serif);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.bo-lock-desc {
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--grey, #666666);
}
.bo-lock-row { display: flex; gap: 8px; align-items: stretch; }
/* beats the site-wide input[type=password] style (84px tall, underline, white text) */
.bo-lock-card input.bo-lock-input,
.bo-lock-card input.bo-lock-input:focus {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  width: auto;
  height: 44px;
  line-height: normal;
  margin: 0;
  padding: 0 14px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  background: #ffffff;
  font-family: var(--body-font, "Inter", sans-serif);
  font-size: 15px;
  letter-spacing: normal;
  color: var(--black, #1E1F20);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.bo-lock-card input.bo-lock-input:focus { border-color: var(--link, #2a90cd); box-shadow: 0 0 0 3px rgba(42, 144, 205, 0.15); }
.bo-lock-card input.bo-lock-input::placeholder { color: #999; }

/* the header (logo, menu, EN / JA) stays sharp and usable above the lock */
html.bo-works-locked header { z-index: 60; }
html.bo-page-locked header { z-index: 10000; }
.bo-lock-button {
  flex: none;
  height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  background: #28282B;
  color: #ffffff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}
.bo-lock-button:hover { background: #010001; }
.bo-lock-error {
  min-height: 1.4em;
  margin: 10px 0 0;
  font-size: 13px;
  color: #d93025;
}
.bo-lock-error:empty { min-height: 0; margin: 0; }
.bo-lock-ask { margin: 14px 0 0; font-size: 13px; color: var(--grey, #666666); }
.bo-lock-ask a, .bo-lock-home { color: var(--link, #2a90cd); text-decoration: none; }
.bo-lock-ask a:hover, .bo-lock-home:hover { text-decoration: underline; }
.bo-lock-home { display: inline-block; margin-top: 12px; font-size: 13px; }

.bo-lock-card.shake { animation: bo-lock-shake 0.4s ease; }
@keyframes bo-lock-shake {
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}
@media (prefers-reduced-motion: reduce) {
  .bo-lock-card.shake { animation: none; }
}
@media (max-width: 480px) {
  .bo-lock-card { padding: 28px 20px 22px; }
  .bo-lock-row { flex-direction: column; }
}
