/* ============================================================
   BRAND.CSS — /brand, the bin identity + guidelines page.
   Builds on page-neon.css (.np-*, .neon-panel, .neon-h ...).
   Everything is scoped under .brand so nothing leaks.
   Colors come from theme vars; the only literal hex values on the
   page are the canonical swatch values in the markup (that's data).
   ============================================================ */

.brand { max-width: 980px; }

/* ---- hero wordmark ---- */
.brand .br-hero {
    position: relative;
    padding: 2.2rem 0 1.6rem;
    margin-bottom: 1.4rem;
    border-bottom: 1px dashed rgba(var(--c-primary-rgb), 0.35);
}
.brand .br-wordmark {
    display: inline-block;
    font-family: var(--f-hero);
    font-weight: 900;
    font-size: clamp(96px, 22vw, 220px);
    line-height: 0.8;
    letter-spacing: -2px;
    color: var(--c-primary);
    text-transform: none;
    margin: 0;
}
.brand .br-wordmark .tld {
    font-size: 0.22em;
    letter-spacing: 1px;
    color: var(--c-secondary);
    text-shadow: 0 0 10px rgba(var(--c-secondary-rgb), 0.5);
    margin-left: 0.15em;
}
.brand .br-hero .np-kicker { margin-top: 1.2rem; }
.brand .br-tagline {
    font-family: var(--f-body);
    font-size: 17px; line-height: 1.7;
    color: var(--c-text); opacity: 0.85;
    max-width: 620px; margin: 0.8rem 0 0;
}

