/* ==========================================================================
   Barlin Games — Contact page   ·   .ct
   --------------------------------------------------------------------------
   Light, typographic layout for /contact-us. No imagery: structure comes from
   type, spacing, hairlines and the shared inline icon set, so there is no
   background-image or url() anywhere in this file.

   Self-contained — layouts/public has no @stack('styles'), so the sheet is
   linked from the view. Token names mirror game-ui.css's `.gd` namespace so
   the two read as one system, and so a later dark pass has the same handles.
   ========================================================================== */

.ct {
    --ct-red:       #E51B23;
    --ct-red-dark:  #C2151C;
    --ct-red-soft:  rgba(229, 27, 35, .07);
    --ct-red-ring:  rgba(229, 27, 35, .18);

    --ct-ink:       #0F1115;
    --ct-body:      #3A4048;
    --ct-muted:     #6B7280;
    --ct-faint:     #9CA3AF;

    --ct-canvas:    #F6F7F9;
    --ct-surface:   #FFFFFF;
    --ct-line:      #E7EAF0;
    --ct-line-soft: #F0F2F6;

    --ct-ok:        #17803D;
    --ct-ok-soft:   rgba(23, 128, 61, .08);

    --ct-r:         14px;
    --ct-ease:      cubic-bezier(.22, .61, .36, 1);

    max-width: var(--bg-w-1180, 1180px);
    margin-inline: auto;
    color: var(--ct-body);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                 Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-align: left;
}
.ct, .ct *, .ct *::before, .ct *::after { box-sizing: border-box; }

/* Light is the designed state. The dark blocks keep parity so a reader in dark
   mode is not handed a white sheet; they are not a finished dark design. */
@media (prefers-color-scheme: dark) {
    body:not(.theme-light) .ct {
        --ct-ink: #F3F5F8; --ct-body: #C3C8D2; --ct-muted: #8B93A2; --ct-faint: #6B7280;
        --ct-canvas: #0D0F13; --ct-surface: #14171E;
        --ct-line: #242936; --ct-line-soft: #1C212B;
        --ct-red-soft: rgba(229, 27, 35, .14);
        --ct-ok-soft: rgba(23, 128, 61, .16);
    }
}
body.theme-dark .ct {
    --ct-ink: #F3F5F8; --ct-body: #C3C8D2; --ct-muted: #8B93A2; --ct-faint: #6B7280;
    --ct-canvas: #0D0F13; --ct-surface: #14171E;
    --ct-line: #242936; --ct-line-soft: #1C212B;
    --ct-red-soft: rgba(229, 27, 35, .14);
    --ct-ok-soft: rgba(23, 128, 61, .16);
}

.ct :focus-visible:not(input):not(textarea):not(select) {
    outline: 2px solid var(--ct-red);
    outline-offset: 2px;
    border-radius: 8px;
}

/* ── Hero ───────────────────────────────────────────────────────────────── */

.ct-hero {
    padding: clamp(6px, 1.6vw, 16px) 0 clamp(26px, 3.6vw, 42px);
    border-bottom: 1px solid var(--ct-line);
    margin-bottom: clamp(24px, 3.4vw, 38px);
}
.ct-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.ct-eyebrow {
    display: inline-block;
    margin: 0 0 14px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--ct-red-soft);
    color: var(--ct-red);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    line-height: 1.2;
}

.ct-title {
    margin: 0 0 16px;
    color: var(--ct-ink);
    font-size: clamp(30px, 5.2vw, 54px);
    line-height: 1.05;
    letter-spacing: -.028em;
    font-weight: 800;
}
.ct-title__accent { color: var(--ct-red); }

.ct-lede {
    margin: 0;
    max-width: 62ch;
    color: var(--ct-body);
    font-size: clamp(15px, 1.2vw, 17px);
    line-height: 1.68;
}

/* Trust badges. Wrap freely — the row must never be the reason the page
   scrolls sideways on a 360px screen. */
.ct-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}
.ct-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--ct-body);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.3;
}
.ct-badge__ic {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex: none;
    border-radius: 9px;
    background: var(--ct-red-soft);
    color: var(--ct-red);
}

