/* ============================================================
   Brand Assets Library — page-specific styles
   Consumes tokens from main.css (:root). No new palette.
   Reuses: .container .section .section-header .btn* .section-cta .reveal
   ============================================================ */

/* Fail-safe scroll-reveal: content is visible by default and only starts
   hidden when JS is active (html.ba-js). If JS/observer never runs, nothing
   is lost. Overrides main.css's unconditional .reveal { opacity: 0 }.
   Uses the `translate` property (not `transform`) so the reveal slide-up
   composes with — rather than fights — the card's `transform` hover lift.
   The transition here also covers the hover props so hover stays smooth
   (this rule outranks .ba-card's own transition on .reveal elements). */
.reveal { opacity: 1; transform: none; }
.ba-js .reveal {
    opacity: 0;
    translate: 0 24px;
    transition: opacity 0.6s ease, translate 0.6s ease,
                transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.ba-js .reveal.visible { opacity: 1; translate: none; }
@media (max-width: 768px), (prefers-reduced-motion: reduce) {
    .ba-js .reveal { opacity: 1; translate: none; transition: none; }
}

/* Local, page-scoped helpers (not part of the global system) */
.ba {
    --ba-danger: #E5484D;               /* red for "Don't" rules — no global red token */
    --ba-danger-soft: #FDECEC;
    --ba-success-soft: #E7F7EF;
    --ba-preview-bg: linear-gradient(135deg, #F4F5FF 0%, #FFFFFF 100%);
    --ba-preview-dark: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-darkest) 100%);
    --ba-card-border: 1px solid rgba(119, 82, 254, 0.12);
    --ba-card-shadow: 0 10px 30px rgba(16, 24, 40, 0.05);
    --ba-card-shadow-hover: 0 20px 48px rgba(119, 82, 254, 0.15);
}

/* ------------------------------------------------------------
   HERO + SLIDER
   ------------------------------------------------------------ */
.ba-hero {
    background: linear-gradient(180deg, var(--bg-light-purple) 0%, var(--bg-lavender) 100%);
    padding: 120px 0 var(--space-xxl);
    overflow: hidden;
}

.ba-hero__container {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: var(--space-xl);
    align-items: center;
}

.ba-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    margin-bottom: var(--space-md);
    transition: color 0.2s ease;
}

.ba-hero__eyebrow:hover { color: var(--color-primary-dark); }

.ba-hero__title {
    font-size: clamp(2.25rem, 5vw, 3.25rem);
    line-height: 1.1;
    margin-bottom: var(--space-md);
}

.ba-hero__title .text-gradient { display: inline-block; }

.ba-hero__desc {
    font-size: 1.125rem;
    line-height: 1.6;
    max-width: 46ch;
    margin-bottom: var(--space-lg);
}

.ba-hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

/* ------------------------------------------------------------
   SHARED CARD GRID (logos + graphics)
   ------------------------------------------------------------ */
.ba-grid {
    display: grid;
    gap: var(--space-lg);
}

.ba-grid--logos {
    grid-template-columns: repeat(4, 1fr);
}

.ba-grid--graphics {
    grid-template-columns: repeat(2, 1fr);
}

.ba-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-white);
    border: var(--ba-card-border);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    box-shadow: var(--ba-card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.ba-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--ba-card-shadow-hover);
    border-color: rgba(119, 82, 254, 0.25);
}

.ba-card__preview {
    display: grid;
    place-items: center;
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    background: var(--ba-preview-bg);
    border: 1px dashed rgba(119, 82, 254, 0.18);
    margin-bottom: var(--space-md);
    min-height: 132px;
}

.ba-card__preview--dark {
    background: var(--ba-preview-dark);
    border-color: transparent;
}

.ba-card__preview img {
    max-width: 100%;
    max-height: 72px;
    height: auto;
    width: auto;
}

.ba-card__title {
    font-size: 1.0625rem;
    margin-bottom: 6px;
}

.ba-card__desc {
    font-size: 0.9rem;
    line-height: 1.55;
    margin-bottom: var(--space-md);
}

/* Pills / tags ------------------------------------------------ */
.ba-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: var(--space-md);
}

.ba-pill {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--color-primary);
    background: var(--bg-soft-purple);
    border-radius: 100px;
    padding: 5px 10px;
}

/* Card actions (download buttons) ----------------------------- */
.ba-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: auto;
}

.ba-btn-download {
    flex: 1 1 auto;
    justify-content: center;
    white-space: nowrap;
}

/* ------------------------------------------------------------
   GRAPHIC CARDS
   ------------------------------------------------------------ */
.ba-graphic-card__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-sm);
    margin-bottom: 6px;
}

.ba-size-badge {
    flex: none;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-primary);
    background: var(--bg-soft-purple);
    border-radius: 100px;
    padding: 4px 12px;
}

.ba-use-list {
    list-style: none;
    margin: 0 0 var(--space-md);
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ba-use-list li {
    font-size: 0.78rem;
    color: var(--text-secondary);
    background: var(--bg-light-purple);
    border-radius: 8px;
    padding: 4px 10px;
}

.ba-variants {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--space-sm);
}

.ba-variant {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--space-sm);
    background: var(--bg-white);
}

.ba-variant__preview {
    display: grid;
    place-items: center;
    background: var(--ba-preview-bg);
    border-radius: var(--radius-sm);
    padding: var(--space-sm);
    margin-bottom: var(--space-sm);
    overflow: hidden;
    min-height: 96px;
    flex: 1 1 auto;
}

.ba-variant__preview img {
    max-width: 100%;
    max-height: 130px;
    width: auto;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(16, 24, 40, 0.08);
}