/* ---- section index ---- */
.brand .br-index { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0 0 2rem; }
.brand .br-index a {
    font-family: var(--f-mono); font-size: 12px; letter-spacing: 1px;
    padding: 0.35rem 0.7rem; text-decoration: none;
    color: var(--c-text);
    background: rgba(var(--c-secondary-rgb), 0.12);
    border: 1px solid rgba(var(--c-secondary-rgb), 0.4);
    transition: border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.brand .br-index a span { color: var(--c-accent); margin-right: 0.35rem; }
.brand .br-index a:hover { color: var(--c-primary); border-color: var(--c-primary); box-shadow: 0 0 12px rgba(var(--c-primary-rgb), 0.3); }

.brand .neon-panel { scroll-margin-top: 1.5rem; }
.brand .np-bar .num { color: var(--c-accent); margin-right: 0.3rem; }

/* ---- generic grids ---- */
.brand .br-grid { display: grid; gap: 0.9rem; }
.brand .br-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.brand .br-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.brand .br-card {
    position: relative;
    padding: 1rem 1.05rem;
    background: rgba(var(--c-primary-rgb), 0.045);
    border: 1px solid rgba(var(--c-primary-rgb), 0.25);
}
/* corner bracket ticks, same language as the desktop windows */
.brand .br-card::before, .brand .br-card::after {
    content: ""; position: absolute; width: 9px; height: 9px; pointer-events: none;
    border-color: var(--c-primary); border-style: solid; opacity: 0.8;
}
.brand .br-card::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.brand .br-card::after { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }
.brand .br-card h3 {
    font-family: var(--f-mono); font-size: 14px; letter-spacing: 1px;
    color: var(--c-primary); margin: 0 0 0.45rem; text-transform: lowercase;
}
.brand .br-card p { font-size: 14px; line-height: 1.7; margin: 0; }
.brand .br-card .big {
    display: block; font-family: var(--f-mono); font-size: 30px;
    color: var(--c-secondary); margin-bottom: 0.4rem;
    text-shadow: 0 0 10px rgba(var(--c-secondary-rgb), 0.4);
}

/* ============================================================
   THE LOWERCASE b
   ============================================================ */
.brand .br-b-wrap {
    display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
    gap: 1.6rem; align-items: center; margin-bottom: 1.4rem;
}
.brand .br-b {
    position: relative;
    aspect-ratio: 1 / 1;
    display: flex; align-items: flex-end; justify-content: center;
    background:
        linear-gradient(rgba(var(--c-primary-rgb), 0.08) 1px, transparent 1px) 0 0 / 20px 20px,
        linear-gradient(90deg, rgba(var(--c-primary-rgb), 0.08) 1px, transparent 1px) 0 0 / 20px 20px,
        rgba(8, 8, 18, 0.6);
    border: 1px solid rgba(var(--c-primary-rgb), 0.4);
    overflow: hidden;
}
.brand .br-b .glyph {
    font-family: var(--f-hero); font-weight: 900;
    font-size: 250px; line-height: 0.74;
    color: var(--c-primary);
    padding-bottom: 46px;
    text-transform: none;
}
/* guide lines: ascender / x-height / baseline */
.brand .br-b .gl {
    position: absolute; left: 0; right: 0; height: 0;
    border-top: 1px dashed rgba(var(--c-accent-rgb), 0.55);
}
.brand .br-b .gl span {
    position: absolute; left: 6px; top: -15px;
    font-family: var(--f-mono); font-size: 10px; letter-spacing: 1px;
    color: var(--c-accent); opacity: 0.85;
}
.brand .br-b .gl.asc { top: 13%; }
.brand .br-b .gl.x { top: 46%; }
.brand .br-b .gl.base { bottom: 46px; border-top-style: solid; }
.brand .br-b-note {
    position: absolute; right: 8px; top: 8px;
    font-family: var(--f-mono); font-size: 10px; color: var(--c-secondary); letter-spacing: 1px;
}

.brand .br-rule {
    font-family: var(--f-mono);
    font-size: clamp(18px, 3vw, 24px); line-height: 1.5;
    color: var(--c-text); margin: 0 0 0.8rem;
}
.brand .br-rule em { font-style: normal; color: var(--c-primary); text-shadow: 0 0 8px rgba(var(--c-primary-rgb), 0.5); }

/* do / don't */
.brand .br-dd { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; margin: 1.2rem 0; }
.brand .br-dd .col h4 {
    display: flex; align-items: center; gap: 0.45rem;
    font-family: var(--f-mono); font-size: 13px; letter-spacing: 2px; text-transform: uppercase;
    margin: 0 0 0.6rem;
}
.brand .br-dd .do h4 { color: var(--c-accent); }
.brand .br-dd .dont h4 { color: var(--c-primary); }
.brand .br-ex {
    font-family: var(--f-mono); font-size: 15px; line-height: 1.5;
    padding: 0.55rem 0.75rem; margin-bottom: 0.5rem;
    color: var(--c-text);
    border-left: 2px solid var(--c-accent);
    background: rgba(var(--c-accent-rgb), 0.06);
}
.brand .br-ex small { display: block; font-size: 11px; opacity: 0.6; margin-top: 0.15rem; }
.brand .dont .br-ex { border-left-color: var(--c-primary); background: rgba(var(--c-primary-rgb), 0.06); }
.brand .dont .br-ex .x { text-decoration: line-through; text-decoration-color: var(--c-primary); text-decoration-thickness: 2px; }
.brand .br-ex .hl { color: var(--c-accent); }
.brand .dont .br-ex .hl { color: var(--c-primary); }

/* edge-case table */
.brand .br-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0.6rem 0 0.2rem; }
.brand .br-table th, .brand .br-table td {
    text-align: left; vertical-align: top;
    padding: 0.55rem 0.7rem;
    border-bottom: 1px solid rgba(var(--c-primary-rgb), 0.18);
}
.brand .br-table th {
    font-family: var(--f-mono); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
    color: var(--c-secondary); font-weight: normal;
}
.brand .br-table td:first-child { color: var(--c-primary); font-family: var(--f-mono); white-space: nowrap; }
.brand .br-table code {
    font-family: var(--f-mono); font-size: 13px; color: var(--c-accent);
    background: rgba(var(--c-accent-rgb), 0.08); padding: 0.05rem 0.35rem;
}

