/* ===== Password gate =====
   The locked storefront. This is the first thing the client and every
   stakeholder sees, so it carries the brand rather than the stock banner +
   modal: the field and its button are the page's main, always-visible action.

   Brand tokens (--cream, --deep-blue, --pop-orange, --sun-yellow, --font-head,
   --font-scribble) come from sooz/styles.css, which layout/password.html loads
   via the sooz-assets component. */

.password-gate {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 100svh;
    background:
        radial-gradient(circle at 82% 16%, rgba(255, 209, 102, 0.45), transparent 54%),
        radial-gradient(circle at 8% 84%, rgba(17, 138, 178, 0.14), transparent 58%),
        var(--cream);
    color: var(--ink);
    font-family: var(--font-body);
}

/* --- Image panel --- */
.password-gate__media {
    position: relative;
    background: var(--gate-media-bg, var(--sun-yellow));
    overflow: hidden;
    min-height: 34svh;
}
/* The still and the video are stacked, not swapped: the still is always painted
   underneath, so if the clip is absent, refused, or still loading, the panel
   shows the poster instead of a hole. No JS needed for that fallback. */
.password-gate__still,
.password-gate__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border: 0;
}
.password-gate__video { z-index: 1; }

.password-gate.is-video-fallback .password-gate__video { display: none; }

.password-gate__media::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: var(--deep-blue);
    opacity: calc(var(--gate-overlay, 0%) / 100);
    pointer-events: none;
}

/* --- Form panel --- */
.password-gate__panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 7% 56px;
}
.password-gate__inner {
    width: 100%;
    max-width: 30rem;
    text-align: center;
}

/* flex, not inline-flex: as an inline-level box it sits on the same line as the
   eyebrow that follows it. */
.password-gate__logo {
    display: flex;
    align-items: center;
    gap: 12px;
    width: var(--gate-logo-width, 260px);
    max-width: 100%;
    margin: 0 auto 26px;
    text-decoration: none;
}
.password-gate__droplet { width: 22%; height: auto; }
.password-gate__letters { width: 78%; height: auto; }

/* The handwritten ticket, same device as the hero's "Did that ... hurt?" line. */
.password-gate__eyebrow {
    display: inline-block;
    font-family: var(--font-scribble);
    font-size: 1.15rem;
    color: var(--deep-blue);
    background: #fff;
    border: 2px solid var(--deep-blue);
    border-radius: 10px;
    box-shadow: 3px 3px 0 var(--deep-blue);
    padding: 5px 15px;
    transform: rotate(-2deg);
    margin: 0 0 20px;
}

.password-gate__heading {
    font-family: var(--font-head);
    font-size: clamp(2.4rem, 7vw, 3.6rem);
    line-height: 0.98;
    letter-spacing: -0.02em;
    margin: 0 0 14px;
}
.password-gate__heading .highlight { color: var(--pop-orange); }

.password-gate__message {
    font-size: 1.05rem;
    line-height: 1.55;
    color: var(--muted, #5b6b72);
    margin: 0 auto 30px;
    max-width: 26rem;
}

/* --- The form: the main action --- */
.password-gate__form { margin: 0; }

.password-gate__label {
    display: block;
    font-family: var(--font-head);
    font-size: 0.95rem;
    text-align: left;
    margin-bottom: 8px;
}

.password-gate__row {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.password-gate__input {
    width: 100%;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--ink);
    background: #fff;
    border: 3px solid var(--deep-blue);
    border-radius: 12px;
    box-shadow: 4px 4px 0 var(--deep-blue);
    padding: 14px 16px;
    min-height: 52px;
}
.password-gate__input::placeholder { color: #9aa8ad; }

/* An offset outline draws a second rounded ring outside the 3px border and
   collides with the hard shadow — it reads as a doubled border. Use a soft halo
   that keeps the shape and the shadow instead. The transparent outline is not
   decorative: box-shadow is dropped in forced-colors / Windows High Contrast,
   where the outline becomes the visible focus indicator. */
.password-gate__input:focus-visible {
    outline: 2px solid transparent;
    outline-offset: 2px;
    border-color: var(--energy-blue);
    box-shadow: 4px 4px 0 var(--deep-blue), 0 0 0 4px rgba(17, 138, 178, 0.28);
}

.password-gate__submit {
    font-family: var(--font-head);
    font-size: 1.05rem;
    color: #fff;
    background: var(--pop-orange);
    border: 3px solid var(--deep-blue);
    border-radius: 12px;
    box-shadow: 4px 4px 0 var(--deep-blue);
    padding: 14px 22px;
    min-height: 52px;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.password-gate__submit:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--deep-blue);
}
.password-gate__submit:active {
    transform: translate(4px, 4px);
    box-shadow: 0 0 0 var(--deep-blue);
}
.password-gate__submit:focus-visible {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 4px 4px 0 var(--deep-blue), 0 0 0 4px rgba(17, 138, 178, 0.28);
}

.password-gate__error {
    color: var(--soft-red);
    font-weight: 700;
    font-size: 0.95rem;
    text-align: left;
    margin: 12px 0 0;
}

.password-gate__owner {
    font-size: 0.9rem;
    color: var(--muted, #5b6b72);
    margin: 26px 0 0;
}
.password-gate__owner a { color: var(--energy-blue); }

.password-gate__credit {
    font-size: 0.8rem;
    color: var(--muted, #5b6b72);
    margin: 18px 0 0;
}
.password-gate__credit a { color: inherit; text-underline-offset: 2px; }
.password-gate__credit a:hover { color: var(--energy-blue); }

@media (min-width: 860px) {
    .password-gate { grid-template-columns: 1fr 1fr; }
    .password-gate__media { min-height: 100svh; }

    /* Image side is a merchant setting; the panel keeps source order and the
       columns swap underneath it. */
    .password-gate--media-right .password-gate__media { order: 2; }
    .password-gate--media-right .password-gate__panel { order: 1; }

    .password-gate--no-media { grid-template-columns: 1fr; }

    .password-gate__inner { text-align: left; }
    .password-gate__logo { margin-left: 0; margin-right: auto; }

    /* Side-by-side field and button once there is room for both. */
    .password-gate__row { flex-direction: row; align-items: stretch; }
    .password-gate__submit { flex: 0 0 auto; white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
    .password-gate__submit { transition: none; }
    .password-gate__eyebrow { transform: none; }
    /* The still underneath takes over. */
    .password-gate__video { display: none; }
}
