/* ESCAPE LAB — document pages on the sunset bar wall. */
:root {
    color-scheme: dark;
    --fg: #fff4e6;
    --muted: #efcfc4;
    --bg: #1a0b24;
    --wall: #3a1650;
    --wall2: #22102f;
    --panel-solid: #2f1545;
    --line: #946e9e;
    --accent: #ffd166;
    --ink: #1d0b28;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    padding: 0 20px 64px;
    color: var(--fg);
    background: radial-gradient(ellipse at 50% 0, var(--wall), var(--wall2) 72%) var(--bg);
    font: 400 17px/1.75 'Nunito', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 4px; }
a:hover { color: var(--fg); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    max-width: 680px;
    margin: 0 auto 48px;
    padding: 24px 0;
    border-bottom: 1px solid var(--line);
}
.brand {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--fg);
    font: 700 15px/1.5 'Unbounded', sans-serif;
    text-decoration: none;
}
.brand b { padding: 2px 5px; color: var(--ink); background: var(--accent); }
.back-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font: 500 17px/1.5 'Oswald', sans-serif;
    text-decoration: none;
}
.back-link:hover { background: var(--panel-solid); }
.container { width: 100%; max-width: 680px; margin: 0 auto; overflow-wrap: anywhere; }
h1, h3 { font-family: 'Unbounded', sans-serif; font-weight: 500; }
h1 {
    margin: 0 0 32px;
    color: var(--accent);
    font-size: clamp(23px, 5vw, 36px);
    line-height: 1.4;
    text-shadow: 0 0 24px #ffd16626;
}
h3 { margin: 36px 0 16px; font-size: clamp(17px, 3vw, 21px); line-height: 1.55; }
p { margin: 0 0 18px; }
ul { margin: 16px 0 24px; padding-left: 24px; }
li { margin-bottom: 10px; }
strong { font-weight: 700; }
.intro-text {
    margin-bottom: 28px;
    padding: 20px;
    border-left: 3px solid var(--accent);
    border-radius: 0 16px 16px 0;
    background: var(--panel-solid);
}
.intro-text p:last-child { margin-bottom: 0; }
.contact-info, .contact-form {
    padding: clamp(20px, 4vw, 32px);
    background: var(--panel-solid);
    border: 1px solid var(--line);
    border-radius: 18px;
}
.contact-info { margin-bottom: 32px; }
.contact-info h3 { margin-top: 0; }
.contact-info a { display: inline-block; padding: 6px 0; }
.contact-form { margin-top: 24px; }
.form-group { margin-bottom: 24px; }
.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font: 500 17px/1.5 'Oswald', sans-serif;
    letter-spacing: .025em;
}
input, select, textarea, button { font: inherit; }
.form-group input, .form-group select, .form-group textarea {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 12px 14px;
    color: var(--fg);
    background: var(--wall2);
    border: 1px solid var(--line);
    border-radius: 10px;
}
.form-group textarea { min-height: 140px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
.consent-text { margin: 24px 0; color: var(--muted); font-size: 15px; }
.submit-btn {
    width: 100%;
    min-height: 52px;
    padding: 12px 20px;
    /* contact.js applies legacy inline colors when it enables this button. */
    background: var(--accent) !important;
    border: 2px solid var(--accent) !important;
    border-radius: 999px;
    color: var(--ink);
    font-weight: 700;
    cursor: pointer;
}
.submit-btn:hover { background: #ffe0a0 !important; }
.submit-btn:disabled { cursor: wait; }
.loading, .success-message, .error-message { display: none; margin-top: 24px; }
.loading.show, .success-message.show, .error-message.show { display: block; }
.loading { text-align: center; }
.spinner {
    width: 30px;
    height: 30px;
    margin: 0 auto 12px;
    border: 3px solid var(--line);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
.success-message, .error-message { padding: 16px; border: 1px solid currentColor; border-radius: 10px; }
.success-message { color: #a7f3d0; }
.error-message { color: #ffb4b4; }
.success-message p, .error-message p { margin: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 400px) {
    body { padding-right: 16px; padding-left: 16px; }
    .page-header { gap: 8px; margin-bottom: 32px; }
    .back-link { padding-right: 12px; padding-left: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Legal documents moved verbatim from the old esc-lab.ru: long, plain, readable on a phone */
.legal { font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.legal h2 { margin: 1.4em 0 .6em; font-size: 18px; line-height: 1.3; }
.legal p, .legal ul, .legal ol { margin: 0 0 .9em; }
.legal li { margin: .2em 0; }