/* live checker */
.brand .br-check textarea {
    width: 100%; min-height: 96px; resize: vertical;
    font-family: var(--f-mono); font-size: 15px; line-height: 1.6;
    color: var(--c-text);
    background: rgba(3, 3, 10, 0.7);
    border: 1px solid rgba(var(--c-secondary-rgb), 0.45);
    padding: 0.7rem 0.85rem; outline: none;
}
.brand .br-check textarea:focus { border-color: var(--c-primary); box-shadow: 0 0 12px rgba(var(--c-primary-rgb), 0.25); }
.brand .br-check-out {
    font-family: var(--f-mono); font-size: 15px; line-height: 1.7;
    white-space: pre-wrap; word-break: break-word;
    margin-top: 0.7rem; padding: 0.7rem 0.85rem; min-height: 2.4rem;
    border: 1px dashed rgba(var(--c-primary-rgb), 0.3);
}
.brand .br-check-out mark {
    background: rgba(var(--c-primary-rgb), 0.22); color: var(--c-primary);
    text-decoration: underline wavy var(--c-primary); text-underline-offset: 3px;
    padding: 0 1px;
}
.brand .br-check-out mark.ok { background: rgba(var(--c-accent-rgb), 0.14); color: var(--c-accent); text-decoration: none; }
.brand .br-check-bar { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: 0.7rem; }
.brand .br-status { font-family: var(--f-mono); font-size: 13px; color: var(--c-secondary); }
.brand .br-status.bad { color: var(--c-primary); }
.brand .br-status.good { color: var(--c-accent); }
.brand .br-btn {
    font-family: var(--f-mono); font-size: 12px; letter-spacing: 1px; text-transform: lowercase;
    color: var(--c-text); cursor: pointer;
    background: rgba(var(--c-primary-rgb), 0.1);
    border: 1px solid rgba(var(--c-primary-rgb), 0.5);
    padding: 0.4rem 0.8rem; display: inline-flex; align-items: center; gap: 0.4rem;
}
.brand .br-btn:hover { border-color: var(--c-primary); box-shadow: 0 0 10px rgba(var(--c-primary-rgb), 0.35); }
.brand .br-btn:disabled { opacity: 0.4; cursor: default; box-shadow: none; }

/* ============================================================
   COLOR
   ============================================================ */
.brand .br-swatches { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.7rem; }
.brand .br-sw {
    display: flex; flex-direction: column; text-align: left; cursor: pointer;
    padding: 0; background: rgba(8, 8, 18, 0.7);
    border: 1px solid rgba(var(--c-text-rgb), 0.14);
    color: var(--c-text); font: inherit;
    transition: transform .15s ease, border-color .15s ease;
}
.brand .br-sw:hover { transform: translateY(-2px); border-color: rgba(var(--c-text-rgb), 0.4); }
.brand .br-sw .chip { height: 92px; border-bottom: 1px solid rgba(var(--c-text-rgb), 0.12); }
.brand .br-sw .meta { padding: 0.6rem 0.7rem 0.7rem; font-family: var(--f-mono); }
.brand .br-sw .name { display: block; font-size: 13px; color: var(--c-text); }
.brand .br-sw .role { display: block; font-size: 11px; opacity: 0.6; margin: 0.1rem 0 0.4rem; font-family: var(--f-body); }
.brand .br-sw .hex { display: block; font-size: 12px; color: var(--c-accent); }
.brand .br-sw .rgb { display: block; font-size: 11px; opacity: 0.55; }
.brand .br-sw .tok { display: block; font-size: 11px; color: var(--c-secondary); margin-top: 0.3rem; }
.brand .br-sw.copied .hex::after { content: "  copied~"; color: var(--c-primary); }

