/* ==========================================================================
   Brand guidelines page (brand.html) — extras on top of styles.css
   ========================================================================== */

.sub-h { font-size: 1.15rem; font-weight: 800; margin: 56px 0 18px; letter-spacing: -0.01em; }
.sub-h:first-child { margin-top: 0; }

/* ---------- Hero ---------- */
.brand-hero { padding-bottom: clamp(48px, 7vw, 88px); }
.brand-hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.brand-hero h1 { font-size: clamp(2.4rem, 5vw, 3.9rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.06; margin: 0 0 22px; }
html[data-lang="bn"] .brand-hero h1 { line-height: 1.35; }
.brand-hero-card { background: #fff; border-radius: 34px; padding: clamp(28px, 4vw, 52px); box-shadow: var(--shadow); border: 1px solid var(--line); display: grid; gap: 28px; justify-items: center; position: relative; overflow: hidden; }
.brand-hero-card::before { content: ""; position: absolute; width: 380px; height: 380px; right: -120px; top: -150px; border-radius: 50%; background: radial-gradient(closest-side, rgba(117, 181, 5, 0.22), transparent); }
.brand-hero-card img { width: min(520px, 100%); height: auto; position: relative; }
.brand-hero-card .dots { display: flex; gap: 10px; position: relative; }
.brand-hero-card .dots i { width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(14, 31, 16, 0.12); }
@media (max-width: 900px) { .brand-hero-grid { grid-template-columns: 1fr; } }

/* ---------- Essence ---------- */
.essence-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 20px; }
.e-card { border-radius: var(--radius); padding: 30px; background: var(--paper); border: 1px solid var(--line); }
.e-card h3 { font-size: 1.2rem; font-weight: 800; margin: 18px 0 8px; }
.e-card p { margin: 0; color: var(--ink-2); font-size: 0.97rem; }
.e-card.name { background: var(--deep); color: #fff; border-color: var(--deep); position: relative; overflow: hidden; }
.e-card.name .big { font-size: clamp(2.6rem, 5vw, 3.8rem); font-weight: 700; line-height: 1.3; margin: 0 0 8px; color: #fff; }
.e-card.name p:last-child { color: rgba(255, 255, 255, 0.86); }
.taglines { display: grid; grid-template-columns: 1.2fr 1.4fr 1fr; gap: 20px; }
.tl { border-radius: var(--radius); padding: 28px; background: var(--mist); border: 1px solid rgba(2, 97, 12, 0.14); }
.tl small { display: block; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--deep); margin-bottom: 10px; }
html[data-lang="bn"] .tl small { text-transform: none; font-size: 0.88rem; letter-spacing: 0; }
.tl p { margin: 0; font-weight: 800; font-size: 1.28rem; line-height: 1.3; letter-spacing: -0.015em; }
.tl.primary { background: var(--lime); border-color: var(--lime); }
.tl.primary small { color: var(--ink); }
.tl.primary p { font-size: 1.55rem; }
.pillars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.pillar { padding: 24px 20px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); }
.pillar h4 { font-size: 1.1rem; font-weight: 800; margin: 16px 0 6px; }
.pillar p { margin: 0; font-size: 0.9rem; color: var(--ink-2); line-height: 1.55; }
@media (max-width: 1000px) { .essence-grid { grid-template-columns: 1fr 1fr; } .e-card.name { grid-column: 1 / -1; } .taglines { grid-template-columns: 1fr; } .pillars { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .essence-grid { grid-template-columns: 1fr; } .pillars { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .pillars { grid-template-columns: 1fr; } }

/* ---------- Logo ---------- */
.anatomy { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(24px, 4vw, 56px); align-items: center; margin-bottom: 14px; }
.anat-stage { background: #fff; border: 1px solid var(--line); border-radius: 30px; padding: clamp(24px, 4vw, 48px); display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.anat-logo { position: relative; width: min(560px, 100%); }
.anat-logo img { width: 100%; height: auto; }
.pin { position: absolute; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 800; font-size: 0.8rem; display: grid; place-items: center; border: 3px solid #fff; box-shadow: 0 4px 10px -2px rgba(0, 0, 0, 0.4); }
.anat-list { counter-reset: a; display: grid; gap: 14px; list-style: none; }
.anat-list li { counter-increment: a; position: relative; padding-left: 50px; }
.anat-list li::before { content: counter(a); position: absolute; left: 0; top: 2px; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 800; font-size: 0.85rem; display: grid; place-items: center; }
.anat-list b { display: block; font-size: 1.05rem; margin-bottom: 2px; }
.anat-list span { color: var(--ink-2); font-size: 0.95rem; display: block; }
@media (max-width: 900px) { .anatomy { grid-template-columns: 1fr; } }

.logo-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.lt { margin: 0; }
.lt .stage { aspect-ratio: 16 / 10; border-radius: var(--radius); display: grid; place-items: center; padding: 8%; border: 1px solid var(--line); overflow: hidden; }
.lt .stage img { width: min(78%, 300px); height: auto; }
.lt .stage img.mark { width: 34%; }
.stage.white { background: #fff; }
.stage.deep { background: var(--deep); border-color: var(--deep); }
.stage.paper { background: var(--paper); }
.stage.mist { background: var(--mist); }
.lt figcaption { padding: 12px 4px 0; }
.lt figcaption b { display: block; font-size: 0.98rem; }
.lt figcaption span { font-size: 0.88rem; color: var(--muted); }
@media (max-width: 900px) { .logo-tiles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .logo-tiles { grid-template-columns: 1fr; } }

.space-size { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; margin-top: 56px; }
.space-size > div { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.space-size h3 { font-size: 1.2rem; font-weight: 800; margin-bottom: 8px; }
.space-size p { color: var(--ink-2); font-size: 0.95rem; }
.clear-demo { margin-top: 22px; display: grid; place-items: center; background: var(--paper); border-radius: 18px; padding: 28px 16px; }
.clear-box { position: relative; width: min(360px, 100%); padding: 12.5% ; outline: 2px dashed var(--field); background: #fff; }
.clear-box img { width: 100%; height: auto; display: block; outline: 1px solid rgba(2, 97, 12, 0.25); }
.clear-box .x { position: absolute; font-style: normal; font-weight: 800; font-size: 0.8rem; color: var(--deep); background: var(--mist-2); border-radius: 6px; display: grid; place-items: center; }
.clear-box .x.t, .clear-box .x.b { left: 50%; width: 28px; height: 22px; margin-left: -14px; }
.clear-box .x.t { top: calc(6.25% - 11px); } .clear-box .x.b { bottom: calc(6.25% - 11px); }
.clear-box .x.l, .clear-box .x.r { top: 50%; width: 22px; height: 28px; margin-top: -14px; }
.clear-box .x.l { left: calc(6.25% - 11px); } .clear-box .x.r { right: calc(6.25% - 11px); }
.ms-row { display: flex; align-items: center; gap: 20px; padding: 18px 0; border-top: 1px solid var(--line); }
.ms-row:first-of-type { margin-top: 8px; }
.ms-row img { flex: none; height: auto; }
.ms-row div { display: grid; }
.ms-row b { font-size: 0.98rem; }
.ms-note { margin: 18px 0 0; padding: 14px 16px; border-radius: 14px; background: var(--mist); color: var(--ink-2); font-size: 0.9rem; }
.ms-row span { font-size: 0.86rem; color: var(--muted); }
@media (max-width: 860px) { .space-size { grid-template-columns: 1fr; } }

.misuse { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.mu { margin: 0; }
.mu .stage { aspect-ratio: 16 / 10; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); display: grid; place-items: center; overflow: hidden; position: relative; padding: 8%; }
.mu .stage::after { content: ""; position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 50%; background: #c0392b url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7L7 17'/%3E%3C/svg%3E") center / 14px no-repeat; }
.mu .stage img { width: 62%; height: auto; }
.mu .crowd { position: absolute; left: 12%; bottom: 8%; font-weight: 800; font-size: 0.8rem; color: #02610c; background: #fff; padding: 2px 6px; }
.mu figcaption { padding: 10px 4px 0; font-size: 0.92rem; color: var(--ink-2); font-weight: 600; }
@media (max-width: 900px) { .misuse { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .misuse { grid-template-columns: 1fr; } }

/* ---------- Colour ---------- */
.swatches { display: grid; gap: 16px; }
.primary-sw { grid-template-columns: repeat(3, 1fr); }
.support-sw { grid-template-columns: repeat(5, 1fr); }
.sw { appearance: none; border: 0; text-align: left; background: var(--c); color: var(--t); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 4px; position: relative; transition: transform .18s, box-shadow .18s; font-family: inherit; line-height: 1.35; }
.sw:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.sw.big { min-height: 230px; padding: 26px; }
.sw:not(.big) { min-height: 170px; }
.sw .role { font-size: 0.78rem; font-weight: 600; margin-bottom: auto; }
.sw b { font-size: 1.12rem; margin-top: auto; }
.sw code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.95rem; font-weight: 700; }
.sw small { font-size: 0.78rem; line-height: 1.45; }
.sw:not(.big) b { margin-top: auto; }
.sw::after { content: "Copy"; position: absolute; top: 16px; right: 16px; font-size: 0.7rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: rgba(255, 255, 255, 0.22); color: inherit; opacity: 0; transition: opacity .15s; }
.sw:hover::after, .sw:focus-visible::after { opacity: 1; }
html[data-lang="bn"] .sw::after { content: "কপি"; }
.sw.big .role { margin-bottom: 40px; }
@media (max-width: 1000px) { .support-sw { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .primary-sw { grid-template-columns: 1fr; } .sw.big { min-height: 180px; } .support-sw { grid-template-columns: 1fr 1fr; } }

.prop { display: flex; height: 76px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); }
.prop i { font-style: normal; font-size: 0.78rem; font-weight: 700; color: #fff; display: grid; place-items: center; white-space: nowrap; overflow: hidden; padding: 0 6px; }

.pairs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.pair { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px 12px 12px; }
.pair .demo::before { content: attr(data-t); }
.pair .demo { width: 54px; height: 54px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 1.3rem; flex: none; border: 1px solid rgba(14, 31, 16, 0.1); }
.pair b { display: block; font-size: 0.88rem; line-height: 1.3; }
.pair small { font-size: 0.8rem; color: var(--field); font-weight: 700; }
.pair.bad small { color: #b3261e; }
@media (max-width: 1100px) { .pairs { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .pairs { grid-template-columns: 1fr; } }

/* ---------- Typography ---------- */
.fonts { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.font-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; display: grid; gap: 16px; align-content: start; }
.font-card .tag { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--deep); }
html[data-lang="bn"] .font-card .tag { text-transform: none; font-size: 0.9rem; letter-spacing: 0; }
.fname { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; }
.font-card .spec { margin: 0; }
.weights { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--ink-2); font-size: 1rem; }
.glyphs { margin: 0; font-size: 1.15rem; color: var(--muted); letter-spacing: 0.04em; word-spacing: 0.1em; }
.font-card .en { font-family: "Plus Jakarta Sans", system-ui, sans-serif; }
.font-card .bnf { font-family: "Hind Siliguri", "Plus Jakarta Sans", system-ui, sans-serif; }
.font-card .tag[lang="bn"] { font-size: 1rem; text-transform: none; letter-spacing: 0; }
@media (max-width: 860px) { .fonts { grid-template-columns: 1fr; } }
.scale { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.srow { display: grid; grid-template-columns: 190px 1fr; gap: 24px; align-items: center; padding: 20px 28px; border-top: 1px solid var(--line); }
.srow:first-child { border-top: 0; }
.srow .meta { font-weight: 700; font-size: 0.9rem; line-height: 1.4; }
.srow .meta small { color: var(--muted); font-weight: 500; }
.srow .smp { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) { .srow { grid-template-columns: 1fr; gap: 6px; padding: 18px 20px; } }

/* ---------- Voice ---------- */
.traits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 36px; }
.trait { background: #fff; border-radius: var(--radius); padding: 26px; border: 1px solid var(--line); }
.trait h3 { font-size: 1.15rem; font-weight: 800; margin: 16px 0 6px; }
.trait p { margin: 0; font-size: 0.93rem; color: var(--ink-2); }
@media (max-width: 1000px) { .traits { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .traits { grid-template-columns: 1fr; } }
.say-grid { display: grid; grid-template-columns: 1fr 1fr; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #fff; }
.say-head { display: flex; gap: 10px; align-items: center; padding: 16px 24px; font-weight: 800; color: #fff; }
.say-head.say { background: var(--deep); } .say-head.avoid { background: #8f2a22; }
.say-head .icon { width: 20px; height: 20px; }
.say-cell { padding: 16px 24px; border-top: 1px solid var(--line); font-size: 0.98rem; }
.say-cell.say { border-right: 1px solid var(--line); font-weight: 600; }
.say-cell.avoid { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(179, 38, 30, 0.55); text-decoration-thickness: 1.5px; }
@media (max-width: 560px) { .say-head, .say-cell { padding: 14px 16px; font-size: 0.92rem; } }

/* ---------- Imagery & icons ---------- */
.imagery-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.im-card { border-radius: var(--radius); border: 1px solid var(--line); background: #fff; padding: 28px; display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.im-card h3 { font-size: 1.15rem; font-weight: 800; }
.im-card p { margin: 0; font-size: 0.93rem; color: var(--ink-2); }
.avoid-note { display: flex; gap: 10px; align-items: flex-start; margin-top: auto !important; padding-top: 12px; border-top: 1px dashed var(--line-strong); color: #8f2a22 !important; }
.avoid-note .icon { margin-top: 3px; }
.im-card.illus { padding: 0; }
.im-card.illus svg { width: 100%; height: 220px; }
.im-card.illus .cap { padding: 0 28px 28px; display: grid; gap: 8px; }
.icon-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 8px; }
.icon-grid span { aspect-ratio: 1; border-radius: 14px; background: var(--mist); color: var(--deep); display: grid; place-items: center; }
.icon-grid .icon { width: 26px; height: 26px; }
@media (max-width: 1000px) { .imagery-grid { grid-template-columns: 1fr 1fr; } .im-card.illus { grid-row: span 1; } }
@media (max-width: 640px) { .imagery-grid { grid-template-columns: 1fr; } }

/* ---------- Applications ---------- */
.apps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.app-tile { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 280px; grid-column: span 2; overflow: hidden; }
.app-tile .cap { margin: 0; font-size: 0.85rem; font-weight: 700; color: var(--ink-2); }
.app-tile.og { grid-column: span 4; }
.app-tile.og img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); }
.app-tile.post { grid-column: span 2; }
.app-icons .ai-row { flex: 1; display: flex; gap: 22px; align-items: center; justify-content: center; }
.cards-mock { flex: 1; display: grid; gap: 12px; align-content: center; justify-items: center; }
.bcard { width: min(270px, 100%); aspect-ratio: 90 / 54; border-radius: 8px; box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.45); padding: 14px; position: relative; }
.bcard.front { background: #fff; display: grid; place-items: center; }
.bcard.front img { width: 62%; height: auto; }
.bcard.back { background: var(--deep); color: #fff; display: grid; align-content: end; gap: 0; }
.bcard.back b { font-size: 0.95rem; }
.bcard.back span { font-size: 0.72rem; color: var(--lime-soft); font-weight: 600; }
.bcard.back em { font-style: normal; font-size: 0.68rem; opacity: 0.8; margin-top: 8px; }
.bcard.back img { position: absolute; right: 12px; top: 12px; width: 34px; height: auto; opacity: 0.95; }
.social { position: relative; justify-content: flex-start; }
.social .cap { margin-top: auto; }
.social .cover { flex: none; height: 168px; border-radius: 14px; background: linear-gradient(135deg, var(--deep), var(--field)); display: grid; place-items: center; align-content: center; gap: 8px; padding: 16px 16px 30px; color: #fff; text-align: center; font-size: 0.76rem; font-weight: 600; }
.social .cover img { width: 120px; height: auto; }
.social .profile { display: flex; align-items: flex-end; gap: 12px; margin-top: -40px; padding-left: 14px; position: relative; }
.social .avatar-ring { width: 72px; height: 72px; flex: none; border-radius: 50%; border: 4px solid var(--paper); overflow: hidden; background: var(--deep); }
.social .who { display: grid; padding-bottom: 6px; line-height: 1.3; }
.social .who b { font-size: 0.95rem; }
.social .who small { color: var(--muted); font-size: 0.8rem; }
.social .avatar-ring img { width: 100%; height: 100%; }
.post-sq { aspect-ratio: 1; border-radius: 14px; background: linear-gradient(160deg, var(--field), var(--deep)); color: #fff; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; }
.post-sq img { width: 40px; height: auto; }
.post-sq p { margin: 0; font-weight: 800; font-size: 1.2rem; line-height: 1.25; letter-spacing: -0.015em; }
.post-sq small { font-size: 0.74rem; opacity: 0.8; }
@media (max-width: 1000px) { .apps { grid-template-columns: 1fr 1fr; } .app-tile, .app-tile.post { grid-column: span 1; } .app-tile.og { grid-column: 1 / -1; } }
@media (max-width: 600px) { .apps { grid-template-columns: 1fr; } }

/* ---------- Downloads ---------- */
.dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.dl { display: flex; align-items: center; gap: 16px; padding: 14px 18px 14px 14px; background: #fff; border: 1px solid var(--line); border-radius: 18px; text-decoration: none; color: var(--ink); transition: transform .18s, box-shadow .18s, border-color .18s; }
.dl:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: rgba(2, 97, 12, 0.3); color: var(--ink); }
.dl .th { width: 92px; height: 64px; border-radius: 12px; display: grid; place-items: center; flex: none; padding: 8px; border: 1px solid var(--line); overflow: hidden; }
.dl .th img { height: 46px; width: auto; max-width: 100%; object-fit: contain; }
.dl .th img.ico { width: 48px; height: 48px; border-radius: 10px; }
.dl .th.white { background: #fff; } .dl .th.deep { background: var(--deep); border-color: var(--deep); } .dl .th.mist { background: var(--mist); }
.dl .th.code { background: var(--mist); color: var(--deep); }
.dl .th.code .icon { width: 26px; height: 26px; }
.dl .tx { display: grid; flex: 1; min-width: 0; }
.dl .tx b { font-size: 0.97rem; line-height: 1.3; }
.dl .tx small { color: var(--muted); font-size: 0.82rem; }
.dl > .icon { color: var(--field); }
.dl.featured { background: var(--deep); color: #fff; border-color: var(--deep); }
.dl.featured .tx small { color: rgba(255, 255, 255, 0.78); }
.dl.featured > .icon { color: var(--lime); }
.dl.featured .th { background: rgba(255, 255, 255, 0.14); border-color: transparent; color: var(--lime); }
.dl.featured:hover { color: #fff; }
@media (max-width: 1000px) { .dl-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .dl-grid { grid-template-columns: 1fr; } }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 99px; font-weight: 600; font-size: 0.92rem; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 300; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
