:root {
    --bg: #1a1612;
    --surface: #242018;
    --surface-hi: #2c2820;
    --brand-orange: #E85A1A;
    --brand-gold: #FFD166;
    --brand-blue: #1E5BAA;
    --accent-red: #a01818;
    --text: #f4f1ec;
    --text-muted: #a8a39c;
    --border: rgba(255, 255, 255, 0.1);
    --border-hi: rgba(255, 209, 102, 0.45);
}

html {
    scroll-behavior: smooth;
    background: #15110d;
}

body {
    margin: 0;
    background:
        radial-gradient(
            ellipse 55% 45% at 50% 38%,
            rgba(255, 209, 102, 0.08),
            transparent 70%
        ),
        var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
}

/* ---------- Scroll reveal ---------- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    will-change: opacity, transform;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
}

#container-main {
    max-width: 560px;
    margin: 4rem auto;
    padding: 2rem;
}

@media (max-width: 768px) {
    #container-main {
        margin: 2rem auto;
        padding: 1.25rem;
    }
}

.contact-h1 {
    font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem);
    line-height: 1.15;
    margin: 0 0 1.5rem;
    letter-spacing: -0.01em;
}

/* ---------- Form card ---------- */

.contact-form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    display: grid;
    gap: 1.25rem;
}

.field {
    display: grid;
    gap: 0.4rem;
}

.field label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 600;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    box-sizing: border-box;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.7rem 0.9rem;
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.4;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.field textarea {
    resize: vertical;
    min-height: 7rem;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--border-hi);
    box-shadow: 0 0 0 3px rgba(255, 209, 102, 0.18);
    background: var(--surface-hi);
}

.field input::placeholder,
.field textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.error {
    color: #f0a0a0;
    font-size: 0.85rem;
    margin: 0.25rem 0 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.error::before {
    content: "!";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: var(--accent-red);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

.field--error label {
    color: #f0a0a0;
}

.field--error input,
.field--error select,
.field--error textarea {
    border-color: rgba(240, 160, 160, 0.55);
    background: rgba(160, 24, 24, 0.07);
}

.field--error input:focus,
.field--error select:focus,
.field--error textarea:focus {
    border-color: #f0a0a0;
    box-shadow: 0 0 0 3px rgba(160, 24, 24, 0.22);
}

/* Honeypot — visually hidden, accessibility-safe */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
}

/* ---------- Submit button ---------- */

.btn-submit {
    margin-top: 0.5rem;
    background: var(--brand-gold);
    color: #1a1612;
    border: none;
    border-radius: 8px;
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    justify-self: start;
    transition: background 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
}

.btn-submit:hover {
    background: #ffdd85;
    box-shadow: 0 6px 16px rgba(255, 209, 102, 0.2);
}

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

.btn-submit:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 209, 102, 0.35);
}

.btn-submit:disabled,
.btn-submit[disabled] {
    opacity: 0.6;
    cursor: progress;
    background: var(--brand-gold);
    box-shadow: none;
}

/* ---------- Crisis interception alert ---------- */

.crisis-alert {
    background: linear-gradient(180deg, rgba(160, 24, 24, 0.18), rgba(160, 24, 24, 0.08));
    border: 1px solid rgba(240, 160, 160, 0.4);
    border-left: 4px solid var(--accent-red);
    border-radius: 10px;
    padding: 1.25rem 1.25rem 1rem;
    margin-bottom: 1.25rem;
}

.crisis-alert[hidden] {
    display: none;
}

.crisis-title {
    margin: 0 0 0.75rem;
    font-weight: 700;
    color: #ffe6e6;
    font-size: 1.05rem;
}

.crisis-actions {
    list-style: none;
    padding: 0;
    margin: 0 0 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.crisis-actions a {
    display: inline-block;
    background: var(--accent-red);
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 0.9rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.crisis-actions a:hover {
    background: #c12020;
}

.crisis-note {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.5;
}
