/*
 * Phone nav shared by every case study. It copies the Scout case study: a fixed top bar with the
 * Back link and a button showing the current section, which opens the list of sections.
 * Scout has its own markup and styles for this. case-study-shared.js adds the button and the
 * cs-* classes to the other pages, so the desktop side menu stays as it is.
 */

.cs-toggle {
  display: none;
}

.cs-links a.cs-extra {
  display: none !important;
}

@media (max-width: 960px) {
  html {
    scroll-padding-top: 72px;
  }

  section[id] {
    scroll-margin-top: 72px;
  }

  body {
    margin-left: 0 !important;
    padding-top: 56px !important;
  }

  .layout {
    display: block !important;
  }

  .main {
    width: 100% !important;
    margin-left: 0 !important;
  }

  .cs-nav.cs-nav {
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: auto !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px 12px !important;
    padding: 12px 16px !important;
    overflow: visible !important;
    border-bottom: 1px solid #e5e2dc !important;
    background: #fff !important;
    z-index: 100 !important;
  }

  .cs-nav .cs-back {
    margin-bottom: 0 !important;
    flex-shrink: 0 !important;
    align-self: center !important;
  }

  .cs-nav .cs-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: "Geist Mono", ui-monospace, monospace;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a8a8a;
    background: transparent;
    border: 1px solid #e5e2dc;
    border-radius: 999px;
    padding: 7px 12px;
    cursor: pointer;
  }

  .cs-nav .cs-toggle-icon {
    width: 14px;
    height: 10px;
    position: relative;
  }

  .cs-nav .cs-toggle-icon::before,
  .cs-nav .cs-toggle-icon::after,
  .cs-nav .cs-toggle-icon span {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 1.6px;
    background: currentColor;
    border-radius: 2px;
  }

  .cs-nav .cs-toggle-icon::before {
    top: 0;
  }

  .cs-nav .cs-toggle-icon span {
    top: 4px;
  }

  .cs-nav .cs-toggle-icon::after {
    top: 8px;
  }

  .cs-nav .cs-links {
    display: none !important;
    flex: 0 0 100% !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    padding: 8px 0 2px !important;
    gap: 6px !important;
    width: 100% !important;
    overflow: visible !important;
  }

  .cs-nav.is-open .cs-links {
    display: flex !important;
  }

  .cs-nav .cs-links a {
    display: block !important;
    width: 100% !important;
    padding: 8px 0 !important;
    font-family: "Geist Mono", ui-monospace, monospace !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    white-space: nowrap;
    color: #8a8a8a !important;
    background: none !important;
    text-align: left !important;
  }

  .cs-nav .cs-links a.active,
  .cs-nav .cs-links a.newly-active,
  .cs-nav .cs-links a:hover {
    color: #111110 !important;
  }

  .cs-nav .cs-links a.active,
  .cs-nav .cs-links a.newly-active {
    font-weight: 600 !important;
  }

  /* Links that sit beside the Back link on desktop (such as "View live demo") move into the list */
  .cs-nav > a:not(.cs-back) {
    display: none !important;
  }

  .cs-nav .cs-links a.cs-extra {
    display: block !important;
  }

  /* "Get in touch": at least a 44px tap target */
  .case-close-cta,
  .reflection-cta,
  .contact-cta {
    min-height: 44px;
  }

  .more-projects {
    margin-left: 0 !important;
    width: 100% !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}
