/* ─────────────────────────────────────────────
   shell.css — persistent layout
───────────────────────────────────────────── */

body.shell-page {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* ── HEADER — full width ── */
.shell__header {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1rem 2rem;
  background: rgba(245, 242, 237, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 50;
  position: fixed;
  width: 100%;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

/* ── NAME ── */
.shell__name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--dark);
  text-decoration: none;
  transition: color 0.2s;
}

.shell__name:hover { color: var(--accent); }

/* ── NAV ── */
.shell__nav {
  display: flex;
  gap: 2rem;
  flex-direction: row;
  align-items: center;
}

.shell__nav a {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(27, 27, 24, 0.4);
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
}

.shell__nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.25s ease;
}

.shell__nav a:hover { color: var(--dark); }
.shell__nav a:hover::after { width: 100%; }

/* ── CONTENT FRAME ── */
turbo-frame#content,
.shell__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

/* ── MAIN AREA ── */
.shell__main {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* ── FOOTER — full width, mirrors header ── */
.shell__footer {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
}

/* ── MOBILE FAB ── */
.mobile-fab {
  display: none;
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 200;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--dark);
  border: none;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: background 0.2s, transform 0.2s;
}

.mobile-fab__line {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--light);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-origin: center;
}

/* Morph to × when menu is open */
.mobile-menu-open .mobile-fab__line:first-child {
  transform: translateY(3.25px) rotate(45deg);
}
.mobile-menu-open .mobile-fab__line:last-child {
  transform: translateY(-3.25px) rotate(-45deg);
}

/* ── MOBILE OVERLAY ── */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 150;
  background: var(--light);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.mobile-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-overlay__inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5rem 2rem 8rem;
  height: 100%;
  gap: 3rem;
}

.mobile-overlay__nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-overlay__nav-link {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 10vw, 3rem);
  font-weight: 300;
  color: rgba(27, 27, 24, 0.35);
  text-decoration: none;
  letter-spacing: -0.01em;
  line-height: 1.3;
  transition: color 0.2s;
}

.mobile-overlay__nav-link:hover,
.mobile-overlay__nav-link[aria-current] {
  color: var(--dark);
}

.mobile-overlay__filters-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(27, 27, 24, 0.3);
  margin-bottom: 1rem;
}

.mobile-overlay__filters-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mobile-overlay__filter-btn {
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(27, 27, 24, 0.4);
  background: transparent;
  border: 1px solid rgba(27, 27, 24, 0.12);
  padding: 0.4rem 0.9rem;
  border-radius: 100px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.mobile-overlay__filter-btn.is-active {
  color: var(--light);
  background: var(--dark);
  border-color: var(--dark);
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  /* Switch to natural document scroll — header scrolls away with content */
  body.shell-page {
    height: auto;
    overflow: visible;
  }

  .shell__header {
    position: relative;
    width: auto;
    padding: 1.25rem;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
  }

  .shell__name br { display: none; }

  turbo-frame#content,
  .shell__content {
    overflow: visible;
    flex: none;
    min-height: 0;
  }

  .shell__main {
    overflow: visible;
  }

  .posts-scroll,
  .show-scroll {
    overflow: visible;
    padding-top: 1rem;
    padding-bottom: 2rem;
  }

  .shell__footer { padding: 1rem 1.25rem; }
  .shell__nav { display: none; }

  .mobile-fab { display: flex; }
  .mobile-overlay { display: block; }
}
