/* ===================================================================
   Service packages page: branding (/ae-ar/services/branding-packages/)

   Loaded after css/pages/service-packages.css on this page only. Prefix `pp-br-`.
   - Hero variant brand-sheet  (sections/hero/brand-sheet.php)
   - Deliverables ladder       (sections/custom/br-deliverables.php)
   =================================================================== */

/* ---------- Hero: identity sheet ---------- */

/* Frame, tilt and stacking come from the shared .pp-hero-card / .pp-hero-card--tilt. */
.pp-br-sheet {
    --pp-hero-card-pad: 18px;
    --pp-hero-card-pad-sm: 12px;
}

.pp-br-sheet__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 2px 4px 14px;
}

.pp-br-sheet__title {
    font-weight: 800;
    font-size: 1rem;
    color: var(--white);
}

.pp-br-sheet__badge {
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px dashed var(--white-30);
    color: var(--brand-gold);
    font-size: 0.74rem;
    font-weight: 700;
    white-space: nowrap;
}

/* The sheet itself: a white page with four panels. */
.pp-br-sheet__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    grid-template-areas:
        "logo colors"
        "type rules";
    gap: 1px;
    overflow: hidden;
    border-radius: 12px;
    background: var(--border-soft);
    color: var(--text-deep);
}

.pp-br-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    padding: 16px;
    background: var(--white);
}

.pp-br-panel--logo { grid-area: logo; }
.pp-br-panel--colors { grid-area: colors; }
.pp-br-panel--type { grid-area: type; }
.pp-br-panel--rules { grid-area: rules; background: var(--surface-5); }

.pp-br-panel__label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--text-muted-3);
}

/* Logo panel: abstract mark inside a dashed clear-space frame. */
.pp-br-logo {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pp-br-logo__space {
    display: grid;
    place-items: center;
    padding: 14px;
    border: 1.5px dashed var(--primary-bright-alpha-50);
    border-radius: 14px;
}

.pp-br-mark {
    position: relative;
    display: block;
    width: 92px;
    height: 92px;
    border-radius: 18px;
    background: var(--brand-ink);
    overflow: hidden;
}

.pp-br-mark__circle {
    position: absolute;
    inset: 18px;
    border-radius: 50%;
    border: 7px solid var(--brand-primary-bright);
}

.pp-br-mark__square {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    background: var(--brand-primary-bright);
    transform: translate(-50%, -50%) rotate(45deg);
    mix-blend-mode: screen;
    box-shadow: 0 0 0 5px var(--brand-ink);
}

.pp-br-mark__dot {
    position: absolute;
    top: 14px;
    inset-inline-start: 14px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--brand-gold);
}

.pp-br-logo__caption {
    font-size: 0.74rem;
    color: var(--text-muted-4);
}

/* Colour swatches. */
.pp-br-swatches {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pp-br-swatch {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 8px;
    align-items: center;
    animation: pp-br-pop 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    animation-delay: calc(0.35s + var(--pp-br-i, 0) * 110ms);
}

.pp-br-swatch__chip {
    grid-row: 1 / 3;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--pp-br-swatch, var(--brand-ink));
    box-shadow: inset 0 0 0 1px var(--brand-ink-alpha-12);
}

.pp-br-swatch__name {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--brand-ink);
    line-height: 1.3;
}

.pp-br-swatch__hex {
    font-size: 0.7rem;
    color: var(--text-muted-3);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    text-align: end;
    line-height: 1.3;
}

@keyframes pp-br-pop {
    from { opacity: 0; transform: translateY(6px) scale(0.96); }
    to { opacity: 1; transform: none; }
}

