/* Hallmark - macrostructure: Split Gate - genre: modern-minimal - tone: corporate, confident
 * theme: custom "graphite + brass" - paper dark left / light right - accent warm
 *
 * Marpex Pass - auth.css. Само екранът на входа: цял екран, две половини.
 */

:root {
    --ink: #14181f;
    --ink-soft: #2b333f;
    --ink-muted: #6b7480;
    --ink-faint: #98a1ac;
    --paper: #f6f6f4;
    --surface: #ffffff;
    --line: #e3e3df;
    --line-strong: #cfd0cb;

    --brass: #a8762a;
    --brass-strong: #8c611f;
    --brass-soft: #f4ead8;
    --brass-line: #e0cba4;
    --brass-on-dark: #d9a94f;

    --night: #14181f;
    --night-2: #0b0e13;
    --night-line: rgba(255, 255, 255, 0.09);
    --night-text: #eceef1;
    --night-text-soft: rgba(236, 238, 241, 0.66);
    --night-text-faint: rgba(236, 238, 241, 0.4);

    --bad: #a52521;
    --bad-soft: #f9e6e5;

    --r-sm: 6px;
    --r: 10px;
    --r-pill: 999px;

    --s-2: 8px;
    --s-3: 12px;
    --s-4: 16px;
    --s-5: 24px;
    --s-6: 32px;
    --s-7: 48px;

    --font: Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, Consolas, "Courier New", monospace;

    --fast: 120ms;
    --mid: 220ms;
    --ease: cubic-bezier(0.2, 0, 0.2, 1);
}

@font-face {
    font-family: Manrope;
    src: url("../fonts/manrope/manrope-variable.woff2") format("woff2-variations");
    font-weight: 200 800;
    font-display: swap;
}

@font-face {
    font-family: "JetBrains Mono";
    src: url("../fonts/jetbrains-mono/jetbrains-mono-variable.woff2") format("woff2-variations");
    font-weight: 100 800;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: clip;
}

body {
    font-family: var(--font);
    background: var(--paper);
    color: var(--ink);
    min-height: 100vh;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}

:focus-visible {
    outline: 2px solid var(--brass);
    outline-offset: 2px;
}

/* ============================================================
 * Двете половини
 * ============================================================ */

.gate {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    min-height: 100vh;
}

/* ---------- Лявата половина: трезорът ---------- */

.gate-stage {
    position: relative;
    background: var(--night-2);
    color: var(--night-text);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: var(--s-7);
    isolation: isolate;
}

.gate-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(120% 90% at 78% 18%, rgba(217, 169, 79, 0.16), transparent 58%),
        radial-gradient(90% 80% at 12% 92%, rgba(96, 122, 160, 0.14), transparent 60%);
    z-index: -2;
}

.gate-stage::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
    background-size: 46px 46px;
    z-index: -2;
}

/* Ключалката: два бавно въртящи се пръстена, изтеглени вдясно извън центъра. */
.dial {
    position: absolute;
    right: -170px;
    top: 50%;
    width: 720px;
    height: 720px;
    transform: translateY(-50%);
    z-index: -1;
    opacity: 0.85;
}

.dial-ring {
    transform-origin: 50% 50%;
    animation: dial-spin 150s linear infinite;
}

.dial-ring--inner {
    animation: dial-spin 96s linear infinite reverse;
}

.dial-core {
    animation: dial-breathe 7s ease-in-out infinite;
    transform-origin: 50% 50%;
}

@keyframes dial-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes dial-breathe {
    0%, 100% {
        opacity: 0.5;
    }

    50% {
        opacity: 0.95;
    }
}

.stage-brand {
    display: flex;
    align-items: center;
    gap: var(--s-3);
}

.stage-mark {
    width: 42px;
    height: 42px;
}

.stage-brand-name {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.stage-brand-sub {
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--night-text-faint);
}

.stage-statement {
    max-width: 30ch;
}

.stage-line {
    font-size: clamp(34px, 4.6vw, 58px);
    line-height: 1.02;
    letter-spacing: -0.035em;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.stage-line em {
    font-style: normal;
    color: var(--brass-on-dark);
}

.stage-text {
    margin-top: var(--s-4);
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--night-text-soft);
    max-width: 42ch;
}

.stage-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-4);
    font-size: 11.5px;
    color: var(--night-text-faint);
    border-top: 1px solid var(--night-line);
    padding-top: var(--s-4);
    flex-wrap: wrap;
}

.stage-foot span {
    white-space: nowrap;
}

/* ---------- Дясната половина: формата ---------- */