/* Typographic side element. Decoration only, and gone below 1000px. */
.ct-hero__side { display: none; }
@media (min-width: 1000px) {
    .ct-hero__grid { grid-template-columns: minmax(0, 1fr) clamp(180px, 22%, 250px); }
    .ct-hero__side { display: block; padding-top: 6px; }
    .ct-side__words {
        display: flex;
        flex-direction: column;
        gap: 3px;
        margin: 0 0 14px;
        padding-bottom: 14px;
        border-bottom: 3px solid var(--ct-red);
        color: var(--ct-ink);
        font-size: 13px;
        font-weight: 800;
        letter-spacing: .16em;
        text-transform: uppercase;
        line-height: 1.5;
    }
    .ct-side__note {
        margin: 0;
        max-width: 20ch;
        color: var(--ct-faint);
        font-size: 12px;
        font-weight: 600;
        letter-spacing: .13em;
        text-transform: uppercase;
        line-height: 1.7;
    }
}

/* ── Quick contact cards ────────────────────────────────────────────────── */

.ct-quick {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    margin: 0 0 clamp(20px, 2.6vw, 28px);
    padding: 0;
    list-style: none;
}
@media (min-width: 720px)  { .ct-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .ct-quick { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.ct-qcard {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px;
    border: 1px solid var(--ct-line);
    border-radius: var(--ct-r);
    background: var(--ct-surface);
    transition: border-color .22s var(--ct-ease), transform .22s var(--ct-ease);
}
.ct-qcard:hover { border-color: #D8DCE6; transform: translateY(-2px); }

.ct-qcard__ic,
.ct-panel__ic,
.ct-form__ic {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: none;
    border-radius: 11px;
    background: var(--ct-red-soft);
    color: var(--ct-red);
}
.ct-qcard__body { min-width: 0; }

.ct-qcard__title {
    margin: 0 0 5px;
    color: var(--ct-ink);
    font-size: 15.5px;
    font-weight: 700;
    line-height: 1.35;
}
.ct-qcard p {
    margin: 0;
    color: var(--ct-body);
    font-size: 13.5px;
    line-height: 1.6;
}
.ct-qcard__act {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 9px;
    color: var(--ct-red);
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    /* Long addresses must wrap rather than push the card wide. */
    overflow-wrap: anywhere;
    transition: gap .2s var(--ct-ease), color .2s var(--ct-ease);
}
.ct-qcard__act:hover { gap: 10px; color: var(--ct-red-dark); }
.ct-qcard__act svg { flex: none; }

/* ── Main two-column area ───────────────────────────────────────────────── */

.ct-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    margin-bottom: clamp(20px, 2.6vw, 28px);
    align-items: start;
}
@media (min-width: 1024px) {
    /* ~68 / 32, as specified. minmax(0,…) so a long word in either column
       cannot blow the track out and force a horizontal scrollbar. */
    .ct-main { grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); }
}

/* ── Form ───────────────────────────────────────────────────────────────── */

.ct-form {
    padding: clamp(20px, 2.6vw, 30px);
    /* Uniform hairline. The red top edge that used to sit here read as a
       stray rule above the card rather than as an accent on it. */
    border: 1px solid var(--ct-line);
    border-radius: var(--ct-r);
    background: var(--ct-surface);
}
.ct-form__head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 24px;
}
.ct-form__head p {
    margin: 5px 0 0;
    color: var(--ct-muted);
    font-size: 13.5px;
    line-height: 1.6;
}

.ct-h2 {
    margin: 0;
    color: var(--ct-ink);
    font-size: clamp(19px, 2.1vw, 23px);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.02em;
}
.ct-h3 {
    margin: 0;
    color: var(--ct-ink);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

.ct-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
}
@media (min-width: 640px) {
    .ct-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ct-field--wide { grid-column: 1 / -1; }
}