/* square sizes get a touch more room */
.ba-variant__preview--square img { max-height: 160px; }
.ba-variant__preview--compact img { max-height: 100px; }

.ba-variant .ba-btn-download {
    font-size: 0.8rem;
    padding: 8px 12px;
}

/* ------------------------------------------------------------
   BRAND RULES (Do / Don't)
   A "brand-book spread": two verdict cards, each with a tinted
   letterhead wash, a rounded chip mark, spec-line rules and a
   ghosted watermark glyph that states the verdict at a glance.
   ------------------------------------------------------------ */
.ba-rules {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    max-width: 940px;
    margin: 0 auto;
}

.ba-rule-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    border: 1px solid transparent;
    box-shadow: var(--ba-card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Verdict wash: accent tint at the top fading into white — a printed
   letterhead, not a flat-filled card. */
.ba-rule-card--do {
    background: linear-gradient(180deg, rgba(66, 189, 136, 0.10) 0%, rgba(66, 189, 136, 0.02) 130px, #fff 300px);
    border-color: rgba(66, 189, 136, 0.30);
}
.ba-rule-card--dont {
    background: linear-gradient(180deg, rgba(229, 72, 77, 0.09) 0%, rgba(229, 72, 77, 0.02) 130px, #fff 300px);
    border-color: rgba(229, 72, 77, 0.24);
}

/* Top hairline accent */
.ba-rule-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
}
.ba-rule-card--do::before { background: linear-gradient(90deg, var(--color-success), rgba(66, 189, 136, 0)); }
.ba-rule-card--dont::before { background: linear-gradient(90deg, var(--ba-danger), rgba(229, 72, 77, 0)); }

/* Signature: oversized ghost glyph anchored to the corner. Sits above
   the card background but behind the content (isolate + z-index:-1). */
.ba-rule-card::after {
    content: "";
    position: absolute;
    right: -22px;
    bottom: -30px;
    width: 190px;
    height: 190px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.07;
    z-index: -1;
    pointer-events: none;
}
.ba-rule-card--do::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2342BD88' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}
.ba-rule-card--dont::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E5484D' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E");
}

.ba-rule-card:hover { transform: translateY(-4px); }
.ba-rule-card--do:hover { box-shadow: 0 22px 46px rgba(66, 189, 136, 0.18); }
.ba-rule-card--dont:hover { box-shadow: 0 22px 46px rgba(229, 72, 77, 0.16); }

/* --- Card header --- */
.ba-rule-card__head {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.ba-rule-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    color: #fff;
}
.ba-rule-icon svg { width: 24px; height: 24px; }

.ba-rule-card--do .ba-rule-icon {
    background: linear-gradient(135deg, var(--color-success) 0%, var(--color-success-dark) 100%);
    box-shadow: 0 8px 18px rgba(66, 189, 136, 0.35);
}
.ba-rule-card--dont .ba-rule-icon {
    background: linear-gradient(135deg, #FF6B6F 0%, var(--ba-danger) 100%);
    box-shadow: 0 8px 18px rgba(229, 72, 77, 0.30);
}

.ba-rule-card__eyebrow {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.ba-rule-card--do .ba-rule-card__eyebrow { color: var(--color-success-dark); }
.ba-rule-card--dont .ba-rule-card__eyebrow { color: var(--ba-danger); }

.ba-rule-card__title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin: 2px 0 0;
}

/* --- Spec-line rules --- */
.ba-rule-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ba-rule-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.ba-rule-card--do .ba-rule-list li { border-color: rgba(66, 189, 136, 0.20); }
.ba-rule-card--dont .ba-rule-list li { border-color: rgba(229, 72, 77, 0.16); }

.ba-rule-card--do .ba-rule-list li:hover {
    transform: translateX(3px);
    background: #fff;
    border-color: rgba(66, 189, 136, 0.45);
}
.ba-rule-card--dont .ba-rule-list li:hover {
    transform: translateX(3px);
    background: #fff;
    border-color: rgba(229, 72, 77, 0.40);
}

.ba-rule-list li::before {
    content: "";
    flex: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 13px;
}

.ba-rule-card--do .ba-rule-list li::before {
    background-color: var(--ba-success-soft);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2342BD88' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}

.ba-rule-card--dont .ba-rule-list li::before {
    background-color: var(--ba-danger-soft);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E5484D' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E");
}

/* ------------------------------------------------------------
   FINAL CTA extras (reuses .section-cta / .cta-content)
   ------------------------------------------------------------ */
.ba-cta-note {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.65);
    margin-top: var(--space-md);
}

/* ------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------ */
@media (max-width: 1024px) {
    .ba-grid--logos { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .ba-hero { padding: 104px 0 var(--space-xl); }
    /* minmax(0, 1fr) — not plain 1fr — so the column can shrink below its
       content's min-content and the roadmap filmstrip scrolls instead of
       widening the page. */
    .ba-hero__container { grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); }
    .ba-grid--graphics { grid-template-columns: 1fr; }
    .ba-rules { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .ba-grid--logos { grid-template-columns: 1fr; }
    /* Large download/CTA buttons (all .btn-lg on this page): full-width and
       wrapping so long labels — e.g. "Download Logo Pack (.zip)" and
       "Download Complete Asset Pack (.zip)" — fit without overflowing, down
       to a 320px viewport. Trim the btn-lg side padding and let text wrap. */
    .btn-lg {
        width: 100%;
        justify-content: center;
        white-space: normal;
        text-align: center;
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }
    .btn-lg svg { flex: none; }
}