/* Type sample. */
.pp-br-type {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.pp-br-type__latin {
    font-size: 3.4rem;
    font-weight: 800;
    line-height: 0.9;
    color: var(--brand-ink);
}

.pp-br-type__arabic {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.25;
    color: var(--brand-ink);
}

.pp-br-type__arabic b {
    font-size: 1.35rem;
    font-weight: 800;
}

.pp-br-type__arabic span {
    font-size: 1.05rem;
    font-weight: 400;
    color: var(--text-muted-2);
}

.pp-br-type__caption {
    padding-top: 8px;
    border-top: 1px solid var(--border-soft);
    font-size: 0.74rem;
    color: var(--text-muted-4);
}

/* Usage rules. */
.pp-br-rules {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pp-br-rule {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--text-muted-2);
}

.pp-br-rule__icon {
    flex-shrink: 0;
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    border-radius: 50%;
    background: var(--brand-success);
    color: var(--white);
    font-size: 0.62rem;
    font-weight: 800;
}

.pp-br-rule--no .pp-br-rule__icon {
    background: var(--brand-danger);
}

/* ---------- Deliverables ladder ---------- */

.pp-br-deliver {
    padding: 80px 0;
    background:
        linear-gradient(180deg, var(--white) 0%, var(--surface-5) 100%);
}

.pp-br-ladder {
    display: grid;
    grid-template-columns: repeat(var(--pp-br-tiers, 3), minmax(0, 1fr));
    align-items: start;
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pp-br-tier {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px 22px 22px;
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    background: var(--white);
    box-shadow: 0 10px 28px var(--shadow-05);
    /* Each tier sits higher than the one before: the page reads as a ladder. */
    margin-top: calc((var(--pp-br-tiers, 3) - 1 - var(--pp-br-step, 0)) * 34px);
}

.pp-br-tier::before {
    content: "";
    position: absolute;
    top: -1px;
    inset-inline: 22px;
    height: 4px;
    border-radius: 0 0 4px 4px;
    background: var(--brand-primary-bright);
    opacity: calc(0.45 + var(--pp-br-step, 0) * 0.275);
}

.pp-br-tier--popular {
    border-color: var(--primary-bright-alpha-50);
    box-shadow: 0 16px 36px var(--primary-bright-alpha-15);
}

.pp-br-tier__head {
    display: grid;
    gap: 6px;
    padding-bottom: 14px;
    border-bottom: 1px dashed var(--border-strong);
}

.pp-br-tier__level {
    display: inline-flex;
    gap: 4px;
    justify-self: start;
}

.pp-br-tier__level i {
    display: block;
    width: 18px;
    height: 6px;
    border-radius: 3px;
    background: var(--border-soft);
}

.pp-br-tier__level i.is-on {
    background: var(--brand-ink);
}

.pp-br-tier__heading {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--brand-ink);
}

.pp-br-tier__meta {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--pp-accent-text);
}

.pp-br-files {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pp-br-file {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

/* A folded-corner document icon, pure CSS. */
.pp-br-file__icon {
    position: relative;
    flex-shrink: 0;
    width: 30px;
    height: 36px;
    margin-top: 2px;
    border-radius: 5px 12px 5px 5px;
    background: var(--primary-bright-alpha-12);
    border: 1.5px solid var(--brand-primary-bright);
}

.pp-br-file__icon::after {
    content: "";
    position: absolute;
    inset-inline: 6px;
    top: 12px;
    height: 10px;
    border-top: 2px solid var(--pp-accent-text);
    border-bottom: 2px solid var(--primary-bright-alpha-50);
}

.pp-br-file__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pp-br-file__body strong {
    font-size: 0.98rem;
    color: var(--brand-ink);
}

.pp-br-file__body span {
    font-size: 0.88rem;
    line-height: 1.75;
    color: var(--text-muted-2);
}

.pp-br-deliver__note {
    margin: 28px auto 0;
    max-width: 640px;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted-3);
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
    .pp-br-ladder {
        grid-template-columns: 1fr;
        max-width: 620px;
        margin-inline: auto;
        gap: 14px;
    }

    .pp-br-tier {
        margin-top: 0;
    }
}

@media (max-width: 768px) {
    .pp-br-sheet__bar {
        flex-wrap: wrap;
        padding-bottom: 10px;
    }

    .pp-br-sheet__badge {
        font-size: 0.68rem;
        white-space: normal;
    }

    /* Logo and colours side by side, the type sample under them; rules drop to keep it short. */
    .pp-br-sheet__grid {
        grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
        grid-template-areas:
            "logo colors"
            "type type";
    }

    .pp-br-panel--rules {
        display: none;
    }

    .pp-br-panel {
        padding: 12px;
        gap: 8px;
    }

    .pp-br-logo__space {
        padding: 8px;
    }

    .pp-br-mark {
        width: 64px;
        height: 64px;
        border-radius: 14px;
    }

    .pp-br-mark__circle {
        inset: 12px;
        border-width: 5px;
    }

    .pp-br-mark__square {
        width: 20px;
        height: 20px;
        box-shadow: 0 0 0 4px var(--brand-ink);
    }

    .pp-br-mark__dot {
        top: 9px;
        width: 9px;
        height: 9px;
        inset-inline-start: 9px;
    }

    .pp-br-swatches {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .pp-br-swatch__chip {
        width: 26px;
        height: 26px;
        border-radius: 7px;
    }

    .pp-br-swatch__name {
        font-size: 0.74rem;
    }

    .pp-br-swatch__hex {
        font-size: 0.64rem;
    }

    .pp-br-type {
        align-items: center;
    }

    .pp-br-type__latin {
        font-size: 2.4rem;
    }

    .pp-br-type__caption {
        padding-top: 6px;
    }

    .pp-br-deliver {
        padding: 48px 0;
    }

    .pp-br-tier {
        padding: 20px 18px 18px;
        gap: 12px;
    }

    .pp-br-deliver__note {
        margin-top: 20px;
        text-align: start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pp-br-swatch {
        animation: none;
    }
}
