:root {
  color: #1b1a18;
  background: #fbfaf7;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  /* Transparent so the fixed .site-bg (z-index:-10) shows through. The fallback
     canvas color lives on :root above. Do NOT set an opaque background here:
     an opaque body paints above negative-z-index children and hides the lobby. */
  background: transparent;
}

a {
  color: inherit;
}

html {
  /* No horizontal jitter, and don't let the whole document rubber-band on iOS. */
  overflow-x: hidden;
}

.site-shell {
  position: relative;
  min-height: 100svh;
}

/* ── Fixed full-cover lobby background: poster + calm ambient loop + the
      occasional intrusion clip, layered and cross-faded. Sits behind all
      content. Ported from the previous site's "background director". ────────── */
.site-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  /* Constant height (the LARGE viewport height) so the cover media never
     re-scales when a mobile URL bar shows/hides during scroll — the "zoom on
     scroll" bug. Falls back to 100vh where lvh is unsupported. Anchored at the
     top; the bottom simply extends under the URL bar when it's visible. */
  height: 100vh;
  height: 100lvh;
  z-index: -10;
  overflow: hidden;
  background: #fbfaf7;
}

.site-bg__base,
.site-bg__fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The intrusion still sits over the calm base, invisible until the director
   dissolves it in, then fades it back out to calm. */
.site-bg__fx {
  opacity: 0;
  transition: opacity 1200ms ease-in-out;
}

.site-bg__fx.is-showing {
  opacity: 1;
}

/* Defense-in-depth for reduced-motion: even if the director never runs,
   show only the calm base — never an intrusion. */
@media (prefers-reduced-motion: reduce) {
  .site-bg__fx {
    display: none;
  }
}

.site-navbar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  min-height: 76px;
  padding: 0;
  background: transparent;
}

/* Top scrim: darkens just the header band so the white nav stays legible over a
   bright photo, while leaving the scene and its intrusions vibrant below. */
.site-navbar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 160px;
  z-index: -1;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.6),
    rgba(0, 0, 0, 0)
  );
  pointer-events: none;
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
}

