/* ==========================================================================
   RTP Auto – site-wide tokens, buttons, header and footer
   Loaded after the theme's style.css so these rules win without !important.
   ========================================================================== */

:root {
    /* Brand (sampled from the RTP logo) */
    --c-ink: #0b1626;
    --c-ink-2: #12223a;
    --c-ink-3: #1b3050;
    --c-brand: #2bb6e8;          /* cyan – accents on dark */
    --c-brand-text: #07759c;     /* cyan dark enough for text on white (5.2:1) and --c-bg (4.8:1) */
    --c-coral: #d9363e;          /* primary action (white text passes AA) */
    --c-coral-hover: #bf2c34;

    /* Neutrals */
    --c-bg: #f4f6f9;
    --c-surface: #ffffff;
    --c-line: #e2e8f0;
    --c-text: #0b1626;
    --c-muted: #5a6b80;
    --c-on-dark: #f3f6fa;
    --c-on-dark-muted: #9fb0c6;

    /* Type – Montserrat & Cabin are already loaded by the theme */
    --f-display: "Montserrat", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --f-body: "Cabin", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 22px;
    --shadow-sm: 0 1px 2px rgb(11 22 38 / 6%), 0 1px 1px rgb(11 22 38 / 4%);
    --shadow: 0 10px 30px -12px rgb(11 22 38 / 25%);
    --shadow-lg: 0 30px 60px -20px rgb(11 22 38 / 45%);
    --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Accessibility helpers ---------- */
.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute;
    left: 1rem; top: -100px;
    z-index: 2000;
    padding: .75rem 1rem;
    background: var(--c-surface);
    color: var(--c-ink);
    border-radius: var(--radius-sm);
    font-weight: 700;
}
.skip-link:focus { top: 1rem; }

:where(a, button, input, select, textarea, summary):focus-visible {
    outline: 3px solid var(--c-brand);
    outline-offset: 2px;
}
/* style.css has `a:focus, button:focus { outline: none }` (0,1,1), which beats the
   zero-specificity rule above. :is() matches that weight and wins by load order. */
:is(a, button, summary):focus-visible {
    outline: 3px solid var(--c-brand);
    outline-offset: 2px;
}

