/* Approved mobile introduction and selected-project composition. */
.mobile-intro-variant {
  display: none;
}

.selected-filter-toggle {
  display: none;
}

@media (max-width: 620px) {
  html[data-mobile-intro-variant] .home-page .home-hero {
    gap: 0;
    padding-bottom: 0;
  }

  html[data-mobile-intro-variant] .home-page .hero-intro {
    width: calc(100% + var(--gutter) * 2);
    margin-inline: calc(-1 * var(--gutter));
    background: #fff;
    scroll-margin-top: 72px;
  }

  html[data-mobile-intro-variant] .home-page .mobile-intro-copy {
    display: none;
  }

  html[data-mobile-intro-variant="1"] .mobile-intro-one {
    display: block;
    width: 100%;
    color: var(--ink);
    font-family: var(--body);
    letter-spacing: 0;
    text-align: left;
  }

  html[data-mobile-intro-variant="1"] .mobile-intro-one {
    padding: clamp(72px, 20vw, 100px) clamp(32px, 11.7vw, 62px) 96px;
  }

  .mobile-intro-one h1 {
    display: grid;
    gap: 26px;
    margin: 0;
    font-family: var(--body);
    font-size: clamp(33px, 10.2vw, 48px);
    font-weight: 400;
    line-height: 1.12;
    letter-spacing: 0;
  }

  .mobile-intro-one h1 span {
    display: block;
  }

  .mobile-intro-one h1 span:last-child {
    justify-self: end;
    white-space: nowrap;
  }

  .mobile-intro-one-description {
    margin: 64px 0 0;
    font-size: clamp(19px, 5.33vw, 24px);
    font-weight: 400;
    line-height: 1.4;
  }

  .mobile-intro-one-description strong {
    font-weight: 500;
  }

  .mobile-intro-one-about {
    display: flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 44px;
    margin: 64px auto 0;
    color: var(--ink);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.3;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 8px;
  }

  html[data-mobile-intro-variant="1"] .home-page #selected {
    padding-top: 32px;
  }

  .mobile-intro-variant a:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 5px;
  }

  .home-page #selected {
    --project-edge: clamp(8px, 2.5vw, 15px);
    width: calc(100% + var(--gutter) * 2);
    margin-inline: calc(-1 * var(--gutter));
    padding-top: 32px;
    background: #fff;
  }

  .home-page #selected .selected-top {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 52px;
    margin-bottom: 16px;
    padding-inline: var(--project-edge);
    border-bottom: 1px solid var(--line);
  }

  .home-page #selected .soft-label,
  .home-page #selected .selected-filter-toggle {
    margin: 0;
    color: var(--ink);
    font-family: var(--body);
    font-size: clamp(12px, 3.3vw, 16px);
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: 0;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .home-page #selected .selected-filter-toggle {
    display: inline-flex;
    font-size: clamp(11px, calc(3.3vw - 1px), 15px);
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #686560;
    letter-spacing: 0.06em;
    cursor: pointer;
  }

  .home-page #selected .selected-filter-toggle svg {
    width: 8px;
    height: 5px;
    fill: currentColor;
    color: #aaa9a4;
    flex-shrink: 0;
  }

  .home-page #selected .selected-filter-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
  }

  .home-page #selected .selected-filter-toggle:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
  }

  .home-page #selected .project-filter-bar {
    display: none;
    position: absolute;
    top: 100%;
    right: var(--project-edge);
    width: max-content;
    min-width: 148px;
    padding: 6px 0 8px 16px;
    gap: 0;
    border: 0;
    background: var(--paper) url("assets/textures/paper-grain.png") repeat;
    box-shadow: none;
  }

  .home-page #selected .selected-top.is-filter-open .project-filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .home-page #selected .project-filter-button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    min-height: 44px;
    padding: 10px 15px 10px 0;
    border: 0;
    font-family: var(--body);
    font-size: clamp(11px, calc(3.3vw - 1px), 15px);
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: 0.06em;
    text-align: right;
    text-transform: uppercase;
    color: #686560;
    background: transparent;
  }

  .home-page #selected .project-filter-button:is(:hover, .active) {
    background: transparent;
    text-shadow: none;
    color: #686560;
  }

  .home-page #selected .project-filter-button.active {
    font-weight: 500;
  }

  .home-page #selected .project-filter-button:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: -2px;
  }

  .home-page #selected .selected-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
    padding-inline: var(--project-edge);
  }

  .home-page #selected .work-link.is-hidden {
    display: none;
  }

  /* Large square crops match the user's selected mobile reference. */
  .home-page #selected .work-link .work-card {
    display: block;
    aspect-ratio: 1 / 1;
    border-radius: 0;
  }

  .home-page #selected .work-card img,
  .home-page #selected .work-card video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .home-page #selected .project-caption {
    gap: 4px;
    margin-top: 10px;
    overflow: visible;
  }

  .home-page #selected .project-caption h3 {
    display: flex;
    align-items: baseline;
    gap: 5px;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: 0;
    text-transform: uppercase;
  }

  .home-page #selected .project-caption h3::before {
    content: "";
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    align-self: center;
    border-radius: 50%;
    background: currentColor;
  }

  .home-page #selected .project-caption p {
    color: var(--ink);
    font-size: 13px;
    font-style: italic;
    line-height: 1.4;
    text-align: left;
    text-transform: none;
    white-space: normal;
  }
}
