/* LJLK shared shell — corner chrome for v1 + v2 */

:root {
  --ljlk-shell-top: max(1rem, env(safe-area-inset-top, 0px));
  --ljlk-shell-side: max(1.1rem, env(safe-area-inset-right, 0px));
  --ljlk-shell-side-left: max(1.1rem, env(safe-area-inset-left, 0px));
  --ljlk-shell-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  --ljlk-shell-control-size: 2.75rem;
  --ljlk-page-accent: #17131d;
  --ljlk-footer-spacing: 3.5rem;
  --ljlk-shell-z: 1200;
  --ljlk-shell-ink: #17131d;
  --ljlk-shell-muted: rgba(23, 19, 29, 0.55);
  --ljlk-shell-glass: rgba(255, 255, 255, 0.48);
  --ljlk-shell-glass-border: rgba(255, 255, 255, 0.65);
  --ljlk-shell-green: #36bd5f;
  --ljlk-shell-red: #ff3b3c;
  --ljlk-shell-purple: #7a35e8;
  --ljlk-shell-yellow: #feb333;
  --ljlk-shell-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ljlk-shell-spring: cubic-bezier(0.34, 1.2, 0.64, 1);
  --ljlk-shell-sans: "Inter", system-ui, sans-serif;
}

body.admin-bar {
  --ljlk-shell-top: max(calc(1rem + 32px), calc(env(safe-area-inset-top, 0px) + 32px));
}

@media screen and (max-width: 782px) {
  body.admin-bar {
    --ljlk-shell-top: max(calc(1rem + 46px), calc(env(safe-area-inset-top, 0px) + 46px));
  }
}

/* Hide legacy chrome when shell is active */
body.ljlk-shell-active .site-header,
body.ljlk-shell-active #masthead,
body.ljlk-shell-active .ljlk-site-header,
body.ljlk-shell-active .main-navigation,
body.ljlk-shell-active .mobile-menu-control-wrapper,
body.ljlk-shell-active .menu-toggle,
body.ljlk-shell-active .generate-back-to-top {
  display: none !important;
}

body.ljlk-shell-active .site-footer,
body.ljlk-shell-active #colophon,
body.ljlk-shell-active .ljlk-site-footer {
  display: none !important;
}

body.ljlk-shell-active {
  overflow-x: clip;
}

body.ljlk-shell-active:not(.ljlk-logo-home) {
  padding-bottom: 0;
}

/* Content clearance under fixed chrome */
body.ljlk-shell-active:not(.ljlk-logo-home) .site-content,
body.ljlk-shell-active:not(.ljlk-logo-home) #content,
body.ljlk-shell-active:not(.ljlk-logo-home) .ljlk-home,
body.ljlk-shell-active:not(.ljlk-logo-home) .ljlk-v2p__inner,
body.ljlk-shell-active:not(.ljlk-logo-home) .ljlk-overview__inner,
body.ljlk-shell-active:not(.ljlk-logo-home) .ljlk-v2 {
  padding-top: calc(var(--ljlk-shell-top) + 3.75rem);
  padding-bottom: calc(var(--ljlk-shell-bottom) + 5.5rem);
  box-sizing: border-box;
}

body.ljlk-shell--footer .site,
body.ljlk-shell--footer #page {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}

body.ljlk-shell--footer #content,
body.ljlk-shell--footer .site-content {
  flex: 1 0 auto;
}

body.ljlk-shell--no-footer:not(.ljlk-logo-home) .site,
body.ljlk-shell--no-footer:not(.ljlk-logo-home) #page {
  min-height: 100svh;
}

.ljlk-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: calc(var(--ljlk-shell-z, 1200) + 10);
  pointer-events: auto;
}

.ljlk-skip-link:focus,
.ljlk-skip-link:focus-visible {
  left: 1rem;
  top: 1rem;
}

.ljlk-shell {
  position: fixed;
  inset: 0;
  z-index: var(--ljlk-shell-z);
  pointer-events: none;
  font-family: var(--ljlk-shell-sans);
  color: var(--ljlk-shell-ink);
}

.ljlk-shell__brand,
.ljlk-shell__controls,
.ljlk-shell__cta {
  pointer-events: auto;
}

.ljlk-shell__brand {
  position: absolute;
  top: var(--ljlk-shell-top);
  left: var(--ljlk-shell-side-left);
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
  max-width: min(16rem, calc(100vw - 6.5rem));
  transition: opacity 0.25s var(--ljlk-shell-ease);
}

.ljlk-shell__brand:hover,
.ljlk-shell__brand:focus-visible {
  opacity: 0.85;
  outline: none;
}

.ljlk-shell__brand:focus-visible {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ljlk-shell-ink);
  border-radius: 0.5rem;
}

.ljlk-shell__mark {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ljlk-shell-glass);
  border: 1px solid var(--ljlk-shell-glass-border);
  box-shadow: 0 8px 24px rgba(22, 20, 15, 0.06);
  backdrop-filter: blur(10px);
}