.ct-field { min-width: 0; }
.ct-field label {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
    color: var(--ct-ink);
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.3;
}
.ct-field label svg { flex: none; color: var(--ct-red); }
.ct-req { color: var(--ct-red); font-weight: 800; }
.ct-opt {
    margin-left: auto;
    color: var(--ct-faint);
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
}

.ct-field input,
.ct-field select,
.ct-field textarea {
    display: block;
    width: 100%;
    /* 46px: comfortable to tap, and at 16px iOS will not zoom the page on
       focus — which on a form this long is a real usability problem. */
    min-height: 46px;
    padding: 12px 14px;
    border: 1px solid var(--ct-line);
    border-radius: 10px;
    background: var(--ct-surface);
    color: var(--ct-ink);
    font-family: inherit;
    font-size: 15px;
    line-height: 1.5;
    transition: border-color .18s var(--ct-ease), box-shadow .18s var(--ct-ease);
}
.ct-field textarea { min-height: 150px; resize: vertical; }

.ct-field input::placeholder,
.ct-field textarea::placeholder { color: var(--ct-faint); }

.ct-field input:hover,
.ct-field select:hover,
.ct-field textarea:hover { border-color: #D3D8E2; }

.ct-field input:focus,
.ct-field select:focus,
.ct-field textarea:focus { outline: none; }
.ct-field [aria-invalid="true"] { border-color: var(--ct-red); }

/* Native select arrow removed for one that matches the rest of the page; the
   element itself stays a real <select> so mobile keyboards behave. */
.ct-select { position: relative; }
.ct-select select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 42px;
}
.ct-select__chev {
    position: absolute;
    top: 50%;
    right: 13px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    color: var(--ct-muted);
    pointer-events: none;
}

.ct-area { position: relative; }
.ct-count {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 3px 8px;
    border: 1px solid var(--ct-line);
    border-radius: 999px;
    background: var(--ct-surface);
    color: var(--ct-faint);
    font-size: 11.5px;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}

.ct-err {
    margin: 7px 0 0;
    color: var(--ct-red);
    font-size: 12.5px;
    line-height: 1.5;
    font-weight: 600;
}

.ct-captcha { margin-top: 20px; }

.ct-submit {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px 20px;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--ct-line-soft);
}
.ct-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    flex: 1 1 260px;
    color: var(--ct-muted);
    font-size: 13px;
    line-height: 1.5;
}
.ct-hint svg { flex: none; color: var(--ct-red); }

.ct-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 13px 26px;
    border: 1px solid var(--ct-red);
    border-radius: 10px;
    background: var(--ct-red);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color .2s var(--ct-ease), border-color .2s var(--ct-ease),
                transform .2s var(--ct-ease), opacity .2s var(--ct-ease);
}
.ct-btn:hover:not(:disabled) {
    background: var(--ct-red-dark);
    border-color: var(--ct-red-dark);
    transform: translateY(-1px);
}
.ct-btn:disabled { opacity: .65; cursor: not-allowed; transform: none; }
.ct-btn__in { display: inline-flex; align-items: center; gap: 9px; }
.ct-btn__in svg { flex: none; }

/* On a phone the button takes the full width rather than sitting orphaned. */
@media (max-width: 519px) {
    .ct-submit { flex-direction: column; align-items: stretch; }
    .ct-btn { width: 100%; }
}

.ct-spin {
    width: 15px;
    height: 15px;
    flex: none;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ct-spin .7s linear infinite;
}
@keyframes ct-spin { to { transform: rotate(360deg); } }

/* ── Result banner ──────────────────────────────────────────────────────── */

