/* Brand identity portfolio. Each case study takes the client's own palette
   through --case-* custom properties set inline on its section. */

.brand-portfolio-page {
  background: var(--paper);
}

.brand-portfolio-page .site-header {
  background: rgba(244, 241, 233, 0.94);
}

/* Hero */
.bp-hero {
  padding-block: clamp(140px, 14vw, 196px) clamp(64px, 8vw, 110px);
}

.bp-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  align-items: end;
  gap: clamp(36px, 7vw, 104px);
  margin-top: clamp(30px, 5vw, 64px);
}

.bp-hero h1 {
  max-width: 15ch;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.9rem, 6.6vw, 6.4rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.bp-hero-intro > p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  line-height: 1.7;
}

.bp-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  margin-top: 32px;
}

.bp-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

.bp-link:hover,
.bp-link:focus-visible {
  color: var(--accent-strong);
}

.bp-hero-plate {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: clamp(10px, 1.4vw, 18px);
  margin: clamp(56px, 8vw, 96px) 0 0;
}

.bp-hero-plate figure {
  margin: 0;
}

.bp-hero-plate img {
  display: block;
  width: 100%;
  height: clamp(240px, 34vw, 480px);
  object-fit: cover;
  border-radius: 4px;
}

@media (max-width: 640px) {
  .bp-hero-plate {
    grid-template-columns: 1fr 1fr;
  }

  .bp-hero-plate figure:first-child {
    grid-column: 1 / -1;
  }

  .bp-hero-plate img {
    height: 200px;
  }

  .bp-hero-plate figure:first-child img {
    height: 240px;
  }
}

.bp-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: clamp(40px, 6vw, 72px) 0 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.bp-facts > div {
  padding: 22px clamp(14px, 2.4vw, 32px);
  border-left: 1px solid var(--line);
}

.bp-facts > div:first-child {
  border-left: 0;
  padding-left: 0;
}

.bp-facts dt {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.bp-facts dd {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.bp-scope {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Case studies */
.bp-case {
  padding-block: clamp(80px, 11vw, 150px);
  color: var(--case-ink);
  background: var(--case-bg);
}

.bp-case-head {
  max-width: 900px;
}

.bp-case-sector {
  margin: 0;
  color: var(--case-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.bp-case-head h2 {
  margin: 14px 0 0;
  font-family: var(--font-display);
  font-size: clamp(3rem, 8.4vw, 7.6rem);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.05em;
}

.bp-case-line {
  margin: 20px 0 0;
  color: var(--case-accent);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.2vw, 1.8rem);
  font-style: italic;
  line-height: 1.3;
}

.bp-case-body {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(36px, 6vw, 96px);
  margin-top: clamp(44px, 6vw, 76px);
}

.bp-case-story h3 {
  margin: 0;
  color: var(--case-accent);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.4;
}

.bp-case-story p {
  max-width: 60ch;
  margin: 10px 0 28px;
  color: var(--case-ink);
  font-size: clamp(1.02rem, 1.3vw, 1.15rem);
  line-height: 1.7;
}

.bp-case-story p:last-child {
  margin-bottom: 0;
}

.bp-deliverables {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--case-line);
}

.bp-deliverables li {
  padding: 13px 0;
  color: var(--case-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  border-bottom: 1px solid var(--case-line);
}

/* Galleries: two columns, wide plates span both. */
.bp-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-flow: dense;
  align-items: start;
  gap: clamp(12px, 1.6vw, 20px);
  margin-top: clamp(48px, 7vw, 88px);
}

.bp-gallery figure {
  margin: 0;
}

.bp-gallery .g-wide {
  grid-column: 1 / -1;
}

.bp-gallery img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.bp-gallery-c {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bp-gallery-c figure {
  grid-column: span 1;
}

.bp-gallery-c figure:not(.g-square):not(.g-tall):not(.g-wide) {
  grid-column: span 2;
}

.bp-gallery-c .g-tall {
  grid-row: span 2;
}

.bp-reference {
  margin: clamp(36px, 5vw, 56px) 0 0;
  padding-top: 20px;
  color: var(--case-accent);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.5;
  border-top: 1px solid var(--case-line);
}

/* More identities and logos */
.bp-more,
.bp-logos {
  padding-block: clamp(80px, 10vw, 130px) 0;
}

.bp-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--ink);
}

.bp-section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.6vw, 3.8rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
}

.bp-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.bp-more-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 48px) clamp(20px, 3vw, 36px);
  margin-top: clamp(32px, 4vw, 48px);
}

.bp-card {
  margin: 0;
}

.bp-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 4px;
}

.bp-card h3 {
  margin: 18px 0 0;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.bp-card p {
  max-width: 48ch;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.bp-logo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: clamp(16px, 2.4vw, 28px);
  margin-top: clamp(32px, 4vw, 48px);
}

.bp-logo-grid figure {
  margin: 0;
}

.bp-logo-grid img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.bp-logo-grid figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* References */
.bp-references {
  margin-top: clamp(90px, 11vw, 150px);
  padding-block: clamp(80px, 10vw, 130px);
  color: var(--white);
  background: var(--ink);
}

.bp-references-inner h2 {
  max-width: 14ch;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.bp-references-inner > p {
  max-width: 56ch;
  margin: 24px 0 0;
  color: rgba(255, 253, 248, 0.76);
  font-size: 1.05rem;
  line-height: 1.7;
}

.bp-ref-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: clamp(40px, 5vw, 64px) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(255, 253, 248, 0.24);
}

.bp-ref-list li {
  display: grid;
  gap: 6px;
  padding: 22px 20px 22px 0;
  border-bottom: 1px solid rgba(255, 253, 248, 0.24);
}

.bp-ref-list strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
}

.bp-ref-list span {
  color: rgba(255, 253, 248, 0.7);
  font-size: 0.9rem;
  line-height: 1.45;
}

.bp-ref-button {
  margin-top: 40px;
  color: var(--ink);
  background: var(--white);
}

.bp-ref-button:hover,
.bp-ref-button:focus-visible {
  color: var(--white);
  background: var(--accent-strong);
}

/* Closing call to action */
.bp-close {
  padding-block: clamp(90px, 11vw, 150px);
}

.bp-close h2 {
  max-width: 18ch;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.4vw, 4.6rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.045em;
}

.bp-close > p {
  max-width: 56ch;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* Responsive */
@media (max-width: 900px) {
  .bp-hero-grid,
  .bp-case-body,
  .bp-section-head {
    grid-template-columns: 1fr;
  }

  .bp-ref-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bp-gallery-c {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bp-gallery-c figure:not(.g-square):not(.g-tall):not(.g-wide) {
    grid-column: 1 / -1;
  }

  .bp-gallery-c .g-tall {
    grid-row: auto;
  }
}

@media (max-width: 640px) {
  .bp-facts,
  .bp-more-grid {
    grid-template-columns: 1fr;
  }

  .bp-facts > div {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .bp-facts > div:first-child {
    border-top: 0;
  }

  .bp-gallery {
    grid-template-columns: 1fr;
  }

  .bp-gallery-c figure,
  .bp-gallery-c figure:not(.g-square):not(.g-tall):not(.g-wide) {
    grid-column: 1 / -1;
  }

  .bp-logo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bp-ref-list {
    grid-template-columns: 1fr;
  }
}
