/* Kalsoni password page: the page everyone sees while the store is locked.
   Split layout in the site's editorial style: campaign image on one side, black panel with the
   tracked KALSONI wordmark, a Cormorant heading and the password entry as the one action.
   Every colour is a section setting; the fallbacks below match the site's design tokens. */

.kp {
  --kp-bg: #0a0a0a;
  --kp-text: #ffffff;
  --kp-muted: #9a9a9a;
  --kp-button-bg: #ffffff;
  --kp-button-text: #0a0a0a;
  --kp-error: #ff8a7a;
  --kp-serif: "Cormorant Garamond", Georgia, serif;
  --kp-sans: "Jost", Helvetica, Arial, sans-serif;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: var(--kp-bg);
  color: var(--kp-text);
  font-family: var(--kp-sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

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

.kp--no-media {
  grid-template-columns: minmax(0, 1fr);
}

.kp--media-right .kp__media {
  order: 2;
}

/* ---------- Image panel ---------- */

.kp__media {
  position: relative;
  overflow: hidden;
  background: #141414;
}

.kp__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kp__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #000;
  opacity: var(--kp-overlay);
  pointer-events: none;
}

/* ---------- Content panel ---------- */

.kp__panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(48px, 7vw, 112px) clamp(24px, 6vw, 96px);
}

.kp--no-media .kp__panel {
  text-align: center;
}

.kp__inner {
  width: 100%;
  max-width: 440px;
}

.kp__brand {
  margin: 0 0 64px;
}

/* Same treatment as the site header's wordmark */
.kp__wordmark {
  display: inline-block;
  padding-left: 0.42em; /* optical centering for tracked text */
  margin-left: -0.42em;
  font-family: var(--kp-sans);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.42em;
  line-height: 1;
  text-transform: uppercase;
}

.kp__logo {
  display: inline-block;
  width: var(--kp-logo-width);
  max-width: 100%;
}

.kp__logo img {
  display: block;
  width: 100%;
  height: auto;
}

.kp__eyebrow {
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--kp-muted);
}

.kp__heading {
  margin: 0 0 22px;
  font-family: var(--kp-serif);
  font-size: clamp(44px, 4.8vw, 72px);
  font-style: italic;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.005em;
  color: var(--kp-text);
}

.kp__message {
  margin: 0 0 44px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--kp-muted);
}

/* ---------- Form ---------- */

.kp__form {
  margin: 0;
}

.kp__label {
  display: block;
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--kp-text);
}

.kp__row {
  display: flex;
}

.kp__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 56px;
  margin: 0;
  padding: 0 18px;
  border: 1px solid var(--kp-text);
  border-right: 0;
  border-radius: 0;
  background: transparent;
  color: var(--kp-text);
  font: inherit;
  font-size: 16px; /* 16px keeps iOS from zooming in on focus */
  font-weight: 300;
  letter-spacing: 0.04em;
  box-shadow: none;
  appearance: none;
}

.kp__input::placeholder {
  color: var(--kp-muted);
  opacity: 1;
}

.kp__input:focus {
  outline: none;
}

/* Focus thickens the field's own border rather than drawing an outline that would
   overlap the button sitting flush against it. */
.kp__input:focus-visible {
  box-shadow: inset 0 0 0 1px var(--kp-text);
}

.kp__input[aria-invalid="true"] {
  border-color: var(--kp-error);
  box-shadow: inset 0 0 0 1px var(--kp-error);
}

.kp__submit {
  flex: 0 0 auto;
  height: 56px;
  margin: 0;
  padding: 0 30px;
  border: 1px solid var(--kp-button-bg);
  border-radius: 0;
  background: var(--kp-button-bg);
  color: var(--kp-button-text);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.kp__submit:hover {
  background: transparent;
  color: var(--kp-button-bg);
}

.kp__submit:focus-visible {
  outline: 2px solid var(--kp-text);
  outline-offset: 3px;
}

.kp__error {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 0;
  font-size: 14px;
  font-weight: 400;
  color: var(--kp-error);
}

.kp__error[hidden] {
  display: none;
}

.kp__error::before {
  content: "!";
  display: inline-grid;
  place-items: center;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--kp-error);
  color: var(--kp-bg);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.kp__footnote {
  margin: 40px 0 0;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--kp-muted);
}

.kp__owner {
  margin: 20px 0 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13px;
  color: var(--kp-muted);
}

.kp__footnote + .kp__owner {
  margin-top: 20px;
}

.kp__owner a {
  color: var(--kp-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Mobile: image becomes a band above the form ---------- */

@media (max-width: 767px) {
  .kp {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr;
  }

  .kp--media-right .kp__media {
    order: 0;
  }

  .kp__media {
    height: 38vh;
    min-height: 220px;
    max-height: 340px;
  }

  .kp__panel {
    align-items: flex-start;
    padding: 36px 20px 48px;
  }

  .kp__brand {
    margin-bottom: 36px;
  }

  .kp__wordmark {
    font-size: 16px;
    letter-spacing: 0.32em;
    padding-left: 0.32em;
    margin-left: -0.32em;
  }

  .kp__logo {
    width: var(--kp-logo-width-mobile);
  }

  .kp__message {
    margin-bottom: 32px;
    font-size: 15px;
  }

  .kp__row {
    flex-direction: column;
    gap: 12px;
  }

  .kp__input {
    border-right: 1px solid var(--kp-text);
  }

  .kp__input[aria-invalid="true"] {
    border-color: var(--kp-error);
  }

  .kp__submit {
    width: 100%;
  }

  .kp__footnote {
    margin-top: 32px;
  }
}