.ct-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 22px;
    padding: 14px 16px;
    border: 1px solid var(--ct-line);
    border-left: 3px solid var(--ct-muted);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.55;
}
.ct-alert svg { flex: none; margin-top: 2px; }
.ct-alert--ok  { border-left-color: var(--ct-ok);  background: var(--ct-ok-soft);  color: var(--ct-ok); }
.ct-alert--bad { border-left-color: var(--ct-red); background: var(--ct-red-soft); color: var(--ct-red-dark); }
body.theme-dark .ct-alert--bad { color: #F1959A; }

/* ── Side panels ────────────────────────────────────────────────────────── */

.ct-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.ct-panel {
    padding: clamp(18px, 2.2vw, 24px);
    border: 1px solid var(--ct-line);
    border-radius: var(--ct-r);
    background: var(--ct-surface);
    min-width: 0;
}
.ct-panel--quiet { background: var(--ct-canvas); }

.ct-panel__head {
    display: flex;
    align-items: flex-start;
    gap: 13px;
}
.ct-panel__head > div { min-width: 0; }
.ct-panel__head p {
    margin: 5px 0 0;
    color: var(--ct-muted);
    font-size: 13px;
    line-height: 1.6;
}

.ct-methods {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin: 20px 0 0;
    padding: 20px 0 0;
    border-top: 1px solid var(--ct-line-soft);
    list-style: none;
}
.ct-methods li { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.ct-methods > li > div { min-width: 0; }

.ct-method__ic {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: 9px;
    background: var(--ct-red-soft);
    color: var(--ct-red);
}
.ct-method__title {
    margin: 0 0 3px;
    color: var(--ct-ink);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}
.ct-method__act {
    display: inline-block;
    color: var(--ct-red);
    font-size: 13.5px;
    font-weight: 650;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.ct-method__act:hover { color: var(--ct-red-dark); }
.ct-methods p {
    margin: 3px 0 0;
    color: var(--ct-muted);
    font-size: 12.5px;
    line-height: 1.55;
}

/* ── Footer blocks: topics + links ──────────────────────────────────────── */

.ct-foot {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    margin-bottom: 8px;
}
@media (min-width: 900px) { .ct-foot { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.ct-topics,
.ct-links {
    margin: 18px 0 0;
    padding: 6px 0 0;
    border-top: 1px solid var(--ct-line-soft);
    list-style: none;
}

.ct-topic {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 2px;
    border-bottom: 1px solid var(--ct-line-soft);
    color: var(--ct-ink);
    font-size: 14.5px;
    font-weight: 600;
    text-decoration: none;
    transition: color .18s var(--ct-ease), padding-left .18s var(--ct-ease);
}
.ct-topics li:last-child .ct-topic { border-bottom: 0; }
a.ct-topic:hover { color: var(--ct-red); padding-left: 6px; }
.ct-topic svg { flex: none; color: var(--ct-faint); }
a.ct-topic:hover svg { color: var(--ct-red); }

.ct-link {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 13px 2px;
    border-bottom: 1px solid var(--ct-line-soft);
    color: inherit;
    text-decoration: none;
    transition: padding-left .18s var(--ct-ease);
}
.ct-links li:last-child .ct-link { border-bottom: 0; }
.ct-link:hover { padding-left: 6px; }
.ct-link__ic {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: 9px;
    background: var(--ct-red-soft);
    color: var(--ct-red);
}
.ct-link__tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.ct-link__t {
    color: var(--ct-ink);
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.3;
    transition: color .18s var(--ct-ease);
}
.ct-link:hover .ct-link__t { color: var(--ct-red); }
.ct-link__d { color: var(--ct-muted); font-size: 12.5px; line-height: 1.5; }
.ct-link > svg { flex: none; color: var(--ct-faint); }
.ct-link:hover > svg { color: var(--ct-red); }

/* ── Motion ─────────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .ct *, .ct *::before, .ct *::after {
        transition-duration: .001ms !important;
        animation-duration: .001ms !important;
    }
    /* The spinner is a loading signal, not decoration — slowed, not stopped. */
    .ct-spin { animation-duration: 1.6s !important; }
}

/* ── Host page reset ────────────────────────────────────────────────────── */
/*
 * layouts/public wraps every CMS page body in .card > .card-body. This page
 * draws its own surfaces, so the wrapper's panel is flattened here rather than
 * by editing shared layout markup — every other page keeps its card.
 */
body.contact-page #content-box > .card {
    border: 0;
    background: none;
    box-shadow: none;
}
body.contact-page #content-box > .card > .card-body { padding: 0; }
body.contact-page #content-box { margin-bottom: 0 !important; }