.ljlk-shell__mark-img {
  width: 16px;
  height: 16px;
  display: block;
}

.ljlk-shell__wordmark {
  font-weight: 700;
  font-size: clamp(0.68rem, 1.3vw, 0.78rem);
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ljlk-shell__controls {
  position: absolute;
  top: var(--ljlk-shell-top);
  right: var(--ljlk-shell-side);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.ljlk-shell__orb {
  position: relative;
  width: var(--ljlk-shell-control-size);
  height: var(--ljlk-shell-control-size);
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid var(--ljlk-shell-glass-border);
  border-radius: 50%;
  background: var(--ljlk-shell-glass);
  box-shadow:
    0 10px 28px rgba(22, 20, 15, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(14px);
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 0.35s var(--ljlk-shell-spring),
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

.ljlk-shell__orb:hover,
.ljlk-shell__orb:focus-visible {
  transform: translateY(-1px) scale(1.04);
  outline: none;
  border-color: color-mix(in srgb, var(--ljlk-page-accent) 40%, white);
  box-shadow: 0 14px 32px rgba(22, 20, 15, 0.12);
}

.ljlk-shell__orb:focus-visible {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ljlk-shell-ink);
}

.ljlk-shell__orb-colors {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.ljlk-shell__orb-slice--voeding { background: var(--ljlk-shell-green); }
.ljlk-shell__orb-slice--beweging { background: var(--ljlk-shell-red); }
.ljlk-shell__orb-slice--bewustzijn { background: var(--ljlk-shell-purple); }
.ljlk-shell__orb-slice--energie { background: var(--ljlk-shell-yellow); }

/* Active pillar: solid accent wash */
body.ljlk-pillar--voeding .ljlk-shell__orb-colors,
body.ljlk-pillar--beweging .ljlk-shell__orb-colors,
body.ljlk-pillar--bewustzijn .ljlk-shell__orb-colors,
body.ljlk-pillar--energie .ljlk-shell__orb-colors {
  display: block;
  background: var(--ljlk-page-accent);
}

body.ljlk-pillar--voeding .ljlk-shell__orb-slice,
body.ljlk-pillar--beweging .ljlk-shell__orb-slice,
body.ljlk-pillar--bewustzijn .ljlk-shell__orb-slice,
body.ljlk-pillar--energie .ljlk-shell__orb-slice {
  display: none;
}

.ljlk-shell__orb-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 3px;
  z-index: 1;
}

.ljlk-shell__orb-icon span {
  display: block;
  width: 12px;
  height: 1.5px;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 1px rgba(23, 19, 29, 0.12);
}

.ljlk-shell__panel {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  width: min(18.5rem, calc(100vw - 1.5rem));
  max-height: min(70svh, 28rem);
  overflow: auto;
  padding: 0.85rem 0.9rem 1rem;
  border-radius: 1.15rem;
  background: rgba(252, 250, 247, 0.94);
  border: 1px solid rgba(23, 19, 29, 0.1);
  box-shadow: 0 18px 48px rgba(22, 20, 15, 0.14);
  backdrop-filter: blur(18px);
  transform-origin: top right;
  animation: ljlk-shell-panel-in 0.28s var(--ljlk-shell-ease) both;
}

.ljlk-shell__panel[hidden] {
  display: none !important;
}

.ljlk-shell__menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.15rem;
}

.ljlk-shell__menu a {
  display: block;
  padding: 0.55rem 0.65rem;
  border-radius: 0.65rem;
  text-decoration: none;
  color: var(--ljlk-shell-ink);
  font-size: 0.92rem;
  font-weight: 550;
  letter-spacing: 0.01em;
  transition: background 0.2s ease, color 0.2s ease;
}

.ljlk-shell__menu a:hover,
.ljlk-shell__menu a:focus-visible {
  background: color-mix(in srgb, var(--ljlk-page-accent) 12%, transparent);
  color: var(--ljlk-shell-ink);
  outline: none;
}

.ljlk-shell__menu .sub-menu {
  list-style: none;
  margin: 0 0 0.25rem 0.65rem;
  padding: 0;
}

.ljlk-shell__panel-tools {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(23, 19, 29, 0.08);
  display: grid;
  gap: 0.45rem;
}

.ljlk-shell__color-toggle,
.ljlk-shell__mono-theme {
  margin: 0;
  padding: 0.55rem 0.65rem;
  border: 0;
  border-radius: 0.65rem;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ljlk-shell-ink);
  opacity: 0.78;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.ljlk-shell__color-toggle:hover,
.ljlk-shell__color-toggle:focus-visible,
.ljlk-shell__mono-theme:hover,
.ljlk-shell__mono-theme:focus-visible {
  opacity: 1;
  background: rgba(23, 19, 29, 0.05);
  outline: none;
}

.ljlk-shell__cta {
  position: absolute;
  right: var(--ljlk-shell-side);
  bottom: var(--ljlk-shell-bottom);
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.25rem 0.85rem 1.4rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ljlk-shell-ink);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: var(--ljlk-shell-glass);
  border: 1px solid var(--ljlk-shell-glass-border);
  backdrop-filter: blur(16px);
  box-shadow:
    0 12px 36px rgba(22, 20, 15, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  transition:
    transform 0.4s var(--ljlk-shell-spring),
    box-shadow 0.4s ease,
    border-color 0.4s ease;
}

.ljlk-shell__cta:hover,
.ljlk-shell__cta:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(22, 20, 15, 0.12);
  outline: none;
  border-color: color-mix(in srgb, var(--ljlk-page-accent) 35%, white);
}

.ljlk-shell__cta:focus-visible {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ljlk-shell-ink);
}