/* ---------- Buttons ---------- */
.rtp-btn {
    --btn-bg: transparent;
    --btn-fg: var(--c-ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 48px;
    padding: .75rem 1.4rem;
    border: 1.5px solid transparent;
    border-radius: 999px;
    background: var(--btn-bg);
    color: var(--btn-fg);
    font-family: var(--f-display);
    font-weight: 700;
    font-size: .95rem;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.rtp-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; }
.rtp-btn:hover { transform: translateY(-1px); color: var(--btn-fg); }
.rtp-btn:active { transform: translateY(0); }

.rtp-btn--primary { --btn-bg: var(--c-coral); --btn-fg: #fff; box-shadow: 0 8px 20px -8px rgb(217 54 62 / 70%); }
.rtp-btn--primary:hover { --btn-bg: var(--c-coral-hover); }

.rtp-btn--ghost { border-color: var(--c-ink); }
.rtp-btn--ghost:hover { --btn-bg: var(--c-ink); --btn-fg: #fff; }

.rtp-btn--ghost-light { --btn-fg: #fff; border-color: rgb(255 255 255 / 35%); }
.rtp-btn--ghost-light:hover { border-color: #fff; }

.rtp-btn--sm { min-height: 40px; padding: .55rem 1.1rem; font-size: .875rem; }

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
}

.site-header__admin {
    background: var(--c-coral);
    color: #fff;
    text-align: center;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .02em;
    padding: .35rem 1rem;
}

.site-nav {
    background: rgb(11 22 38 / 92%);
    backdrop-filter: saturate(140%) blur(14px);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
    border-bottom: 1px solid rgb(255 255 255 / 8%);
}

.site-nav__inner {
    display: flex;
    align-items: center;
    gap: 2rem;
    min-height: 72px;
}

.site-nav__brand img { display: block; height: 36px; width: auto; max-width: 200px; object-fit: contain; object-position: left center; }

.site-nav__links {
    display: flex;
    gap: .25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav__link {
    display: inline-block;
    padding: .55rem .9rem;
    border-radius: 999px;
    color: var(--c-on-dark-muted);
    font-family: var(--f-display);
    font-weight: 600;
    font-size: .925rem;
    text-decoration: none;
    transition: color .15s, background-color .15s;
}
.site-nav__link:hover,
.site-nav__link[aria-current="page"] {
    color: #fff;
    background: rgb(255 255 255 / 7%);
}

.site-nav__actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.site-nav__toggle {
    display: none;
    margin-left: auto;
    width: 44px; height: 44px;
    border: 1px solid rgb(255 255 255 / 15%);
    border-radius: 12px;
    background: transparent;
    color: #fff;
}
.site-nav__toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

@media (max-width: 991.98px) {
    .site-nav__links,
    .site-nav__actions { display: none; }
    .site-nav__toggle { display: inline-flex; align-items: center; justify-content: center; }
    .site-nav__inner { min-height: 64px; }
}

/* ---------- Mobile menu ---------- */
.mobile-menu {
    background: var(--c-ink);
    color: var(--c-on-dark);
    max-width: 86vw;
}
.mobile-menu .offcanvas-header { border-bottom: 1px solid rgb(255 255 255 / 10%); }
.mobile-menu__links { list-style: none; padding: 0; margin: 0 0 2rem; }
.mobile-menu__links a {
    display: block;
    padding: .9rem 0;
    border-bottom: 1px solid rgb(255 255 255 / 8%);
    color: #fff;
    font-family: var(--f-display);
    font-weight: 700;
    font-size: 1.15rem;
    text-decoration: none;
}
.mobile-menu__links a[aria-current="page"] { color: var(--c-brand); }
.mobile-menu__actions { display: grid; gap: .75rem; }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--c-ink);
    color: var(--c-on-dark-muted);
    padding: 4rem 0 2rem;
    font-family: var(--f-body);
}

.site-footer__top {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr);
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgb(255 255 255 / 10%);
}

.site-footer__brand img { height: 36px; width: auto; max-width: 200px; object-fit: contain; object-position: left center; margin-bottom: 1.25rem; }
.site-footer__brand p { max-width: 36ch; margin-bottom: 1rem; color: var(--c-on-dark-muted); }
.site-footer__stat strong { color: #fff; font-family: var(--f-display); }

.site-footer__cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}

.site-footer__title {
    color: #fff;
    font-family: var(--f-display);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li + li { margin-top: .6rem; }
.site-footer a { color: var(--c-on-dark-muted); text-decoration: none; overflow-wrap: anywhere; }
.site-footer a:hover { color: #fff; }

.site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1.5rem;
    font-size: .875rem;
}
.site-footer__bottom p { margin: 0; color: var(--c-on-dark-muted); }
.site-footer__social { display: flex; gap: .5rem; }
.site-footer__social li + li { margin-top: 0; }
.site-footer__social a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    border: 1px solid rgb(255 255 255 / 15%);
    border-radius: 50%;
    font-size: 1.1rem;
}

@media (max-width: 767.98px) {
    .site-footer__top { grid-template-columns: 1fr; gap: 2rem; }
    .site-footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}

/* ---------- Announcement bar (Admin › Settings › General) ---------- */
.site-announce { position: relative; z-index: 60; padding: .55rem 1rem; font-family: var(--f-display); font-size: .88rem; font-weight: 700; line-height: 1.4; text-align: center; }
.site-announce p { margin: 0; color: inherit !important; }
.site-announce a { color: inherit; text-decoration: underline; text-decoration-color: rgb(255 255 255 / 45%); text-underline-offset: 3px; }
.site-announce a:hover { text-decoration-color: currentColor; }
.site-announce--info { background: var(--c-ink-2, #12223a); color: var(--c-on-dark, #f3f6fa); border-bottom: 1px solid rgb(255 255 255 / 8%); }
.site-announce--promo { background: linear-gradient(90deg, #d9363e, #ff7a59); color: #fff; }
.site-announce--warning { background: #fcf0d9; color: #7a4a00; }
.site-announce--warning a { text-decoration-color: rgb(122 74 0 / 45%); }
