/* KQ4TYO site-wide custom styles
   Background is one shade lighter than the darkest night in the splash scene;
   text is a warm off-white so it stays readable on it. */
:root {
    --kq-bg: #1f2a3c;
    --kq-fg: #f2e8d2;
    --kq-panel: #26344a;
    --kq-line: rgba(242, 232, 210, 0.18);
    --kq-gold: #e0b45f;
    --kq-sand: #f4e6cb;
    --kq-ink: #33291c;
}
html, body {
    background-color: var(--kq-bg);
}
body {
    color: var(--kq-fg);
    padding-top: 3.4rem;
}
.theme-atomik {
    background-color: var(--kq-bg);
    min-height: 100vh;
}

/* fixed transparent top bar */
.kq-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    background: transparent;
}
.kq-topbar-nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1.75rem;
    padding: 1rem 1.6rem;
    font-size: 1.05rem;
    font-weight: 600;
}
.kq-topbar-nav a {
    color: var(--kq-fg);
    text-decoration: none;
}
.kq-topbar-nav a:hover,
.kq-topbar-nav a:focus,
.kq-topbar-nav a:focus-visible {
    text-decoration: underline;
    outline-offset: 3px;
}

/* splash image: guaranteed visible (defeats atomik's height:0 sliver + inline JS heights) */
.ccm-block-hero-image-offset-title {
    display: block;
    height: auto !important;
    overflow: visible !important;
}
.ccm-block-hero-image-offset-image-container {
    display: block;
    width: 100%;
    height: auto !important;
    overflow: visible !important;
}
.ccm-block-hero-image-offset-image-container img {
    display: block;
    width: 100% !important;
    height: auto !important;
    max-height: 85vh;
    object-fit: cover;
}

/* screen-reader-only splash description */
.kq-splash-desc {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* KQ4TYO: bar must never eat clicks meant for the page beneath it */
.kq-topbar {
    pointer-events: none;
}
.kq-topbar a {
    pointer-events: auto;
}
/* in Concrete edit mode the core toolbar owns the top strip — hide our bar */
body:has(#ccm-toolbar) .kq-topbar,
body:has(.ccm-toolbar) .kq-topbar {
    display: none !important;
}

/* KQ4TYO: the footer sits on the same sand as the page, not a cream slab */
footer {
    background-color: var(--kq-bg) !important;
    color: var(--kq-fg);
}
footer .concrete-branding {
    border-top: 1px solid var(--kq-line);
    padding-top: 0.75rem;
}
body footer,
body footer div,
body footer section {
    color: var(--kq-fg) !important;
}
body footer a,
body footer a:visited,
body footer a:hover {
    color: var(--kq-fg) !important;
    text-decoration: underline;
}

/* KQ4TYO: the sitemap / auto-navigation panel in sand, not a grey slab */
body .ccm-block-autonav {
    background-color: transparent !important;
    color: var(--kq-fg) !important;
    border: 0;
    border-radius: 0;
    padding: 0;
}
body .ccm-block-autonav ul {
    margin-bottom: 0;
    padding-left: 1.1rem;
}
body .ccm-block-autonav li {
    margin-bottom: 0.55rem;
}
body .ccm-block-autonav li:last-child {
    margin-bottom: 0;
}
body .ccm-block-autonav a,
body .ccm-block-autonav a:visited {
    color: var(--kq-fg) !important;
    text-decoration: underline;
}
body .ccm-block-autonav a:hover {
    color: var(--kq-fg) !important;
    text-decoration-thickness: 2px;
}

/* KQ4TYO: call sign above the splash, in the page's own sand-and-ink type */
body .ccm-block-hero-image-offset-title .ccm-block-hero-image-text {
    background-color: transparent !important;
    margin: 0 0 1.1rem !important;
    padding: 0 !important;
    position: static !important;
    text-align: left !important;
}
body .ccm-block-hero-image-offset-title .ccm-block-hero-image-text h1 {
    color: var(--kq-fg) !important;
    font-size: clamp(2.4rem, 7vw, 4.5rem) !important;
    letter-spacing: 0.09em;
    line-height: 1.05;
    margin: 0 !important;
    padding: 0 !important;
    text-transform: uppercase;
}
body .ccm-block-hero-image-offset-title .ccm-block-hero-image-text p {
    color: var(--kq-fg) !important;
    font-size: 1rem !important;
    letter-spacing: 0.2em;
    line-height: 1.4;
    margin: 1.1rem 0 0 !important;
    text-transform: uppercase;
}

/* KQ4TYO: Atomik hides a negative-margin spacer above this paragraph,
   which silently eats the gap between the call sign and the subtitle */
body .ccm-block-hero-image-offset-title .ccm-block-hero-image-text p::before {
    content: none !important;
    display: none !important;
    margin: 0 !important;
    height: 0 !important;
}

/* KQ4TYO: readable links inside page content on the night background */
body .ccm-block-content a {
    color: var(--kq-gold);
    text-decoration: underline;
}
body .ccm-block-content a:hover {
    color: var(--kq-fg);
}

/* ===== iPhone / narrow-screen fallback (added 2026-11-04) =====
   Below 650px the seven top-bar links cannot fit one row, and the row was
   fixed to the top with no wrapping, so links ran off-screen on phones.
   On narrow screens: let the bar scroll with the page, let links wrap onto
   centered rows, and give each a 44px (Apple-recommended) tap target. */
@media (max-width: 650px) {
    body { padding-top: 0; }
    .kq-topbar { position: static; background: var(--kq-panel); }
    .kq-topbar-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.25rem 1.1rem;
        padding: 0.9rem 1rem;
        font-size: 1rem;
    }
    .kq-topbar-nav a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        padding: 0 0.35rem;
    }
}