.brand-logo {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.nav-link-item {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  color: #fff;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
}

.nav-link-item:hover,
.nav-link-item:focus-visible {
  color: rgba(255, 255, 255, 0.75);
}

.nav-link-icon {
  display: none;
  font-size: 1.35rem;
  line-height: 1;
}

.hero {
  display: flex;
  /* svh = small viewport height (URL bar visible). Sizing to it means the lobby
     fits without ever needing to scroll, so the URL bar never collapses. */
  min-height: 100svh;
  align-items: flex-start;
  padding: 112px 0 40px;
}

.hero .container-lg {
  display: flex;
  justify-content: flex-end;
}

.hero h1 {
  width: min(100%, 1100px);
  margin: 0 auto;
  color: #fff;
  text-align: center;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
  font-size: clamp(2.35rem, 4.4vw, 4.6rem);
  font-weight: 600;
  line-height: 1.04;
}

.page-view {
  min-height: 100vh;
  padding: 132px 0 120px;
}

.page-view h1 {
  margin: 0;
  color: #1b1a18;
  font-size: clamp(2.5rem, 8vw, 5.25rem);
  font-weight: 600;
  line-height: 1;
}

.cookie-alert {
  position: fixed;
  right: 24px;
  bottom: 24px;
  left: 24px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(760px, calc(100% - 48px));
  margin: 0 auto;
  padding: 16px 18px;
  color: #1b1a18;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(27, 26, 24, 0.14);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(27, 26, 24, 0.1);
}

.cookie-copy {
  min-width: 0; /* let the fine print wrap instead of shoving the button off */
  flex: 1 1 auto;
}

.cookie-heading {
  margin: 0 0 4px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
}

.cookie-fineprint {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: rgba(27, 26, 24, 0.62);
}

.cookie-yield {
  flex: 0 0 auto;
  padding: 8px 18px;
  font-weight: 600;
  color: #fff;
  background: #4f6358;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.cookie-yield:hover,
.cookie-yield:focus-visible {
  color: #fff;
  background: #3f5147;
}

@media (max-width: 767.98px) {
  .site-navbar {
    min-height: 68px;
  }

  .navbar-inner {
    gap: 12px;
  }

  .brand-logo {
    width: 40px;
    height: 40px;
  }

  .nav-links {
    gap: 4px;
  }

  .nav-link-item {
    width: 42px;
    min-height: 42px;
    justify-content: center;
    padding: 0;
  }

  .nav-link-icon {
    display: inline-block;
  }

  .nav-link-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .hero {
    min-height: 100svh;
    padding: 88px 0 32px;
  }

  .hero h1 {
    width: 100%;
    font-size: clamp(1.6rem, 7.4vw, 2.3rem);
    line-height: 1.08;
  }


  .page-view {
    min-height: 100svh;
    padding: 104px 0 116px;
  }

  .cookie-alert {
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 12px;
    width: calc(100% - 24px);
    max-height: calc(100svh - 24px);
    padding: 12px 14px;
    font-size: 0.9rem;
    line-height: 1.35;
  }

  .cookie-yield {
    padding: 7px 14px;
  }
}

@media (max-width: 374.98px) {
  .hero h1 {
    font-size: clamp(1.4rem, 7vw, 1.95rem);
  }

  .cookie-alert {
    gap: 10px;
    padding: 10px 12px;
    font-size: 0.84rem;
  }
}

/* ── Restorative Bookshelf ──────────────────────────────────────────────────
      Frosted reading panel over the lobby background, with Bulletins / Findings
      tabs. Ink #1b1a18, forest accent #4f6358. Plain CSS. ──────────────────── */
.shelf-wrap {
  display: flex;
  justify-content: flex-end;
}

.shelf-panel {
  width: min(100%, 640px);
  padding: 36px;
  color: #1b1a18;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(27, 26, 24, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Beats the generic .page-view h1 sizing. */
.shelf-panel .shelf-title {
  margin: 0;
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.shelf-intro {
  margin: 16px 0 0;
  line-height: 1.6;
  color: rgba(27, 26, 24, 0.62);
}

.shelf-tabs {
  display: flex;
  gap: 4px;
  margin-top: 28px;
  border-bottom: 1px solid rgba(27, 26, 24, 0.14);
}

.shelf-tab {
  margin-bottom: -1px;
  padding: 10px 16px;
  color: rgba(27, 26, 24, 0.55);
  font: 600 11px/1 ui-monospace, "SFMono-Regular", Menlo, monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}

.shelf-tab:hover {
  color: #1b1a18;
}

.shelf-tab.is-active {
  color: #1b1a18;
  border-bottom-color: #4f6358;
}

.shelf-tabpanel {
  margin-top: 28px;
}

.shelf-tabpanel[hidden] {
  display: none;
}

.eyebrow {
  margin: 0;
  color: #4f6358;
  font: 600 11px/1.4 ui-monospace, "SFMono-Regular", Menlo, monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* Buttons */
.btn-primary {
  display: inline-block;
  padding: 9px 18px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
  background: #4f6358;
  border: 0;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  color: #fff;
  background: #3f5147;
}

/* Bulletins — the book */
.book {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.book-cover {
  flex: 0 0 auto;
  align-self: flex-start; /* don't stretch to the text column's height */
}

.book-cover img {
  display: block;
  width: 144px;
  height: 216px; /* fixed 2:3 box so flex can never distort it */
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(27, 26, 24, 0.2);
}

.book-title {
  margin: 8px 0 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.book-byline {
  margin: 2px 0 0;
  font-size: 0.9rem;
  color: rgba(27, 26, 24, 0.6);
}

.book-blurb {
  margin: 16px 0 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: rgba(27, 26, 24, 0.66);
}

.book-blurb em {
  color: #1b1a18;
}

.book-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 22px;
}

.book-also {
  font-size: 0.9rem;
  color: rgba(27, 26, 24, 0.6);
}

.book-also a {
  color: #1b1a18;
}

@media (min-width: 576px) {
  .book {
    flex-direction: row;
  }
}

/* Findings — the whitepapers */
.wp-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.wp {
  padding: 22px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(27, 26, 24, 0.14);
  border-radius: 14px;
}

.wp-title {
  margin: 8px 0 0;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.25;
}

.wp-subtitle {
  margin: 4px 0 0;
  font-style: italic;
  color: rgba(27, 26, 24, 0.6);
}

.wp-teaser {
  margin: 12px 0 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: rgba(27, 26, 24, 0.66);
}

.dispatch {
  margin-top: 20px;
  box-shadow: 0 12px 30px rgba(27, 26, 24, 0.2);
}

.dispatch-btn {
  background: rgba(27, 26, 24, 0.7);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
  transition: background 200ms ease;
}

.dispatch-play:hover .dispatch-btn {
  background: #4f6358;
}

.dispatch-tag {
  font: 600 10px/1 ui-monospace, "SFMono-Regular", Menlo, monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

.wp-actions {
  margin-top: 18px;
}

@media (max-width: 767.98px) {
  .shelf-wrap {
    justify-content: center;
  }
  .shelf-panel {
    padding: 24px 20px;
  }
}

/* ── Digital Sanctuary — the social "node" cards ────────────────────────────── */
.node-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 28px;
}

.node {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 22px;
  color: #1b1a18;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(27, 26, 24, 0.14);
  border-radius: 14px;
  transition: background 200ms ease, border-color 200ms ease;
}

.node:hover,
.node:focus-visible {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(79, 99, 88, 0.5);
}

.node-glyph {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #fff;
  background: #4f6358;
  border-radius: 9999px;
  transition: background 250ms ease;
}

.node:hover .node-glyph {
  background: #3f5147;
}

.node-glyph svg {
  width: 20px;
  height: 20px;
}

.node-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.node-title {
  margin-top: 4px;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.2;
}

.node-handle {
  margin-top: 3px;
  font: 500 12px/1.4 ui-monospace, "SFMono-Regular", Menlo, monospace;
  color: rgba(27, 26, 24, 0.55);
}

.node-blurb {
  margin-top: 8px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(27, 26, 24, 0.66);
}

.node-open {
  margin-top: 12px;
  font: 600 11px/1 ui-monospace, "SFMono-Regular", Menlo, monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(27, 26, 24, 0.5);
  transition: color 200ms ease;
}

.node:hover .node-open {
  color: #1b1a18;
}

/* ── Register — "The Inbox Stuffer" ─────────────────────────────────────────── */
.current-form {
  margin-top: 28px;
}

.current-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.current-input {
  width: 100%;
  padding: 12px 20px;
  color: #1b1a18;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(27, 26, 24, 0.18);
  border-radius: 9999px;
}

.current-input::placeholder {
  color: rgba(27, 26, 24, 0.4);
}

.current-input:focus {
  outline: none;
  border-color: #4f6358;
}

.current-submit {
  flex: 0 0 auto;
  padding: 12px 22px;
  white-space: nowrap;
  border-radius: 9999px;
}

.current-fine {
  margin: 16px 0 0;
  font: 500 11px/1.6 ui-monospace, "SFMono-Regular", Menlo, monospace;
  color: rgba(27, 26, 24, 0.55);
}

.current-error {
  margin: 12px 0 0;
  font: 500 11px/1.6 ui-monospace, "SFMono-Regular", Menlo, monospace;
  color: #8a1c1c;
}

.current-done {
  margin-top: 28px;
}

.current-open {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #1b1a18;
}

.current-open-note {
  margin: 12px 0 0;
  line-height: 1.6;
  color: rgba(27, 26, 24, 0.62);
}

.current-vessel {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  color: #1b1a18;
}

.current-sever {
  margin-top: 24px;
  padding: 9px 18px;
  font: 600 11px/1 ui-monospace, "SFMono-Regular", Menlo, monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8a1c1c;
  background: transparent;
  border: 1px solid rgba(138, 28, 28, 0.4);
  border-radius: 9999px;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease;
}

.current-sever:hover,
.current-sever:focus-visible {
  color: #fff;
  background: #8a1c1c;
}

@media (min-width: 576px) {
  .current-row {
    flex-direction: row;
  }
}
