/* The password page (playbook §14.2, rebuilt 2026-09-28). One screen, always the full height of
   the viewport: brand bar, the words and the password field, a quiet bottom bar. The film sits
   to the right on desktop, where the lamp's light falls behind the words, and above them on a
   phone. The field and the button are the design system's own (.input--pill, .btn--spectrum). */

.password-gate {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  /* minmax(0, …): an auto column grows to its widest line and pushes the page sideways on a phone */
  grid-template-columns: minmax(0, 1fr);
  background: var(--c-ink);
  color: var(--c-cream);
  overflow: hidden;
}

/* --- The film ------------------------------------------------------------
   The light source in the Anthos film sits at 46% × 66% of the frame. object-position uses the
   same 46%, so however the frame is cropped the lamp stays at 46% of the media box and the glow
   below can be placed in the box's own percentages. */
.password-gate__media {
  position: absolute;
  inset: 0 0 0 34%;
  z-index: -1;
}
.password-gate__still,
.password-gate__film,
.password-gate__film video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 46% 50%;
  display: block;
}
.password-gate__still img { width: 100%; height: 100%; object-fit: cover; object-position: 46% 50%; }

/* The lamp's light, carried past the edge of the film onto the words' side of the page. Painted
   from --flare-*, like the hero's lens flare, and blurred rather than stepped (no contour rings). */
.password-gate__glow {
  position: absolute;
  left: 46%; top: 66%;
  width: min(92vw, 1100px);
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle,
    rgba(var(--flare-core), .34) 0%,
    rgba(var(--flare-warm), .20) 12%,
    rgba(var(--flare-amber), .12) 30%,
    rgba(var(--flare-amber), 0) 60%);
  filter: blur(30px);
  mix-blend-mode: screen;
  pointer-events: none;
  animation: gate-breathe 7s ease-in-out infinite alternate;
}
@keyframes gate-breathe {
  from { opacity: .75; transform: translate(-50%, -50%) scale(.94); }
  to   { opacity: 1;   transform: translate(-50%, -50%) scale(1.04); }
}

/* Ink from the left, where the words sit, into the film. --gate-overlay is the editor's
   "overlay strength": it darkens the film as a whole, the left fade stays solid. */
.password-gate__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--c-ink) 0%, rgba(28, 33, 24, .82) 16%, rgba(28, 33, 24, .25) 48%, rgba(28, 33, 24, 0) 70%),
    linear-gradient(0deg, rgba(28, 33, 24, .85) 0%, rgba(28, 33, 24, 0) 30%),
    rgba(28, 33, 24, calc(var(--gate-overlay, .55) * .35));
}

/* --- Top bar ------------------------------------------------------------ */
.password-gate__top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  padding-block: clamp(22px, 3.4vw, 40px);
}
.password-gate__brand .brand__mark { width: 44px; }
.password-gate__brand .brand__word { font-size: 17px; color: var(--c-cream); }
.password-gate__eyebrow { color: var(--c-spectrum); }

/* --- The words and the field --------------------------------------------- */
.password-gate__main {
  width: 100%;
  display: flex;
  align-items: center;
  padding-block: clamp(24px, 5vw, 64px);
}
.password-gate__copy {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 2.2vw, 26px);
}
.password-gate__title {
  font-family: var(--f-display);
  font-size: var(--t-display-xl);
  font-weight: 300;
  line-height: .98;
  letter-spacing: -.03em;
  text-shadow: 0 2px 40px rgba(0, 0, 0, .35);
}
.password-gate__title em {
  font-style: italic;
  color: var(--c-spectrum);
}
.password-gate__lede {
  font-size: clamp(16px, 1.35vw, 18px);
  line-height: 1.7;
  color: var(--c-cream-72);
  max-width: 44ch;
}

.password-gate__form { margin-top: var(--sp-2); }

/* The field and the button as one pill: the button sits inside the field's right end. */
.password-gate__row {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 520px;
  padding: 6px;
  border-radius: var(--r-pill);
  background: rgba(246, 242, 233, .08);
  border: 1px solid rgba(246, 242, 233, .28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color var(--t-control), box-shadow var(--t-control);
}
.password-gate__row:focus-within {
  border-color: var(--c-spectrum);
  box-shadow: 0 0 0 4px rgba(232, 163, 61, .18), 0 0 60px rgba(var(--flare-amber), .18);
}
.password-gate__input.input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--c-cream);
  padding: 14px 18px;
  font-size: 16px; /* 16px or iOS zooms the page on focus */
  box-shadow: none;
}
.password-gate__input.input::placeholder { color: var(--c-cream-60); }
.password-gate__input.input:focus { box-shadow: none; }
.password-gate__submit.btn {
  flex: 0 0 auto;
  padding: 15px 24px;
}
.password-gate__submit svg { transition: transform var(--t-control); }
.password-gate__submit:hover svg { transform: translateX(3px); }

.password-gate__row:has([aria-invalid="true"]) { border-color: var(--c-clay); }
.password-gate__error {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 16px;
  max-width: 520px;
  border-radius: var(--r-md);
  background: rgba(200, 107, 74, .16);
  border: 1px solid rgba(200, 107, 74, .55);
  color: var(--c-cream);
  font-size: 14.5px;
  line-height: 1.45;
}
.password-gate__error::before {
  content: '';
  flex: 0 0 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-clay);
}

.password-gate__note { font-size: 14px; color: var(--c-cream-60); }

/* --- Bottom bar ---------------------------------------------------------- */
.password-gate__foot {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 22px clamp(22px, 3vw, 34px);
  font-size: 13px;
  color: var(--c-cream-60);
  border-top: 1px solid var(--c-cream-16);
}
.password-gate__foot a { color: var(--c-cream-72); text-decoration: underline; text-underline-offset: 3px; }
.password-gate__foot a:hover { color: var(--c-spectrum); }

/* --- Phone: the film above, the words below on ink ----------------------- */
@media (max-width: 760px) {
  .password-gate__media { inset: 0 0 34% 0; }
  .password-gate__scrim {
    background:
      linear-gradient(180deg, rgba(28, 33, 24, .55) 0%, rgba(28, 33, 24, 0) 24%),
      linear-gradient(0deg, var(--c-ink) 0%, rgba(28, 33, 24, .7) 24%, rgba(28, 33, 24, 0) 55%),
      rgba(28, 33, 24, calc(var(--gate-overlay, .55) * .3));
  }
  .password-gate__glow { width: 150vw; }
  .password-gate__main { align-items: flex-end; padding-block: 0 28px; }
  .password-gate__brand .brand__mark { width: 36px; }
  .password-gate__brand .brand__word { font-size: 14px; }
  .password-gate__eyebrow { display: none; }
  .password-gate__row { padding: 5px; }
  .password-gate__input.input { padding: 13px 14px; }
  .password-gate__submit.btn { padding: 14px 18px; }
  .password-gate__foot { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .password-gate__glow { animation: none; }
}
