/* Project pages: one quiet message. A padlock closes as the page arrives; the headline says why; the email is how to get in.
   Beside it on wide screens, the project's case study as a redacted sheet.
   Tokens, header, breadcrumb and email styles come from site.css; the project colors from cards.css. */

.lock-page {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--header-h));
    min-height: calc(100svh - var(--header-h));
    padding-top: 24px;
    padding-bottom: 64px;
}
@media (min-width: 768px) { .lock-page { padding-top: 32px; padding-bottom: 96px; } }

.lock-stage {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    padding: 48px 0 8vh;   /* sits a little above the middle, where the eye rests */
}
@media (min-width: 900px) {
    .lock-stage { grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: 64px; }
}
.gate {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 560px;
    animation: gateIn 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

/* The redacted sheet: the case study is there, its words are not. Wide screens only. */
.lock-sheet { display: none; }
@media (min-width: 900px) {
    .lock-sheet { display: block; position: relative; width: 100%; max-width: 360px; justify-self: center;
                  animation: gateIn 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.12s both; }   /* rises just after the text */
}
.sheet {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 28px 26px 34px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(50, 64, 79, 0.04), 0 16px 40px rgba(50, 64, 79, 0.07);
}
.sheet-under {
    position: absolute;
    inset: 0;
    background: #F4F6F8;
    box-shadow: none;
    transform: translate(14px, 10px) rotate(3deg);
}
.sheet-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.sheet-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--tone); box-shadow: inset 0 0 0 1px rgba(50, 64, 79, 0.08); }
.sheet .bar { display: block; height: 8px; border-radius: 4px; background: rgba(50, 64, 79, 0.08); }
.sheet .bar-title { height: 14px; background: rgba(50, 64, 79, 0.14); }
.sheet .gap { margin-top: 10px; }
.sheet .w30 { width: 30%; } .sheet .w45 { width: 45%; } .sheet .w60 { width: 60%; } .sheet .w70 { width: 70%; }
.sheet .w75 { width: 75%; } .sheet .w85 { width: 85%; } .sheet .w90 { width: 90%; }
.sheet .sheet-head .bar { flex: none; }
.sheet-fig { aspect-ratio: 16 / 10; margin: 10px 0 8px; border-radius: 10px; background: var(--tone); }

/* The padlock: drawn in ink, its shackle drops shut once on arrival.
   The viewBox is cropped to the stroke, so its left edge lines up with the text and the breadcrumb. */
.lock-mark { width: 25px; height: 38px; overflow: visible; color: var(--ink); transform-origin: 50% 20%; }
.lock-mark path, .lock-mark rect { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lock-shackle { animation: shackle 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) 0.45s both; }
.lock-mark.nope { animation: nope 0.4s ease; }
@keyframes shackle { from { transform: translateY(-6px); } to { transform: none; } }
@keyframes nope { 20%, 60% { transform: rotate(-8deg); } 40%, 80% { transform: rotate(8deg); } }
@keyframes gateIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.gate-kick {
    margin-top: 28px;
    font-family: var(--font-mono);
    font-size: 13px;
    text-transform: uppercase;
    color: var(--muted-2);
}
.gate h1 {
    margin-top: 12px;
    font-family: var(--font-serif);
    font-size: clamp(34px, 5vw, 52px);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--ink);
    text-wrap: balance;
}
.gate-note {
    margin-top: 20px;
    font-family: var(--font-serif);
    font-size: 19px;
    line-height: 1.5;
    letter-spacing: -0.01em;
    color: var(--muted);
}
/* The way in: the email reads as the main thing to do */
.gate-mail { margin-top: 8px; gap: 14px; }
.gate-mail .mail-link { font-size: 19px; }

/* The password: present, but second */
.gate-form { width: 100%; max-width: 420px; margin-top: 44px; }
.gate-label {
    display: block;
    margin-bottom: 10px;
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    color: var(--muted-2);
}
.gate-row { display: flex; gap: 8px; }
.gate-field { position: relative; flex: 1; min-width: 0; }
.gate-field input {
    width: 100%;
    height: 44px;
    padding: 0 46px 0 14px;
    font: 400 15px/1 var(--font);
    letter-spacing: 0.02em;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    transition: border-color 0.2s ease;
}
.gate-field input:hover { border-color: rgba(50, 64, 79, 0.25); }
.gate-field input:focus { outline: none; border-color: var(--ink); }
.gate-eye {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    font-size: 14px;
    color: var(--muted-2);
    background: none;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    transition: color 0.2s ease;
}
.gate-eye:hover { color: var(--ink); }
.gate-submit {
    flex: none;
    height: 44px;
    padding: 0 16px;
    font-family: var(--font-mono);
    font-size: 13px;
    text-transform: uppercase;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
    transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.gate-submit:hover { box-shadow: 0 4px 12px rgba(50, 64, 79, 0.1); border-color: rgba(50, 64, 79, 0.25); }
.gate-submit:active { transform: translateY(1px); box-shadow: none; }
.gate-error { margin-top: 10px; font-size: 13px; line-height: 1.5; color: var(--muted); }

.gate-home {
    display: inline-block;
    margin-top: 32px;
    padding: 10px 0;
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    color: var(--muted-2);
    text-decoration: none;
}
.gate-home:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
    .gate, .lock-sheet, .lock-shackle, .lock-mark.nope { animation: none; }
}
