.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--color-border-inverted);
  background:
    linear-gradient(90deg, rgba(3, 1, 3, 0.94), rgba(32, 7, 22, 0.92)),
    rgba(3, 1, 3, 0.92);
  backdrop-filter: blur(14px);
}

.site-header-inner {
  width: min(100% - 2rem, var(--page-max-width));
  margin: 0 auto;
  padding: 0.85rem 0;
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  justify-content: space-between;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--color-text-inverted);
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.4vw, 1.8rem);
  font-weight: 950;
  letter-spacing: -0.055em;
  text-decoration: none;
  white-space: nowrap;
}

.site-logo::before {
  content: "";
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 999px;
  background: var(--color-accent);
  box-shadow: var(--shadow-glow);
}

.site-logo:hover,
.site-logo:focus-visible {
  color: var(--color-text-inverted);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}

.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.45rem 0.25rem;
  border: 0;
  color: var(--color-text-inverted);
  text-decoration: none;
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: -0.01em;
  margin-left: 2rem;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0.25rem;
  right: 0.25rem;
  bottom: 0.15rem;
  height: 1px;
  background: transparent;
  transition:
    height 140ms ease,
    background 140ms ease,
    opacity 140ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: #ffffff;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  background: rgba(255, 255, 255, 0.55);
}

.site-nav a[aria-current="page"],
.site-nav a.active {
  color: #ffffff;
}

.site-nav a[aria-current="page"]::after,
.site-nav a.active::after {
  height: 4px;
  background: var(--color-accent);
  box-shadow: 0 0 0.8rem rgba(225, 16, 232, 0.45);
}

.site-nav a.has-unread-chat {
  color: #ffffff;
}

.site-nav a.has-unread-chat::before {
  content: "";
  position: absolute;
  top: 0.35rem;
  right: -0.35rem;
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 999px;
  background: var(--color-accent);
  box-shadow: 0 0 0 0.25rem rgba(225, 16, 232, 0.20);
}

.site-main {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  margin: 0;
  /*padding: var(--space-xl) 0 var(--space-2xl);*/
  padding: 0;
}
.page-header {
  position: relative;
  margin-bottom: var(--space-lg);
  padding: clamp(1.1rem, 3vw, 2rem);
  border: 1px solid var(--color-border-inverted);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(23, 7, 17, 0.96), rgba(58, 11, 39, 0.88)),
    var(--color-card-dark);
  color: var(--color-text-inverted);
  box-shadow: var(--shadow-card-soft);
  overflow: hidden;
}

.page-header::before {
  content: "";
  position: absolute;
  inset: auto -4rem -5rem auto;
  width: 15rem;
  height: 15rem;
  border-radius: 999px;
  background: rgba(225, 16, 232, 0.20);
  filter: blur(8px);
}

.page-header > * {
  position: relative;
  z-index: 1;
}

.page-header h1 {
  margin: 0 0 var(--space-sm);
  color: #ffffff;
  text-transform: uppercase;
}

.page-header p {
  max-width: var(--content-max-width);
  margin-bottom: 0;
  color: var(--color-muted-inverted);
  font-size: 1.05rem;
}

.page-actions {
  margin-top: var(--space-md);
}

.site-footer {
  border-top: 1px solid var(--color-border-inverted);
  background: rgba(3, 1, 3, 0.72);
  color: var(--color-muted-inverted);
}

.site-footer-inner {
  width: min(100% - 2rem, var(--page-max-width));
  margin: 0 auto;
  padding: var(--space-lg) 0;
  font-size: 0.92rem;
}
/* ==========================================================================
   Full-width page hero header for public content pages
   ========================================================================== */

/*
.page-header.page-header-hero {
  width: 100vw;
  min-height: clamp(5rem, 18vw, 15rem);
  margin: calc(-1 * var(--space-xl)) calc(50% - 50vw) var(--space-xl);
  padding:
    clamp(2rem, 7vw, 4rem)
    max(1rem, calc((100vw - var(--page-max-width)) / 2));
  border: 0;
  border-radius: 0;
  background: var(--color-section-dark);
  color: var(--color-text-inverted);
  box-shadow: none;
  overflow: hidden;
}
*/