.brand .br-ratio { display: flex; height: 26px; margin: 1.1rem 0 0.4rem; border: 1px solid rgba(var(--c-text-rgb), 0.15); }
.brand .br-ratio div { height: 100%; }
.brand .br-ratio-legend { font-family: var(--f-mono); font-size: 11px; opacity: 0.7; }

.brand .br-pairs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7rem; margin-top: 1rem; }
.brand .br-pair { padding: 0.9rem; font-family: var(--f-mono); font-size: 13px; border: 1px solid rgba(var(--c-text-rgb), 0.12); }
.brand .br-pair b { display: block; font-size: 22px; font-family: var(--f-hero); margin-bottom: 0.2rem; }

/* ============================================================
   TYPE
   ============================================================ */
.brand .br-type { display: grid; gap: 0.8rem; }
.brand .br-font {
    display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 1rem; align-items: center;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(var(--c-primary-rgb), 0.2);
    background: rgba(var(--c-primary-rgb), 0.03);
}
.brand .br-font .lbl { font-family: var(--f-mono); font-size: 12px; line-height: 1.6; }
.brand .br-font .lbl .r { display: block; color: var(--c-primary); font-size: 13px; letter-spacing: 1px; }
.brand .br-font .lbl .t { display: block; color: var(--c-secondary); }
.brand .br-font .lbl .u { display: block; opacity: 0.55; }
.brand .br-font .spec { color: var(--c-text); overflow-wrap: anywhere; }
.brand .spec.hero { font-family: var(--f-hero); font-weight: 900; font-size: 46px; color: var(--c-primary); line-height: 1; }
.brand .spec.head { font-family: var(--f-head); font-size: 28px; }
.brand .spec.body { font-family: var(--f-body); font-size: 17px; line-height: 1.6; }
.brand .spec.mono { font-family: var(--f-mono); font-size: 16px; color: var(--c-secondary); }
.brand .spec.vt { font-family: 'VT323', monospace; font-size: 26px; color: var(--c-accent); }

/* ============================================================
   VOICE
   ============================================================ */
.brand .br-chat { display: grid; gap: 0.55rem; }
.brand .br-line {
    font-family: var(--f-mono); font-size: 14px; line-height: 1.6;
    padding: 0.5rem 0.75rem;
    border-left: 2px solid var(--c-secondary);
    background: rgba(var(--c-secondary-rgb), 0.07);
}
.brand .br-line .who { color: var(--c-secondary); margin-right: 0.5rem; }
.brand .br-line.off { border-left-color: rgba(var(--c-text-rgb), 0.3); background: transparent; opacity: 0.55; }
.brand .br-line.off .who { color: var(--c-text); }
.brand .br-line.off .x { text-decoration: line-through; }

/* ============================================================
   VISUAL LANGUAGE demos
   ============================================================ */
