/* Shared mobile navigation and responsive fixes */

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  margin: -10px 0 -10px 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--cream, #f3f1e2);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-close {
  display: none;
}

body.nav-open {
  overflow: hidden;
}

body.nav-open .intro,
body.nav-open .wordmark,
body.nav-open .header-cta {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 760px) {
  header {
    z-index: 110;
    justify-content: space-between;
    gap: 0;
    padding-left: max(22px, env(safe-area-inset-left));
    padding-right: max(22px, env(safe-area-inset-right));
  }

  .nav-toggle {
    display: flex;
    position: relative;
    z-index: 111;
  }

  #site-nav {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    flex: none;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 0;
    padding: max(96px, env(safe-area-inset-top)) 32px max(48px, env(safe-area-inset-bottom));
    background: #14132b;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  }

  #site-nav.is-open {
    display: flex;
  }

  #site-nav.is-open .nav-close {
    display: block;
  }

  .nav-close {
    position: absolute;
    top: max(20px, env(safe-area-inset-top));
    right: max(20px, env(safe-area-inset-right));
    background: transparent;
    border: none;
    color: #f3f1e2;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 300;
    font-size: 22px;
    line-height: 1;
    padding: 10px;
    cursor: pointer;
    opacity: 0.9;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.2s ease;
  }

  .nav-close:hover,
  .nav-close:active {
    opacity: 0.45;
  }

  #site-nav a {
    display: block;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 300;
    font-size: 14px;
    letter-spacing: 0.2px;
    padding: 18px 0;
    text-align: center;
    color: #f3f1e2;
    text-decoration: none;
    border-bottom: 1px solid rgba(243, 241, 226, 0.1);
    opacity: 0.92;
    transition: opacity 0.2s ease;
  }

  #site-nav a:last-child {
    border-bottom: none;
  }

  #site-nav a:hover,
  #site-nav a:active {
    opacity: 0.55;
  }

  #site-nav a.active {
    border-bottom-color: rgba(243, 241, 226, 0.1);
    opacity: 1;
  }

  body.nav-open .nav-toggle {
    visibility: hidden;
    pointer-events: none;
  }

  .btn-join {
    font-size: 11px;
    padding: 6px 12px;
    white-space: nowrap;
  }

  .footer-cols {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-form {
    flex-direction: column;
    max-width: none;
  }

  .footer-form input {
    border-right: 1px solid rgba(243, 241, 226, 0.35);
    font-size: 16px;
  }

  .footer-form button {
    width: 100%;
  }

  .footer-form-status {
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.4;
    opacity: 0.75;
    min-height: 1.2em;
  }

  .site-footer {
    padding-bottom: max(28px, env(safe-area-inset-bottom));
  }

  /* Legal / disclosures pages */
  header + .post-body-wrap {
    padding-top: 40px;
  }

  /* Stream page */
  .stream-intro {
    padding-left: max(22px, env(safe-area-inset-left));
    padding-right: max(22px, env(safe-area-inset-right));
  }

  .stream-intro h1 {
    font-size: 44px;
  }

  .stream-intro p {
    font-size: 15px;
  }

  .episodes {
    padding-left: max(22px, env(safe-area-inset-left));
    padding-right: max(22px, env(safe-area-inset-right));
  }
}

@media (max-width: 480px) {
  .guests-grid {
    grid-template-columns: 1fr;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }
}