.page-header.page-header-hero {
  width: 100vw;
  min-height: clamp(3rem, 7vw, 16rem);
  margin: calc(-1 * var(--space-xl)) calc(50% - 50vw) var(--space-xl);
  margin-bottom: 2px;
  padding:
    clamp(4rem, 4vw, 3.5rem)
    max(1rem, calc((100vw - var(--page-max-width)) / 2));
  border: 0;
  border-radius: 0;
  background: var(--color-section-dark);
  color: var(--color-text-inverted);
  box-shadow: none;
  overflow: hidden;
}

.page-header.page-header-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    var(--page-header-image, none) center / cover no-repeat;
  opacity: 1;
  filter: saturate(1.08) contrast(1.04);
}

.page-header.page-header-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(5, 2, 5, 0.50),
      rgba(5, 2, 5, 0.16) 52%,
      rgba(5, 2, 5, 0.34)
    ),
    radial-gradient(circle at 18% 45%, rgba(225, 16, 232, 0.18), transparent 28rem);
}

.page-header.page-header-hero > * {
  position: relative;
  z-index: 1;
}

/*
.page-header.page-header-hero h1 {
  max-width: 12ch;
  margin: 0;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5rem);
  line-height: 0.86;
  letter-spacing: -0.085em;
  text-transform: uppercase;
  text-shadow:
    0.045em 0.045em 0 rgba(225, 16, 232, 0.72),
    0 0.12em 0.6em rgba(0, 0, 0, 0.72),
    0 0 1.4rem rgba(0, 0, 0, 0.38);
}

.page-header.page-header-hero p {
  max-width: 42rem;
  margin: var(--space-md) 0 0;
  color: #ffe8f8;
  font-size: clamp(1.02rem, 1.5vw, 1.25rem);
  line-height: 1.5;
  font-weight: 750;
  text-shadow: 0 0.12rem 0.7rem rgba(0, 0, 0, 0.65);
}

*/

.page-header.page-header-hero h1 {
  max-width: 12ch;
  margin: 0;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5.5vw, 5.4rem);
  line-height: 0.86;
  letter-spacing: -0.085em;
  text-transform: uppercase;
  text-shadow:
    0.045em 0.045em 0 rgba(225, 16, 232, 0.72),
    0 0.12em 0.6em rgba(0, 0, 0, 0.72),
    0 0 1.4rem rgba(0, 0, 0, 0.38);
}

.page-header.page-header-hero p {
  max-width: 42rem;
  margin: var(--space-sm) 0 0;
  color: #ffe8f8;
  font-size: clamp(0.98rem, 1.2vw, 1.15rem);
  line-height: 1.45;
  font-weight: 750;
  text-shadow: 0 0.12rem 0.7rem rgba(0, 0, 0, 0.65);
}

.page-header.page-header-hero .page-actions {
  margin-top: var(--space-lg);
}

@media (max-width: 52rem) {
  .site-header {
    position: static;
  }

  .site-header-inner {
    width: min(100% - 1rem, var(--page-max-width));
    align-items: flex-start;
    flex-direction: column;
    gap: var(--space-sm);
  }

  .site-nav {
    justify-content: flex-start;
  }

  .site-nav a {
    min-height: 2.1rem;
    padding: 0.4rem 0.65rem;
    font-size: 0.88rem;
    margin-left: 0;
  }

  .site-main {
   /* width: min(100% - 1rem, var(--page-max-width));*/
    width: 100%;
    margin: 0;
    padding-top: var(--space-md);
  }

  .page-header {
    padding: var(--space-md);
  }

  .page-header.page-header-hero {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    min-height: clamp(5rem, 10vh, 18rem);
    margin: calc(-1 * var(--space-md)) calc(50% - 50vw) var(--space-lg);
    padding: 2.5rem 1rem;
  }

  .page-header.page-header-hero::after {
    background:
      linear-gradient(
        180deg,
        rgba(5, 2, 5, 0.26),
        rgba(5, 2, 5, 0.60)
      ),
      radial-gradient(circle at 20% 45%, rgba(225, 16, 232, 0.12), transparent 22rem);
  }

  .page-header.page-header-hero h1 {
    font-size: clamp(2.2rem, 15vw, 4rem);
  }

  .page-header.page-header-hero p {
    font-size: 1.02rem;
  }

}
