/* ============================================================
   Shared styles for ported sub-brand pages (The Canon Genie,
   Legacy Ballot). The standard serbres-web brand layout brought
   into the unified app: a contained dark panel with a white logo
   card, mono labels, and gap-px card grids, tinted per brand.
   These keep their OWN look — only header/footer are shared.
   ============================================================ */
.brand-page {
    --bg: #0b0b0c;
    --bg-elev: #141417;
    --fg: #ededed;
    --muted: #9a9aa3;
    --border: #2a2a31;
    --accent: #c3c8d2;
    --accent-hover: #e4e8f0;
    --accent-fg: #16161a;
    --glow: rgba(195, 200, 210, 0.14);

    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg);
    color: var(--fg);
    font-family: 'Hanken Grotesk', system-ui, sans-serif;
}
/* Per-brand accent tokens live in their own theme files, edited separately:
   themes/canon-genie.css (.brand-page.genie), themes/legacy-ballot.css
   (.brand-page.ballot), themes/gold-tie.css (.brand-page.goldtie). */

.brand-page .sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.brand-inner { max-width: 1024px; margin: 0 auto; padding: clamp(2.75rem, 5vw, 4.5rem) clamp(1.25rem, 4vw, 2.5rem); }

/* ---- hero ---- */
.brand-logo {
    margin-bottom: 1.75rem;
    width: clamp(8rem, 22vw, 10rem);
    height: clamp(8rem, 22vw, 10rem);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 1rem;
    background: #fff;
    padding: 0.85rem;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05), 0 14px 40px -16px rgba(0, 0, 0, 0.7);
}
.brand-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }

.brand-eyebrow {
    margin: 0;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent);
}
.brand-eyebrow.muted { color: var(--muted); }

.brand-desc {
    margin-top: 2rem;
    max-width: 42rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    font-size: 1.14rem;
    line-height: 1.65;
    color: var(--muted);
}
.brand-desc p { margin: 0; }

.brand-actions { margin-top: 2.25rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1.4rem; }
.brand-cta {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.8rem 1.5rem; border-radius: 999px;
    background: var(--accent); color: var(--accent-fg);
    font-weight: 600; font-size: 0.92rem; text-decoration: none;
    transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.brand-cta:hover { background: var(--accent-hover); box-shadow: 0 8px 30px -6px var(--glow); transform: translateY(-1px); }
.brand-extlink {
    display: inline-flex; align-items: center; gap: 0.5rem;
    color: var(--muted); font-size: 0.92rem; font-weight: 500; text-decoration: none;
    transition: color 0.25s ease;
}
.brand-extlink:hover { color: var(--accent); }
.brand-extlink svg { width: 18px; height: 18px; }
.brand-textlink {
    color: var(--fg); font-size: 0.92rem; font-weight: 500; text-decoration: none;
    text-underline-offset: 4px; transition: color 0.25s ease;
}
.brand-textlink:hover { color: var(--accent); text-decoration: underline; }

/* ---- sections ---- */
.brand-section { border-top: 1px solid var(--border); }
.brand-section.elev { background: rgba(20, 20, 24, 0.5); }
.brand-row-between { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; }
.brand-note { margin: 1.5rem 0 0; max-width: 38rem; font-size: 0.95rem; line-height: 1.6; color: var(--muted); }

/* ---- card grids (gap-px hairline pattern) ---- */
.card-grid {
    list-style: none;
    margin: 2rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1px;
    border: 1px solid var(--border);
    background: var(--border);
    border-radius: 1rem;
    overflow: hidden;
}
@media (min-width: 640px) { .card-grid.cols2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 640px) { .card-grid.cols3 { grid-template-columns: 1fr 1fr 1fr; } }
.card {
    display: flex; flex-direction: column; gap: 1rem; height: 100%;
    padding: 1.75rem; background: var(--bg);
}
.card-h { margin: 0; font-weight: 600; letter-spacing: -0.01em; font-size: 1.02rem; color: var(--fg); }
.card-p { margin: 0; font-size: 0.95rem; line-height: 1.55; color: var(--muted); }

/* ---- Canon Genie: modes ---- */
.cg-mode-head { display: flex; align-items: center; gap: 1rem; }
.cg-mode-icon {
    width: 5rem; height: 5rem; flex: 0 0 auto;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
    border-radius: 1rem; background: #fff; padding: 0.375rem; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
}
.cg-mode-icon img { width: 100%; height: 100%; object-fit: contain; }
.cg-mode-name { margin: 0; font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }
.cg-mode-label {
    margin: 0.15rem 0 0;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--accent);
}

/* ---- Green Apologetics ---- */
.brand-sub-tag { margin: 1rem 0 0; max-width: 42rem; font-size: clamp(1.4rem, 3vw, 1.7rem); font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; color: var(--fg); }
.brand-sub-desc { margin: 1rem 0 0; max-width: 42rem; font-size: 1.14rem; line-height: 1.6; color: var(--muted); }

/* ---- Legacy Ballot ---- */
.lb-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.lb-status {
    padding: 0.2rem 0.7rem; border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.625rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--accent);
}
.lb-num { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 1.5rem; font-weight: 700; color: var(--accent); opacity: 0.7; }
.lb-idea { margin-top: 3rem; border: 1px solid var(--border); border-radius: 1rem; background: var(--bg); padding: clamp(1.4rem, 3vw, 1.85rem); }
.lb-idea-p { margin: 0.75rem 0 0; max-width: 42rem; font-size: 1.14rem; line-height: 1.6; color: var(--muted); }