.gate-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--s-7) var(--s-6);
    background: var(--paper);
}

.panel-inner {
    width: 100%;
    max-width: 372px;
}

.panel-title {
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.panel-sub {
    color: var(--ink-muted);
    font-size: 13.5px;
    margin-top: 6px;
    margin-bottom: var(--s-6);
}

.panel-alert {
    display: flex;
    align-items: flex-start;
    gap: var(--s-3);
    background: var(--bad-soft);
    border: 1px solid #eec4c2;
    color: var(--bad);
    border-radius: var(--r-sm);
    padding: var(--s-3) var(--s-4);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: var(--s-4);
}

.panel-alert i {
    margin-top: 2px;
}

.panel-form {
    display: flex;
    flex-direction: column;
    gap: var(--s-4);
}

.gate-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gate-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-soft);
}

.gate-input-wrap {
    position: relative;
}

.gate-input-wrap i {
    position: absolute;
    left: var(--s-3);
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-faint);
    font-size: 13px;
    pointer-events: none;
}

.gate-input {
    width: 100%;
    height: 44px;
    padding: 0 var(--s-4) 0 36px;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-sm);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    transition: border-color var(--fast) var(--ease);
}

.gate-input:hover {
    border-color: var(--ink-faint);
}

.gate-input:focus {
    border-color: var(--brass);
    outline: 2px solid rgba(168, 118, 42, 0.18);
    outline-offset: 0;
}

.gate-input::placeholder {
    color: var(--ink-faint);
}

.gate-input--eye {
    padding-right: 44px;
}

.gate-eye {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: none;
    border-radius: var(--r-sm);
    background: none;
    color: var(--ink-faint);
    font-size: 13px;
    cursor: pointer;
    transition: color var(--fast) var(--ease), background var(--fast) var(--ease);
}

.gate-eye:hover {
    color: var(--ink-soft);
    background: var(--paper);
}

.gate-remember {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    font-size: 13px;
    color: var(--ink-soft);
    cursor: pointer;
    user-select: none;
}

.gate-remember input {
    width: 16px;
    height: 16px;
    accent-color: var(--brass);
}

.gate-submit {
    height: 46px;
    border: 1px solid var(--ink);
    border-radius: var(--r-sm);
    background: var(--ink);
    color: #fff;
    font: inherit;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-3);
    transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease);
}

.gate-submit:hover {
    background: var(--brass);
    border-color: var(--brass);
}

.gate-submit:active {
    transform: translateY(1px);
}

.gate-submit i {
    font-size: 12px;
    transition: transform var(--mid) var(--ease);
}

.gate-submit:hover i {
    transform: translateX(3px);
}

.panel-foot {
    margin-top: var(--s-6);
    padding-top: var(--s-4);
    border-top: 1px solid var(--line);
    font-size: 12px;
    color: var(--ink-muted);
    display: flex;
    justify-content: space-between;
    gap: var(--s-3);
    flex-wrap: wrap;
}

.panel-foot .mono {
    font-family: var(--mono);
}

/* ============================================================
 * Спряна врата (403)
 * ============================================================ */

.stop {
    min-height: 100vh;
    background: var(--night-2);
    color: var(--night-text);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--s-6);
    gap: var(--s-3);
}

.stop-mark {
    margin-bottom: var(--s-3);
}

.stop-title {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.stop-text {
    color: var(--night-text-soft);
    font-size: 15px;
    max-width: 46ch;
}

.stop-hint {
    color: var(--night-text-faint);
    font-size: 13px;
    max-width: 46ch;
}

.stop-link {
    margin-top: var(--s-4);
    color: var(--brass-on-dark);
    font-weight: 700;
    font-size: 13.5px;
    text-decoration: none;
    border-bottom: 1px solid rgba(217, 169, 79, 0.4);
}

/* ============================================================
 * Мобилно
 * ============================================================ */

@media (max-width: 980px) {
    .gate {
        grid-template-columns: minmax(0, 1fr);
    }

    .gate-stage {
        padding: var(--s-5);
        min-height: 300px;
    }

    .dial {
        right: -260px;
        width: 520px;
        height: 520px;
    }

    .stage-line {
        font-size: clamp(28px, 8vw, 40px);
    }

    .stage-text {
        font-size: 13.5px;
    }

    .stage-foot {
        display: none;
    }

    .gate-panel {
        padding: var(--s-6) var(--s-4);
    }
}

@media (max-width: 420px) {
    .gate-stage {
        min-height: 250px;
    }

    .stage-text {
        display: none;
    }
}