.ljlk-shell__cta-icon {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(22, 20, 15, 0.18);
  font-size: 0.75rem;
  line-height: 1;
}

/* Hide duplicate in-page brand chrome */
body.ljlk-shell-active .ljlk-logo-nav__top,
body.ljlk-shell-active .ljlk-logo-nav__cta,
body.ljlk-shell-active .ljlk-v2p__top,
body.ljlk-shell-active .ljlk-overview__top,
body.ljlk-shell-active .ljlk-v2 a.back {
  display: none !important;
}

/* Logo-nav: leave room for fixed shell corners */
body.ljlk-logo-home .ljlk-logo-nav {
  padding-top: calc(var(--ljlk-shell-top) + 3.25rem);
  padding-bottom: calc(var(--ljlk-shell-bottom) + 4.75rem);
}

body.ljlk-logo-home .ljlk-logo-nav__footer {
  grid-template-columns: 1fr;
}

/* Footer */
.ljlk-shell-footer {
  position: relative;
  margin-top: var(--ljlk-footer-spacing);
  background: #24174a;
  color: rgba(255, 255, 255, 0.82);
  padding:
    clamp(2.5rem, 5vw, 3.75rem)
    max(1.1rem, env(safe-area-inset-right))
    calc(1.25rem + env(safe-area-inset-bottom, 0px))
    max(1.1rem, env(safe-area-inset-left));
  flex: 0 0 auto;
}

.ljlk-shell-footer__inner {
  width: min(72rem, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 2fr;
  gap: 2rem;
  padding-bottom: 2rem;
}

.ljlk-shell-footer__title {
  margin: 0 0 0.5rem;
  font-family: "Lora", Georgia, serif;
  font-size: 1.15rem;
  color: #fff;
}

.ljlk-shell-footer__text {
  margin: 0;
  max-width: 22rem;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.95rem;
  line-height: 1.5;
}

.ljlk-shell-footer__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.ljlk-shell-footer__heading {
  margin: 0 0 0.7rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f0d38a;
}

.ljlk-shell-footer__menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.ljlk-shell-footer__menu a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.92rem;
}

.ljlk-shell-footer__menu a:hover,
.ljlk-shell-footer__menu a:focus-visible {
  color: #f0d38a;
  outline: none;
}

.ljlk-shell-footer__bar {
  width: min(72rem, 100%);
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}

.ljlk-shell-footer__bar p {
  margin: 0;
}

/* Mono mode */
html.ljlk-mono .ljlk-shell__mark,
html.ljlk-mono .ljlk-shell__orb,
html.ljlk-mono .ljlk-shell__cta,
html.ljlk-mono .ljlk-shell__panel {
  box-shadow: none !important;
  backdrop-filter: none !important;
  background: #fff;
  border-color: #000;
  color: #000;
}

html.ljlk-mono .ljlk-shell__orb-colors {
  filter: contrast(1000%);
}

html.ljlk-mono .ljlk-shell__orb-icon span {
  background: #000;
  box-shadow: none;
}

html.ljlk-mono.ljlk-mono-dark .ljlk-shell__mark,
html.ljlk-mono.ljlk-mono-dark .ljlk-shell__orb,
html.ljlk-mono.ljlk-mono-dark .ljlk-shell__cta,
html.ljlk-mono.ljlk-mono-dark .ljlk-shell__panel {
  background: #000;
  border-color: #fff;
  color: #fff;
}

html.ljlk-mono.ljlk-mono-dark .ljlk-shell__wordmark,
html.ljlk-mono.ljlk-mono-dark .ljlk-shell__menu a,
html.ljlk-mono.ljlk-mono-dark .ljlk-shell__color-toggle,
html.ljlk-mono.ljlk-mono-dark .ljlk-shell__mono-theme {
  color: #fff;
}

html.ljlk-mono.ljlk-mono-dark .ljlk-shell__orb-icon span {
  background: #fff;
}

@keyframes ljlk-shell-panel-in {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 720px) {
  .ljlk-shell__wordmark {
    font-size: 0.62rem;
  }

  .ljlk-shell__panel {
    width: min(100vw - 1.25rem, 18.5rem);
  }

  .ljlk-shell-footer__inner,
  .ljlk-shell-footer__cols {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ljlk-shell__orb,
  .ljlk-shell__cta,
  .ljlk-shell__panel,
  .ljlk-shell__brand {
    animation: none !important;
    transition: none !important;
  }
}
