/* Manifest Bitch rebuilt shell */

:root {
  --bg: #070808;
  --bg-deep: #020504;
  --fg: #f2f2f2;
  --muted: #b5bbb7;
  --accent: #8fbf9b;
  --accent-deep: #184e2d;
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.4);

  --header-h: 10vh;
  --main-h: 80vh;
  --footer-h: 10vh;

  --logo-size: 300px;
  --logo-pad: 0px;
  --logo-safe-w: 10px;

  --left-pane-w: 20%;
  --nav-item-h: 28px;
  --nav-gap: 0.85rem;
  --nav-visible-items:4;

  --essay-menu-max-h: 56px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.45;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 600px at 18% 22%, rgba(143, 191, 155, 0.22), transparent 60%),
    radial-gradient(800px 520px at 82% 78%, rgba(24, 78, 45, 0.55), transparent 62%),
    linear-gradient(135deg, #04140c 0%, #062116 28%, #020504 62%, #000000 100%);
  background-size: 220% 220%;
  animation: bgFlow 18s ease-in-out infinite;
}

@keyframes bgFlow {
  0% { background-position: 0% 30%; }
  50% { background-position: 100% 70%; }
  100% { background-position: 0% 30%; }
}

.site-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100vh;
  display: grid;
  grid-template-rows: max(92px, var(--header-h)) minmax(0, 1fr) max(88px, var(--footer-h));
}

/* HEADER */