.brand .demo {
    height: 110px; margin-bottom: 0.7rem;
    display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden;
    background: rgba(3, 3, 10, 0.75);
    border: 1px solid rgba(var(--c-primary-rgb), 0.2);
}
.brand .demo .neonword { font-family: var(--f-hero); font-weight: 900; font-size: 40px; color: var(--c-primary); }
.brand .demo.scan::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.45) 0 1px, transparent 1px 3px);
}
.brand .demo .term { font-family: var(--f-mono); font-size: 13px; line-height: 1.6; color: var(--c-text); text-align: left; }
.brand .demo .term .p { color: var(--c-accent); }
.brand .demo .term .c { color: var(--c-secondary); }
.brand .demo .term .cur { display: inline-block; width: 8px; height: 14px; background: var(--c-primary); vertical-align: -2px; animation: introblink 1s steps(1) infinite; }
.brand .demo .icons { display: flex; gap: 0.9rem; font-size: 26px; color: var(--c-primary); }
.brand .demo .icons .pi:nth-child(2n) { color: var(--c-secondary); }
.brand .demo .icons .pi:nth-child(3n) { color: var(--c-accent); }
.brand .demo .win {
    width: 70%; height: 66px; position: relative;
    border: 1px solid rgba(var(--c-primary-rgb), 0.5);
    background: rgba(var(--c-primary-rgb), 0.04);
}
.brand .demo .win::before {
    content: "about.exe"; display: block; height: 18px; line-height: 18px; padding: 0 6px;
    font-family: var(--f-mono); font-size: 10px; letter-spacing: 1px; color: var(--c-primary);
    background: rgba(var(--c-primary-rgb), 0.1); border-bottom: 1px solid rgba(var(--c-primary-rgb), 0.35);
}
.brand .demo .win i { position: absolute; width: 9px; height: 9px; border: 0 solid var(--c-primary); }
.brand .demo .win i:nth-child(1) { top: -4px; left: -4px; border-width: 2px 0 0 2px; }
.brand .demo .win i:nth-child(2) { top: -4px; right: -4px; border-width: 2px 2px 0 0; }
.brand .demo .win i:nth-child(3) { bottom: -4px; left: -4px; border-width: 0 0 2px 2px; }
.brand .demo .win i:nth-child(4) { bottom: -4px; right: -4px; border-width: 0 2px 2px 0; }

/* ============================================================
   MARKS
   ============================================================ */
.brand .br-marks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; }
.brand .br-mark {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.4rem;
    aspect-ratio: 4 / 3; padding: 1rem; text-align: center;
    border: 1px solid rgba(var(--c-primary-rgb), 0.25);
    background: rgba(3, 3, 10, 0.7);
}
.brand .br-mark .wm { font-family: var(--f-hero); font-weight: 900; font-size: 56px; line-height: 1; color: var(--c-primary); text-transform: none; }
.brand .br-mark .wm.mono { color: var(--c-text); text-shadow: none; }
.brand .br-mark .wm.url { font-size: 34px; }
.brand .br-mark .wm.url span { color: var(--c-secondary); }
.brand .br-mark .cap { font-family: var(--f-mono); font-size: 11px; opacity: 0.65; letter-spacing: 1px; }
.brand .br-mark.light { background: var(--c-text); }
.brand .br-mark.light .wm { color: var(--c-bg); text-shadow: none; }
.brand .br-mark.light .cap { color: var(--c-bg); }
.brand .br-mark.clear .wm { outline: 1px dashed rgba(var(--c-accent-rgb), 0.7); outline-offset: 0.5em; }
.brand .br-avatar {
    width: 96px; height: 96px; object-fit: cover; image-rendering: auto;
    border: 2px solid var(--c-primary); box-shadow: 0 0 16px rgba(var(--c-primary-rgb), 0.45);
}

/* ============================================================
   QUICK REF
   ============================================================ */
.brand .br-ref { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.4rem; font-family: var(--f-mono); font-size: 13px; }
.brand .br-ref div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.45rem 0; border-bottom: 1px dotted rgba(var(--c-primary-rgb), 0.25); }
.brand .br-ref span:first-child { color: var(--c-secondary); }
.brand .br-ref span:last-child { color: var(--c-text); text-align: right; }

/* ============================================================
   responsive
   ============================================================ */
@media (max-width: 880px) {
    .brand .br-swatches { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .brand .br-grid.three, .brand .br-marks, .brand .br-pairs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
    .brand .br-b-wrap { grid-template-columns: 1fr; }
    .brand .br-b { max-width: 300px; }
    .brand .br-dd, .brand .br-grid.two, .brand .br-ref { grid-template-columns: 1fr; }
    .brand .br-font { grid-template-columns: 1fr; gap: 0.4rem; }
    .brand .br-swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .brand .br-table td:first-child { white-space: normal; }
}
@media (max-width: 520px) {
    .brand .br-grid.three, .brand .br-marks, .brand .br-pairs { grid-template-columns: 1fr; }
}
