/* ==========================================================
   Projects hub (/projects) and brand brief pages (/projects/*)
   ========================================================== */
:root {
    --es-teal:   #1e4b4d;
    --es-navy:   #0f2d3d;
    --es-dark:   #0d1f20;
    --es-accent: #2eb8c2;
    --es-gray:   #f4f6f7;
}

body.es-projects { font-family: 'Montserrat', sans-serif; overflow-x: hidden; background: #fff; }

/* ── Shared labels ── */
.pj-eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--es-accent);
    margin-bottom: 14px;
}
.pj-title {
    font-weight: 900;
    font-size: clamp(1.9rem, 4vw, 3rem);
    letter-spacing: -0.8px;
    line-height: 1.08;
    color: var(--es-dark);
    margin-bottom: 16px;
}
.pj-divider { width: 48px; height: 4px; background: var(--es-teal); border-radius: 2px; margin: 0 0 28px; }
.pj-lead { font-size: 1.05rem; line-height: 1.8; color: #4a5658; max-width: 640px; }
.pj-section { padding: 96px 0; }
.pj-section-dark { background: var(--es-dark); color: #fff; }
.pj-section-dark .pj-title { color: #fff; }
.pj-section-dark .pj-lead { color: rgba(255,255,255,0.65); }
.pj-section-gray { background: var(--es-gray); }

.pj-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 26px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: transform 0.2s, background 0.2s, border-color 0.2s, color 0.2s;
    border: 1px solid transparent;
}
.pj-btn:hover { transform: translateY(-2px); }
.pj-btn-primary { background: var(--es-accent); border-color: var(--es-accent); color: #fff; }
.pj-btn-primary:hover { background: #26a3ac; color: #fff; }
.pj-btn-ghost { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.22); color: #fff; }
.pj-btn-ghost:hover { background: rgba(255,255,255,0.16); color: #fff; }
.pj-btn-dark { background: var(--es-teal); border-color: var(--es-teal); color: #fff; }
.pj-btn-dark:hover { background: var(--es-accent); border-color: var(--es-accent); color: #fff; }
.pj-btn-disabled { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.14); color: rgba(255,255,255,0.55); cursor: default; }
.pj-btn-disabled:hover { transform: none; }

/* ── Brand grid (hub) ── */
.pj-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.pj-card {
    display: flex;
    flex-direction: column;
    border-radius: 22px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e6eaeb;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s cubic-bezier(.34,1.56,.64,1), box-shadow 0.25s ease;
}
.pj-card:hover { transform: translateY(-8px); box-shadow: 0 24px 54px var(--glow, rgba(0,0,0,0.15)); color: inherit; }
.pj-card-art {
    aspect-ratio: 16 / 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-bg, #000);
    padding: 36px;
    position: relative;
    overflow: hidden;
}
.pj-card-art img { max-width: 70%; max-height: 100%; object-fit: contain; transition: transform 0.4s ease; }
.pj-card-art .pj-logo-circle { width: 58%; max-width: 220px; aspect-ratio: 1; border-radius: 50%; overflow: hidden; box-shadow: 0 12px 30px rgba(0,0,0,0.2); }
.pj-card-art .pj-logo-circle img { width: 100%; height: 100%; max-width: none; object-fit: cover; }
.pj-card:hover .pj-card-art img { transform: scale(1.05); }
.pj-card-status {
    position: absolute;
    top: 18px;
    left: 18px;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 50px;
}
.pj-card-body { padding: 28px 30px 30px; display: flex; flex-direction: column; flex: 1; }
.pj-card-cat { font-size: 0.7rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: #7a8789; margin-bottom: 8px; }
.pj-card-body h3 { font-weight: 800; font-size: 1.55rem; color: var(--es-dark); margin-bottom: 10px; }
.pj-card-body p { font-size: 1rem; line-height: 1.7; color: #4a5658; margin-bottom: 22px; }
.pj-card-link { margin-top: auto; font-weight: 700; font-size: 1rem; color: var(--es-teal); display: inline-flex; align-items: center; gap: 8px; }
.pj-card-link i { transition: transform 0.2s; }
.pj-card:hover .pj-card-link { color: var(--es-accent); }
.pj-card:hover .pj-card-link i { transform: translateX(4px); }

/* ── Process strip (hub) ── */
.pj-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; counter-reset: step; }
.pj-step {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 18px;
    padding: 28px 24px;
}
.pj-step-num { font-size: 0.75rem; font-weight: 800; letter-spacing: 2px; color: var(--es-accent); margin-bottom: 14px; }
.pj-step h4 { color: #fff; font-weight: 800; font-size: 1.1rem; margin-bottom: 8px; }
.pj-step p { color: rgba(255,255,255,0.62); font-size: 1rem; line-height: 1.7; margin: 0; }

/* ── CTA band ── */
.pj-cta {
    background: linear-gradient(135deg, var(--es-teal) 0%, var(--es-navy) 100%);
    border-radius: 26px;
    padding: 64px 48px;
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.pj-cta h2 { color: #fff; font-weight: 900; font-size: clamp(1.7rem, 3.5vw, 2.5rem); margin-bottom: 14px; }
.pj-cta p { color: rgba(255,255,255,0.72); max-width: 560px; margin: 0 auto 28px; line-height: 1.8; }

/* ==========================================================
   Brand brief pages
   ========================================================== */

.bp-hero { background: var(--es-dark); color: #fff; }
.bp-hero .row { min-height: 560px; }
.bp-hero-text { padding: 80px 48px 80px 0; }
.bp-hero-tag {
    display: inline-block;
    background: var(--brand-accent);
    color: var(--brand-accent-ink, #fff);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 50px;
    margin-bottom: 22px;
}
.bp-hero h1 { color: #fff; font-weight: 900; font-size: clamp(2.6rem, 6vw, 4.6rem); letter-spacing: -1.5px; line-height: 1.02; margin-bottom: 18px; }
.bp-hero-tagline { font-size: clamp(1.1rem, 2vw, 1.35rem); font-weight: 600; color: rgba(255,255,255,0.88); line-height: 1.5; margin-bottom: 18px; }
.bp-hero-intro { color: rgba(255,255,255,0.62); line-height: 1.8; margin-bottom: 32px; max-width: 540px; }
.bp-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.bp-hero-art {
    background: var(--brand-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px;
    height: 100%;
    position: relative;
    overflow: hidden;
}
.bp-hero-art img { max-width: 78%; max-height: 420px; object-fit: contain; position: relative; }
.bp-hero-art .pj-logo-circle { width: 70%; max-width: 340px; aspect-ratio: 1; border-radius: 50%; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,0.25); position: relative; }
.bp-hero-art .pj-logo-circle img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; }

/* At a glance */
.bp-glance { background: #0a1819; border-top: 1px solid rgba(255,255,255,0.06); }
.bp-glance-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bp-glance-item { padding: 28px 24px; border-right: 1px solid rgba(255,255,255,0.08); }
.bp-glance-item:last-child { border-right: 0; }
.bp-glance-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--brand-accent-on-dark, var(--es-accent)); margin-bottom: 8px; }
.bp-glance-value { color: #fff; font-weight: 600; font-size: 1rem; line-height: 1.5; }

/* Brief body */
.bp-brief { padding: 100px 0; }
.bp-toc { position: sticky; top: 110px; }
.bp-toc-title { font-size: 0.72rem; font-weight: 800; letter-spacing: 2.5px; text-transform: uppercase; color: #7a8789; margin-bottom: 16px; }
.bp-toc a {
    display: flex;
    gap: 12px;
    align-items: baseline;
    padding: 9px 0 9px 14px;
    border-left: 2px solid #e2e7e8;
    color: #4a5658;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.2s, border-color 0.2s;
}
.bp-toc a small { font-size: 0.7rem; font-weight: 800; color: #9aa5a7; letter-spacing: 1px; }
.bp-toc a:hover, .bp-toc a.active { color: var(--es-dark); border-left-color: var(--brand-line, var(--es-accent)); }
.bp-toc a.active small { color: var(--brand-line, var(--es-accent)); }

.bp-block { padding-bottom: 56px; margin-bottom: 56px; border-bottom: 1px solid #e8eced; scroll-margin-top: 100px; }
.bp-block:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.bp-block-num { font-size: 0.75rem; font-weight: 800; letter-spacing: 2.5px; text-transform: uppercase; color: var(--brand-line, var(--es-accent)); margin-bottom: 10px; }
.bp-block h2 { font-weight: 800; font-size: clamp(1.5rem, 2.6vw, 2rem); color: var(--es-dark); margin-bottom: 18px; letter-spacing: -0.4px; }
.bp-block p { font-size: 1.04rem; line-height: 1.85; color: #3d4749; }
.bp-block ul { padding-left: 0; list-style: none; margin: 0; }
.bp-block li { position: relative; padding-left: 30px; margin-bottom: 14px; font-size: 1.02rem; line-height: 1.75; color: #3d4749; }
.bp-block li::before {
    content: '';
    position: absolute;
    left: 0; top: 10px;
    width: 14px; height: 4px;
    border-radius: 2px;
    background: var(--brand-line, var(--es-accent));
}
.bp-quote {
    font-size: clamp(1.35rem, 2.6vw, 1.85rem);
    font-weight: 800;
    line-height: 1.4;
    color: var(--es-dark);
    border-left: 5px solid var(--brand-line, var(--es-accent));
    padding: 6px 0 6px 26px;
    margin: 0 0 22px;
    letter-spacing: -0.3px;
}
.bp-audience { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 8px; }
.bp-audience-card { background: var(--es-gray); border-radius: 16px; padding: 24px; }
.bp-audience-card h3 { font-size: 0.72rem; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: #7a8789; margin-bottom: 8px; }
.bp-audience-card h4 { font-size: 1.08rem; font-weight: 800; color: var(--es-dark); margin-bottom: 8px; }
.bp-audience-card p { font-size: 1rem; line-height: 1.7; margin: 0; }
.bp-pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 8px; }
.bp-pillar { border: 1px solid #e2e7e8; border-radius: 16px; padding: 22px; }
.bp-pillar i { font-size: 1.4rem; color: var(--brand-line, var(--es-accent)); display: block; margin-bottom: 12px; }
.bp-pillar h4 { font-size: 1rem; font-weight: 800; color: var(--es-dark); margin-bottom: 6px; }
.bp-pillar p { font-size: 1rem; line-height: 1.65; margin: 0; }

/* Identity */
.bp-identity-logo {
    background: var(--brand-bg);
    border-radius: 22px;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    height: 100%;
}
.bp-identity-logo img { max-width: 75%; max-height: 260px; object-fit: contain; }
.bp-identity-logo .pj-logo-circle { width: 60%; max-width: 240px; aspect-ratio: 1; border-radius: 50%; overflow: hidden; }
.bp-identity-logo .pj-logo-circle img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; }
.bp-swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 26px; }
.bp-swatch { background: #fff; border: 1px solid #e2e7e8; border-radius: 14px; overflow: hidden; }
.bp-swatch-chip { height: 86px; border-bottom: 1px solid #e2e7e8; }
.bp-swatch-meta { padding: 12px 14px; }
.bp-swatch-meta div { font-size: 0.7rem; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: #7a8789; margin-bottom: 2px; }
.bp-swatch-meta code { font-size: 1rem; color: var(--es-dark); }
.bp-identity-notes p { font-size: 1rem; line-height: 1.8; color: #3d4749; }

/* More brands */
.bp-more { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.bp-more .pj-card-art { aspect-ratio: 4 / 3; padding: 28px; }
.bp-more .pj-card-body { padding: 22px 24px 24px; }
.bp-more .pj-card-body h3 { font-size: 1.2rem; margin-bottom: 14px; }

/* Back to top (matches about page) */
.back-to-top {
    position: fixed; bottom: 30px; right: 30px;
    width: 44px; height: 44px;
    background: var(--es-teal); color: #fff;
    border-radius: 50%; display: flex;
    align-items: center; justify-content: center;
    text-decoration: none; z-index: 999;
    opacity: 0; transition: opacity 0.3s, transform 0.3s;
    transform: translateY(10px);
}
.back-to-top.show { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: var(--es-accent); color: #fff; }
.footer-bg { background-color: #224B4D !important; }
.btn-link { text-decoration: none; display: block; text-align: left; padding: 3px 0; }

/* ── Responsive ── */
@media (max-width: 991px) {
    .pj-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bp-hero .row { min-height: 0; }
    .bp-hero-text { padding: 56px 12px 48px; }
    .bp-hero-art { min-height: 340px; padding: 44px; }
    .bp-glance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bp-glance-item:nth-child(2) { border-right: 0; }
    .bp-glance-item:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,0.08); }
    .bp-toc { position: static; margin-bottom: 40px; }
    .bp-more { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bp-pillars { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
    .pj-section { padding: 68px 0; }
    .pj-grid { grid-template-columns: 1fr; gap: 20px; }
    .pj-card-body { padding: 22px 22px 24px; }
    .pj-steps { grid-template-columns: 1fr; }
    .pj-cta { padding: 48px 24px; }
    .bp-brief { padding: 64px 0; }
    .bp-audience { grid-template-columns: 1fr; }
    .bp-more { grid-template-columns: 1fr; }
    .bp-toc { display: none; }
}

.es-main :is(h1, h2, h3, h4) { font-family: 'Montserrat', sans-serif; }

/* ==========================================================
   Newsletter bar (sits above the footer, same teal as footer)
   ========================================================== */
.es-newsletter { background: #224B4D; color: #fff; padding: 10px 0 0; }
.es-newsletter__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.es-newsletter h2 {
    font-family: 'Montserrat', sans-serif;
    color: #fff;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0;
    margin: 0 0 6px;
}
.es-newsletter p { color: rgba(255,255,255,0.62); font-size: 1rem; line-height: 1.6; margin: 0; }
.es-newsletter__form { display: flex; gap: 10px; flex: 0 1 420px; }
.es-newsletter__form input {
    flex: 1;
    min-width: 0;
    height: 44px;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    padding: 0 14px;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}
.es-newsletter__form input::placeholder { color: rgba(255,255,255,0.45); }
.es-newsletter__form input:focus { border-color: var(--es-accent); background: rgba(0,0,0,0.28); }
.es-newsletter__form button {
    height: 44px;
    background: var(--es-accent);
    color: #fff;
    border: 0;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    padding: 0 20px;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s;
}
.es-newsletter__form button:hover { background: #26a3ac; }
.es-newsletter__form button:disabled { opacity: 0.7; cursor: default; }
.es-newsletter__msg { flex-basis: 100%; text-align: right; font-size: 1rem; color: var(--es-accent); margin: -6px 0 0; }
.es-newsletter__msg:empty { display: none; }
/* The footer below already has generous padding; tighten the gap under the bar */
.es-newsletter + .es-footer-wrap .footer { padding-top: 1rem !important; }
@media (max-width: 767px) {
    .es-newsletter__inner { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 14px; }
    .es-newsletter__form { flex: none; }
    .es-newsletter__msg { text-align: left; }
}

/* ── Category cards (/brands and category pages) ── */
.pj-cat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.pj-cat-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pj-card-art--photo { padding: 0; }
.pj-card-art--photo img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; }
.pj-card-art--photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(5,14,16,0.75) 0%, rgba(5,14,16,0.1) 60%); }
.pj-cat-name { position: absolute; left: 24px; bottom: 18px; z-index: 1; color: #fff; font-family: 'Montserrat', sans-serif; font-weight: 900; font-size: 1.7rem; letter-spacing: -0.5px; }
.pj-cat-card .pj-card-body p { margin-bottom: 18px; }
.pj-video { position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #000; box-shadow: 0 18px 44px rgba(13,31,32,0.15); }
.pj-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pj-subtitle { font-weight: 800; font-size: clamp(1.4rem, 2.4vw, 1.9rem); color: var(--es-dark); margin-bottom: 12px; }
.pj-section.pb-0 { padding-bottom: 0; }

/* Brief hero: status + category link */
.bp-hero-tags { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 22px; }
.bp-hero-tags .bp-hero-tag { margin-bottom: 0; }
.bp-hero-cat {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.68rem; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase;
    color: #fff; text-decoration: none;
    padding: 5px 14px; border-radius: 50px; border: 1px solid rgba(255,255,255,0.3);
    transition: background 0.2s, border-color 0.2s;
}
.bp-hero-cat:hover { background: rgba(255,255,255,0.1); border-color: #fff; color: #fff; }

@media (max-width: 991px) {
    .pj-cat-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767px) {
    .pj-cat-grid, .pj-cat-grid--two { grid-template-columns: 1fr; gap: 20px; }
}

/* SVG logos have a small built-in size, so give them a width */
.pj-card-art img[src$=".svg"] { width: 72%; height: auto; }
/* Stacked "Best of" wordmarks: keep them inside the card art */
.pj-card-art img[src*="wordmark"] { width: auto; max-width: 64%; max-height: 66%; }
/* Brand cards with artwork: no dark tint (that's for category cards), badge stays on top */
.pj-card:not(.pj-cat-card) .pj-card-art--photo::after { display: none; }
.pj-card-art--photo .pj-card-status { z-index: 2; }
