/* Shared identity: quiet faceted edges, inspired by the project's post artwork.
   Decorative backgrounds carry no content and never intercept input. */
:root {
  --brand-paper: #fcfafd;
  --brand-edge-opacity: .16;
  --brand-rule: #e8deed;
}
:root.dark {
  --brand-paper: #100c16;
  --brand-edge-opacity: .19;
  --brand-rule: #34243f;
}
body.brand-page {
  position: relative;
  isolation: isolate;
  background-color: var(--brand-paper);
  --brand-edge-width: clamp(40px, calc((100vw - 780px) / 2), 230px);
}
.brand-page::before,
.brand-page::after {
  content: "";
  position: fixed;
  z-index: -1;
  pointer-events: none;
  top: 0;
  bottom: 0;
  width: var(--brand-edge-width);
  background: url('/assets/brand/edge-facets.svg') left center / 100% 100% no-repeat;
  opacity: var(--brand-edge-opacity);
}
.brand-page::before { left: 0; }
.brand-page::after { right: 0; transform: rotate(180deg); }
.brand-page article,
.brand-page .donate-container {
  border-color: var(--brand-rule);
  box-shadow: 0 8px 32px rgb(73 38 111 / 4%);
}
.brand-page article::before,
.brand-page .donate-container::before {
  content: "";
  display: block;
  width: 64px;
  height: 6px;
  margin-bottom: 1.4rem;
  background: linear-gradient(115deg, #49266f 0 35%, #946eaa 35% 73%, #d0bcd9 73%);
  clip-path: polygon(8% 0, 100% 0, 92% 100%, 0 100%);
}
body.brand-home { --brand-edge-width: clamp(28px, calc((100vw - 1100px) / 2), 200px); }
.brand-home header.block {
  position: relative;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--brand-rule);
}
.brand-home header.block::after {
  content: "";
  display: block;
  width: 150px;
  height: 58px;
  position: absolute;
  right: 0;
  bottom: 0;
  background: url('/assets/brand/facets-gold.svg') right bottom / contain no-repeat;
  opacity: .6;
  pointer-events: none;
}
.brand-case { --brand-edge-opacity: .22; }
.brand-service article::before,
.brand-donate .donate-container::before {
  background: linear-gradient(115deg, #49266f 0 35%, #946eaa 35% 80%, #f4c326 80%);
}
.brand-donate .donate-container::before { margin-inline: auto; }
.brand-message .container { box-sizing: border-box; border: 1px solid var(--brand-rule); }
@media (max-width: 900px) {
  .brand-page::before, .brand-page::after { opacity: .09; }
}
@media (max-width: 600px) {
  .brand-home #app > .container { min-width: 0; }
  .brand-home .two-columns,
  .brand-home .social-contact-grid { grid-template-columns: minmax(0, 1fr); }
  /* A small stationary corner replaces the desktop rails on narrow screens. */
  .brand-page::before { display: none; }
  .brand-page::after { position: absolute; top: 0; bottom: auto; height: 360px; width: 90px; opacity: .12; }
  .brand-home header.block::after { width: 75px; height: 29px; opacity: .45; }
  .brand-home header.block { padding-bottom: 2.4rem; }
  .brand-message .container { max-width: calc(100% - 2rem); }
}
@media print {
  body.brand-page { background: white; }
  .brand-page::before, .brand-page::after,
  .brand-home header.block::after,
  .brand-page article::before, .brand-page .donate-container::before { display: none; }
}