.site-header {
  position: relative;
  z-index: 20;
  width: 100%;
  min-width: 0;
  overflow: visible;
  display: grid;
  grid-template-columns: var(--logo-safe-w) minmax(0, 1fr);
  align-items: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-logo-wrap {
  width: var(--logo-safe-w);
  height: 100%;
  min-width: var(--logo-safe-w);
  pointer-events: none;
}

.header-logo {
  position: fixed;
  top: 10px;
  left: 10px;
  height: 200px;
  z-index: 9999;
  display: block;
  opacity: 0.7;
  object-fit: contain;
  pointer-events: auto;
}

.header-phrase-wrap {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.5rem;
}

.phrase,fly-h2 {
  display: block;
  text-align: center;
  font-family: "Cinzel Decorative", "Playfair Display", serif;
  font-size: clamp(0.88rem, 1.45vw, 2.16rem);
  letter-spacing: 0.06em;
  line-height: 1.18;
  color: rgba(242, 242, 242, 0.92);
  text-shadow: 0 10px 22px rgba(0, 0, 0, 0.55);
  max-width: min(920px, 100%);
  opacity: 0;
  transform: translateY(8px);
  filter: blur(6px);
  transition: opacity 1200ms ease, transform 1200ms ease, filter 1200ms ease;
}

.phrase.show {
  opacity: 1;
  transform: none;
  filter: none;
}

.phrase.subtle {
  opacity: 0;
  transform: translateY(-6px);
  filter: blur(8px);
}

/* MAIN */

.site-main {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: max(var(--logo-safe-w), var(--left-pane-w)) minmax(0, 1fr);
}

.left-pane {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: transparent;
}

.left-pane__inner {
  height: 100%;
  min-height: 0;
  padding: 1rem;
  padding-top: 140px;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 0.3rem;
  overflow: hidden;
}

.page-nav {
  display: flex;
  flex-direction: column;
  gap: var(--nav-gap);
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  padding-right: 0.35rem;
}

.page-nav a,
.nav-link {
  text-decoration: none;
}

.page-nav a:hover,
.page-nav a:focus-visible,
.nav-link:hover,
.nav-link:focus-visible {
  text-decoration: none;
}

.nav-link {
  appearance: none;
  flex: 0 0 var(--nav-item-h);
  width: 100%;
  min-height: var(--nav-item-h);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(242, 242, 242, 0.92);
  padding: 0.4rem 0.75rem;
  border-radius: 12px;
  font: 600 0.8rem/1.15 Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  text-align: left;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.nav-link.is-active {
  border-color: rgba(143, 191, 155, 0.55);
  background: rgba(143, 191, 155, 0.12);
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 0;
}

.nav-summary {
  position: relative;
  list-style: none;
  user-select: none;
  padding-right: 2rem;
}

.nav-summary::-webkit-details-marker {
  display: none;
}

.nav-summary::after {
  content: "\25b8";
  position: absolute;
  right: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  opacity: 0.8;
}

.nav-group[open] > .nav-summary::after {
  content: "\25be";
}

.essay-submenu {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
  padding-left: 1.15rem;
  padding-right: 0.35rem;
  max-height: var(--essay-menu-max-h);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.essay-submenu a {
  display: block;
  color: #8fbf9b;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.24;
  padding: 0.16rem 0;
  opacity: 0.88;
  transition:
    color 140ms ease,
    transform 140ms ease,
    opacity 140ms ease;
}

.essay-submenu a:hover,
.essay-submenu a:focus-visible {
  color: #c6f5d1;
  text-decoration: none;
  transform: translateX(3px);
  opacity: 1;
  outline: none;
}

.essay-submenu a:active {
  opacity: 0.72;
}

.right-pane {
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: 1.25rem;
  overflow-x: auto;
  overflow-y: hidden;
}

.reader-stage {
  min-width: 960px;
  width: calc(100% - 1.25rem);
  height: 100%;
  margin: 0 auto;
  padding: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(5, 7, 7, 0.62);
  box-shadow: var(--shadow);
}

.document-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}

/* BOTTOM-RIGHT IMAGE */

.mbgirl,
.mb-girl,
.mbgirl-image,
.mb-girl-image,
.bottom-right-image,
.site-mbgirl {
  display: block;
  position: fixed;
  right: 0;
  bottom: 0;
  z-index: 9998;
  max-width: min(34vw, 420px);
  max-height: min(48vh, 520px);
  width: auto;
  height: auto;
  object-fit: contain;
  pointer-events: none;
}

/* FOOTER */

.site-footer {
  position: relative;
  z-index: 20;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-top: 1px solid var(--border);
  background: linear-gradient(to top, rgba(7, 8, 8, 0.92), rgba(7, 8, 8, 0.7), rgba(7, 8, 8, 0.1));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-align: center;
  padding: 0.6rem 1rem;
}

.footer-line {
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  color: rgba(220, 220, 220, 0.9);
}

.footer-disclaimer {
  font-size: 0.6rem;
  color: rgba(165, 165, 170, 0.78);
}

/* RESPONSIVE */

@media (max-width: 1100px) {
  :root {
    --logo-size: 240px;
    --logo-safe-w: 270px;
    --nav-item-h: 54px;
    --essay-menu-max-h: 170px;
  }

  .reader-stage {
    min-width: 820px;
  }
}

@media (max-width: 860px) {
  :root {
    --logo-size: 160px;
    --logo-pad: 16px;
    --logo-safe-w: 192px;
    --nav-item-h: 52px;
    --essay-menu-max-h: 160px;
  }

  html,
  body {
    overflow: auto;
  }

  .site-shell {
    min-height: 100vh;
    height: auto;
    grid-template-rows: auto auto auto;
  }

  .site-header {
    min-height: calc(var(--logo-size) + var(--logo-pad) * 2);
    grid-template-columns: var(--logo-safe-w) minmax(0, 1fr);
  }

  .site-main {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .left-pane {
    overflow: visible;
    border-bottom: 1px solid var(--border);
  }

  .left-pane__inner {
    height: auto;
    padding-top: 1rem;
    padding-left: var(--logo-safe-w);
    overflow: visible;
  }

  .page-nav {
    overflow: visible;
    max-height: none;
  }

  .right-pane {
    min-height: 72vh;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .reader-stage {
    min-width: 720px;
    width: 100%;
  }

  .mbgirl,
  .mb-girl,
  .mbgirl-image,
  .mb-girl-image,
  .bottom-right-image,
  .site-mbgirl {
    max-width: min(42vw, 260px);
    max-height: min(36vh, 320px);
  }

  .site-footer {
    min-height: 96px;
  }
}

.frame-body {
  background: transparent;
  color: rgba(242, 242, 242, 0.92);
  overflow: auto;
}

.frame-content {
  background: transparent;
  padding: 2rem;
}

.fly {
  background: transparent;
  color: rgba(242, 242, 242, 0.9);
  max-width: 900px;
  margin: 0 auto 2rem;
}

.fly h1,
.fly h2,
.fly h3 {

  color: #00671f;
}

.fly p,
.fly li {
  color: rgba(242, 242, 242, 0.9);
}

.fly a {
  color: #b9e6c3;
  text-decoration: none;
}

/* IFRAME PAGE / ESSAY CONTENT FIX */

html:has(body.frame-body),
body.frame-body {
  width: 100%;
  min-height: 100%;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
  background: transparent;
  color: rgba(242, 242, 242, 0.94);
}

body.frame-body::before {
  display: none;
}

.frame-content {
  position: relative;
  z-index: 5;
  width: 100%;
  min-height: 100%;
  padding: 2rem;
  background: transparent;
  color: rgba(242, 242, 242, 0.94);
}

.fly,
.page-item {
  display: block;
  max-width: 900px;
  margin: 0 auto 2rem;
  padding: 1.25rem 1.5rem;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(143, 191, 155, 0.18);
  border-radius: 18px;
  color: rgba(242, 242, 242, 0.94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.fly h1,
.fly h2,
.fly h3,
.page-item h1,
.page-item h2,
.page-item h3 {
  font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
  color: #b0bb94;
}

.fly p,
.fly li,
.page-item p,
.page-item li {
  color: rgba(242, 242, 242, 0.94);
}

.fly ul,
.page-item ul {
  padding-left: 1.35rem;
}

.fly a,
.page-item a {
  color: #b9e6c3;
  text-decoration: none;
}

.fly a:hover,
.fly a:focus-visible,
.page-item a:hover,
.page-item a:focus-visible {
  color: #d9ffe1;
  text-decoration: none;
  outline: none;
}


.essay-submenu a.is-active,
.essay-submenu a[aria-current="page"] {
  color: #d9ffe1;
  opacity: 1;
  font-weight: 700;
  transform: translateX(3px);
}

.nav-summary.is-active {
  border-color: rgba(143, 191, 155, 0.55);
  background: rgba(143, 191, 155, 0.12);
}

